diff --git a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt index 449f0ee3f..733c74f38 100644 --- a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt +++ b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt @@ -66,7 +66,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -82,7 +82,7 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rustbuffer_free(buf, status) + UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free(buf, status) } } @@ -93,40 +93,6 @@ open class RustBuffer : Structure() { } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -346,23 +312,35 @@ internal inline fun uniffiTraitInterfaceCallWithError( } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -385,5223 +363,3555 @@ private fun findLibraryName(componentName: String): String { return "iota_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // 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 +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun uniffi_iota_sdk_ffi_checksum_func_base64_decode( +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "iota_sdk_ffi")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun uniffi_iota_sdk_ffi_checksum_func_base64_decode( ): Short -fun uniffi_iota_sdk_ffi_checksum_func_base64_encode( +external fun uniffi_iota_sdk_ffi_checksum_func_base64_encode( ): Short -fun uniffi_iota_sdk_ffi_checksum_func_hex_decode( +external fun uniffi_iota_sdk_ffi_checksum_func_hex_decode( ): Short -fun uniffi_iota_sdk_ffi_checksum_func_hex_encode( +external fun uniffi_iota_sdk_ffi_checksum_func_hex_encode( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_address_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_address_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_address_to_hex( +external fun uniffi_iota_sdk_ffi_checksum_method_address_to_hex( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result( +external fun uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded( +external fun uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded( +external fun uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments( +external fun uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages( +external fun uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction( +external fun uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_coin_balance( +external fun uniffi_iota_sdk_ffi_checksum_method_coin_balance( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_coin_coin_type( +external fun uniffi_iota_sdk_ffi_checksum_method_coin_coin_type( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_coin_id( +external fun uniffi_iota_sdk_ffi_checksum_method_coin_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index( +external fun uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions( +external fun uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions( +external fun uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_digest_to_base58( +external fun uniffi_iota_sdk_ffi_checksum_method_digest_to_base58( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user( +external fun uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key( +external fun uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations( +external fun uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request( +external fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait( +external fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status( +external fun uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_data( +external fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_data( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id( +external fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type( +external fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner( +external fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_version( +external fun uniffi_iota_sdk_ffi_checksum_method_genesisobject_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events( +external fun uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects( +external fun uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects( +external fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_identifier_as_str( +external fun uniffi_iota_sdk_ffi_checksum_method_identifier_as_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements( +external fun uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag( +external fun uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin( +external fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge( +external fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movecall_arguments( +external fun uniffi_iota_sdk_ffi_checksum_method_movecall_arguments( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movecall_function( +external fun uniffi_iota_sdk_ffi_checksum_method_movecall_function( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movecall_module( +external fun uniffi_iota_sdk_ffi_checksum_method_movecall_module( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movecall_package( +external fun uniffi_iota_sdk_ffi_checksum_method_movecall_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments( +external fun uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_name( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_name( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility( +external fun uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movepackage_id( +external fun uniffi_iota_sdk_ffi_checksum_method_movepackage_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table( +external fun uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movepackage_modules( +external fun uniffi_iota_sdk_ffi_checksum_method_movepackage_modules( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table( +external fun uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_movepackage_version( +external fun uniffi_iota_sdk_ffi_checksum_method_movepackage_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_format( +external fun uniffi_iota_sdk_ffi_checksum_method_name_format( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_is_sln( +external fun uniffi_iota_sdk_ffi_checksum_method_name_is_sln( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_is_subname( +external fun uniffi_iota_sdk_ffi_checksum_method_name_is_subname( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_label( +external fun uniffi_iota_sdk_ffi_checksum_method_name_label( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_labels( +external fun uniffi_iota_sdk_ffi_checksum_method_name_labels( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_num_labels( +external fun uniffi_iota_sdk_ffi_checksum_method_name_num_labels( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_name_parent( +external fun uniffi_iota_sdk_ffi_checksum_method_name_parent( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms( +external fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_id( +external fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_name( +external fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_name( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str( +external fun uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_as_package( +external fun uniffi_iota_sdk_ffi_checksum_method_object_as_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_as_struct( +external fun uniffi_iota_sdk_ffi_checksum_method_object_as_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_data( +external fun uniffi_iota_sdk_ffi_checksum_method_object_data( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_object_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_object_id( +external fun uniffi_iota_sdk_ffi_checksum_method_object_object_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_object_type( +external fun uniffi_iota_sdk_ffi_checksum_method_object_object_type( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_owner( +external fun uniffi_iota_sdk_ffi_checksum_method_object_owner( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction( +external fun uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate( +external fun uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_object_version( +external fun uniffi_iota_sdk_ffi_checksum_method_object_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package( +external fun uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct( +external fun uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id( +external fun uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_address( +external fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex( +external fun uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct( +external fun uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package( +external fun uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct( +external fun uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_address( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_object( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_object( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_shared( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_shared( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_is_address( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_is_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_is_object( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_is_object( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_owner_is_shared( +external fun uniffi_iota_sdk_ffi_checksum_method_owner_is_shared( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands( +external fun uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs( +external fun uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_publish_dependencies( +external fun uniffi_iota_sdk_ffi_checksum_method_publish_dependencies( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_publish_modules( +external fun uniffi_iota_sdk_ffi_checksum_method_publish_modules( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user( +external fun uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts( +external fun uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin( +external fun uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_structtag_address( +external fun uniffi_iota_sdk_ffi_checksum_method_structtag_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type( +external fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies( +external fun uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_systempackage_modules( +external fun uniffi_iota_sdk_ffi_checksum_method_systempackage_modules( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_systempackage_version( +external fun uniffi_iota_sdk_ffi_checksum_method_systempackage_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_expiration( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_expiration( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_kind( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_kind( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_sender( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_sender( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1( +external fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1( +external fun uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transactionevents_events( +external fun uniffi_iota_sdk_ffi_checksum_method_transactionevents_events( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transferobjects_address( +external fun uniffi_iota_sdk_ffi_checksum_method_transferobjects_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects( +external fun uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_address( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector( +external fun uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies( +external fun uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_upgrade_modules( +external fun uniffi_iota_sdk_ffi_checksum_method_upgrade_modules( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_upgrade_package( +external fun uniffi_iota_sdk_ffi_checksum_method_upgrade_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket( +external fun uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier( +external fun uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes( +external fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id( +external fun uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_versionassignment_version( +external fun uniffi_iota_sdk_ffi_checksum_method_versionassignment_version( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier( +external fun uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks( +external fun uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex( +external fun uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_address_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_address_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas( +external fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input( +external fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result( +external fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result( +external fun uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10( +external fun uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object( +external fun uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade( +external fun uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions( +external fun uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58( +external fun uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_digest_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_digest_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create( +external fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire( +external fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch( +external fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2( +external fun uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_identifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_identifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned( +external fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure( +external fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving( +external fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared( +external fun uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_movecall_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_movecall_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_name_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_name_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_object_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_object_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct( +external fun uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address( +external fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable( +external fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object( +external fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared( +external fun uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector( +external fun uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_publish_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_publish_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem( +external fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin( +external fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin( +external fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota( +external fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transaction_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transaction_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector( +external fun uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary( +external fun uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet( +external fun uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet( ): Short -fun ffi_iota_sdk_ffi_uniffi_contract_version( +external fun ffi_iota_sdk_ffi_uniffi_contract_version( ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "iota_sdk_ffi" - // 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 - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } - - // The Cleaner for the whole library - internal val CLEANER: UniffiCleaner by lazy { - UniffiCleaner.create() - } +internal object UniffiLib { + + // The Cleaner for the whole library + internal val CLEANER: UniffiCleaner by lazy { + UniffiCleaner.create() } + - // FFI functions - fun uniffi_iota_sdk_ffi_fn_clone_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "iota_sdk_ffi")) + + } + external fun uniffi_iota_sdk_ffi_fn_clone_address(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_address(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_address_from_hex(`hex`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_address_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_address_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_address_from_hex(`hex`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_address_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_address_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_address_to_hex(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_address_to_hex(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_argument(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_argument(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_argument(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_argument(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_input(`input`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result(`commandIndex`: Short,`subresultIndex`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_result(`result`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result(`ptr`: Pointer,`ix`: Short,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_input(`input`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result(`commandIndex`: Short,`subresultIndex`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_argument_new_result(`result`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result(`ptr`: Long,`ix`: Short,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_bls12381privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_bls12381privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary(`ptr`: Pointer,`summary`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_bls12381publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_bls12381publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary(`ptr`: Long,`summary`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_bls12381publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_bls12381publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_bls12381signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_bls12381signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_bls12381signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_bls12381signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new(`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new(`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_bn254fieldelement(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_bn254fieldelement(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_cancelledtransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_cancelledtransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new(`digest`: Pointer,`versionAssignments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new(`digest`: Long,`versionAssignments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_changeepoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_changeepoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_changeepoch(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_changeepoch(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new(`epoch`: Long,`protocolVersion`: Long,`storageCharge`: Long,`computationCharge`: Long,`storageRebate`: Long,`nonRefundableStorageFee`: Long,`epochStartTimestampMs`: Long,`systemPackages`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new(`epoch`: Long,`protocolVersion`: Long,`storageCharge`: Long,`computationCharge`: Long,`storageRebate`: Long,`nonRefundableStorageFee`: Long,`epochStartTimestampMs`: Long,`systemPackages`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_changeepochv2(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_changeepochv2(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_changeepochv2(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_changeepochv2(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new(`epoch`: Long,`protocolVersion`: Long,`storageCharge`: Long,`computationCharge`: Long,`computationChargeBurned`: Long,`storageRebate`: Long,`nonRefundableStorageFee`: Long,`epochStartTimestampMs`: Long,`systemPackages`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new(`epoch`: Long,`protocolVersion`: Long,`storageCharge`: Long,`computationCharge`: Long,`computationChargeBurned`: Long,`storageRebate`: Long,`nonRefundableStorageFee`: Long,`epochStartTimestampMs`: Long,`systemPackages`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_checkpointcommitment(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_checkpointcommitment(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_checkpointcontents(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_checkpointcontents(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_checkpointcontents(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_checkpointcontents(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new(`transactionInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new(`transactionInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_checkpointsummary(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_checkpointsummary(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_checkpointsummary(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_checkpointsummary(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new(`epoch`: Long,`sequenceNumber`: Long,`networkTotalTransactions`: Long,`contentDigest`: Pointer,`previousDigest`: RustBuffer.ByValue,`epochRollingGasCostSummary`: RustBuffer.ByValue,`timestampMs`: Long,`checkpointCommitments`: RustBuffer.ByValue,`endOfEpochData`: RustBuffer.ByValue,`versionSpecificData`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new(`epoch`: Long,`sequenceNumber`: Long,`networkTotalTransactions`: Long,`contentDigest`: Long,`previousDigest`: RustBuffer.ByValue,`epochRollingGasCostSummary`: RustBuffer.ByValue,`timestampMs`: Long,`checkpointCommitments`: RustBuffer.ByValue,`endOfEpochData`: RustBuffer.ByValue,`versionSpecificData`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new(`transaction`: Pointer,`effects`: Pointer,`signatures`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new(`transaction`: Long,`effects`: Long,`signatures`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_circomg1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_circomg1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_circomg1(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_circomg1(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_circomg1_new(`el0`: Pointer,`el1`: Pointer,`el2`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_circomg2(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_circomg2(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_circomg1_new(`el0`: Long,`el1`: Long,`el2`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_circomg2(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_circomg2(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_circomg2_new(`el00`: Pointer,`el01`: Pointer,`el10`: Pointer,`el11`: Pointer,`el20`: Pointer,`el21`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_coin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_coin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_circomg2_new(`el00`: Long,`el01`: Long,`el10`: Long,`el11`: Long,`el20`: Long,`el21`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_coin(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_coin(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object(`object`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_coin_balance(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_method_coin_coin_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_coin_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_command(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_command(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object(`object`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_coin_balance(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_coin_coin_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_coin_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_command(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_command(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector(`makeMoveVector`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins(`mergeCoins`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call(`moveCall`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_publish(`publish`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins(`splitCoins`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects(`transferObjects`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade(`upgrade`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector(`makeMoveVector`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins(`mergeCoins`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call(`moveCall`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_publish(`publish`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins(`splitCoins`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects(`transferObjects`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade(`upgrade`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new(`epoch`: Long,`round`: Long,`subDagIndex`: RustBuffer.ByValue,`commitTimestampMs`: Long,`consensusCommitDigest`: Pointer,`consensusDeterminedVersionAssignments`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new(`epoch`: Long,`round`: Long,`subDagIndex`: RustBuffer.ByValue,`commitTimestampMs`: Long,`consensusCommitDigest`: Long,`consensusDeterminedVersionAssignments`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions(`cancelledTransactions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions(`cancelledTransactions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_digest(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_digest(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58(`base58`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_digest_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_digest_to_base58(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58(`base58`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_digest_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_digest_to_base58(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_digest_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_digest_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ed25519privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_digest_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ed25519privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_ed25519publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ed25519publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_ed25519publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ed25519publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_ed25519signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ed25519signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_ed25519signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ed25519signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_ed25519verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ed25519verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_ed25519verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ed25519verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new(`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new(`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch(`tx`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2(`tx`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch(`tx`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2(`tx`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new(`key`: Pointer,`observations`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new(`key`: Long,`observations`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point(`package`: Pointer,`module`: RustBuffer.ByValue,`function`: RustBuffer.ByValue,`typeArguments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point(`package`: Long,`module`: RustBuffer.ByValue,`function`: RustBuffer.ByValue,`typeArguments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_executiontimeobservations(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1(`executionTimeObservations`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_faucetclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_faucetclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1(`executionTimeObservations`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_faucetclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_faucetclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new(`faucetUrl`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request(`ptr`: Pointer,`address`: Pointer, -): Long -fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait(`ptr`: Pointer,`address`: Pointer, -): Long -fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status(`ptr`: Pointer,`id`: RustBuffer.ByValue, -): Long -fun uniffi_iota_sdk_ffi_fn_clone_genesisobject(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_genesisobject(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new(`faucetUrl`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request(`ptr`: Long,`address`: Long, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait(`ptr`: Long,`address`: Long, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status(`ptr`: Long,`id`: RustBuffer.ByValue, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_genesisobject(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_genesisobject(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new(`data`: Pointer,`owner`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesisobject_data(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesisobject_owner(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesisobject_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_clone_genesistransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_genesistransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new(`data`: Long,`owner`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesisobject_data(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesisobject_owner(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesisobject_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_genesistransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_genesistransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new(`objects`: RustBuffer.ByValue,`events`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_genesistransaction_events(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new(`objects`: RustBuffer.ByValue,`events`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_genesistransaction_events(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_graphqlclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_graphqlclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_graphqlclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_graphqlclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new(`server`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators(`ptr`: Pointer,`epoch`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new(`server`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet(uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance(`ptr`: Pointer,`address`: Pointer,`coinType`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet(uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id(`ptr`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet(uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint(`ptr`: Pointer,`digest`: RustBuffer.ByValue,`seqNum`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators(`ptr`: Long,`epoch`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints(`ptr`: Pointer,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance(`ptr`: Long,`address`: Long,`coinType`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata(`ptr`: Pointer,`coinType`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id(`ptr`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins(`ptr`: Pointer,`owner`: Pointer,`paginationFilter`: RustBuffer.ByValue,`coinType`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint(`ptr`: Long,`digest`: RustBuffer.ByValue,`seqNum`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx(`ptr`: Pointer,`tx`: Pointer,`skipChecks`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints(`ptr`: Long,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind(`ptr`: Pointer,`txKind`: Pointer,`txMeta`: RustBuffer.ByValue,`skipChecks`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata(`ptr`: Long,`coinType`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field(`ptr`: Pointer,`address`: Pointer,`typeTag`: Pointer,`name`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins(`ptr`: Long,`owner`: Long,`paginationFilter`: RustBuffer.ByValue,`coinType`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields(`ptr`: Pointer,`address`: Pointer,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx(`ptr`: Long,`tx`: Long,`skipChecks`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field(`ptr`: Pointer,`address`: Pointer,`typeTag`: Pointer,`name`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind(`ptr`: Long,`txKind`: Long,`txMeta`: RustBuffer.ByValue,`skipChecks`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch(`ptr`: Pointer,`epoch`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field(`ptr`: Long,`address`: Long,`typeTag`: Long,`name`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints(`ptr`: Pointer,`epoch`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields(`ptr`: Long,`address`: Long,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks(`ptr`: Pointer,`epoch`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field(`ptr`: Long,`address`: Long,`typeTag`: Long,`name`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_events(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch(`ptr`: Long,`epoch`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx(`ptr`: Pointer,`signatures`: RustBuffer.ByValue,`tx`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints(`ptr`: Long,`epoch`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name(`ptr`: Pointer,`address`: Pointer,`format`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks(`ptr`: Long,`epoch`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup(`ptr`: Pointer,`name`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_events(`ptr`: Long,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations(`ptr`: Pointer,`address`: Pointer,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx(`ptr`: Long,`signatures`: RustBuffer.ByValue,`tx`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number(`ptr`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name(`ptr`: Long,`address`: Long,`format`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size(`ptr`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup(`ptr`: Long,`name`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents(`ptr`: Pointer,`objectId`: Pointer,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations(`ptr`: Long,`address`: Long,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs(`ptr`: Pointer,`objectId`: Pointer,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number(`ptr`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function(`ptr`: Pointer,`package`: Pointer,`module`: RustBuffer.ByValue,`function`: RustBuffer.ByValue,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size(`ptr`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module(`ptr`: Pointer,`package`: Pointer,`module`: RustBuffer.ByValue,`version`: RustBuffer.ByValue,`paginationFilterEnums`: RustBuffer.ByValue,`paginationFilterFriends`: RustBuffer.ByValue,`paginationFilterFunctions`: RustBuffer.ByValue,`paginationFilterStructs`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents(`ptr`: Long,`objectId`: Long,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_object(`ptr`: Pointer,`objectId`: Pointer,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs(`ptr`: Long,`objectId`: Long,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs(`ptr`: Pointer,`objectId`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function(`ptr`: Long,`package`: Long,`module`: RustBuffer.ByValue,`function`: RustBuffer.ByValue,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module(`ptr`: Long,`package`: Long,`module`: RustBuffer.ByValue,`version`: RustBuffer.ByValue,`paginationFilterEnums`: RustBuffer.ByValue,`paginationFilterFriends`: RustBuffer.ByValue,`paginationFilterFunctions`: RustBuffer.ByValue,`paginationFilterStructs`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package(`ptr`: Pointer,`address`: Pointer,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_object(`ptr`: Long,`objectId`: Long,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest(`ptr`: Pointer,`address`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs(`ptr`: Long,`objectId`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions(`ptr`: Pointer,`address`: Pointer,`afterVersion`: RustBuffer.ByValue,`beforeVersion`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects(`ptr`: Long,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages(`ptr`: Pointer,`afterCheckpoint`: RustBuffer.ByValue,`beforeCheckpoint`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package(`ptr`: Long,`address`: Long,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config(`ptr`: Pointer,`version`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest(`ptr`: Long,`address`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price(`ptr`: Pointer,`epoch`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions(`ptr`: Long,`address`: Long,`afterVersion`: RustBuffer.ByValue,`beforeVersion`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query(`ptr`: Pointer,`query`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages(`ptr`: Long,`afterCheckpoint`: RustBuffer.ByValue,`beforeCheckpoint`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config(`ptr`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config(`ptr`: Long,`version`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server(`ptr`: Pointer,`server`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price(`ptr`: Long,`epoch`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply(`ptr`: Pointer,`coinType`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query(`ptr`: Long,`query`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks(`ptr`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config(`ptr`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest(`ptr`: Pointer,`digest`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server(`ptr`: Long,`server`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num(`ptr`: Pointer,`seqNum`: Long, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply(`ptr`: Long,`coinType`: RustBuffer.ByValue, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction(`ptr`: Pointer,`digest`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks(`ptr`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects(`ptr`: Pointer,`digest`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest(`ptr`: Long,`digest`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects(`ptr`: Pointer,`digest`: Pointer, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num(`ptr`: Long,`seqNum`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction(`ptr`: Long,`digest`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects(`ptr`: Long,`digest`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects(`ptr`: Long,`digest`: Long, ): Long -fun uniffi_iota_sdk_ffi_fn_clone_identifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_identifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions(`ptr`: Long,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects(`ptr`: Long,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects(`ptr`: Long,`filter`: RustBuffer.ByValue,`paginationFilter`: RustBuffer.ByValue, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_identifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_identifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_identifier_new(`identifier`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_identifier_as_str(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_identifier_new(`identifier`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_identifier_as_str(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_input(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_clone_input(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_input(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_free_input(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned(`objectRef`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_input_new_pure(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving(`objectRef`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_input_new_shared(`objectId`: Pointer,`initialSharedVersion`: Long,`mutable`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_makemovevector(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_makemovevector(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned(`objectRef`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_input_new_pure(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving(`objectRef`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_input_new_shared(`objectId`: Long,`initialSharedVersion`: Long,`mutable`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_makemovevector(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_makemovevector(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new(`typeTag`: RustBuffer.ByValue,`elements`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_makemovevector_elements(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new(`typeTag`: RustBuffer.ByValue,`elements`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_makemovevector_elements(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_mergecoins(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_mergecoins(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_mergecoins(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_mergecoins(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new(`coin`: Pointer,`coinsToMerge`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_mergecoins_coin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new(`coin`: Long,`coinsToMerge`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_mergecoins_coin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_movecall(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_movecall(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_movecall(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_movecall(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_movecall_new(`package`: Pointer,`module`: Pointer,`function`: Pointer,`typeArguments`: RustBuffer.ByValue,`arguments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movecall_arguments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_movecall_new(`package`: Long,`module`: Long,`function`: Long,`typeArguments`: RustBuffer.ByValue,`arguments`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movecall_arguments(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movecall_function(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movecall_module(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movecall_package(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movecall_function(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movecall_module(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movecall_package(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_movefunction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_movefunction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_movefunction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_movefunction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_movefunction_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movefunction_parameters(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_parameters(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movefunction_return_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_return_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movefunction_visibility(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_visibility(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_movepackage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_movepackage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_movepackage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_movepackage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_movepackage_new(`id`: Pointer,`version`: Long,`modules`: RustBuffer.ByValue,`typeOriginTable`: RustBuffer.ByValue,`linkageTable`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movepackage_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_movepackage_new(`id`: Long,`version`: Long,`modules`: RustBuffer.ByValue,`typeOriginTable`: RustBuffer.ByValue,`linkageTable`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movepackage_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movepackage_modules(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movepackage_modules(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_movepackage_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_movepackage_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new(`committee`: Pointer,`signatures`: RustBuffer.ByValue,`bitmap`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new(`committee`: Long,`signatures`: RustBuffer.ByValue,`bitmap`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_multisigaggregator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigaggregator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigaggregator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigaggregator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message(`committee`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction(`committee`: Pointer,`transaction`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature(`ptr`: Pointer,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier(`ptr`: Pointer,`verifier`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_multisigcommittee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigcommittee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message(`committee`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction(`committee`: Long,`transaction`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature(`ptr`: Long,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier(`ptr`: Long,`verifier`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_multisigcommittee(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigcommittee(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new(`members`: RustBuffer.ByValue,`threshold`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new(`members`: RustBuffer.ByValue,`threshold`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun uniffi_iota_sdk_ffi_fn_clone_multisigmember(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigmember(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigmember(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigmember(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new(`publicKey`: Pointer,`weight`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmember_weight(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new(`publicKey`: Long,`weight`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmember_weight(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigmembersignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigmembersignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_multisigverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_multisigverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_multisigverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_multisigverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier(`ptr`: Pointer,`zkloginVerifier`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier(`ptr`: Long,`zkloginVerifier`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_name(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_name(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_name_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_name_format(`ptr`: Pointer,`format`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_name_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_name_format(`ptr`: Long,`format`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_name_is_sln(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_is_sln(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_name_is_subname(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_is_subname(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_name_label(`ptr`: Pointer,`index`: Int,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_label(`ptr`: Long,`index`: Int,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_name_labels(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_labels(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_name_num_labels(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_num_labels(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun uniffi_iota_sdk_ffi_fn_method_name_parent(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_name_parent(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_nameregistration(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_nameregistration(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_nameregistration(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_nameregistration(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new(`id`: Pointer,`name`: Pointer,`nameStr`: RustBuffer.ByValue,`expirationTimestampMs`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_method_nameregistration_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_nameregistration_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new(`id`: Long,`name`: Long,`nameStr`: RustBuffer.ByValue,`expirationTimestampMs`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_nameregistration_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_nameregistration_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_object(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_object(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_object(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_object(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_object_new(`data`: Pointer,`owner`: Pointer,`previousTransaction`: Pointer,`storageRebate`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_as_package(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_as_package_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_object_new(`data`: Long,`owner`: Long,`previousTransaction`: Long,`storageRebate`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_as_package(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_as_package_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_object_as_struct(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_object_as_struct(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_object_data(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_object_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_object_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_owner(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_previous_transaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_object_storage_rebate(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_method_object_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_clone_objectdata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_objectdata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_object_data(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_object_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_object_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_owner(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_previous_transaction(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_storage_rebate(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_object_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_objectdata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_objectdata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package(`movePackage`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct(`moveStruct`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package(`movePackage`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct(`moveStruct`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_objectdata_is_package(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objectdata_is_package(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_objectid(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_objectid(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_objectid(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_objectid(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id(`digest`: Pointer,`count`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex(`hex`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id(`ptr`: Pointer,`keyTypeTag`: Pointer,`keyBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objectid_to_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id(`digest`: Long,`count`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex(`hex`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id(`ptr`: Long,`keyTypeTag`: Long,`keyBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objectid_to_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_objectid_to_hex(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objectid_to_hex(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_clone_objecttype(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_objecttype(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_objecttype(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_objecttype(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct(`structTag`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_objecttype_is_package(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objecttype_is_package(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_owner(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_owner(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_owner(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_owner(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_address(`address`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_object(`id`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared(`version`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_owner_as_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_address(`address`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_object(`id`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared(`version`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_owner_as_object(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_object(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_owner_as_shared(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_shared(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_owner_is_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_is_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_owner_is_immutable(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_is_immutable(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_owner_is_object(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_is_object(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_owner_is_shared(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_is_shared(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_ptbargument(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_ptbargument(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_ptbargument(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_ptbargument(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address(`address`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest(`digest`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id(`id`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving(`id`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res(`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared(`id`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut(`id`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string(`string`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16(`value`: Short,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32(`value`: Int,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64(`value`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8(`value`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector(`vec`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address(`address`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest(`digest`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id(`id`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving(`id`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res(`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared(`id`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut(`id`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string(`string`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16(`value`: Short,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32(`value`: Int,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64(`value`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8(`value`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector(`vec`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_passkeypublickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_passkeypublickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_passkeypublickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_passkeypublickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new(`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_passkeyverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_passkeyverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new(`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_passkeyverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_passkeyverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`authenticator`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`authenticator`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_personalmessage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_personalmessage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_personalmessage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_personalmessage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new(`messageBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new(`messageBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_programmabletransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_programmabletransaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_programmabletransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_programmabletransaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new(`inputs`: RustBuffer.ByValue,`commands`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new(`inputs`: RustBuffer.ByValue,`commands`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_publish(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_publish(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_publish(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_publish(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_publish_new(`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_publish_dependencies(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_publish_new(`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_publish_dependencies(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_publish_modules(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_publish_modules(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256k1publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256k1publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_secp256k1signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256k1signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256k1signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256k1signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256k1verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256k1verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new(`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new(`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256r1publickey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256r1publickey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_secp256r1signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256r1signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256r1signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256r1signature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256r1verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256r1verifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new(`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new(`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_simplekeypair(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_simplekeypair(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_simplekeypair(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_simplekeypair(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519(`keypair`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1(`keypair`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1(`keypair`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32(`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519(`keypair`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1(`keypair`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1(`keypair`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_simplesignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_simplesignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_simplesignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_simplesignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519(`signature`: Pointer,`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1(`signature`: Pointer,`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1(`signature`: Pointer,`publicKey`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519(`signature`: Long,`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1(`signature`: Long,`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1(`signature`: Long,`publicKey`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_simpleverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_simpleverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_simpleverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_simpleverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem(`s`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_splitcoins(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_splitcoins(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_splitcoins(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_splitcoins(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new(`coin`: Pointer,`amounts`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new(`coin`: Long,`amounts`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_splitcoins_coin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_structtag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_structtag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_splitcoins_coin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_structtag(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_structtag(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_coin(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new(`address`: Pointer,`module`: Pointer,`name`: Pointer,`typeParams`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_structtag_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_structtag_coin(`typeTag`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new(`address`: Long,`module`: Long,`name`: Long,`typeParams`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_structtag_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_systempackage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_systempackage(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_systempackage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_systempackage(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_systempackage_new(`version`: Long,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_systempackage_new(`version`: Long,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_systempackage_modules(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_systempackage_modules(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_systempackage_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_systempackage_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_transaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_clone_transaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transaction(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_free_transaction(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transaction_new(`kind`: Pointer,`sender`: Pointer,`gasPayment`: RustBuffer.ByValue,`expiration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transaction_new(`kind`: Long,`sender`: Long,`gasPayment`: RustBuffer.ByValue,`expiration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_transaction_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transaction_expiration(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_transaction_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transaction_expiration(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_transaction_kind(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transaction_sender(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_transaction_kind(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transaction_sender(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_transactionbuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transactionbuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_transactionbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_transactionbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init(`sender`: Pointer,`client`: Pointer, -): Long -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run(`ptr`: Pointer,`skipChecks`: Byte, -): Long -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute(`ptr`: Pointer,`keypair`: Pointer,`waitForFinalization`: Byte, -): Long -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor(`ptr`: Pointer,`keypair`: Pointer,`sponsorKeypair`: Pointer,`waitForFinalization`: Byte, -): Long -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration(`ptr`: Pointer,`epoch`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish(`ptr`: Pointer, -): Long -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas(`ptr`: Pointer,`objectId`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget(`ptr`: Pointer,`budget`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price(`ptr`: Pointer,`price`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor(`ptr`: Pointer,`url`: RustBuffer.ByValue,`duration`: RustBuffer.ByValue,`headers`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec(`ptr`: Pointer,`elements`: RustBuffer.ByValue,`typeTag`: Pointer,`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins(`ptr`: Pointer,`coin`: Pointer,`coinsToMerge`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call(`ptr`: Pointer,`package`: Pointer,`module`: Pointer,`function`: Pointer,`arguments`: RustBuffer.ByValue,`typeArgs`: RustBuffer.ByValue,`names`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish(`ptr`: Pointer,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`upgradeCapName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins(`ptr`: Pointer,`coins`: RustBuffer.ByValue,`recipient`: Pointer,`amount`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota(`ptr`: Pointer,`recipient`: Pointer,`amount`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins(`ptr`: Pointer,`coin`: Pointer,`amounts`: RustBuffer.ByValue,`names`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor(`ptr`: Pointer,`sponsor`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects(`ptr`: Pointer,`recipient`: Pointer,`objects`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade(`ptr`: Pointer,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`package`: Pointer,`ticket`: Pointer,`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_transactioneffects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transactioneffects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init(`sender`: Long,`client`: Long, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run(`ptr`: Long,`skipChecks`: Byte, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute(`ptr`: Long,`keypair`: Long,`waitForFinalization`: Byte, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor(`ptr`: Long,`keypair`: Long,`sponsorKeypair`: Long,`waitForFinalization`: Byte, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration(`ptr`: Long,`epoch`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish(`ptr`: Long, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas(`ptr`: Long,`objectId`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget(`ptr`: Long,`budget`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price(`ptr`: Long,`price`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor(`ptr`: Long,`url`: RustBuffer.ByValue,`duration`: RustBuffer.ByValue,`headers`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec(`ptr`: Long,`elements`: RustBuffer.ByValue,`typeTag`: Long,`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins(`ptr`: Long,`coin`: Long,`coinsToMerge`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call(`ptr`: Long,`package`: Long,`module`: Long,`function`: Long,`arguments`: RustBuffer.ByValue,`typeArgs`: RustBuffer.ByValue,`names`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish(`ptr`: Long,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`upgradeCapName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins(`ptr`: Long,`coins`: RustBuffer.ByValue,`recipient`: Long,`amount`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota(`ptr`: Long,`recipient`: Long,`amount`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins(`ptr`: Long,`coin`: Long,`amounts`: RustBuffer.ByValue,`names`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor(`ptr`: Long,`sponsor`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects(`ptr`: Long,`recipient`: Long,`objects`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade(`ptr`: Long,`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`package`: Long,`ticket`: Long,`name`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_transactioneffects(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_transactioneffects(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1(`effects`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1(`effects`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_clone_transactionevents(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transactionevents(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_transactionevents(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_transactionevents(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new(`events`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionevents_digest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transactionevents_events(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new(`events`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionevents_digest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transactionevents_events(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_transactionkind(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transactionkind(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_transactionkind(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_transactionkind(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1(`tx`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis(`tx`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction(`tx`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_transferobjects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_transferobjects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1(`tx`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis(`tx`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction(`tx`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update(`tx`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_transferobjects(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_transferobjects(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new(`objects`: RustBuffer.ByValue,`address`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transferobjects_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_transferobjects_objects(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new(`objects`: RustBuffer.ByValue,`address`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transferobjects_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_transferobjects_objects(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_typetag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_typetag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_typetag(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_typetag(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct(`structTag`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector(`typeTag`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_bool(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_bool(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_signer(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_signer(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_struct(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_struct(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u128(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u128(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u16(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u16(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u256(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u256(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u32(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u32(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u64(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u64(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u8(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_u8(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_is_vector(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_is_vector(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_upgrade(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_upgrade(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_upgrade(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_upgrade(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_upgrade_new(`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`package`: Pointer,`ticket`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_upgrade_new(`modules`: RustBuffer.ByValue,`dependencies`: RustBuffer.ByValue,`package`: Long,`ticket`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_upgrade_modules(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_upgrade_modules(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_upgrade_package(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_upgrade_ticket(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_usersignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_usersignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_upgrade_package(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_upgrade_ticket(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_usersignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_usersignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64(`base64`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig(`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey(`authenticator`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple(`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin(`authenticator`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64(`base64`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig(`signature`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey(`authenticator`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple(`signature`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin(`authenticator`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_scheme(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_usersignatureverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_usersignatureverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier(`ptr`: Pointer,`zkloginVerifier`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier(`ptr`: Long,`zkloginVerifier`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new(`epoch`: Long,`signature`: Pointer,`bitmapBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new(`epoch`: Long,`signature`: Long,`bitmapBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary(`committee`: RustBuffer.ByValue,`summary`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature(`ptr`: Pointer,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary(`committee`: RustBuffer.ByValue,`summary`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature(`ptr`: Long,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new(`committee`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new(`committee`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated(`ptr`: Pointer,`message`: RustBuffer.ByValue,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated(`ptr`: Long,`message`: RustBuffer.ByValue,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary(`ptr`: Pointer,`summary`: Pointer,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary(`ptr`: Long,`summary`: Long,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new(`validator`: Pointer,`duration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new(`validator`: Long,`duration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_validatorsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_validatorsignature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_validatorsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_validatorsignature(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new(`epoch`: Long,`publicKey`: Pointer,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_versionassignment(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_versionassignment(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new(`epoch`: Long,`publicKey`: Long,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_versionassignment(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_versionassignment(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new(`objectId`: Pointer,`version`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_versionassignment_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new(`objectId`: Long,`version`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_versionassignment_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new(`inputs`: Pointer,`maxEpoch`: Long,`signature`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_zklogininputs(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_zklogininputs(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new(`inputs`: Long,`maxEpoch`: Long,`signature`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_zklogininputs(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_zklogininputs(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new(`proofPoints`: Pointer,`issBase64Details`: RustBuffer.ByValue,`headerBase64`: RustBuffer.ByValue,`addressSeed`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new(`proofPoints`: Long,`issBase64Details`: RustBuffer.ByValue,`headerBase64`: RustBuffer.ByValue,`addressSeed`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_zkloginproof(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_zkloginproof(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_zkloginproof(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_zkloginproof(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new(`a`: Pointer,`b`: Pointer,`c`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_a(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_b(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_c(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new(`a`: Long,`b`: Long,`c`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_a(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_b(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginproof_c(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new(`iss`: RustBuffer.ByValue,`addressSeed`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new(`iss`: RustBuffer.ByValue,`addressSeed`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_clone_zkloginverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_free_zkloginverifier(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_clone_zkloginverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_free_zkloginverifier(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify(`ptr`: Pointer,`message`: RustBuffer.ByValue,`authenticator`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify(`ptr`: Long,`message`: RustBuffer.ByValue,`authenticator`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks(`ptr`: Pointer,`jwks`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_iota_sdk_ffi_fn_func_base64_decode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks(`ptr`: Long,`jwks`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_iota_sdk_ffi_fn_method_changedobject_uniffi_trait_display(`ptr`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_func_base64_encode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_transactioneffectsv1_uniffi_trait_display(`ptr`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_func_hex_decode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_method_unchangedsharedobject_uniffi_trait_display(`ptr`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_func_hex_encode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_func_base64_decode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_iota_sdk_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_func_base64_encode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_iota_sdk_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_func_hex_decode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_iota_sdk_ffi_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_iota_sdk_ffi_fn_func_hex_encode(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun ffi_iota_sdk_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun ffi_iota_sdk_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun ffi_iota_sdk_ffi_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun ffi_iota_sdk_ffi_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_iota_sdk_ffi_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_u8(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_u8(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_u8(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_u8(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun ffi_iota_sdk_ffi_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_i8(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_i8(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_i8(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_i8(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun ffi_iota_sdk_ffi_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_u16(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_u16(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_u16(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_u16(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun ffi_iota_sdk_ffi_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_i16(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_i16(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_i16(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_i16(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun ffi_iota_sdk_ffi_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_u32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_u32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_u32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_u32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun ffi_iota_sdk_ffi_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_i32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_i32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_i32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_i32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun ffi_iota_sdk_ffi_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_u64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_u64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_u64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_u64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun ffi_iota_sdk_ffi_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_i64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_i64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_i64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_i64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun ffi_iota_sdk_ffi_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_f32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_f32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_f32(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_f32(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Float -fun ffi_iota_sdk_ffi_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_f64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_f64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_f64(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_f64(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Double -fun ffi_iota_sdk_ffi_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_pointer(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_pointer(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_rust_buffer(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_iota_sdk_ffi_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_iota_sdk_ffi_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_iota_sdk_ffi_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_cancel_void(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_cancel_void(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_free_void(`handle`: Long, +external fun ffi_iota_sdk_ffi_rust_future_free_void(`handle`: Long, ): Unit -fun ffi_iota_sdk_ffi_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_iota_sdk_ffi_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_iota_sdk_ffi_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -5913,52 +4223,52 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects() != 14715.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 29559.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 21511.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance() != 9953.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance() != 49784.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id() != 45619.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 11584.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 53336.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 44363.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 27138.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata() != 10872.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 50359.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 51349.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 12272.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 47213.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind() != 40594.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind() != 44511.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 29988.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 6963.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 58912.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field() != 47284.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 62805.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 29064.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 29086.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 17381.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 61978.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 4371.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 20245.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 52831.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 41079.toShort()) { @@ -5979,43 +4289,43 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size() != 44733.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents() != 40412.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents() != 1364.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 49694.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 16600.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 16965.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 56437.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 51355.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 58921.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 51508.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 9436.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs() != 1970.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 14004.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 62483.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 7913.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 23455.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest() != 55024.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 34213.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 22480.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 45891.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 64638.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 62867.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 45651.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 39065.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 53093.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query() != 54586.toShort()) { @@ -6048,13 +4358,13 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects() != 27010.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 20537.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 56377.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 46218.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 22771.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 25858.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 24427.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str() != 63815.toShort()) { @@ -6690,13 +5000,13 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest() != 36608.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run() != 11138.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run() != 62992.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute() != 27688.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute() != 1543.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor() != 53109.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor() != 33268.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration() != 5328.toShort()) { @@ -6714,7 +5024,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price() != 7437.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor() != 41106.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor() != 4885.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec() != 49808.toShort()) { @@ -6723,19 +5033,19 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins() != 10444.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call() != 22281.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call() != 33011.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish() != 46833.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins() != 15827.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins() != 38330.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota() != 29895.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota() != 36757.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins() != 34656.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins() != 40929.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor() != 25655.toShort()) { @@ -6744,7 +5054,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects() != 16313.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade() != 34068.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade() != 43600.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1() != 48710.toShort()) { @@ -7515,7 +5825,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() != 37848.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 26004.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() != 30839.toShort()) { @@ -7656,14 +5966,17 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support // Async return type handlers internal const val UNIFFI_RUST_FUTURE_POLL_READY = 0.toByte() -internal const val UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1.toByte() +internal const val UNIFFI_RUST_FUTURE_POLL_WAKE = 1.toByte() internal val uniffiContinuationHandleMap = UniffiHandleMap>() @@ -7762,12 +6075,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * The cleaner interface for Object finalization code to run. * This is the entry point to any implementation that we're using. @@ -8112,21 +6436,18 @@ public object FfiConverterDuration: FfiConverterRustBuffer { } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -8151,13 +6472,13 @@ public object FfiConverterDuration: FfiConverterRustBuffer { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -8210,6 +6531,7 @@ public object FfiConverterDuration: FfiConverterRustBuffer { // +// /** * Unique identifier for an Account on the IOTA blockchain. * @@ -8332,23 +6654,368 @@ public interface AddressInterface { open class Address: Disposable, AutoCloseable, AddressInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + @Suppress("UNUSED_PARAMETER") + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) + } + + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable + + private val wasDestroyed = AtomicBoolean(false) + private val callCounter = AtomicLong(1) + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + @Synchronized + override fun close() { + this.destroy() + } + + internal inline fun callWithHandle(block: (handle: Long) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.get() + if (c == 0L) { + throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the handle being freed concurrently. + try { + return block(this.uniffiCloneHandle()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiCleanAction(private val handle: Long) : Runnable { + override fun run() { + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_address(handle, status) + } + } + } + + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } + return uniffiRustCall() { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address(handle, status) + } + } + + override fun `toBytes`(): kotlin.ByteArray { + return FfiConverterByteArray.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes( + it, + _status) +} + } + ) + } + + + override fun `toHex`(): kotlin.String { + return FfiConverterString.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex( + it, + _status) +} + } + ) + } + + + + + + + + + companion object { + + @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Address { + return FfiConverterTypeAddress.lift( + uniffiRustCallWithError(SdkFfiException) { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes( + + FfiConverterByteArray.lower(`bytes`),_status) +} + ) + } + + + + @Throws(SdkFfiException::class) fun `fromHex`(`hex`: kotlin.String): Address { + return FfiConverterTypeAddress.lift( + uniffiRustCallWithError(SdkFfiException) { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex( + + FfiConverterString.lower(`hex`),_status) +} + ) + } + + + fun `generate`(): Address { + return FfiConverterTypeAddress.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate( + + _status) +} + ) + } + + + + } + +} + + +/** + * @suppress + */ +public object FfiConverterTypeAddress: FfiConverter { + override fun lower(value: Address): Long { + return value.uniffiCloneHandle() + } + + override fun lift(value: Long): Address { + return Address(UniffiWithHandle, value) + } + + override fun read(buf: ByteBuffer): Address { + return lift(buf.getLong()) + } + + override fun allocationSize(value: Address) = 8UL + + override fun write(value: Address, buf: ByteBuffer) { + buf.putLong(lower(value)) + } +} + + +// This template implements a class for working with a Rust struct via a handle +// to the live Rust struct on the other side of the FFI. +// +// There's some subtlety here, because we have to be careful not to operate on a Rust +// struct after it has been dropped, and because we must expose a public API for freeing +// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: +// +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to +// the Rust FFI. +// +// * When an instance is no longer needed, its handle should be passed to a +// special destructor function provided by the Rust FFI, which will drop the +// underlying Rust struct. +// +// * Given an instance, calling code is expected to call the special +// `destroy` method in order to free it after use, either by calling it explicitly +// or by using a higher-level helper like the `use` method. Failing to do so risks +// leaking the underlying Rust struct. +// +// * We can't assume that calling code will do the right thing, and must be prepared +// to handle Kotlin method calls executing concurrently with or even after a call to +// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. +// +// * We must never allow Rust code to operate on the underlying Rust struct after +// the destructor has been called, and must never call the destructor more than once. +// Doing so may trigger memory unsafety. +// +// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` +// is implemented to call the destructor when the Kotlin object becomes unreachable. +// This is done in a background thread. This is not a panacea, and client code should be aware that +// 1. the thread may starve if some there are objects that have poorly performing +// `drop` methods or do significant work in their `drop` methods. +// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, +// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). +// +// If we try to implement this with mutual exclusion on access to the handle, there is the +// possibility of a race between a method call and a concurrent call to `destroy`: +// +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. +// * Thread B calls `destroy` and frees the underlying Rust struct. +// * Thread A resumes, passing the already-read handle value to Rust and triggering +// a use-after-free. +// +// One possible solution would be to use a `ReadWriteLock`, with each method call taking +// a read lock (and thus allowed to run concurrently) and the special `destroy` method +// taking a write lock (and thus blocking on live method calls). However, we aim not to +// generate methods with any hidden blocking semantics, and a `destroy` method that might +// block if called incorrectly seems to meet that bar. +// +// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track +// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` +// has been called. These are updated according to the following rules: +// +// * The initial value of the counter is 1, indicating a live object with no in-flight calls. +// The initial value for the flag is false. +// +// * At the start of each method call, we atomically check the counter. +// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. +// If it is nonzero them we atomically increment it by 1 and proceed with the method call. +// +// * At the end of each method call, we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// * When `destroy` is called, we atomically flip the flag from false to true. +// If the flag was already true we silently fail. +// Otherwise we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, +// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. +// +// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been +// called *and* all in-flight method calls have completed, avoiding violating any of the expectations +// of the underlying Rust code. +// +// This makes a cleaner a better alternative to _not_ calling `destroy()` as +// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` +// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner +// thread may be starved, and the app will leak memory. +// +// In this case, `destroy`ing manually may be a better solution. +// +// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects +// with Rust peers are reclaimed: +// +// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: +// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: +// 3. The memory is reclaimed when the process terminates. +// +// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 +// + + +// +/** + * An argument to a programmable transaction command + * + * # BCS + * + * The BCS serialized form for this type is defined by the following ABNF: + * + * ```text + * argument = argument-gas + * =/ argument-input + * =/ argument-result + * =/ argument-nested-result + * + * argument-gas = %x00 + * argument-input = %x01 u16 + * argument-result = %x02 u16 + * argument-nested-result = %x03 u16 u16 + * ``` + */ +public interface ArgumentInterface { + + /** + * Get the nested result for this result at the given index. Returns None + * if this is not a Result. + */ + fun `getNestedResult`(`ix`: kotlin.UShort): Argument? + + companion object +} + +/** + * An argument to a programmable transaction command + * + * # BCS + * + * The BCS serialized form for this type is defined by the following ABNF: + * + * ```text + * argument = argument-gas + * =/ argument-input + * =/ argument-result + * =/ argument-nested-result + * + * argument-gas = %x00 + * argument-input = %x01 u16 + * argument-result = %x02 u16 + * argument-nested-result = %x03 u16 u16 + * ``` + */ +open class Argument: Disposable, AutoCloseable, ArgumentInterface +{ + + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) + } + + /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -8370,7 +7037,7 @@ open class Address: Disposable, AutoCloseable, AddressInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -8382,9 +7049,9 @@ open class Address: Disposable, AutoCloseable, AddressInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -8395,342 +7062,27 @@ open class Address: Disposable, AutoCloseable, AddressInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_address(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument(handle, status) } } } - fun uniffiClonePointer(): Pointer { - return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_address(pointer!!, status) - } - } - - override fun `toBytes`(): kotlin.ByteArray { - return FfiConverterByteArray.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_address_to_bytes( - it, _status) -} - } - ) - } - - - override fun `toHex`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_address_to_hex( - it, _status) -} - } - ) - } - - - - - - companion object { - - @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Address { - return FfiConverterTypeAddress.lift( - uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes( - FfiConverterByteArray.lower(`bytes`),_status) -} - ) - } - - - - @Throws(SdkFfiException::class) fun `fromHex`(`hex`: kotlin.String): Address { - return FfiConverterTypeAddress.lift( - uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex( - FfiConverterString.lower(`hex`),_status) -} - ) - } - - - fun `generate`(): Address { - return FfiConverterTypeAddress.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_address_generate( - _status) -} - ) - } - - - - } - -} - -/** - * @suppress - */ -public object FfiConverterTypeAddress: FfiConverter { - - override fun lower(value: Address): Pointer { - return value.uniffiClonePointer() - } - - override fun lift(value: Pointer): Address { - return Address(value) - } - - override fun read(buf: ByteBuffer): Address { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) - } - - override fun allocationSize(value: Address) = 8UL - - override fun write(value: Address, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) - } -} - - -// This template implements a class for working with a Rust struct via a Pointer/Arc -// to the live Rust struct on the other side of the FFI. -// -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// -// There's some subtlety here, because we have to be careful not to operate on a Rust -// struct after it has been dropped, and because we must expose a public API for freeing -// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: -// -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to -// the Rust FFI. -// -// * When an instance is no longer needed, its pointer should be passed to a -// special destructor function provided by the Rust FFI, which will drop the -// underlying Rust struct. -// -// * Given an instance, calling code is expected to call the special -// `destroy` method in order to free it after use, either by calling it explicitly -// or by using a higher-level helper like the `use` method. Failing to do so risks -// leaking the underlying Rust struct. -// -// * We can't assume that calling code will do the right thing, and must be prepared -// to handle Kotlin method calls executing concurrently with or even after a call to -// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. -// -// * We must never allow Rust code to operate on the underlying Rust struct after -// the destructor has been called, and must never call the destructor more than once. -// Doing so may trigger memory unsafety. -// -// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` -// is implemented to call the destructor when the Kotlin object becomes unreachable. -// This is done in a background thread. This is not a panacea, and client code should be aware that -// 1. the thread may starve if some there are objects that have poorly performing -// `drop` methods or do significant work in their `drop` methods. -// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, -// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). -// -// If we try to implement this with mutual exclusion on access to the pointer, there is the -// possibility of a race between a method call and a concurrent call to `destroy`: -// -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. -// * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering -// a use-after-free. -// -// One possible solution would be to use a `ReadWriteLock`, with each method call taking -// a read lock (and thus allowed to run concurrently) and the special `destroy` method -// taking a write lock (and thus blocking on live method calls). However, we aim not to -// generate methods with any hidden blocking semantics, and a `destroy` method that might -// block if called incorrectly seems to meet that bar. -// -// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track -// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` -// has been called. These are updated according to the following rules: -// -// * The initial value of the counter is 1, indicating a live object with no in-flight calls. -// The initial value for the flag is false. -// -// * At the start of each method call, we atomically check the counter. -// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. -// If it is nonzero them we atomically increment it by 1 and proceed with the method call. -// -// * At the end of each method call, we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// * When `destroy` is called, we atomically flip the flag from false to true. -// If the flag was already true we silently fail. -// Otherwise we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, -// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. -// -// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been -// called *and* all in-flight method calls have completed, avoiding violating any of the expectations -// of the underlying Rust code. -// -// This makes a cleaner a better alternative to _not_ calling `destroy()` as -// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` -// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner -// thread may be starved, and the app will leak memory. -// -// In this case, `destroy`ing manually may be a better solution. -// -// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects -// with Rust peers are reclaimed: -// -// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: -// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: -// 3. The memory is reclaimed when the process terminates. -// -// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 -// - - -/** - * An argument to a programmable transaction command - * - * # BCS - * - * The BCS serialized form for this type is defined by the following ABNF: - * - * ```text - * argument = argument-gas - * =/ argument-input - * =/ argument-result - * =/ argument-nested-result - * - * argument-gas = %x00 - * argument-input = %x01 u16 - * argument-result = %x02 u16 - * argument-nested-result = %x03 u16 u16 - * ``` - */ -public interface ArgumentInterface { - - /** - * Get the nested result for this result at the given index. Returns None - * if this is not a Result. - */ - fun `getNestedResult`(`ix`: kotlin.UShort): Argument? - - companion object -} - -/** - * An argument to a programmable transaction command - * - * # BCS - * - * The BCS serialized form for this type is defined by the following ABNF: - * - * ```text - * argument = argument-gas - * =/ argument-input - * =/ argument-result - * =/ argument-nested-result - * - * argument-gas = %x00 - * argument-input = %x01 u16 - * argument-result = %x02 u16 - * argument-nested-result = %x03 u16 u16 - * ``` - */ -open class Argument: Disposable, AutoCloseable, ArgumentInterface -{ - - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - /** - * This constructor can be used to instantiate a fake object. Only used for tests. Any - * attempt to actually use an object constructed this way will fail as there is no - * connected Rust object. + * @suppress */ - @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable - - private val wasDestroyed = AtomicBoolean(false) - private val callCounter = AtomicLong(1) - - override fun destroy() { - // Only allow a single call to this method. - // TODO: maybe we should log a warning if called more than once? - if (this.wasDestroyed.compareAndSet(false, true)) { - // This decrement always matches the initial count of 1 given at creation time. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); } - } - - @Synchronized - override fun close() { - this.destroy() - } - - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { - // Check and increment the call counter, to keep the object alive. - // This needs a compare-and-set retry loop in case of concurrent updates. - do { - val c = this.callCounter.get() - if (c == 0L) { - throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") - } - if (c == Long.MAX_VALUE) { - throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") - } - } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. - try { - return block(this.uniffiClonePointer()) - } finally { - // This decrement always matches the increment we performed above. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } - } - } - - // Use a static inner class instead of a closure so as not to accidentally - // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { - override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_argument(ptr, status) - } - } - } - } - - fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_argument(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument(handle, status) } } @@ -8740,10 +7092,11 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface * if this is not a Result. */override fun `getNestedResult`(`ix`: kotlin.UShort): Argument? { return FfiConverterOptionalTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result( - it, FfiConverterUShort.lower(`ix`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result( + it, + FfiConverterUShort.lower(`ix`),_status) } } ) @@ -8753,6 +7106,9 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface + + + companion object { /** @@ -8761,7 +7117,8 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface */ fun `newGas`(): Argument { return FfiConverterTypeArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas( + _status) } ) @@ -8775,7 +7132,8 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface */ fun `newInput`(`input`: kotlin.UShort): Argument { return FfiConverterTypeArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input( + FfiConverterUShort.lower(`input`),_status) } ) @@ -8790,7 +7148,8 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface */ fun `newNestedResult`(`commandIndex`: kotlin.UShort, `subresultIndex`: kotlin.UShort): Argument { return FfiConverterTypeArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result( + FfiConverterUShort.lower(`commandIndex`),FfiConverterUShort.lower(`subresultIndex`),_status) } ) @@ -8803,7 +7162,8 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface */ fun `newResult`(`result`: kotlin.UShort): Argument { return FfiConverterTypeArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result( + FfiConverterUShort.lower(`result`),_status) } ) @@ -8815,50 +7175,43 @@ open class Argument: Disposable, AutoCloseable, ArgumentInterface } + /** * @suppress */ -public object FfiConverterTypeArgument: FfiConverter { - - override fun lower(value: Argument): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeArgument: FfiConverter { + override fun lower(value: Argument): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Argument { - return Argument(value) + override fun lift(value: Long): Argument { + return Argument(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Argument { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Argument) = 8UL override fun write(value: Argument, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -8883,13 +7236,13 @@ public object FfiConverterTypeArgument: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -8942,6 +7295,7 @@ public object FfiConverterTypeArgument: FfiConverter { // +// public interface Bls12381PrivateKeyInterface { fun `publicKey`(): Bls12381PublicKey @@ -8960,30 +7314,37 @@ public interface Bls12381PrivateKeyInterface { open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`bytes`: kotlin.ByteArray) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new( + FfiConverterByteArray.lower(`bytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -9005,7 +7366,7 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -9017,9 +7378,9 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -9030,28 +7391,37 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey(handle, status) } } override fun `publicKey`(): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key( + it, + _status) } } ) @@ -9060,10 +7430,11 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme( + it, + _status) } } ) @@ -9072,10 +7443,11 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte override fun `signCheckpointSummary`(`summary`: CheckpointSummary): ValidatorSignature { return FfiConverterTypeValidatorSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary( - it, FfiConverterTypeCheckpointSummary.lower(`summary`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary( + it, + FfiConverterTypeCheckpointSummary.lower(`summary`),_status) } } ) @@ -9085,10 +7457,11 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte @Throws(SdkFfiException::class)override fun `trySign`(`message`: kotlin.ByteArray): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -9097,10 +7470,11 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte override fun `verifyingKey`(): Bls12381VerifyingKey { return FfiConverterTypeBls12381VerifyingKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key( + it, + _status) } } ) @@ -9110,11 +7484,15 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte + + + companion object { fun `generate`(): Bls12381PrivateKey { return FfiConverterTypeBls12381PrivateKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate( + _status) } ) @@ -9126,50 +7504,43 @@ open class Bls12381PrivateKey: Disposable, AutoCloseable, Bls12381PrivateKeyInte } + /** * @suppress */ -public object FfiConverterTypeBls12381PrivateKey: FfiConverter { - - override fun lower(value: Bls12381PrivateKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeBls12381PrivateKey: FfiConverter { + override fun lower(value: Bls12381PrivateKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Bls12381PrivateKey { - return Bls12381PrivateKey(value) + override fun lift(value: Long): Bls12381PrivateKey { + return Bls12381PrivateKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Bls12381PrivateKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Bls12381PrivateKey) = 8UL override fun write(value: Bls12381PrivateKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -9194,13 +7565,13 @@ public object FfiConverterTypeBls12381PrivateKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -9345,9 +7723,9 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -9358,28 +7736,37 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_bls12381publickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey(handle, status) } } override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes( + it, + _status) } } ) @@ -9389,12 +7776,16 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -9405,7 +7796,8 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -9415,7 +7807,8 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf fun `generate`(): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate( + _status) } ) @@ -9427,50 +7820,43 @@ open class Bls12381PublicKey: Disposable, AutoCloseable, Bls12381PublicKeyInterf } + /** * @suppress */ -public object FfiConverterTypeBls12381PublicKey: FfiConverter { - - override fun lower(value: Bls12381PublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeBls12381PublicKey: FfiConverter { + override fun lower(value: Bls12381PublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Bls12381PublicKey { - return Bls12381PublicKey(value) + override fun lift(value: Long): Bls12381PublicKey { + return Bls12381PublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Bls12381PublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Bls12381PublicKey) = 8UL override fun write(value: Bls12381PublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -9495,13 +7881,13 @@ public object FfiConverterTypeBls12381PublicKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -9646,9 +8039,9 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -9659,28 +8052,37 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_bls12381signature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_bls12381signature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature(handle, status) } } override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes( + it, + _status) } } ) @@ -9690,12 +8092,16 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -9706,7 +8112,8 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -9716,7 +8123,8 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf fun `generate`(): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate( + _status) } ) @@ -9728,50 +8136,43 @@ open class Bls12381Signature: Disposable, AutoCloseable, Bls12381SignatureInterf } + /** * @suppress */ -public object FfiConverterTypeBls12381Signature: FfiConverter { - - override fun lower(value: Bls12381Signature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeBls12381Signature: FfiConverter { + override fun lower(value: Bls12381Signature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Bls12381Signature { - return Bls12381Signature(value) + override fun lift(value: Long): Bls12381Signature { + return Bls12381Signature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Bls12381Signature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Bls12381Signature) = 8UL override fun write(value: Bls12381Signature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -9796,13 +8197,13 @@ public object FfiConverterTypeBls12381Signature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new( + FfiConverterTypeBls12381PublicKey.lower(`publicKey`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -9912,7 +8321,7 @@ open class Bls12381VerifyingKey: Disposable, AutoCloseable, Bls12381VerifyingKey this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -9924,9 +8333,9 @@ open class Bls12381VerifyingKey: Disposable, AutoCloseable, Bls12381VerifyingKey throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -9937,28 +8346,37 @@ open class Bls12381VerifyingKey: Disposable, AutoCloseable, Bls12381VerifyingKey // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey(handle, status) } } override fun `publicKey`(): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key( + it, + _status) } } ) @@ -9968,10 +8386,11 @@ open class Bls12381VerifyingKey: Disposable, AutoCloseable, Bls12381VerifyingKey @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: Bls12381Signature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeBls12381Signature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeBls12381Signature.lower(`signature`),_status) } } @@ -9980,55 +8399,54 @@ open class Bls12381VerifyingKey: Disposable, AutoCloseable, Bls12381VerifyingKey + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeBls12381VerifyingKey: FfiConverter { - - override fun lower(value: Bls12381VerifyingKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeBls12381VerifyingKey: FfiConverter { + override fun lower(value: Bls12381VerifyingKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Bls12381VerifyingKey { - return Bls12381VerifyingKey(value) + override fun lift(value: Long): Bls12381VerifyingKey { + return Bls12381VerifyingKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Bls12381VerifyingKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Bls12381VerifyingKey) = 8UL override fun write(value: Bls12381VerifyingKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -10053,13 +8471,13 @@ public object FfiConverterTypeBls12381VerifyingKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -10204,9 +8629,9 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -10217,28 +8642,37 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement(handle, status) } } override fun `padded`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded( + it, + _status) } } ) @@ -10247,10 +8681,11 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf override fun `unpadded`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded( + it, + _status) } } ) @@ -10260,12 +8695,16 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Bn254FieldElement { return FfiConverterTypeBn254FieldElement.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -10276,7 +8715,8 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Bn254FieldElement { return FfiConverterTypeBn254FieldElement.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -10287,7 +8727,8 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf @Throws(SdkFfiException::class) fun `fromStrRadix10`(`s`: kotlin.String): Bn254FieldElement { return FfiConverterTypeBn254FieldElement.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10( + FfiConverterString.lower(`s`),_status) } ) @@ -10299,50 +8740,43 @@ open class Bn254FieldElement: Disposable, AutoCloseable, Bn254FieldElementInterf } + /** * @suppress */ -public object FfiConverterTypeBn254FieldElement: FfiConverter { - - override fun lower(value: Bn254FieldElement): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeBn254FieldElement: FfiConverter { + override fun lower(value: Bn254FieldElement): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Bn254FieldElement { - return Bn254FieldElement(value) + override fun lift(value: Long): Bn254FieldElement { + return Bn254FieldElement(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Bn254FieldElement { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Bn254FieldElement) = 8UL override fun write(value: Bn254FieldElement, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -10367,13 +8801,13 @@ public object FfiConverterTypeBn254FieldElement: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new( + FfiConverterTypeDigest.lower(`digest`),FfiConverterSequenceTypeVersionAssignment.lower(`versionAssignments`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -10505,7 +8947,7 @@ open class CancelledTransaction: Disposable, AutoCloseable, CancelledTransaction this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -10517,9 +8959,9 @@ open class CancelledTransaction: Disposable, AutoCloseable, CancelledTransaction throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -10530,28 +8972,37 @@ open class CancelledTransaction: Disposable, AutoCloseable, CancelledTransaction // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction(handle, status) } } override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest( + it, + _status) } } ) @@ -10560,10 +9011,11 @@ open class CancelledTransaction: Disposable, AutoCloseable, CancelledTransaction override fun `versionAssignments`(): List { return FfiConverterSequenceTypeVersionAssignment.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments( + it, + _status) } } ) @@ -10573,55 +9025,54 @@ open class CancelledTransaction: Disposable, AutoCloseable, CancelledTransaction + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCancelledTransaction: FfiConverter { - - override fun lower(value: CancelledTransaction): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCancelledTransaction: FfiConverter { + override fun lower(value: CancelledTransaction): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CancelledTransaction { - return CancelledTransaction(value) + override fun lift(value: Long): CancelledTransaction { + return CancelledTransaction(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CancelledTransaction { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CancelledTransaction) = 8UL override fun write(value: CancelledTransaction, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -10646,13 +9097,13 @@ public object FfiConverterTypeCancelledTransaction: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new( + FfiConverterULong.lower(`epoch`),FfiConverterULong.lower(`protocolVersion`),FfiConverterULong.lower(`storageCharge`),FfiConverterULong.lower(`computationCharge`),FfiConverterULong.lower(`storageRebate`),FfiConverterULong.lower(`nonRefundableStorageFee`),FfiConverterULong.lower(`epochStartTimestampMs`),FfiConverterSequenceTypeSystemPackage.lower(`systemPackages`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -10835,7 +9294,7 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -10847,9 +9306,9 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -10860,19 +9319,27 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_changeepoch(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_changeepoch(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch(handle, status) } } @@ -10881,10 +9348,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The total amount of gas charged for computation during the epoch. */override fun `computationCharge`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge( + it, + _status) } } ) @@ -10896,10 +9364,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The next (to become) epoch ID. */override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch( + it, + _status) } } ) @@ -10911,10 +9380,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * Unix timestamp when epoch started */override fun `epochStartTimestampMs`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms( + it, + _status) } } ) @@ -10926,10 +9396,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The non-refundable storage fee. */override fun `nonRefundableStorageFee`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee( + it, + _status) } } ) @@ -10941,10 +9412,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The protocol version in effect in the new epoch. */override fun `protocolVersion`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version( + it, + _status) } } ) @@ -10956,10 +9428,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The total amount of gas charged for storage during the epoch. */override fun `storageCharge`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge( + it, + _status) } } ) @@ -10971,10 +9444,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * The amount of storage rebate refunded to the txn senders. */override fun `storageRebate`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate( + it, + _status) } } ) @@ -10987,10 +9461,11 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface * written before the new epoch starts. */override fun `systemPackages`(): List { return FfiConverterSequenceTypeSystemPackage.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages( + it, + _status) } } ) @@ -11000,55 +9475,54 @@ open class ChangeEpoch: Disposable, AutoCloseable, ChangeEpochInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeChangeEpoch: FfiConverter { - - override fun lower(value: ChangeEpoch): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeChangeEpoch: FfiConverter { + override fun lower(value: ChangeEpoch): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ChangeEpoch { - return ChangeEpoch(value) + override fun lift(value: Long): ChangeEpoch { + return ChangeEpoch(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ChangeEpoch { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ChangeEpoch) = 8UL override fun write(value: ChangeEpoch, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -11073,13 +9547,13 @@ public object FfiConverterTypeChangeEpoch: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -11132,6 +9606,7 @@ public object FfiConverterTypeChangeEpoch: FfiConverter { // +// /** * System transaction used to change the epoch * @@ -11224,30 +9699,37 @@ public interface ChangeEpochV2Interface { open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`epoch`: kotlin.ULong, `protocolVersion`: kotlin.ULong, `storageCharge`: kotlin.ULong, `computationCharge`: kotlin.ULong, `computationChargeBurned`: kotlin.ULong, `storageRebate`: kotlin.ULong, `nonRefundableStorageFee`: kotlin.ULong, `epochStartTimestampMs`: kotlin.ULong, `systemPackages`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new( + FfiConverterULong.lower(`epoch`),FfiConverterULong.lower(`protocolVersion`),FfiConverterULong.lower(`storageCharge`),FfiConverterULong.lower(`computationCharge`),FfiConverterULong.lower(`computationChargeBurned`),FfiConverterULong.lower(`storageRebate`),FfiConverterULong.lower(`nonRefundableStorageFee`),FfiConverterULong.lower(`epochStartTimestampMs`),FfiConverterSequenceTypeSystemPackage.lower(`systemPackages`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -11269,7 +9751,7 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -11281,9 +9763,9 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -11294,19 +9776,27 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_changeepochv2(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_changeepochv2(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2(handle, status) } } @@ -11315,10 +9805,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The total amount of gas charged for computation during the epoch. */override fun `computationCharge`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge( + it, + _status) } } ) @@ -11330,10 +9821,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The total amount of gas burned for computation during the epoch. */override fun `computationChargeBurned`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned( + it, + _status) } } ) @@ -11345,10 +9837,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The next (to become) epoch ID. */override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch( + it, + _status) } } ) @@ -11360,10 +9853,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * Unix timestamp when epoch started */override fun `epochStartTimestampMs`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms( + it, + _status) } } ) @@ -11375,10 +9869,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The non-refundable storage fee. */override fun `nonRefundableStorageFee`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee( + it, + _status) } } ) @@ -11390,10 +9885,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The protocol version in effect in the new epoch. */override fun `protocolVersion`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version( + it, + _status) } } ) @@ -11405,10 +9901,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The total amount of gas charged for storage during the epoch. */override fun `storageCharge`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge( + it, + _status) } } ) @@ -11420,10 +9917,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * The amount of storage rebate refunded to the txn senders. */override fun `storageRebate`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate( + it, + _status) } } ) @@ -11436,10 +9934,11 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface * written before the new epoch starts. */override fun `systemPackages`(): List { return FfiConverterSequenceTypeSystemPackage.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages( + it, + _status) } } ) @@ -11449,55 +9948,54 @@ open class ChangeEpochV2: Disposable, AutoCloseable, ChangeEpochV2Interface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeChangeEpochV2: FfiConverter { - - override fun lower(value: ChangeEpochV2): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeChangeEpochV2: FfiConverter { + override fun lower(value: ChangeEpochV2): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ChangeEpochV2 { - return ChangeEpochV2(value) + override fun lift(value: Long): ChangeEpochV2 { + return ChangeEpochV2(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ChangeEpochV2 { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ChangeEpochV2) = 8UL override fun write(value: ChangeEpochV2, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -11522,13 +10020,13 @@ public object FfiConverterTypeChangeEpochV2: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -11669,9 +10174,9 @@ open class CheckpointCommitment: Disposable, AutoCloseable, CheckpointCommitment throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -11682,28 +10187,37 @@ open class CheckpointCommitment: Disposable, AutoCloseable, CheckpointCommitment // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment(handle, status) } } override fun `asEcmhLiveObjectSetDigest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest( + it, + _status) } } ) @@ -11712,10 +10226,11 @@ open class CheckpointCommitment: Disposable, AutoCloseable, CheckpointCommitment override fun `isEcmhLiveObjectSet`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set( + it, + _status) } } ) @@ -11725,55 +10240,54 @@ open class CheckpointCommitment: Disposable, AutoCloseable, CheckpointCommitment + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCheckpointCommitment: FfiConverter { - - override fun lower(value: CheckpointCommitment): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCheckpointCommitment: FfiConverter { + override fun lower(value: CheckpointCommitment): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CheckpointCommitment { - return CheckpointCommitment(value) + override fun lift(value: Long): CheckpointCommitment { + return CheckpointCommitment(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CheckpointCommitment { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CheckpointCommitment) = 8UL override fun write(value: CheckpointCommitment, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -11798,13 +10312,13 @@ public object FfiConverterTypeCheckpointCommitment: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new( + FfiConverterSequenceTypeCheckpointTransactionInfo.lower(`transactionInfo`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -11954,7 +10476,7 @@ open class CheckpointContents: Disposable, AutoCloseable, CheckpointContentsInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -11966,9 +10488,9 @@ open class CheckpointContents: Disposable, AutoCloseable, CheckpointContentsInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -11979,28 +10501,37 @@ open class CheckpointContents: Disposable, AutoCloseable, CheckpointContentsInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_checkpointcontents(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents(handle, status) } } override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest( + it, + _status) } } ) @@ -12009,10 +10540,11 @@ open class CheckpointContents: Disposable, AutoCloseable, CheckpointContentsInte override fun `transactionInfo`(): List { return FfiConverterSequenceTypeCheckpointTransactionInfo.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info( + it, + _status) } } ) @@ -12022,55 +10554,54 @@ open class CheckpointContents: Disposable, AutoCloseable, CheckpointContentsInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCheckpointContents: FfiConverter { - - override fun lower(value: CheckpointContents): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCheckpointContents: FfiConverter { + override fun lower(value: CheckpointContents): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CheckpointContents { - return CheckpointContents(value) + override fun lift(value: Long): CheckpointContents { + return CheckpointContents(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CheckpointContents { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CheckpointContents) = 8UL override fun write(value: CheckpointContents, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12095,13 +10626,13 @@ public object FfiConverterTypeCheckpointContents: FfiConverter, `endOfEpochData`: EndOfEpochData?, `versionSpecificData`: kotlin.ByteArray) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new( + FfiConverterULong.lower(`epoch`),FfiConverterULong.lower(`sequenceNumber`),FfiConverterULong.lower(`networkTotalTransactions`),FfiConverterTypeDigest.lower(`contentDigest`),FfiConverterOptionalTypeDigest.lower(`previousDigest`),FfiConverterTypeGasCostSummary.lower(`epochRollingGasCostSummary`),FfiConverterULong.lower(`timestampMs`),FfiConverterSequenceTypeCheckpointCommitment.lower(`checkpointCommitments`),FfiConverterOptionalTypeEndOfEpochData.lower(`endOfEpochData`),FfiConverterByteArray.lower(`versionSpecificData`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -12354,7 +10893,7 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -12366,9 +10905,9 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -12379,19 +10918,27 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_checkpointsummary(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary(handle, status) } } @@ -12400,10 +10947,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * Commitments to checkpoint-specific state. */override fun `checkpointCommitments`(): List { return FfiConverterSequenceTypeCheckpointCommitment.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments( + it, + _status) } } ) @@ -12415,10 +10963,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * The hash of the `CheckpointContents` for this checkpoint. */override fun `contentDigest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest( + it, + _status) } } ) @@ -12427,10 +10976,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest( + it, + _status) } } ) @@ -12442,10 +10992,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * Extra data only present in the final checkpoint of an epoch. */override fun `endOfEpochData`(): EndOfEpochData? { return FfiConverterOptionalTypeEndOfEpochData.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data( + it, + _status) } } ) @@ -12457,10 +11008,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * Epoch that this checkpoint belongs to. */override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch( + it, + _status) } } ) @@ -12473,10 +11025,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * epoch so far until this checkpoint. */override fun `epochRollingGasCostSummary`(): GasCostSummary { return FfiConverterTypeGasCostSummary.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary( + it, + _status) } } ) @@ -12489,10 +11042,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * this checkpoint. */override fun `networkTotalTransactions`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions( + it, + _status) } } ) @@ -12506,10 +11060,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * This will be only be `None` for the first, or genesis checkpoint. */override fun `previousDigest`(): Digest? { return FfiConverterOptionalTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest( + it, + _status) } } ) @@ -12521,10 +11076,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * The height of this checkpoint. */override fun `sequenceNumber`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number( + it, + _status) } } ) @@ -12533,10 +11089,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf override fun `signingMessage`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message( + it, + _status) } } ) @@ -12551,10 +11108,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * from the same underlining consensus commit */override fun `timestampMs`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms( + it, + _status) } } ) @@ -12570,10 +11128,11 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf * protocol version. */override fun `versionSpecificData`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data( + it, + _status) } } ) @@ -12583,55 +11142,54 @@ open class CheckpointSummary: Disposable, AutoCloseable, CheckpointSummaryInterf + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCheckpointSummary: FfiConverter { - - override fun lower(value: CheckpointSummary): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCheckpointSummary: FfiConverter { + override fun lower(value: CheckpointSummary): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CheckpointSummary { - return CheckpointSummary(value) + override fun lift(value: Long): CheckpointSummary { + return CheckpointSummary(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CheckpointSummary { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CheckpointSummary) = 8UL override fun write(value: CheckpointSummary, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12656,13 +11214,13 @@ public object FfiConverterTypeCheckpointSummary: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new( + FfiConverterTypeDigest.lower(`transaction`),FfiConverterTypeDigest.lower(`effects`),FfiConverterSequenceTypeUserSignature.lower(`signatures`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -12780,7 +11346,7 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -12792,9 +11358,9 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -12805,28 +11371,37 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo(handle, status) } } override fun `effects`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects( + it, + _status) } } ) @@ -12835,10 +11410,11 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans override fun `signatures`(): List { return FfiConverterSequenceTypeUserSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures( + it, + _status) } } ) @@ -12847,10 +11423,11 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans override fun `transaction`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction( + it, + _status) } } ) @@ -12860,55 +11437,54 @@ open class CheckpointTransactionInfo: Disposable, AutoCloseable, CheckpointTrans + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCheckpointTransactionInfo: FfiConverter { - - override fun lower(value: CheckpointTransactionInfo): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCheckpointTransactionInfo: FfiConverter { + override fun lower(value: CheckpointTransactionInfo): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CheckpointTransactionInfo { - return CheckpointTransactionInfo(value) + override fun lift(value: Long): CheckpointTransactionInfo { + return CheckpointTransactionInfo(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CheckpointTransactionInfo { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CheckpointTransactionInfo) = 8UL override fun write(value: CheckpointTransactionInfo, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12933,13 +11509,13 @@ public object FfiConverterTypeCheckpointTransactionInfo: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new( + FfiConverterTypeBn254FieldElement.lower(`el0`),FfiConverterTypeBn254FieldElement.lower(`el1`),FfiConverterTypeBn254FieldElement.lower(`el2`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -13073,7 +11657,7 @@ open class CircomG1: Disposable, AutoCloseable, CircomG1Interface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -13085,9 +11669,9 @@ open class CircomG1: Disposable, AutoCloseable, CircomG1Interface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -13098,74 +11682,81 @@ open class CircomG1: Disposable, AutoCloseable, CircomG1Interface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_circomg1(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_circomg1(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1(handle, status) } } + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCircomG1: FfiConverter { - - override fun lower(value: CircomG1): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCircomG1: FfiConverter { + override fun lower(value: CircomG1): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CircomG1 { - return CircomG1(value) + override fun lift(value: Long): CircomG1 { + return CircomG1(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CircomG1 { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CircomG1) = 8UL override fun write(value: CircomG1, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13190,13 +11781,13 @@ public object FfiConverterTypeCircomG1: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -13249,6 +11840,7 @@ public object FfiConverterTypeCircomG1: FfiConverter { // +// /** * A G2 point * @@ -13285,30 +11877,37 @@ public interface CircomG2Interface { open class CircomG2: Disposable, AutoCloseable, CircomG2Interface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`el00`: Bn254FieldElement, `el01`: Bn254FieldElement, `el10`: Bn254FieldElement, `el11`: Bn254FieldElement, `el20`: Bn254FieldElement, `el21`: Bn254FieldElement) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new( + FfiConverterTypeBn254FieldElement.lower(`el00`),FfiConverterTypeBn254FieldElement.lower(`el01`),FfiConverterTypeBn254FieldElement.lower(`el10`),FfiConverterTypeBn254FieldElement.lower(`el11`),FfiConverterTypeBn254FieldElement.lower(`el20`),FfiConverterTypeBn254FieldElement.lower(`el21`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -13330,7 +11929,7 @@ open class CircomG2: Disposable, AutoCloseable, CircomG2Interface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -13342,9 +11941,9 @@ open class CircomG2: Disposable, AutoCloseable, CircomG2Interface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -13355,74 +11954,81 @@ open class CircomG2: Disposable, AutoCloseable, CircomG2Interface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_circomg2(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_circomg2(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2(handle, status) } } + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCircomG2: FfiConverter { - - override fun lower(value: CircomG2): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCircomG2: FfiConverter { + override fun lower(value: CircomG2): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CircomG2 { - return CircomG2(value) + override fun lift(value: Long): CircomG2 { + return CircomG2(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CircomG2 { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CircomG2) = 8UL override fun write(value: CircomG2, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13447,13 +12053,13 @@ public object FfiConverterTypeCircomG2: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -13506,6 +12112,7 @@ public object FfiConverterTypeCircomG2: FfiConverter { // +// public interface CoinInterface { fun `balance`(): kotlin.ULong @@ -13520,23 +12127,29 @@ public interface CoinInterface { open class Coin: Disposable, AutoCloseable, CoinInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -13558,7 +12171,7 @@ open class Coin: Disposable, AutoCloseable, CoinInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -13570,9 +12183,9 @@ open class Coin: Disposable, AutoCloseable, CoinInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -13583,28 +12196,37 @@ open class Coin: Disposable, AutoCloseable, CoinInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_coin(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_coin(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin(handle, status) } } override fun `balance`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_coin_balance( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance( + it, + _status) } } ) @@ -13613,10 +12235,11 @@ open class Coin: Disposable, AutoCloseable, CoinInterface override fun `coinType`(): TypeTag { return FfiConverterTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_coin_coin_type( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type( + it, + _status) } } ) @@ -13625,10 +12248,11 @@ open class Coin: Disposable, AutoCloseable, CoinInterface override fun `id`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_coin_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id( + it, + _status) } } ) @@ -13638,12 +12262,16 @@ open class Coin: Disposable, AutoCloseable, CoinInterface + + + companion object { @Throws(SdkFfiException::class) fun `tryFromObject`(`object`: Object): Coin { return FfiConverterTypeCoin.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object( + FfiConverterTypeObject.lower(`object`),_status) } ) @@ -13655,50 +12283,43 @@ open class Coin: Disposable, AutoCloseable, CoinInterface } + /** * @suppress */ -public object FfiConverterTypeCoin: FfiConverter { - - override fun lower(value: Coin): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCoin: FfiConverter { + override fun lower(value: Coin): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Coin { - return Coin(value) + override fun lift(value: Long): Coin { + return Coin(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Coin { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Coin) = 8UL override fun write(value: Coin, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13723,13 +12344,13 @@ public object FfiConverterTypeCoin: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -13782,6 +12403,7 @@ public object FfiConverterTypeCoin: FfiConverter { // +// /** * A single command in a programmable transaction. * @@ -13840,23 +12462,29 @@ public interface CommandInterface { open class Command: Disposable, AutoCloseable, CommandInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -13878,7 +12506,7 @@ open class Command: Disposable, AutoCloseable, CommandInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -13890,9 +12518,9 @@ open class Command: Disposable, AutoCloseable, CommandInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -13903,25 +12531,36 @@ open class Command: Disposable, AutoCloseable, CommandInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_command(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_command(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_command(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command(handle, status) } } + + + companion object { /** @@ -13930,7 +12569,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newMakeMoveVector`(`makeMoveVector`: MakeMoveVector): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector( + FfiConverterTypeMakeMoveVector.lower(`makeMoveVector`),_status) } ) @@ -13943,7 +12583,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newMergeCoins`(`mergeCoins`: MergeCoins): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins( + FfiConverterTypeMergeCoins.lower(`mergeCoins`),_status) } ) @@ -13956,7 +12597,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newMoveCall`(`moveCall`: MoveCall): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call( + FfiConverterTypeMoveCall.lower(`moveCall`),_status) } ) @@ -13970,7 +12612,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newPublish`(`publish`: Publish): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish( + FfiConverterTypePublish.lower(`publish`),_status) } ) @@ -13983,7 +12626,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newSplitCoins`(`splitCoins`: SplitCoins): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins( + FfiConverterTypeSplitCoins.lower(`splitCoins`),_status) } ) @@ -13998,7 +12642,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newTransferObjects`(`transferObjects`: TransferObjects): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects( + FfiConverterTypeTransferObjects.lower(`transferObjects`),_status) } ) @@ -14018,7 +12663,8 @@ open class Command: Disposable, AutoCloseable, CommandInterface */ fun `newUpgrade`(`upgrade`: Upgrade): Command { return FfiConverterTypeCommand.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade( + FfiConverterTypeUpgrade.lower(`upgrade`),_status) } ) @@ -14030,50 +12676,43 @@ open class Command: Disposable, AutoCloseable, CommandInterface } + /** * @suppress */ -public object FfiConverterTypeCommand: FfiConverter { - - override fun lower(value: Command): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCommand: FfiConverter { + override fun lower(value: Command): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Command { - return Command(value) + override fun lift(value: Long): Command { + return Command(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Command { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Command) = 8UL override fun write(value: Command, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14098,13 +12737,13 @@ public object FfiConverterTypeCommand: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -14157,6 +12796,7 @@ public object FfiConverterTypeCommand: FfiConverter { // +// /** * V1 of the consensus commit prologue system transaction * @@ -14220,30 +12860,37 @@ public interface ConsensusCommitPrologueV1Interface { open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommitPrologueV1Interface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`epoch`: kotlin.ULong, `round`: kotlin.ULong, `subDagIndex`: kotlin.ULong?, `commitTimestampMs`: kotlin.ULong, `consensusCommitDigest`: Digest, `consensusDeterminedVersionAssignments`: ConsensusDeterminedVersionAssignments) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new( + FfiConverterULong.lower(`epoch`),FfiConverterULong.lower(`round`),FfiConverterOptionalULong.lower(`subDagIndex`),FfiConverterULong.lower(`commitTimestampMs`),FfiConverterTypeDigest.lower(`consensusCommitDigest`),FfiConverterTypeConsensusDeterminedVersionAssignments.lower(`consensusDeterminedVersionAssignments`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -14265,7 +12912,7 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -14277,9 +12924,9 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -14290,19 +12937,27 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1(handle, status) } } @@ -14311,10 +12966,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * Unix timestamp from consensus */override fun `commitTimestampMs`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms( + it, + _status) } } ) @@ -14326,10 +12982,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * Digest of consensus output */override fun `consensusCommitDigest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest( + it, + _status) } } ) @@ -14341,10 +12998,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * Stores consensus handler determined shared object version assignments. */override fun `consensusDeterminedVersionAssignments`(): ConsensusDeterminedVersionAssignments { return FfiConverterTypeConsensusDeterminedVersionAssignments.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments( + it, + _status) } } ) @@ -14356,10 +13014,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * Epoch of the commit prologue transaction */override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch( + it, + _status) } } ) @@ -14371,10 +13030,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * Consensus round of the commit */override fun `round`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round( + it, + _status) } } ) @@ -14387,10 +13047,11 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit * if there are multiple consensus commits per round. */override fun `subDagIndex`(): kotlin.ULong? { return FfiConverterOptionalULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index( + it, + _status) } } ) @@ -14400,55 +13061,54 @@ open class ConsensusCommitPrologueV1: Disposable, AutoCloseable, ConsensusCommit + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeConsensusCommitPrologueV1: FfiConverter { - - override fun lower(value: ConsensusCommitPrologueV1): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeConsensusCommitPrologueV1: FfiConverter { + override fun lower(value: ConsensusCommitPrologueV1): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ConsensusCommitPrologueV1 { - return ConsensusCommitPrologueV1(value) + override fun lift(value: Long): ConsensusCommitPrologueV1 { + return ConsensusCommitPrologueV1(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ConsensusCommitPrologueV1 { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ConsensusCommitPrologueV1) = 8UL override fun write(value: ConsensusCommitPrologueV1, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14473,13 +13133,13 @@ public object FfiConverterTypeConsensusCommitPrologueV1: FfiConverter @@ -14544,23 +13205,29 @@ public interface ConsensusDeterminedVersionAssignmentsInterface { open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, ConsensusDeterminedVersionAssignmentsInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -14582,7 +13249,7 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -14594,9 +13261,9 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -14607,28 +13274,37 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments(handle, status) } } override fun `asCancelledTransactions`(): List { return FfiConverterSequenceTypeCancelledTransaction.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions( + it, + _status) } } ) @@ -14637,10 +13313,11 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con override fun `isCancelledTransactions`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions( + it, + _status) } } ) @@ -14650,11 +13327,15 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con + + + companion object { fun `newCancelledTransactions`(`cancelledTransactions`: List): ConsensusDeterminedVersionAssignments { return FfiConverterTypeConsensusDeterminedVersionAssignments.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions( + FfiConverterSequenceTypeCancelledTransaction.lower(`cancelledTransactions`),_status) } ) @@ -14666,50 +13347,43 @@ open class ConsensusDeterminedVersionAssignments: Disposable, AutoCloseable, Con } + /** * @suppress */ -public object FfiConverterTypeConsensusDeterminedVersionAssignments: FfiConverter { - - override fun lower(value: ConsensusDeterminedVersionAssignments): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeConsensusDeterminedVersionAssignments: FfiConverter { + override fun lower(value: ConsensusDeterminedVersionAssignments): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ConsensusDeterminedVersionAssignments { - return ConsensusDeterminedVersionAssignments(value) + override fun lift(value: Long): ConsensusDeterminedVersionAssignments { + return ConsensusDeterminedVersionAssignments(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ConsensusDeterminedVersionAssignments { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ConsensusDeterminedVersionAssignments) = 8UL override fun write(value: ConsensusDeterminedVersionAssignments, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14734,13 +13408,13 @@ public object FfiConverterTypeConsensusDeterminedVersionAssignments: FfiConverte // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -14793,6 +13467,7 @@ public object FfiConverterTypeConsensusDeterminedVersionAssignments: FfiConverte // +// /** * A 32-byte Blake2b256 hash output. * @@ -14837,23 +13512,29 @@ public interface DigestInterface { open class Digest: Disposable, AutoCloseable, DigestInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -14875,7 +13556,7 @@ open class Digest: Disposable, AutoCloseable, DigestInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -14887,9 +13568,9 @@ open class Digest: Disposable, AutoCloseable, DigestInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -14900,28 +13581,37 @@ open class Digest: Disposable, AutoCloseable, DigestInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_digest(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_digest(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest(handle, status) } } override fun `toBase58`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_digest_to_base58( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58( + it, + _status) } } ) @@ -14930,10 +13620,11 @@ open class Digest: Disposable, AutoCloseable, DigestInterface override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes( + it, + _status) } } ) @@ -14943,12 +13634,28 @@ open class Digest: Disposable, AutoCloseable, DigestInterface + + // The local Rust `Display`/`Debug` implementation. + override fun toString(): String { + return FfiConverterString.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_uniffi_trait_display( + it, + _status) +} + } + ) + } + + companion object { @Throws(SdkFfiException::class) fun `fromBase58`(`base58`: kotlin.String): Digest { return FfiConverterTypeDigest.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58( + FfiConverterString.lower(`base58`),_status) } ) @@ -14959,7 +13666,8 @@ open class Digest: Disposable, AutoCloseable, DigestInterface @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Digest { return FfiConverterTypeDigest.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -14969,7 +13677,8 @@ open class Digest: Disposable, AutoCloseable, DigestInterface fun `generate`(): Digest { return FfiConverterTypeDigest.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_digest_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate( + _status) } ) @@ -14981,50 +13690,43 @@ open class Digest: Disposable, AutoCloseable, DigestInterface } + /** * @suppress */ -public object FfiConverterTypeDigest: FfiConverter { - - override fun lower(value: Digest): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeDigest: FfiConverter { + override fun lower(value: Digest): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Digest { - return Digest(value) + override fun lift(value: Long): Digest { + return Digest(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Digest { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Digest) = 8UL override fun write(value: Digest, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15049,13 +13751,13 @@ public object FfiConverterTypeDigest: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -15108,6 +13810,7 @@ public object FfiConverterTypeDigest: FfiConverter { // +// public interface Ed25519PrivateKeyInterface { fun `publicKey`(): Ed25519PublicKey @@ -15149,30 +13852,37 @@ public interface Ed25519PrivateKeyInterface { open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`bytes`: kotlin.ByteArray) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new( + FfiConverterByteArray.lower(`bytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -15194,7 +13904,7 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -15206,9 +13916,9 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -15219,28 +13929,37 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey(handle, status) } } override fun `publicKey`(): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key( + it, + _status) } } ) @@ -15249,10 +13968,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme( + it, + _status) } } ) @@ -15266,10 +13986,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf */ @Throws(SdkFfiException::class)override fun `toBech32`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32( + it, + _status) } } ) @@ -15281,10 +14002,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf * Serialize this private key to bytes. */override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes( + it, + _status) } } ) @@ -15297,10 +14019,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der( + it, + _status) } } ) @@ -15313,10 +14036,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem( + it, + _status) } } ) @@ -15326,10 +14050,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class)override fun `trySign`(`message`: kotlin.ByteArray): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -15339,10 +14064,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class)override fun `trySignSimple`(`message`: kotlin.ByteArray): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -15352,10 +14078,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class)override fun `trySignUser`(`message`: kotlin.ByteArray): UserSignature { return FfiConverterTypeUserSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -15364,10 +14091,11 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf override fun `verifyingKey`(): Ed25519VerifyingKey { return FfiConverterTypeEd25519VerifyingKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key( + it, + _status) } } ) @@ -15377,6 +14105,9 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf + + + companion object { /** @@ -15386,7 +14117,8 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class) fun `fromBech32`(`value`: kotlin.String): Ed25519PrivateKey { return FfiConverterTypeEd25519PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32( + FfiConverterString.lower(`value`),_status) } ) @@ -15401,7 +14133,8 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Ed25519PrivateKey { return FfiConverterTypeEd25519PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -15415,7 +14148,8 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Ed25519PrivateKey { return FfiConverterTypeEd25519PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -15425,7 +14159,8 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf fun `generate`(): Ed25519PrivateKey { return FfiConverterTypeEd25519PrivateKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate( + _status) } ) @@ -15437,50 +14172,43 @@ open class Ed25519PrivateKey: Disposable, AutoCloseable, Ed25519PrivateKeyInterf } + /** * @suppress */ -public object FfiConverterTypeEd25519PrivateKey: FfiConverter { - - override fun lower(value: Ed25519PrivateKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEd25519PrivateKey: FfiConverter { + override fun lower(value: Ed25519PrivateKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Ed25519PrivateKey { - return Ed25519PrivateKey(value) + override fun lift(value: Long): Ed25519PrivateKey { + return Ed25519PrivateKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Ed25519PrivateKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Ed25519PrivateKey) = 8UL override fun write(value: Ed25519PrivateKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15505,13 +14233,13 @@ public object FfiConverterTypeEd25519PrivateKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -15661,9 +14396,9 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -15674,19 +14409,27 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ed25519publickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey(handle, status) } } @@ -15700,10 +14443,11 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac * `hash(32-byte ed25519 public key)` */override fun `deriveAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address( + it, + _status) } } ) @@ -15715,10 +14459,11 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac * Return the flag for this signature scheme */override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme( + it, + _status) } } ) @@ -15727,10 +14472,11 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes( + it, + _status) } } ) @@ -15740,12 +14486,16 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -15756,7 +14506,8 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -15766,7 +14517,8 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac fun `generate`(): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate( + _status) } ) @@ -15778,50 +14530,43 @@ open class Ed25519PublicKey: Disposable, AutoCloseable, Ed25519PublicKeyInterfac } + /** * @suppress */ -public object FfiConverterTypeEd25519PublicKey: FfiConverter { - - override fun lower(value: Ed25519PublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEd25519PublicKey: FfiConverter { + override fun lower(value: Ed25519PublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Ed25519PublicKey { - return Ed25519PublicKey(value) + override fun lift(value: Long): Ed25519PublicKey { + return Ed25519PublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Ed25519PublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Ed25519PublicKey) = 8UL override fun write(value: Ed25519PublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15846,13 +14591,13 @@ public object FfiConverterTypeEd25519PublicKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -15987,9 +14739,9 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -16000,28 +14752,37 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ed25519signature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ed25519signature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature(handle, status) } } override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes( + it, + _status) } } ) @@ -16031,12 +14792,16 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -16047,7 +14812,8 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -16057,7 +14823,8 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac fun `generate`(): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate( + _status) } ) @@ -16069,50 +14836,43 @@ open class Ed25519Signature: Disposable, AutoCloseable, Ed25519SignatureInterfac } + /** * @suppress */ -public object FfiConverterTypeEd25519Signature: FfiConverter { - - override fun lower(value: Ed25519Signature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEd25519Signature: FfiConverter { + override fun lower(value: Ed25519Signature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Ed25519Signature { - return Ed25519Signature(value) + override fun lift(value: Long): Ed25519Signature { + return Ed25519Signature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Ed25519Signature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Ed25519Signature) = 8UL override fun write(value: Ed25519Signature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -16137,13 +14897,13 @@ public object FfiConverterTypeEd25519Signature: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -16254,9 +15021,9 @@ open class Ed25519Verifier: Disposable, AutoCloseable, Ed25519VerifierInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -16267,74 +15034,81 @@ open class Ed25519Verifier: Disposable, AutoCloseable, Ed25519VerifierInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ed25519verifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier(handle, status) } } + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeEd25519Verifier: FfiConverter { - - override fun lower(value: Ed25519Verifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEd25519Verifier: FfiConverter { + override fun lower(value: Ed25519Verifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Ed25519Verifier { - return Ed25519Verifier(value) + override fun lift(value: Long): Ed25519Verifier { + return Ed25519Verifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Ed25519Verifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Ed25519Verifier) = 8UL override fun write(value: Ed25519Verifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -16359,13 +15133,13 @@ public object FfiConverterTypeEd25519Verifier: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new( + FfiConverterTypeEd25519PublicKey.lower(`publicKey`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -16489,7 +15271,7 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -16501,9 +15283,9 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -16514,28 +15296,37 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey(handle, status) } } override fun `publicKey`(): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key( + it, + _status) } } ) @@ -16548,10 +15339,11 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der( + it, + _status) } } ) @@ -16564,10 +15356,11 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem( + it, + _status) } } ) @@ -16577,10 +15370,11 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: Ed25519Signature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeEd25519Signature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeEd25519Signature.lower(`signature`),_status) } } @@ -16589,10 +15383,11 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn @Throws(SdkFfiException::class)override fun `verifySimple`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -16601,10 +15396,11 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn @Throws(SdkFfiException::class)override fun `verifyUser`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -16613,6 +15409,9 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn + + + companion object { /** @@ -16621,7 +15420,8 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Ed25519VerifyingKey { return FfiConverterTypeEd25519VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -16635,7 +15435,8 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Ed25519VerifyingKey { return FfiConverterTypeEd25519VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -16647,50 +15448,43 @@ open class Ed25519VerifyingKey: Disposable, AutoCloseable, Ed25519VerifyingKeyIn } + /** * @suppress */ -public object FfiConverterTypeEd25519VerifyingKey: FfiConverter { - - override fun lower(value: Ed25519VerifyingKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEd25519VerifyingKey: FfiConverter { + override fun lower(value: Ed25519VerifyingKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Ed25519VerifyingKey { - return Ed25519VerifyingKey(value) + override fun lift(value: Long): Ed25519VerifyingKey { + return Ed25519VerifyingKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Ed25519VerifyingKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Ed25519VerifyingKey) = 8UL override fun write(value: Ed25519VerifyingKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -16715,13 +15509,13 @@ public object FfiConverterTypeEd25519VerifyingKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -16886,9 +15687,9 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -16899,30 +15700,42 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind(handle, status) } } + + + companion object { fun `newAuthenticatorStateCreate`(): EndOfEpochTransactionKind { return FfiConverterTypeEndOfEpochTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create( + _status) } ) @@ -16932,7 +15745,8 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans fun `newAuthenticatorStateExpire`(`tx`: AuthenticatorStateExpire): EndOfEpochTransactionKind { return FfiConverterTypeEndOfEpochTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire( + FfiConverterTypeAuthenticatorStateExpire.lower(`tx`),_status) } ) @@ -16942,7 +15756,8 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans fun `newChangeEpoch`(`tx`: ChangeEpoch): EndOfEpochTransactionKind { return FfiConverterTypeEndOfEpochTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch( + FfiConverterTypeChangeEpoch.lower(`tx`),_status) } ) @@ -16952,7 +15767,8 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans fun `newChangeEpochV2`(`tx`: ChangeEpochV2): EndOfEpochTransactionKind { return FfiConverterTypeEndOfEpochTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2( + FfiConverterTypeChangeEpochV2.lower(`tx`),_status) } ) @@ -16964,50 +15780,43 @@ open class EndOfEpochTransactionKind: Disposable, AutoCloseable, EndOfEpochTrans } + /** * @suppress */ -public object FfiConverterTypeEndOfEpochTransactionKind: FfiConverter { - - override fun lower(value: EndOfEpochTransactionKind): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEndOfEpochTransactionKind: FfiConverter { + override fun lower(value: EndOfEpochTransactionKind): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): EndOfEpochTransactionKind { - return EndOfEpochTransactionKind(value) + override fun lift(value: Long): EndOfEpochTransactionKind { + return EndOfEpochTransactionKind(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): EndOfEpochTransactionKind { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: EndOfEpochTransactionKind) = 8UL override fun write(value: EndOfEpochTransactionKind, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -17032,13 +15841,13 @@ public object FfiConverterTypeEndOfEpochTransactionKind: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new( + FfiConverterTypeExecutionTimeObservationKey.lower(`key`),FfiConverterSequenceTypeValidatorExecutionTimeObservation.lower(`observations`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -17148,7 +15965,7 @@ open class ExecutionTimeObservation: Disposable, AutoCloseable, ExecutionTimeObs this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -17160,9 +15977,9 @@ open class ExecutionTimeObservation: Disposable, AutoCloseable, ExecutionTimeObs throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -17173,28 +15990,37 @@ open class ExecutionTimeObservation: Disposable, AutoCloseable, ExecutionTimeObs // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation(handle, status) } } override fun `key`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key( + it, + _status) } } ) @@ -17203,10 +16029,11 @@ open class ExecutionTimeObservation: Disposable, AutoCloseable, ExecutionTimeObs override fun `observations`(): List { return FfiConverterSequenceTypeValidatorExecutionTimeObservation.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations( + it, + _status) } } ) @@ -17216,55 +16043,54 @@ open class ExecutionTimeObservation: Disposable, AutoCloseable, ExecutionTimeObs + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeExecutionTimeObservation: FfiConverter { - - override fun lower(value: ExecutionTimeObservation): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeExecutionTimeObservation: FfiConverter { + override fun lower(value: ExecutionTimeObservation): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ExecutionTimeObservation { - return ExecutionTimeObservation(value) + override fun lift(value: Long): ExecutionTimeObservation { + return ExecutionTimeObservation(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ExecutionTimeObservation { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ExecutionTimeObservation) = 8UL override fun write(value: ExecutionTimeObservation, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -17289,13 +16115,13 @@ public object FfiConverterTypeExecutionTimeObservation: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -17444,9 +16277,9 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -17457,30 +16290,42 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey(handle, status) } } + + + companion object { fun `newMakeMoveVec`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec( + _status) } ) @@ -17490,7 +16335,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newMergeCoins`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins( + _status) } ) @@ -17500,7 +16346,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newMoveEntryPoint`(`package`: ObjectId, `module`: kotlin.String, `function`: kotlin.String, `typeArguments`: List): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point( + FfiConverterTypeObjectId.lower(`package`),FfiConverterString.lower(`module`),FfiConverterString.lower(`function`),FfiConverterSequenceTypeTypeTag.lower(`typeArguments`),_status) } ) @@ -17510,7 +16357,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newPublish`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish( + _status) } ) @@ -17520,7 +16368,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newSplitCoins`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins( + _status) } ) @@ -17530,7 +16379,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newTransferObjects`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects( + _status) } ) @@ -17540,7 +16390,8 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime fun `newUpgrade`(): ExecutionTimeObservationKey { return FfiConverterTypeExecutionTimeObservationKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade( + _status) } ) @@ -17552,50 +16403,43 @@ open class ExecutionTimeObservationKey: Disposable, AutoCloseable, ExecutionTime } + /** * @suppress */ -public object FfiConverterTypeExecutionTimeObservationKey: FfiConverter { - - override fun lower(value: ExecutionTimeObservationKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeExecutionTimeObservationKey: FfiConverter { + override fun lower(value: ExecutionTimeObservationKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ExecutionTimeObservationKey { - return ExecutionTimeObservationKey(value) + override fun lift(value: Long): ExecutionTimeObservationKey { + return ExecutionTimeObservationKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ExecutionTimeObservationKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ExecutionTimeObservationKey) = 8UL override fun write(value: ExecutionTimeObservationKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -17620,13 +16464,13 @@ public object FfiConverterTypeExecutionTimeObservationKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -17769,9 +16620,9 @@ open class ExecutionTimeObservations: Disposable, AutoCloseable, ExecutionTimeOb throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -17782,30 +16633,42 @@ open class ExecutionTimeObservations: Disposable, AutoCloseable, ExecutionTimeOb // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations(handle, status) } } + + + companion object { fun `newV1`(`executionTimeObservations`: List): ExecutionTimeObservations { return FfiConverterTypeExecutionTimeObservations.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1( + FfiConverterSequenceTypeExecutionTimeObservation.lower(`executionTimeObservations`),_status) } ) @@ -17817,50 +16680,43 @@ open class ExecutionTimeObservations: Disposable, AutoCloseable, ExecutionTimeOb } + /** * @suppress */ -public object FfiConverterTypeExecutionTimeObservations: FfiConverter { - - override fun lower(value: ExecutionTimeObservations): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeExecutionTimeObservations: FfiConverter { + override fun lower(value: ExecutionTimeObservations): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ExecutionTimeObservations { - return ExecutionTimeObservations(value) + override fun lift(value: Long): ExecutionTimeObservations { + return ExecutionTimeObservations(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ExecutionTimeObservations { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ExecutionTimeObservations) = 8UL override fun write(value: ExecutionTimeObservations, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -17885,13 +16741,13 @@ public object FfiConverterTypeExecutionTimeObservations: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new( + FfiConverterString.lower(`faucetUrl`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -18031,7 +16895,7 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -18043,9 +16907,9 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -18056,19 +16920,27 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_faucetclient(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_faucetclient(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient(handle, status) } } @@ -18082,15 +16954,15 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `request`(`address`: Address) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( + uniffiHandle, FfiConverterTypeAddress.lower(`address`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -18112,15 +16984,15 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `requestAndWait`(`address`: Address) : FaucetReceipt? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( + uniffiHandle, FfiConverterTypeAddress.lower(`address`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeFaucetReceipt.lift(it) }, // Error FFI converter @@ -18138,15 +17010,15 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `requestStatus`(`id`: kotlin.String) : BatchSendStatus? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status( + uniffiHandle, FfiConverterString.lower(`id`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeBatchSendStatus.lift(it) }, // Error FFI converter @@ -18157,6 +17029,9 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface + + + companion object { /** @@ -18164,7 +17039,8 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface */ fun `newDevnet`(): FaucetClient { return FfiConverterTypeFaucetClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet( + _status) } ) @@ -18177,7 +17053,8 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface */ fun `newLocalnet`(): FaucetClient { return FfiConverterTypeFaucetClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet( + _status) } ) @@ -18190,7 +17067,8 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface */ fun `newTestnet`(): FaucetClient { return FfiConverterTypeFaucetClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet( + _status) } ) @@ -18202,50 +17080,43 @@ open class FaucetClient: Disposable, AutoCloseable, FaucetClientInterface } + /** * @suppress */ -public object FfiConverterTypeFaucetClient: FfiConverter { - - override fun lower(value: FaucetClient): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeFaucetClient: FfiConverter { + override fun lower(value: FaucetClient): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): FaucetClient { - return FaucetClient(value) + override fun lift(value: Long): FaucetClient { + return FaucetClient(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): FaucetClient { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: FaucetClient) = 8UL override fun write(value: FaucetClient, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -18270,13 +17141,13 @@ public object FfiConverterTypeFaucetClient: FfiConverter // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -18329,6 +17200,7 @@ public object FfiConverterTypeFaucetClient: FfiConverter // +// /** * An object part of the initial chain state * @@ -18375,30 +17247,37 @@ public interface GenesisObjectInterface { open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`data`: ObjectData, `owner`: Owner) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new( + FfiConverterTypeObjectData.lower(`data`),FfiConverterTypeOwner.lower(`owner`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -18420,7 +17299,7 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -18432,9 +17311,9 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -18445,28 +17324,37 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_genesisobject(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_genesisobject(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject(handle, status) } } override fun `data`(): ObjectData { return FfiConverterTypeObjectData.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesisobject_data( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data( + it, + _status) } } ) @@ -18475,10 +17363,11 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface override fun `objectId`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id( + it, + _status) } } ) @@ -18487,10 +17376,11 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface override fun `objectType`(): ObjectType { return FfiConverterTypeObjectType.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type( + it, + _status) } } ) @@ -18499,10 +17389,11 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface override fun `owner`(): Owner { return FfiConverterTypeOwner.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner( + it, + _status) } } ) @@ -18511,10 +17402,11 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface override fun `version`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesisobject_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version( + it, + _status) } } ) @@ -18524,55 +17416,54 @@ open class GenesisObject: Disposable, AutoCloseable, GenesisObjectInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeGenesisObject: FfiConverter { - - override fun lower(value: GenesisObject): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeGenesisObject: FfiConverter { + override fun lower(value: GenesisObject): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): GenesisObject { - return GenesisObject(value) + override fun lift(value: Long): GenesisObject { + return GenesisObject(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): GenesisObject { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: GenesisObject) = 8UL override fun write(value: GenesisObject, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -18597,13 +17488,13 @@ public object FfiConverterTypeGenesisObject: FfiConverter, `events`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new( + FfiConverterSequenceTypeGenesisObject.lower(`objects`),FfiConverterSequenceTypeEvent.lower(`events`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -18735,7 +17634,7 @@ open class GenesisTransaction: Disposable, AutoCloseable, GenesisTransactionInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -18747,9 +17646,9 @@ open class GenesisTransaction: Disposable, AutoCloseable, GenesisTransactionInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -18760,28 +17659,37 @@ open class GenesisTransaction: Disposable, AutoCloseable, GenesisTransactionInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_genesistransaction(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_genesistransaction(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction(handle, status) } } override fun `events`(): List { return FfiConverterSequenceTypeEvent.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events( + it, + _status) } } ) @@ -18790,10 +17698,11 @@ open class GenesisTransaction: Disposable, AutoCloseable, GenesisTransactionInte override fun `objects`(): List { return FfiConverterSequenceTypeGenesisObject.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects( + it, + _status) } } ) @@ -18803,55 +17712,54 @@ open class GenesisTransaction: Disposable, AutoCloseable, GenesisTransactionInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeGenesisTransaction: FfiConverter { - - override fun lower(value: GenesisTransaction): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeGenesisTransaction: FfiConverter { + override fun lower(value: GenesisTransaction): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): GenesisTransaction { - return GenesisTransaction(value) + override fun lift(value: Long): GenesisTransaction { + return GenesisTransaction(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): GenesisTransaction { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: GenesisTransaction) = 8UL override fun write(value: GenesisTransaction, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -18876,13 +17784,13 @@ public object FfiConverterTypeGenesisTransaction: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new( + FfiConverterString.lower(`server`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -19356,7 +18272,7 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -19368,9 +18284,9 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -19381,19 +18297,27 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_graphqlclient(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_graphqlclient(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient(handle, status) } } @@ -19407,15 +18331,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `activeValidators`(`epoch`: kotlin.ULong?, `paginationFilter`: PaginationFilter?) : ValidatorPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( + uniffiHandle, FfiConverterOptionalULong.lower(`epoch`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeValidatorPage.lift(it) }, // Error FFI converter @@ -19433,15 +18357,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `balance`(`address`: Address, `coinType`: kotlin.String?) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterOptionalString.lower(`coinType`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -19457,15 +18381,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `chainId`() : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -19483,15 +18407,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `checkpoint`(`digest`: Digest?, `seqNum`: kotlin.ULong?) : CheckpointSummary? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( + uniffiHandle, FfiConverterOptionalTypeDigest.lower(`digest`),FfiConverterOptionalULong.lower(`seqNum`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeCheckpointSummary.lift(it) }, // Error FFI converter @@ -19507,15 +18431,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `checkpoints`(`paginationFilter`: PaginationFilter?) : CheckpointSummaryPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( + uniffiHandle, FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeCheckpointSummaryPage.lift(it) }, // Error FFI converter @@ -19531,15 +18455,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `coinMetadata`(`coinType`: kotlin.String) : CoinMetadata? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( + uniffiHandle, FfiConverterString.lower(`coinType`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeCoinMetadata.lift(it) }, // Error FFI converter @@ -19559,15 +18483,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `coins`(`owner`: Address, `paginationFilter`: PaginationFilter?, `coinType`: kotlin.String?) : CoinPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( + uniffiHandle, FfiConverterTypeAddress.lower(`owner`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`),FfiConverterOptionalString.lower(`coinType`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeCoinPage.lift(it) }, // Error FFI converter @@ -19589,15 +18513,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dryRunTx`(`tx`: Transaction, `skipChecks`: kotlin.Boolean?) : DryRunResult { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( + uniffiHandle, FfiConverterTypeTransaction.lower(`tx`),FfiConverterOptionalBoolean.lower(`skipChecks`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeDryRunResult.lift(it) }, // Error FFI converter @@ -19621,15 +18545,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dryRunTxKind`(`txKind`: TransactionKind, `txMeta`: TransactionMetadata, `skipChecks`: kotlin.Boolean?) : DryRunResult { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind( + uniffiHandle, FfiConverterTypeTransactionKind.lower(`txKind`),FfiConverterTypeTransactionMetadata.lower(`txMeta`),FfiConverterOptionalBoolean.lower(`skipChecks`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeDryRunResult.lift(it) }, // Error FFI converter @@ -19664,15 +18588,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dynamicField`(`address`: Address, `typeTag`: TypeTag, `name`: Value) : DynamicFieldOutput? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterTypeTypeTag.lower(`typeTag`),FfiConverterTypeValue.lower(`name`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeDynamicFieldOutput.lift(it) }, // Error FFI converter @@ -19691,15 +18615,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dynamicFields`(`address`: Address, `paginationFilter`: PaginationFilter?) : DynamicFieldOutputPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeDynamicFieldOutputPage.lift(it) }, // Error FFI converter @@ -19722,15 +18646,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dynamicObjectField`(`address`: Address, `typeTag`: TypeTag, `name`: Value) : DynamicFieldOutput? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterTypeTypeTag.lower(`typeTag`),FfiConverterTypeValue.lower(`name`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeDynamicFieldOutput.lift(it) }, // Error FFI converter @@ -19747,15 +18671,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `epoch`(`epoch`: kotlin.ULong?) : Epoch? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( + uniffiHandle, FfiConverterOptionalULong.lower(`epoch`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeEpoch.lift(it) }, // Error FFI converter @@ -19773,15 +18697,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `epochTotalCheckpoints`(`epoch`: kotlin.ULong?) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( + uniffiHandle, FfiConverterOptionalULong.lower(`epoch`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -19799,15 +18723,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `epochTotalTransactionBlocks`(`epoch`: kotlin.ULong?) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( + uniffiHandle, FfiConverterOptionalULong.lower(`epoch`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -19824,15 +18748,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `events`(`filter`: EventFilter?, `paginationFilter`: PaginationFilter?) : EventPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( + uniffiHandle, FfiConverterOptionalTypeEventFilter.lower(`filter`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeEventPage.lift(it) }, // Error FFI converter @@ -19848,15 +18772,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `executeTx`(`signatures`: List, `tx`: Transaction) : TransactionEffects? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx( + uniffiHandle, FfiConverterSequenceTypeUserSignature.lower(`signatures`),FfiConverterTypeTransaction.lower(`tx`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeTransactionEffects.lift(it) }, // Error FFI converter @@ -19872,15 +18796,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `iotaNamesDefaultName`(`address`: Address, `format`: NameFormat?) : Name? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterOptionalTypeNameFormat.lower(`format`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeName.lift(it) }, // Error FFI converter @@ -19896,15 +18820,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `iotaNamesLookup`(`name`: kotlin.String) : Address? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup( + uniffiHandle, FfiConverterString.lower(`name`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeAddress.lift(it) }, // Error FFI converter @@ -19920,15 +18844,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `iotaNamesRegistrations`(`address`: Address, `paginationFilter`: PaginationFilter) : NameRegistrationPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeNameRegistrationPage.lift(it) }, // Error FFI converter @@ -19945,15 +18869,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `latestCheckpointSequenceNumber`() : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -19969,15 +18893,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `maxPageSize`() : kotlin.Int { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_i32(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_i32(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_i32(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32(future) }, // lift function { FfiConverterInt.lift(it) }, // Error FFI converter @@ -19997,15 +18921,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `moveObjectContents`(`objectId`: ObjectId, `version`: kotlin.ULong?) : Value? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( + uniffiHandle, FfiConverterTypeObjectId.lower(`objectId`),FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeValue.lift(it) }, // Error FFI converter @@ -20025,15 +18949,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `moveObjectContentsBcs`(`objectId`: ObjectId, `version`: kotlin.ULong?) : kotlin.ByteArray? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( + uniffiHandle, FfiConverterTypeObjectId.lower(`objectId`),FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalByteArray.lift(it) }, // Error FFI converter @@ -20050,15 +18974,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `normalizedMoveFunction`(`package`: Address, `module`: kotlin.String, `function`: kotlin.String, `version`: kotlin.ULong?) : MoveFunction? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( + uniffiHandle, FfiConverterTypeAddress.lower(`package`),FfiConverterString.lower(`module`),FfiConverterString.lower(`function`),FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMoveFunction.lift(it) }, // Error FFI converter @@ -20074,15 +18998,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `normalizedMoveModule`(`package`: Address, `module`: kotlin.String, `version`: kotlin.ULong?, `paginationFilterEnums`: PaginationFilter?, `paginationFilterFriends`: PaginationFilter?, `paginationFilterFunctions`: PaginationFilter?, `paginationFilterStructs`: PaginationFilter?) : MoveModule? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( + uniffiHandle, FfiConverterTypeAddress.lower(`package`),FfiConverterString.lower(`module`),FfiConverterOptionalULong.lower(`version`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilterEnums`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilterFriends`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilterFunctions`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilterStructs`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMoveModule.lift(it) }, // Error FFI converter @@ -20102,15 +19026,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `object`(`objectId`: ObjectId, `version`: kotlin.ULong?) : Object? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object( + uniffiHandle, FfiConverterTypeObjectId.lower(`objectId`),FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeObject.lift(it) }, // Error FFI converter @@ -20127,15 +19051,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `objectBcs`(`objectId`: ObjectId) : kotlin.ByteArray? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs( + uniffiHandle, FfiConverterTypeObjectId.lower(`objectId`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalByteArray.lift(it) }, // Error FFI converter @@ -20166,15 +19090,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `objects`(`filter`: ObjectFilter?, `paginationFilter`: PaginationFilter?) : ObjectPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects( + uniffiHandle, FfiConverterOptionalTypeObjectFilter.lower(`filter`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeObjectPage.lift(it) }, // Error FFI converter @@ -20200,15 +19124,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `package`(`address`: Address, `version`: kotlin.ULong?) : MovePackage? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMovePackage.lift(it) }, // Error FFI converter @@ -20226,15 +19150,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `packageLatest`(`address`: Address) : MovePackage? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest( + uniffiHandle, FfiConverterTypeAddress.lower(`address`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMovePackage.lift(it) }, // Error FFI converter @@ -20252,15 +19176,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `packageVersions`(`address`: Address, `afterVersion`: kotlin.ULong?, `beforeVersion`: kotlin.ULong?, `paginationFilter`: PaginationFilter?) : MovePackagePage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions( + uniffiHandle, FfiConverterTypeAddress.lower(`address`),FfiConverterOptionalULong.lower(`afterVersion`),FfiConverterOptionalULong.lower(`beforeVersion`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeMovePackagePage.lift(it) }, // Error FFI converter @@ -20282,15 +19206,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `packages`(`afterCheckpoint`: kotlin.ULong?, `beforeCheckpoint`: kotlin.ULong?, `paginationFilter`: PaginationFilter?) : MovePackagePage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( + uniffiHandle, FfiConverterOptionalULong.lower(`afterCheckpoint`),FfiConverterOptionalULong.lower(`beforeCheckpoint`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeMovePackagePage.lift(it) }, // Error FFI converter @@ -20306,15 +19230,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `protocolConfig`(`version`: kotlin.ULong?) : ProtocolConfigs? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config( + uniffiHandle, FfiConverterOptionalULong.lower(`version`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeProtocolConfigs.lift(it) }, // Error FFI converter @@ -20334,15 +19258,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `referenceGasPrice`(`epoch`: kotlin.ULong?) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price( + uniffiHandle, FfiConverterOptionalULong.lower(`epoch`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -20358,15 +19282,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `runQuery`(`query`: Query) : Value { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query( + uniffiHandle, FfiConverterTypeQuery.lower(`query`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeValue.lift(it) }, // Error FFI converter @@ -20383,15 +19307,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `serviceConfig`() : ServiceConfig { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeServiceConfig.lift(it) }, // Error FFI converter @@ -20408,15 +19332,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setRpcServer`(`server`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( + uniffiHandle, FfiConverterString.lower(`server`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_void(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_void(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -20433,15 +19357,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `totalSupply`(`coinType`: kotlin.String) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( + uniffiHandle, FfiConverterString.lower(`coinType`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -20458,15 +19382,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `totalTransactionBlocks`() : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -20483,15 +19407,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `totalTransactionBlocksByDigest`(`digest`: Digest) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( + uniffiHandle, FfiConverterTypeDigest.lower(`digest`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -20508,15 +19432,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `totalTransactionBlocksBySeqNum`(`seqNum`: kotlin.ULong) : kotlin.ULong? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( + uniffiHandle, FfiConverterULong.lower(`seqNum`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalULong.lift(it) }, // Error FFI converter @@ -20532,15 +19456,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transaction`(`digest`: Digest) : SignedTransaction? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( + uniffiHandle, FfiConverterTypeDigest.lower(`digest`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeSignedTransaction.lift(it) }, // Error FFI converter @@ -20556,15 +19480,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transactionDataEffects`(`digest`: Digest) : TransactionDataEffects? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects( + uniffiHandle, FfiConverterTypeDigest.lower(`digest`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeTransactionDataEffects.lift(it) }, // Error FFI converter @@ -20580,15 +19504,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transactionEffects`(`digest`: Digest) : TransactionEffects? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects( + uniffiHandle, FfiConverterTypeDigest.lower(`digest`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeTransactionEffects.lift(it) }, // Error FFI converter @@ -20604,15 +19528,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transactions`(`filter`: TransactionsFilter?, `paginationFilter`: PaginationFilter?) : SignedTransactionPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( + uniffiHandle, FfiConverterOptionalTypeTransactionsFilter.lower(`filter`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeSignedTransactionPage.lift(it) }, // Error FFI converter @@ -20629,15 +19553,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transactionsDataEffects`(`filter`: TransactionsFilter?, `paginationFilter`: PaginationFilter?) : TransactionDataEffectsPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects( + uniffiHandle, FfiConverterOptionalTypeTransactionsFilter.lower(`filter`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeTransactionDataEffectsPage.lift(it) }, // Error FFI converter @@ -20653,15 +19577,15 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `transactionsEffects`(`filter`: TransactionsFilter?, `paginationFilter`: PaginationFilter?) : TransactionEffectsPage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects( + uniffiHandle, FfiConverterOptionalTypeTransactionsFilter.lower(`filter`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeTransactionEffectsPage.lift(it) }, // Error FFI converter @@ -20672,6 +19596,9 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface + + + companion object { /** @@ -20680,7 +19607,8 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface */ fun `newDevnet`(): GraphQlClient { return FfiConverterTypeGraphQLClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet( + _status) } ) @@ -20694,7 +19622,8 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface */ fun `newLocalnet`(): GraphQlClient { return FfiConverterTypeGraphQLClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet( + _status) } ) @@ -20708,7 +19637,8 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface */ fun `newMainnet`(): GraphQlClient { return FfiConverterTypeGraphQLClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet( + _status) } ) @@ -20722,7 +19652,8 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface */ fun `newTestnet`(): GraphQlClient { return FfiConverterTypeGraphQLClient.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet( + _status) } ) @@ -20734,50 +19665,43 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface } + /** * @suppress */ -public object FfiConverterTypeGraphQLClient: FfiConverter { - - override fun lower(value: GraphQlClient): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeGraphQLClient: FfiConverter { + override fun lower(value: GraphQlClient): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): GraphQlClient { - return GraphQlClient(value) + override fun lift(value: Long): GraphQlClient { + return GraphQlClient(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): GraphQlClient { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: GraphQlClient) = 8UL override fun write(value: GraphQlClient, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -20802,13 +19726,13 @@ public object FfiConverterTypeGraphQLClient: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_identifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new( + FfiConverterString.lower(`identifier`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -20946,7 +19878,7 @@ open class Identifier: Disposable, AutoCloseable, IdentifierInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -20958,9 +19890,9 @@ open class Identifier: Disposable, AutoCloseable, IdentifierInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -20971,28 +19903,37 @@ open class Identifier: Disposable, AutoCloseable, IdentifierInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_identifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_identifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier(handle, status) } } override fun `asStr`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_identifier_as_str( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str( + it, + _status) } } ) @@ -21000,12 +19941,17 @@ open class Identifier: Disposable, AutoCloseable, IdentifierInterface + + + + // The local Rust `Hash` implementation override fun hashCode(): Int { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash( + it, + _status) } } ).toInt() @@ -21013,54 +19959,50 @@ open class Identifier: Disposable, AutoCloseable, IdentifierInterface + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeIdentifier: FfiConverter { - - override fun lower(value: Identifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeIdentifier: FfiConverter { + override fun lower(value: Identifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Identifier { - return Identifier(value) + override fun lift(value: Long): Identifier { + return Identifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Identifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Identifier) = 8UL override fun write(value: Identifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21085,13 +20027,13 @@ public object FfiConverterTypeIdentifier: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -21144,6 +20086,7 @@ public object FfiConverterTypeIdentifier: FfiConverter { // +// /** * An input to a user transaction * @@ -21184,23 +20127,29 @@ public interface InputInterface { open class Input: Disposable, AutoCloseable, InputInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -21222,7 +20171,7 @@ open class Input: Disposable, AutoCloseable, InputInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -21234,9 +20183,9 @@ open class Input: Disposable, AutoCloseable, InputInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -21247,25 +20196,36 @@ open class Input: Disposable, AutoCloseable, InputInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_input(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_input(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_input(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input(handle, status) } } + + + companion object { /** @@ -21273,7 +20233,8 @@ open class Input: Disposable, AutoCloseable, InputInterface */ fun `newImmutableOrOwned`(`objectRef`: ObjectReference): Input { return FfiConverterTypeInput.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned( + FfiConverterTypeObjectReference.lower(`objectRef`),_status) } ) @@ -21287,7 +20248,8 @@ open class Input: Disposable, AutoCloseable, InputInterface */ fun `newPure`(`value`: kotlin.ByteArray): Input { return FfiConverterTypeInput.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure( + FfiConverterByteArray.lower(`value`),_status) } ) @@ -21297,7 +20259,8 @@ open class Input: Disposable, AutoCloseable, InputInterface fun `newReceiving`(`objectRef`: ObjectReference): Input { return FfiConverterTypeInput.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving( + FfiConverterTypeObjectReference.lower(`objectRef`),_status) } ) @@ -21310,7 +20273,8 @@ open class Input: Disposable, AutoCloseable, InputInterface */ fun `newShared`(`objectId`: ObjectId, `initialSharedVersion`: kotlin.ULong, `mutable`: kotlin.Boolean): Input { return FfiConverterTypeInput.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared( + FfiConverterTypeObjectId.lower(`objectId`),FfiConverterULong.lower(`initialSharedVersion`),FfiConverterBoolean.lower(`mutable`),_status) } ) @@ -21322,50 +20286,43 @@ open class Input: Disposable, AutoCloseable, InputInterface } + /** * @suppress */ -public object FfiConverterTypeInput: FfiConverter { - - override fun lower(value: Input): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeInput: FfiConverter { + override fun lower(value: Input): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Input { - return Input(value) + override fun lift(value: Long): Input { + return Input(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Input { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Input) = 8UL override fun write(value: Input, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21390,13 +20347,13 @@ public object FfiConverterTypeInput: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -21449,6 +20406,7 @@ public object FfiConverterTypeInput: FfiConverter { // +// /** * Command to build a move vector out of a set of individual elements * @@ -21492,30 +20450,37 @@ public interface MakeMoveVectorInterface { open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`typeTag`: TypeTag?, `elements`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new( + FfiConverterOptionalTypeTypeTag.lower(`typeTag`),FfiConverterSequenceTypeArgument.lower(`elements`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -21537,7 +20502,7 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -21549,9 +20514,9 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -21562,19 +20527,27 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_makemovevector(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_makemovevector(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector(handle, status) } } @@ -21583,10 +20556,11 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface * The set individual elements to build the vector with */override fun `elements`(): List { return FfiConverterSequenceTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements( + it, + _status) } } ) @@ -21601,10 +20575,11 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface * when the set of provided arguments are all pure input values. */override fun `typeTag`(): TypeTag? { return FfiConverterOptionalTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag( + it, + _status) } } ) @@ -21614,55 +20589,54 @@ open class MakeMoveVector: Disposable, AutoCloseable, MakeMoveVectorInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMakeMoveVector: FfiConverter { - - override fun lower(value: MakeMoveVector): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMakeMoveVector: FfiConverter { + override fun lower(value: MakeMoveVector): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MakeMoveVector { - return MakeMoveVector(value) + override fun lift(value: Long): MakeMoveVector { + return MakeMoveVector(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MakeMoveVector { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MakeMoveVector) = 8UL override fun write(value: MakeMoveVector, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21687,13 +20661,13 @@ public object FfiConverterTypeMakeMoveVector: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new( + FfiConverterTypeArgument.lower(`coin`),FfiConverterSequenceTypeArgument.lower(`coinsToMerge`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -21833,7 +20815,7 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -21845,9 +20827,9 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -21858,19 +20840,27 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_mergecoins(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_mergecoins(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins(handle, status) } } @@ -21879,10 +20869,11 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface * Coin to merge coins into */override fun `coin`(): Argument { return FfiConverterTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin( + it, + _status) } } ) @@ -21896,10 +20887,11 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface * All listed coins must be of the same type and be the same type as `coin` */override fun `coinsToMerge`(): List { return FfiConverterSequenceTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge( + it, + _status) } } ) @@ -21909,55 +20901,54 @@ open class MergeCoins: Disposable, AutoCloseable, MergeCoinsInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMergeCoins: FfiConverter { - - override fun lower(value: MergeCoins): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMergeCoins: FfiConverter { + override fun lower(value: MergeCoins): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MergeCoins { - return MergeCoins(value) + override fun lift(value: Long): MergeCoins { + return MergeCoins(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MergeCoins { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MergeCoins) = 8UL override fun write(value: MergeCoins, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21982,13 +20973,13 @@ public object FfiConverterTypeMergeCoins: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -22041,6 +21032,7 @@ public object FfiConverterTypeMergeCoins: FfiConverter { // +// /** * Command to call a move function * @@ -22112,30 +21104,37 @@ public interface MoveCallInterface { open class MoveCall: Disposable, AutoCloseable, MoveCallInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`package`: ObjectId, `module`: Identifier, `function`: Identifier, `typeArguments`: List, `arguments`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_movecall_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new( + FfiConverterTypeObjectId.lower(`package`),FfiConverterTypeIdentifier.lower(`module`),FfiConverterTypeIdentifier.lower(`function`),FfiConverterSequenceTypeTypeTag.lower(`typeArguments`),FfiConverterSequenceTypeArgument.lower(`arguments`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -22157,7 +21156,7 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -22169,9 +21168,9 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -22182,19 +21181,27 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_movecall(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_movecall(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall(handle, status) } } @@ -22203,10 +21210,11 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface * The arguments to the function. */override fun `arguments`(): List { return FfiConverterSequenceTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movecall_arguments( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments( + it, + _status) } } ) @@ -22218,10 +21226,11 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface * The function to be called. */override fun `function`(): Identifier { return FfiConverterTypeIdentifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movecall_function( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function( + it, + _status) } } ) @@ -22233,10 +21242,11 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface * The specific module in the package containing the function. */override fun `module`(): Identifier { return FfiConverterTypeIdentifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movecall_module( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module( + it, + _status) } } ) @@ -22248,10 +21258,11 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface * The package containing the module and function. */override fun `package`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movecall_package( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package( + it, + _status) } } ) @@ -22263,10 +21274,11 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface * The type arguments to the function. */override fun `typeArguments`(): List { return FfiConverterSequenceTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments( + it, + _status) } } ) @@ -22276,55 +21288,54 @@ open class MoveCall: Disposable, AutoCloseable, MoveCallInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMoveCall: FfiConverter { - - override fun lower(value: MoveCall): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMoveCall: FfiConverter { + override fun lower(value: MoveCall): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MoveCall { - return MoveCall(value) + override fun lift(value: Long): MoveCall { + return MoveCall(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MoveCall { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MoveCall) = 8UL override fun write(value: MoveCall, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -22349,13 +21360,13 @@ public object FfiConverterTypeMoveCall: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -22408,6 +21419,7 @@ public object FfiConverterTypeMoveCall: FfiConverter { // +// public interface MoveFunctionInterface { fun `isEntry`(): kotlin.Boolean @@ -22428,23 +21440,29 @@ public interface MoveFunctionInterface { open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -22466,7 +21484,7 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -22478,9 +21496,9 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -22491,28 +21509,37 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_movefunction(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_movefunction(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction(handle, status) } } override fun `isEntry`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry( + it, + _status) } } ) @@ -22521,10 +21548,11 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface override fun `name`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_name( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name( + it, + _status) } } ) @@ -22533,10 +21561,11 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface override fun `parameters`(): List? { return FfiConverterOptionalSequenceTypeOpenMoveType.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters( + it, + _status) } } ) @@ -22545,10 +21574,11 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface override fun `returnType`(): List? { return FfiConverterOptionalSequenceTypeOpenMoveType.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type( + it, + _status) } } ) @@ -22557,10 +21587,11 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface override fun `typeParameters`(): List? { return FfiConverterOptionalSequenceTypeMoveFunctionTypeParameter.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters( + it, + _status) } } ) @@ -22569,10 +21600,11 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface override fun `visibility`(): MoveVisibility? { return FfiConverterOptionalTypeMoveVisibility.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility( + it, + _status) } } ) @@ -22580,68 +21612,68 @@ open class MoveFunction: Disposable, AutoCloseable, MoveFunctionInterface + + + + // The local Rust `Display`/`Debug` implementation. override fun toString(): String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display( + it, + _status) } } ) } - + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMoveFunction: FfiConverter { - - override fun lower(value: MoveFunction): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMoveFunction: FfiConverter { + override fun lower(value: MoveFunction): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MoveFunction { - return MoveFunction(value) + override fun lift(value: Long): MoveFunction { + return MoveFunction(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MoveFunction { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MoveFunction) = 8UL override fun write(value: MoveFunction, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -22666,13 +21698,13 @@ public object FfiConverterTypeMoveFunction: FfiConverter // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -22725,6 +21757,7 @@ public object FfiConverterTypeMoveFunction: FfiConverter // +// /** * A move package * @@ -22773,30 +21806,37 @@ public interface MovePackageInterface { open class MovePackage: Disposable, AutoCloseable, MovePackageInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`id`: ObjectId, `version`: kotlin.ULong, `modules`: Map, `typeOriginTable`: List, `linkageTable`: Map) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new( + FfiConverterTypeObjectId.lower(`id`),FfiConverterULong.lower(`version`),FfiConverterMapTypeIdentifierByteArray.lower(`modules`),FfiConverterSequenceTypeTypeOrigin.lower(`typeOriginTable`),FfiConverterMapTypeObjectIdTypeUpgradeInfo.lower(`linkageTable`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -22818,7 +21858,7 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -22830,9 +21870,9 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -22843,28 +21883,37 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_movepackage(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_movepackage(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage(handle, status) } } override fun `id`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movepackage_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id( + it, + _status) } } ) @@ -22873,10 +21922,11 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface override fun `linkageTable`(): Map { return FfiConverterMapTypeObjectIdTypeUpgradeInfo.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table( + it, + _status) } } ) @@ -22885,10 +21935,11 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface override fun `modules`(): Map { return FfiConverterMapTypeIdentifierByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movepackage_modules( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules( + it, + _status) } } ) @@ -22897,10 +21948,11 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface override fun `typeOriginTable`(): List { return FfiConverterSequenceTypeTypeOrigin.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table( + it, + _status) } } ) @@ -22909,10 +21961,11 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface override fun `version`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_movepackage_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version( + it, + _status) } } ) @@ -22922,55 +21975,54 @@ open class MovePackage: Disposable, AutoCloseable, MovePackageInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMovePackage: FfiConverter { - - override fun lower(value: MovePackage): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMovePackage: FfiConverter { + override fun lower(value: MovePackage): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MovePackage { - return MovePackage(value) + override fun lift(value: Long): MovePackage { + return MovePackage(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MovePackage { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MovePackage) = 8UL override fun write(value: MovePackage, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -22995,13 +22047,13 @@ public object FfiConverterTypeMovePackage: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -23054,6 +22106,7 @@ public object FfiConverterTypeMovePackage: FfiConverter { // +// /** * Aggregated signature from members of a multisig committee. * @@ -23129,20 +22182,26 @@ public interface MultisigAggregatedSignatureInterface { open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggregatedSignatureInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** * Construct a new aggregated multisig signature. @@ -23154,14 +22213,15 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre * and that it's position in the provided bitmap is set. */ constructor(`committee`: MultisigCommittee, `signatures`: List, `bitmap`: kotlin.UShort) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new( + FfiConverterTypeMultisigCommittee.lower(`committee`),FfiConverterSequenceTypeMultisigMemberSignature.lower(`signatures`),FfiConverterUShort.lower(`bitmap`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -23183,7 +22243,7 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -23195,9 +22255,9 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -23208,19 +22268,27 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature(handle, status) } } @@ -23230,10 +22298,11 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre * signature. */override fun `bitmap`(): kotlin.UShort { return FfiConverterUShort.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap( + it, + _status) } } ) @@ -23242,10 +22311,11 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre override fun `committee`(): MultisigCommittee { return FfiConverterTypeMultisigCommittee.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee( + it, + _status) } } ) @@ -23257,10 +22327,11 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre * The list of signatures from committee members */override fun `signatures`(): List { return FfiConverterSequenceTypeMultisigMemberSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures( + it, + _status) } } ) @@ -23270,55 +22341,54 @@ open class MultisigAggregatedSignature: Disposable, AutoCloseable, MultisigAggre + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigAggregatedSignature: FfiConverter { - - override fun lower(value: MultisigAggregatedSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigAggregatedSignature: FfiConverter { + override fun lower(value: MultisigAggregatedSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigAggregatedSignature { - return MultisigAggregatedSignature(value) + override fun lift(value: Long): MultisigAggregatedSignature { + return MultisigAggregatedSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigAggregatedSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigAggregatedSignature) = 8UL override fun write(value: MultisigAggregatedSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23343,13 +22413,13 @@ public object FfiConverterTypeMultisigAggregatedSignature: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -23468,9 +22545,9 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -23481,29 +22558,38 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigaggregator(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator(handle, status) } } @Throws(SdkFfiException::class)override fun `finish`(): MultisigAggregatedSignature { return FfiConverterTypeMultisigAggregatedSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish( + it, + _status) } } ) @@ -23512,10 +22598,11 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte override fun `verifier`(): MultisigVerifier { return FfiConverterTypeMultisigVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier( + it, + _status) } } ) @@ -23525,10 +22612,11 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte @Throws(SdkFfiException::class)override fun `withSignature`(`signature`: UserSignature): MultisigAggregator { return FfiConverterTypeMultisigAggregator.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature( - it, FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature( + it, + FfiConverterTypeUserSignature.lower(`signature`),_status) } } ) @@ -23537,10 +22625,11 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte override fun `withVerifier`(`verifier`: MultisigVerifier): MultisigAggregator { return FfiConverterTypeMultisigAggregator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier( - it, FfiConverterTypeMultisigVerifier.lower(`verifier`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier( + it, + FfiConverterTypeMultisigVerifier.lower(`verifier`),_status) } } ) @@ -23550,11 +22639,15 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte + + + companion object { fun `newWithMessage`(`committee`: MultisigCommittee, `message`: kotlin.ByteArray): MultisigAggregator { return FfiConverterTypeMultisigAggregator.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message( + FfiConverterTypeMultisigCommittee.lower(`committee`),FfiConverterByteArray.lower(`message`),_status) } ) @@ -23564,7 +22657,8 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte fun `newWithTransaction`(`committee`: MultisigCommittee, `transaction`: Transaction): MultisigAggregator { return FfiConverterTypeMultisigAggregator.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction( + FfiConverterTypeMultisigCommittee.lower(`committee`),FfiConverterTypeTransaction.lower(`transaction`),_status) } ) @@ -23576,50 +22670,43 @@ open class MultisigAggregator: Disposable, AutoCloseable, MultisigAggregatorInte } + /** * @suppress */ -public object FfiConverterTypeMultisigAggregator: FfiConverter { - - override fun lower(value: MultisigAggregator): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigAggregator: FfiConverter { + override fun lower(value: MultisigAggregator): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigAggregator { - return MultisigAggregator(value) + override fun lift(value: Long): MultisigAggregator { + return MultisigAggregator(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigAggregator { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigAggregator) = 8UL override fun write(value: MultisigAggregator, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23644,13 +22731,13 @@ public object FfiConverterTypeMultisigAggregator: FfiConverter, `threshold`: kotlin.UShort) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new( + FfiConverterSequenceTypeMultisigMember.lower(`members`),FfiConverterUShort.lower(`threshold`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -23862,7 +22957,7 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -23874,9 +22969,9 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -23887,19 +22982,27 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigcommittee(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee(handle, status) } } @@ -23924,10 +23027,11 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf * [`ZkLoginPublicIdentifier::derive_address_padded`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier::derive_address_padded */override fun `deriveAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address( + it, + _status) } } ) @@ -23948,10 +23052,11 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf * - contains no duplicate members */override fun `isValid`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid( + it, + _status) } } ) @@ -23963,10 +23068,11 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf * The members of the committee */override fun `members`(): List { return FfiConverterSequenceTypeMultisigMember.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members( + it, + _status) } } ) @@ -23978,10 +23084,11 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf * Return the flag for this signature scheme */override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme( + it, + _status) } } ) @@ -23994,10 +23101,11 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf * address corresponding to this `MultisigCommittee`. */override fun `threshold`(): kotlin.UShort { return FfiConverterUShort.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold( + it, + _status) } } ) @@ -24007,55 +23115,54 @@ open class MultisigCommittee: Disposable, AutoCloseable, MultisigCommitteeInterf + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigCommittee: FfiConverter { - - override fun lower(value: MultisigCommittee): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigCommittee: FfiConverter { + override fun lower(value: MultisigCommittee): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigCommittee { - return MultisigCommittee(value) + override fun lift(value: Long): MultisigCommittee { + return MultisigCommittee(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigCommittee { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigCommittee) = 8UL override fun write(value: MultisigCommittee, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -24080,13 +23187,13 @@ public object FfiConverterTypeMultisigCommittee: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new( + FfiConverterTypeMultisigMemberPublicKey.lower(`publicKey`),FfiConverterUByte.lower(`weight`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -24243,7 +23358,7 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -24255,9 +23370,9 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -24268,19 +23383,27 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigmember(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigmember(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember(handle, status) } } @@ -24289,10 +23412,11 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface * This member's public key. */override fun `publicKey`(): MultisigMemberPublicKey { return FfiConverterTypeMultisigMemberPublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key( + it, + _status) } } ) @@ -24304,10 +23428,11 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface * Weight of this member's signature. */override fun `weight`(): kotlin.UByte { return FfiConverterUByte.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight( + it, + _status) } } ) @@ -24317,55 +23442,54 @@ open class MultisigMember: Disposable, AutoCloseable, MultisigMemberInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigMember: FfiConverter { - - override fun lower(value: MultisigMember): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigMember: FfiConverter { + override fun lower(value: MultisigMember): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigMember { - return MultisigMember(value) + override fun lift(value: Long): MultisigMember { + return MultisigMember(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigMember { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigMember) = 8UL override fun write(value: MultisigMember, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -24390,13 +23514,13 @@ public object FfiConverterTypeMultisigMember: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -24591,9 +23722,9 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -24604,28 +23735,37 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey(handle, status) } } override fun `asEd25519`(): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519( + it, + _status) } } ) @@ -24634,10 +23774,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asEd25519Opt`(): Ed25519PublicKey? { return FfiConverterOptionalTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt( + it, + _status) } } ) @@ -24646,10 +23787,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asSecp256k1`(): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1( + it, + _status) } } ) @@ -24658,10 +23800,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asSecp256k1Opt`(): Secp256k1PublicKey? { return FfiConverterOptionalTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt( + it, + _status) } } ) @@ -24670,10 +23813,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asSecp256r1`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1( + it, + _status) } } ) @@ -24682,10 +23826,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asSecp256r1Opt`(): Secp256r1PublicKey? { return FfiConverterOptionalTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt( + it, + _status) } } ) @@ -24694,10 +23839,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asZklogin`(): ZkLoginPublicIdentifier { return FfiConverterTypeZkLoginPublicIdentifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin( + it, + _status) } } ) @@ -24706,10 +23852,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `asZkloginOpt`(): ZkLoginPublicIdentifier? { return FfiConverterOptionalTypeZkLoginPublicIdentifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt( + it, + _status) } } ) @@ -24718,10 +23865,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `isEd25519`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519( + it, + _status) } } ) @@ -24730,10 +23878,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `isSecp256k1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1( + it, + _status) } } ) @@ -24742,10 +23891,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `isSecp256r1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1( + it, + _status) } } ) @@ -24754,10 +23904,11 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub override fun `isZklogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin( + it, + _status) } } ) @@ -24767,55 +23918,54 @@ open class MultisigMemberPublicKey: Disposable, AutoCloseable, MultisigMemberPub + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigMemberPublicKey: FfiConverter { - - override fun lower(value: MultisigMemberPublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigMemberPublicKey: FfiConverter { + override fun lower(value: MultisigMemberPublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigMemberPublicKey { - return MultisigMemberPublicKey(value) + override fun lift(value: Long): MultisigMemberPublicKey { + return MultisigMemberPublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigMemberPublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigMemberPublicKey) = 8UL override fun write(value: MultisigMemberPublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -24840,13 +23990,13 @@ public object FfiConverterTypeMultisigMemberPublicKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -25019,9 +24176,9 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -25032,28 +24189,37 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature(handle, status) } } override fun `asEd25519`(): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519( + it, + _status) } } ) @@ -25062,10 +24228,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asEd25519Opt`(): Ed25519Signature? { return FfiConverterOptionalTypeEd25519Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt( + it, + _status) } } ) @@ -25074,10 +24241,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asSecp256k1`(): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1( + it, + _status) } } ) @@ -25086,10 +24254,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asSecp256k1Opt`(): Secp256k1Signature? { return FfiConverterOptionalTypeSecp256k1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt( + it, + _status) } } ) @@ -25098,10 +24267,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asSecp256r1`(): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1( + it, + _status) } } ) @@ -25110,10 +24280,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asSecp256r1Opt`(): Secp256r1Signature? { return FfiConverterOptionalTypeSecp256r1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt( + it, + _status) } } ) @@ -25122,10 +24293,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asZklogin`(): ZkLoginAuthenticator { return FfiConverterTypeZkLoginAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin( + it, + _status) } } ) @@ -25134,10 +24306,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `asZkloginOpt`(): ZkLoginAuthenticator? { return FfiConverterOptionalTypeZkLoginAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt( + it, + _status) } } ) @@ -25146,10 +24319,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `isEd25519`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519( + it, + _status) } } ) @@ -25158,10 +24332,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `isSecp256k1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1( + it, + _status) } } ) @@ -25170,10 +24345,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `isSecp256r1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1( + it, + _status) } } ) @@ -25182,10 +24358,11 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig override fun `isZklogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin( + it, + _status) } } ) @@ -25195,55 +24372,54 @@ open class MultisigMemberSignature: Disposable, AutoCloseable, MultisigMemberSig + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigMemberSignature: FfiConverter { - - override fun lower(value: MultisigMemberSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigMemberSignature: FfiConverter { + override fun lower(value: MultisigMemberSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigMemberSignature { - return MultisigMemberSignature(value) + override fun lift(value: Long): MultisigMemberSignature { + return MultisigMemberSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigMemberSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigMemberSignature) = 8UL override fun write(value: MultisigMemberSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25268,13 +24444,13 @@ public object FfiConverterTypeMultisigMemberSignature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -25386,7 +24570,7 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -25398,9 +24582,9 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -25411,29 +24595,38 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_multisigverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_multisigverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: MultisigAggregatedSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeMultisigAggregatedSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeMultisigAggregatedSignature.lower(`signature`),_status) } } @@ -25441,10 +24634,11 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac override fun `withZkloginVerifier`(`zkloginVerifier`: ZkloginVerifier): MultisigVerifier { return FfiConverterTypeMultisigVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier( - it, FfiConverterTypeZkloginVerifier.lower(`zkloginVerifier`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier( + it, + FfiConverterTypeZkloginVerifier.lower(`zkloginVerifier`),_status) } } ) @@ -25453,10 +24647,11 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac override fun `zkloginVerifier`(): ZkloginVerifier? { return FfiConverterOptionalTypeZkloginVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier( + it, + _status) } } ) @@ -25466,55 +24661,54 @@ open class MultisigVerifier: Disposable, AutoCloseable, MultisigVerifierInterfac + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMultisigVerifier: FfiConverter { - - override fun lower(value: MultisigVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMultisigVerifier: FfiConverter { + override fun lower(value: MultisigVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MultisigVerifier { - return MultisigVerifier(value) + override fun lift(value: Long): MultisigVerifier { + return MultisigVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MultisigVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MultisigVerifier) = 8UL override fun write(value: MultisigVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25539,13 +24733,13 @@ public object FfiConverterTypeMultisigVerifier: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -25693,9 +24894,9 @@ open class Name: Disposable, AutoCloseable, NameInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -25706,19 +24907,27 @@ open class Name: Disposable, AutoCloseable, NameInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_name(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_name(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_name(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name(handle, status) } } @@ -25728,10 +24937,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * The default separator is `.` */override fun `format`(`format`: NameFormat): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_format( - it, FfiConverterTypeNameFormat.lower(`format`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format( + it, + FfiConverterTypeNameFormat.lower(`format`),_status) } } ) @@ -25743,10 +24953,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * Returns whether this name is a second-level name (Ex. `test.iota`) */override fun `isSln`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_is_sln( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln( + it, + _status) } } ) @@ -25758,10 +24969,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * Returns whether this name is a subname (Ex. `sub.test.iota`) */override fun `isSubname`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_is_subname( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname( + it, + _status) } } ) @@ -25773,10 +24985,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * Get the label at the given index */override fun `label`(`index`: kotlin.UInt): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_label( - it, FfiConverterUInt.lower(`index`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label( + it, + FfiConverterUInt.lower(`index`),_status) } } ) @@ -25789,10 +25002,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * the top-level name and proceeding to subnames. */override fun `labels`(): List { return FfiConverterSequenceString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_labels( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels( + it, + _status) } } ) @@ -25804,10 +25018,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * Returns the number of labels including TLN. */override fun `numLabels`(): kotlin.UInt { return FfiConverterUInt.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_num_labels( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels( + it, + _status) } } ) @@ -25819,10 +25034,11 @@ open class Name: Disposable, AutoCloseable, NameInterface * parents; second-level names return `None`. */override fun `parent`(): Name? { return FfiConverterOptionalTypeName.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_name_parent( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent( + it, + _status) } } ) @@ -25832,12 +25048,16 @@ open class Name: Disposable, AutoCloseable, NameInterface + + + companion object { @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Name { return FfiConverterTypeName.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_name_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -25849,50 +25069,43 @@ open class Name: Disposable, AutoCloseable, NameInterface } + /** * @suppress */ -public object FfiConverterTypeName: FfiConverter { - - override fun lower(value: Name): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeName: FfiConverter { + override fun lower(value: Name): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Name { - return Name(value) + override fun lift(value: Long): Name { + return Name(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Name { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Name) = 8UL override fun write(value: Name, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25917,13 +25130,13 @@ public object FfiConverterTypeName: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -25976,6 +25189,7 @@ public object FfiConverterTypeName: FfiConverter { // +// /** * An object to manage a second-level name (SLN). */ @@ -25998,30 +25212,37 @@ public interface NameRegistrationInterface { open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`id`: ObjectId, `name`: Name, `nameStr`: kotlin.String, `expirationTimestampMs`: kotlin.ULong) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new( + FfiConverterTypeObjectId.lower(`id`),FfiConverterTypeName.lower(`name`),FfiConverterString.lower(`nameStr`),FfiConverterULong.lower(`expirationTimestampMs`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -26043,7 +25264,7 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -26055,9 +25276,9 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -26068,28 +25289,37 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_nameregistration(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_nameregistration(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration(handle, status) } } override fun `expirationTimestampMs`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms( + it, + _status) } } ) @@ -26098,10 +25328,11 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac override fun `id`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_nameregistration_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id( + it, + _status) } } ) @@ -26110,10 +25341,11 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac override fun `name`(): Name { return FfiConverterTypeName.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_nameregistration_name( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name( + it, + _status) } } ) @@ -26122,10 +25354,11 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac override fun `nameStr`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str( + it, + _status) } } ) @@ -26135,55 +25368,54 @@ open class NameRegistration: Disposable, AutoCloseable, NameRegistrationInterfac + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeNameRegistration: FfiConverter { - - override fun lower(value: NameRegistration): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeNameRegistration: FfiConverter { + override fun lower(value: NameRegistration): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): NameRegistration { - return NameRegistration(value) + override fun lift(value: Long): NameRegistration { + return NameRegistration(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): NameRegistration { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: NameRegistration) = 8UL override fun write(value: NameRegistration, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -26208,13 +25440,13 @@ public object FfiConverterTypeNameRegistration: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_object_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new( + FfiConverterTypeObjectData.lower(`data`),FfiConverterTypeOwner.lower(`owner`),FfiConverterTypeDigest.lower(`previousTransaction`),FfiConverterULong.lower(`storageRebate`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -26407,7 +25647,7 @@ open class Object: Disposable, AutoCloseable, ObjectInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -26419,9 +25659,9 @@ open class Object: Disposable, AutoCloseable, ObjectInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -26432,19 +25672,27 @@ open class Object: Disposable, AutoCloseable, ObjectInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_object(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_object(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_object(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object(handle, status) } } @@ -26453,10 +25701,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Interpret this object as a move package */override fun `asPackage`(): MovePackage { return FfiConverterTypeMovePackage.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_as_package( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package( + it, + _status) } } ) @@ -26468,10 +25717,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Try to interpret this object as a move package */override fun `asPackageOpt`(): MovePackage? { return FfiConverterOptionalTypeMovePackage.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt( + it, + _status) } } ) @@ -26483,10 +25733,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Interpret this object as a move struct */override fun `asStruct`(): MoveStruct { return FfiConverterTypeMoveStruct.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_as_struct( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct( + it, + _status) } } ) @@ -26498,10 +25749,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Try to interpret this object as a move struct */override fun `asStructOpt`(): MoveStruct? { return FfiConverterOptionalTypeMoveStruct.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt( + it, + _status) } } ) @@ -26513,10 +25765,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return this object's data */override fun `data`(): ObjectData { return FfiConverterTypeObjectData.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_data( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data( + it, + _status) } } ) @@ -26530,10 +25783,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * This is done by hashing the BCS bytes of this `Object` prefixed */override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest( + it, + _status) } } ) @@ -26545,10 +25799,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return this object's id */override fun `objectId`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_object_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id( + it, + _status) } } ) @@ -26560,10 +25815,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return this object's type */override fun `objectType`(): ObjectType { return FfiConverterTypeObjectType.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_object_type( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type( + it, + _status) } } ) @@ -26575,10 +25831,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return this object's owner */override fun `owner`(): Owner { return FfiConverterTypeOwner.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_owner( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner( + it, + _status) } } ) @@ -26590,10 +25847,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return the digest of the transaction that last modified this object */override fun `previousTransaction`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction( + it, + _status) } } ) @@ -26608,10 +25866,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * deletes this object. */override fun `storageRebate`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate( + it, + _status) } } ) @@ -26623,10 +25882,11 @@ open class Object: Disposable, AutoCloseable, ObjectInterface * Return this object's version */override fun `version`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_object_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version( + it, + _status) } } ) @@ -26636,55 +25896,54 @@ open class Object: Disposable, AutoCloseable, ObjectInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeObject: FfiConverter { - - override fun lower(value: Object): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeObject: FfiConverter { + override fun lower(value: Object): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Object { - return Object(value) + override fun lift(value: Long): Object { + return Object(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Object { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Object) = 8UL override fun write(value: Object, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -26709,13 +25968,13 @@ public object FfiConverterTypeObject: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -26768,6 +26027,7 @@ public object FfiConverterTypeObject: FfiConverter { // +// /** * Object data, either a package or struct * @@ -26824,23 +26084,29 @@ public interface ObjectDataInterface { open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -26862,7 +26128,7 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -26874,9 +26140,9 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -26887,19 +26153,27 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_objectdata(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_objectdata(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata(handle, status) } } @@ -26908,10 +26182,11 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface * Try to interpret this object as a `MovePackage` */override fun `asPackageOpt`(): MovePackage? { return FfiConverterOptionalTypeMovePackage.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt( + it, + _status) } } ) @@ -26923,10 +26198,11 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface * Try to interpret this object as a `MoveStruct` */override fun `asStructOpt`(): MoveStruct? { return FfiConverterOptionalTypeMoveStruct.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt( + it, + _status) } } ) @@ -26938,10 +26214,11 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface * Return whether this object is a `MovePackage` */override fun `isPackage`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package( + it, + _status) } } ) @@ -26953,10 +26230,11 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface * Return whether this object is a `MoveStruct` */override fun `isStruct`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct( + it, + _status) } } ) @@ -26966,6 +26244,9 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface + + + companion object { /** @@ -26973,7 +26254,8 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface */ fun `newMovePackage`(`movePackage`: MovePackage): ObjectData { return FfiConverterTypeObjectData.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package( + FfiConverterTypeMovePackage.lower(`movePackage`),_status) } ) @@ -26986,7 +26268,8 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface */ fun `newMoveStruct`(`moveStruct`: MoveStruct): ObjectData { return FfiConverterTypeObjectData.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct( + FfiConverterTypeMoveStruct.lower(`moveStruct`),_status) } ) @@ -26998,50 +26281,43 @@ open class ObjectData: Disposable, AutoCloseable, ObjectDataInterface } + /** * @suppress */ -public object FfiConverterTypeObjectData: FfiConverter { - - override fun lower(value: ObjectData): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeObjectData: FfiConverter { + override fun lower(value: ObjectData): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ObjectData { - return ObjectData(value) + override fun lift(value: Long): ObjectData { + return ObjectData(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ObjectData { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ObjectData) = 8UL override fun write(value: ObjectData, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27066,13 +26342,13 @@ public object FfiConverterTypeObjectData: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -27125,6 +26401,7 @@ public object FfiConverterTypeObjectData: FfiConverter { // +// /** * An `ObjectId` is a 32-byte identifier used to uniquely identify an object on * the IOTA blockchain. @@ -27186,23 +26463,29 @@ public interface ObjectIdInterface { open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -27224,7 +26507,7 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -27236,9 +26519,9 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -27249,19 +26532,27 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_objectid(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_objectid(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid(handle, status) } } @@ -27272,10 +26563,11 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface * hash(parent || len(key) || key || key_type_tag) */override fun `deriveDynamicChildId`(`keyTypeTag`: TypeTag, `keyBytes`: kotlin.ByteArray): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id( - it, FfiConverterTypeTypeTag.lower(`keyTypeTag`),FfiConverterByteArray.lower(`keyBytes`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id( + it, + FfiConverterTypeTypeTag.lower(`keyTypeTag`),FfiConverterByteArray.lower(`keyBytes`),_status) } } ) @@ -27284,10 +26576,11 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface override fun `toAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectid_to_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address( + it, + _status) } } ) @@ -27296,10 +26589,11 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes( + it, + _status) } } ) @@ -27308,10 +26602,11 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface override fun `toHex`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex( + it, + _status) } } ) @@ -27319,12 +26614,17 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface + + + + // The local Rust `Hash` implementation override fun hashCode(): Int { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash( + it, + _status) } } ).toInt() @@ -27339,7 +26639,8 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface */ fun `deriveId`(`digest`: Digest, `count`: kotlin.ULong): ObjectId { return FfiConverterTypeObjectId.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id( + FfiConverterTypeDigest.lower(`digest`),FfiConverterULong.lower(`count`),_status) } ) @@ -27350,7 +26651,8 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): ObjectId { return FfiConverterTypeObjectId.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -27361,7 +26663,8 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface @Throws(SdkFfiException::class) fun `fromHex`(`hex`: kotlin.String): ObjectId { return FfiConverterTypeObjectId.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex( + FfiConverterString.lower(`hex`),_status) } ) @@ -27373,50 +26676,43 @@ open class ObjectId: Disposable, AutoCloseable, ObjectIdInterface } + /** * @suppress */ -public object FfiConverterTypeObjectId: FfiConverter { - - override fun lower(value: ObjectId): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeObjectId: FfiConverter { + override fun lower(value: ObjectId): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ObjectId { - return ObjectId(value) + override fun lift(value: Long): ObjectId { + return ObjectId(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ObjectId { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ObjectId) = 8UL override fun write(value: ObjectId, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27441,13 +26737,13 @@ public object FfiConverterTypeObjectId: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -27500,6 +26796,7 @@ public object FfiConverterTypeObjectId: FfiConverter { // +// /** * Type of an IOTA object */ @@ -27522,23 +26819,29 @@ public interface ObjectTypeInterface { open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -27560,7 +26863,7 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -27572,9 +26875,9 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -27585,28 +26888,37 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_objecttype(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_objecttype(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype(handle, status) } } override fun `asStruct`(): StructTag { return FfiConverterTypeStructTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct( + it, + _status) } } ) @@ -27615,10 +26927,11 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface override fun `asStructOpt`(): StructTag? { return FfiConverterOptionalTypeStructTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt( + it, + _status) } } ) @@ -27627,10 +26940,11 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface override fun `isPackage`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package( + it, + _status) } } ) @@ -27639,10 +26953,11 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface override fun `isStruct`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct( + it, + _status) } } ) @@ -27650,24 +26965,29 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface + + + + // The local Rust `Display`/`Debug` implementation. override fun toString(): String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display( + it, + _status) } } ) } - companion object { fun `newPackage`(): ObjectType { return FfiConverterTypeObjectType.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package( + _status) } ) @@ -27677,7 +26997,8 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface fun `newStruct`(`structTag`: StructTag): ObjectType { return FfiConverterTypeObjectType.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct( + FfiConverterTypeStructTag.lower(`structTag`),_status) } ) @@ -27689,50 +27010,43 @@ open class ObjectType: Disposable, AutoCloseable, ObjectTypeInterface } + /** * @suppress */ -public object FfiConverterTypeObjectType: FfiConverter { - - override fun lower(value: ObjectType): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeObjectType: FfiConverter { + override fun lower(value: ObjectType): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ObjectType { - return ObjectType(value) + override fun lift(value: Long): ObjectType { + return ObjectType(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ObjectType { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ObjectType) = 8UL override fun write(value: ObjectType, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27757,13 +27071,13 @@ public object FfiConverterTypeObjectType: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -27816,6 +27130,7 @@ public object FfiConverterTypeObjectType: FfiConverter { // +// /** * Enum of different types of ownership for an object. * @@ -27876,23 +27191,29 @@ public interface OwnerInterface { open class Owner: Disposable, AutoCloseable, OwnerInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -27914,7 +27235,7 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -27926,9 +27247,9 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -27939,28 +27260,37 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_owner(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_owner(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner(handle, status) } } override fun `asAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address( + it, + _status) } } ) @@ -27969,10 +27299,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `asAddressOpt`(): Address? { return FfiConverterOptionalTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt( + it, + _status) } } ) @@ -27981,10 +27312,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `asObject`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_object( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object( + it, + _status) } } ) @@ -27993,10 +27325,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `asObjectOpt`(): ObjectId? { return FfiConverterOptionalTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt( + it, + _status) } } ) @@ -28005,10 +27338,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `asShared`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_shared( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared( + it, + _status) } } ) @@ -28017,10 +27351,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `asSharedOpt`(): kotlin.ULong? { return FfiConverterOptionalULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt( + it, + _status) } } ) @@ -28029,10 +27364,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `isAddress`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_is_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address( + it, + _status) } } ) @@ -28041,10 +27377,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `isImmutable`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable( + it, + _status) } } ) @@ -28053,10 +27390,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `isObject`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_is_object( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object( + it, + _status) } } ) @@ -28065,10 +27403,11 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface override fun `isShared`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_is_shared( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared( + it, + _status) } } ) @@ -28076,24 +27415,29 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface + + + + // The local Rust `Display`/`Debug` implementation. override fun toString(): String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display( + it, + _status) } } ) } - companion object { fun `newAddress`(`address`: Address): Owner { return FfiConverterTypeOwner.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address( + FfiConverterTypeAddress.lower(`address`),_status) } ) @@ -28103,7 +27447,8 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface fun `newImmutable`(): Owner { return FfiConverterTypeOwner.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable( + _status) } ) @@ -28113,7 +27458,8 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface fun `newObject`(`id`: ObjectId): Owner { return FfiConverterTypeOwner.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object( + FfiConverterTypeObjectId.lower(`id`),_status) } ) @@ -28123,7 +27469,8 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface fun `newShared`(`version`: kotlin.ULong): Owner { return FfiConverterTypeOwner.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared( + FfiConverterULong.lower(`version`),_status) } ) @@ -28135,50 +27482,43 @@ open class Owner: Disposable, AutoCloseable, OwnerInterface } + /** * @suppress */ -public object FfiConverterTypeOwner: FfiConverter { - - override fun lower(value: Owner): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeOwner: FfiConverter { + override fun lower(value: Owner): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Owner { - return Owner(value) + override fun lift(value: Long): Owner { + return Owner(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Owner { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Owner) = 8UL override fun write(value: Owner, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -28203,13 +27543,13 @@ public object FfiConverterTypeOwner: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -28262,6 +27602,7 @@ public object FfiConverterTypeOwner: FfiConverter { // +// public interface PtbArgumentInterface { companion object @@ -28270,23 +27611,29 @@ public interface PtbArgumentInterface { open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -28308,7 +27655,7 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -28320,9 +27667,9 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -28333,30 +27680,42 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_ptbargument(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_ptbargument(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument(handle, status) } } + + + companion object { fun `address`(`address`: Address): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address( + FfiConverterTypeAddress.lower(`address`),_status) } ) @@ -28366,7 +27725,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `digest`(`digest`: Digest): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest( + FfiConverterTypeDigest.lower(`digest`),_status) } ) @@ -28376,7 +27736,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `gas`(): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas( + _status) } ) @@ -28386,7 +27747,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `objectId`(`id`: ObjectId): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id( + FfiConverterTypeObjectId.lower(`id`),_status) } ) @@ -28396,7 +27758,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `receiving`(`id`: ObjectId): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving( + FfiConverterTypeObjectId.lower(`id`),_status) } ) @@ -28406,7 +27769,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `res`(`name`: kotlin.String): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res( + FfiConverterString.lower(`name`),_status) } ) @@ -28416,7 +27780,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `shared`(`id`: ObjectId): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared( + FfiConverterTypeObjectId.lower(`id`),_status) } ) @@ -28426,7 +27791,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `sharedMut`(`id`: ObjectId): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut( + FfiConverterTypeObjectId.lower(`id`),_status) } ) @@ -28436,7 +27802,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `string`(`string`: kotlin.String): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string( + FfiConverterString.lower(`string`),_status) } ) @@ -28446,7 +27813,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u128`(`value`: kotlin.String): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128( + FfiConverterString.lower(`value`),_status) } ) @@ -28456,7 +27824,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u16`(`value`: kotlin.UShort): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16( + FfiConverterUShort.lower(`value`),_status) } ) @@ -28466,7 +27835,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u256`(`value`: kotlin.String): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256( + FfiConverterString.lower(`value`),_status) } ) @@ -28476,7 +27846,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u32`(`value`: kotlin.UInt): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32( + FfiConverterUInt.lower(`value`),_status) } ) @@ -28486,7 +27857,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u64`(`value`: kotlin.ULong): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64( + FfiConverterULong.lower(`value`),_status) } ) @@ -28496,7 +27868,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `u8`(`value`: kotlin.UByte): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8( + FfiConverterUByte.lower(`value`),_status) } ) @@ -28506,7 +27879,8 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface fun `vector`(`vec`: List): PtbArgument { return FfiConverterTypePTBArgument.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector( + FfiConverterSequenceByteArray.lower(`vec`),_status) } ) @@ -28518,50 +27892,43 @@ open class PtbArgument: Disposable, AutoCloseable, PtbArgumentInterface } + /** * @suppress */ -public object FfiConverterTypePTBArgument: FfiConverter { - - override fun lower(value: PtbArgument): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePTBArgument: FfiConverter { + override fun lower(value: PtbArgument): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): PtbArgument { - return PtbArgument(value) + override fun lift(value: Long): PtbArgument { + return PtbArgument(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): PtbArgument { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: PtbArgument) = 8UL override fun write(value: PtbArgument, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -28586,13 +27953,13 @@ public object FfiConverterTypePTBArgument: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -28645,6 +28012,7 @@ public object FfiConverterTypePTBArgument: FfiConverter { // +// /** * A passkey authenticator. * @@ -28745,23 +28113,29 @@ public interface PasskeyAuthenticatorInterface { open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticatorInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -28783,7 +28157,7 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -28795,9 +28169,9 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -28808,19 +28182,27 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator(handle, status) } } @@ -28832,10 +28214,11 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator * more information on this field. */override fun `authenticatorData`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data( + it, + _status) } } ) @@ -28850,10 +28233,11 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator * `client_data_json.challenge` field. */override fun `challenge`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge( + it, + _status) } } ) @@ -28868,10 +28252,11 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator * for more information on this field. */override fun `clientDataJson`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json( + it, + _status) } } ) @@ -28883,10 +28268,11 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator * The passkey public key */override fun `publicKey`(): PasskeyPublicKey { return FfiConverterTypePasskeyPublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key( + it, + _status) } } ) @@ -28898,10 +28284,11 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator * The passkey signature. */override fun `signature`(): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature( + it, + _status) } } ) @@ -28911,55 +28298,54 @@ open class PasskeyAuthenticator: Disposable, AutoCloseable, PasskeyAuthenticator + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypePasskeyAuthenticator: FfiConverter { - - override fun lower(value: PasskeyAuthenticator): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePasskeyAuthenticator: FfiConverter { + override fun lower(value: PasskeyAuthenticator): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): PasskeyAuthenticator { - return PasskeyAuthenticator(value) + override fun lift(value: Long): PasskeyAuthenticator { + return PasskeyAuthenticator(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): PasskeyAuthenticator { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: PasskeyAuthenticator) = 8UL override fun write(value: PasskeyAuthenticator, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -28984,13 +28370,13 @@ public object FfiConverterTypePasskeyAuthenticator: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new( + FfiConverterTypeSecp256r1PublicKey.lower(`publicKey`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -29135,7 +28529,7 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -29147,9 +28541,9 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -29160,19 +28554,27 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_passkeypublickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey(handle, status) } } @@ -29187,10 +28589,11 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac * `hash( 0x06 || 33-byte secp256r1 public key)` */override fun `deriveAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address( + it, + _status) } } ) @@ -29199,10 +28602,11 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac override fun `inner`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner( + it, + _status) } } ) @@ -29212,55 +28616,54 @@ open class PasskeyPublicKey: Disposable, AutoCloseable, PasskeyPublicKeyInterfac + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypePasskeyPublicKey: FfiConverter { - - override fun lower(value: PasskeyPublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePasskeyPublicKey: FfiConverter { + override fun lower(value: PasskeyPublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): PasskeyPublicKey { - return PasskeyPublicKey(value) + override fun lift(value: Long): PasskeyPublicKey { + return PasskeyPublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): PasskeyPublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: PasskeyPublicKey) = 8UL override fun write(value: PasskeyPublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29285,13 +28688,13 @@ public object FfiConverterTypePasskeyPublicKey: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -29399,7 +28810,7 @@ open class PasskeyVerifier: Disposable, AutoCloseable, PasskeyVerifierInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -29411,9 +28822,9 @@ open class PasskeyVerifier: Disposable, AutoCloseable, PasskeyVerifierInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -29424,29 +28835,38 @@ open class PasskeyVerifier: Disposable, AutoCloseable, PasskeyVerifierInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_passkeyverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `authenticator`: PasskeyAuthenticator) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypePasskeyAuthenticator.lower(`authenticator`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypePasskeyAuthenticator.lower(`authenticator`),_status) } } @@ -29455,55 +28875,54 @@ open class PasskeyVerifier: Disposable, AutoCloseable, PasskeyVerifierInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypePasskeyVerifier: FfiConverter { - - override fun lower(value: PasskeyVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePasskeyVerifier: FfiConverter { + override fun lower(value: PasskeyVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): PasskeyVerifier { - return PasskeyVerifier(value) + override fun lift(value: Long): PasskeyVerifier { + return PasskeyVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): PasskeyVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: PasskeyVerifier) = 8UL override fun write(value: PasskeyVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29528,13 +28947,13 @@ public object FfiConverterTypePasskeyVerifier: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new( + FfiConverterByteArray.lower(`messageBytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -29644,7 +29071,7 @@ open class PersonalMessage: Disposable, AutoCloseable, PersonalMessageInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -29656,9 +29083,9 @@ open class PersonalMessage: Disposable, AutoCloseable, PersonalMessageInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -29669,28 +29096,37 @@ open class PersonalMessage: Disposable, AutoCloseable, PersonalMessageInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_personalmessage(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_personalmessage(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage(handle, status) } } override fun `messageBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes( + it, + _status) } } ) @@ -29699,10 +29135,11 @@ open class PersonalMessage: Disposable, AutoCloseable, PersonalMessageInterface override fun `signingDigest`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest( + it, + _status) } } ) @@ -29712,55 +29149,54 @@ open class PersonalMessage: Disposable, AutoCloseable, PersonalMessageInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypePersonalMessage: FfiConverter { - - override fun lower(value: PersonalMessage): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePersonalMessage: FfiConverter { + override fun lower(value: PersonalMessage): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): PersonalMessage { - return PersonalMessage(value) + override fun lift(value: Long): PersonalMessage { + return PersonalMessage(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): PersonalMessage { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: PersonalMessage) = 8UL override fun write(value: PersonalMessage, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29785,13 +29221,13 @@ public object FfiConverterTypePersonalMessage: FfiConverter, `commands`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new( + FfiConverterSequenceTypeInput.lower(`inputs`),FfiConverterSequenceTypeCommand.lower(`commands`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -29936,7 +29380,7 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -29948,9 +29392,9 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -29961,19 +29405,27 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_programmabletransaction(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction(handle, status) } } @@ -29983,10 +29435,11 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans * result in the failure of the entire transaction. */override fun `commands`(): List { return FfiConverterSequenceTypeCommand.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands( + it, + _status) } } ) @@ -29998,10 +29451,11 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans * Input objects or primitive values */override fun `inputs`(): List { return FfiConverterSequenceTypeInput.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs( + it, + _status) } } ) @@ -30011,55 +29465,54 @@ open class ProgrammableTransaction: Disposable, AutoCloseable, ProgrammableTrans + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeProgrammableTransaction: FfiConverter { - - override fun lower(value: ProgrammableTransaction): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeProgrammableTransaction: FfiConverter { + override fun lower(value: ProgrammableTransaction): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ProgrammableTransaction { - return ProgrammableTransaction(value) + override fun lift(value: Long): ProgrammableTransaction { + return ProgrammableTransaction(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ProgrammableTransaction { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ProgrammableTransaction) = 8UL override fun write(value: ProgrammableTransaction, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -30084,13 +29537,13 @@ public object FfiConverterTypeProgrammableTransaction: FfiConverter, `dependencies`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_publish_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new( + FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -30230,7 +29691,7 @@ open class Publish: Disposable, AutoCloseable, PublishInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -30242,9 +29703,9 @@ open class Publish: Disposable, AutoCloseable, PublishInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -30255,19 +29716,27 @@ open class Publish: Disposable, AutoCloseable, PublishInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_publish(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_publish(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish(handle, status) } } @@ -30276,10 +29745,11 @@ open class Publish: Disposable, AutoCloseable, PublishInterface * Set of packages that the to-be published package depends on */override fun `dependencies`(): List { return FfiConverterSequenceTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_publish_dependencies( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies( + it, + _status) } } ) @@ -30291,10 +29761,11 @@ open class Publish: Disposable, AutoCloseable, PublishInterface * The serialized move modules */override fun `modules`(): List { return FfiConverterSequenceByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_publish_modules( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules( + it, + _status) } } ) @@ -30304,55 +29775,54 @@ open class Publish: Disposable, AutoCloseable, PublishInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypePublish: FfiConverter { - - override fun lower(value: Publish): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypePublish: FfiConverter { + override fun lower(value: Publish): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Publish { - return Publish(value) + override fun lift(value: Long): Publish { + return Publish(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Publish { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Publish) = 8UL override fun write(value: Publish, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -30377,13 +29847,13 @@ public object FfiConverterTypePublish: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -30436,6 +29906,7 @@ public object FfiConverterTypePublish: FfiConverter { // +// public interface Secp256k1PrivateKeyInterface { fun `publicKey`(): Secp256k1PublicKey @@ -30477,30 +29948,37 @@ public interface Secp256k1PrivateKeyInterface { open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`bytes`: kotlin.ByteArray) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new( + FfiConverterByteArray.lower(`bytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -30522,7 +30000,7 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -30534,9 +30012,9 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -30547,28 +30025,37 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey(handle, status) } } override fun `publicKey`(): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key( + it, + _status) } } ) @@ -30577,10 +30064,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme( + it, + _status) } } ) @@ -30594,10 +30082,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toBech32`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32( + it, + _status) } } ) @@ -30609,10 +30098,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn * Serialize this private key to bytes. */override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes( + it, + _status) } } ) @@ -30625,10 +30115,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der( + it, + _status) } } ) @@ -30641,10 +30132,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem( + it, + _status) } } ) @@ -30654,10 +30146,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class)override fun `trySign`(`message`: kotlin.ByteArray): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -30667,10 +30160,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class)override fun `trySignSimple`(`message`: kotlin.ByteArray): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -30680,10 +30174,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class)override fun `trySignUser`(`message`: kotlin.ByteArray): UserSignature { return FfiConverterTypeUserSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -30692,10 +30187,11 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn override fun `verifyingKey`(): Secp256k1VerifyingKey { return FfiConverterTypeSecp256k1VerifyingKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key( + it, + _status) } } ) @@ -30705,6 +30201,9 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn + + + companion object { /** @@ -30714,7 +30213,8 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromBech32`(`value`: kotlin.String): Secp256k1PrivateKey { return FfiConverterTypeSecp256k1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32( + FfiConverterString.lower(`value`),_status) } ) @@ -30729,7 +30229,8 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Secp256k1PrivateKey { return FfiConverterTypeSecp256k1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -30743,7 +30244,8 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Secp256k1PrivateKey { return FfiConverterTypeSecp256k1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -30753,7 +30255,8 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn fun `generate`(): Secp256k1PrivateKey { return FfiConverterTypeSecp256k1PrivateKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate( + _status) } ) @@ -30765,50 +30268,43 @@ open class Secp256k1PrivateKey: Disposable, AutoCloseable, Secp256k1PrivateKeyIn } + /** * @suppress */ -public object FfiConverterTypeSecp256k1PrivateKey: FfiConverter { - - override fun lower(value: Secp256k1PrivateKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256k1PrivateKey: FfiConverter { + override fun lower(value: Secp256k1PrivateKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256k1PrivateKey { - return Secp256k1PrivateKey(value) + override fun lift(value: Long): Secp256k1PrivateKey { + return Secp256k1PrivateKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256k1PrivateKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256k1PrivateKey) = 8UL override fun write(value: Secp256k1PrivateKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -30833,13 +30329,13 @@ public object FfiConverterTypeSecp256k1PrivateKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -30990,9 +30493,9 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -31003,19 +30506,27 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey(handle, status) } } @@ -31030,10 +30541,11 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte * `hash( 0x01 || 33-byte secp256k1 public key)` */override fun `deriveAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address( + it, + _status) } } ) @@ -31045,10 +30557,11 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte * Return the flag for this signature scheme */override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme( + it, + _status) } } ) @@ -31057,10 +30570,11 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes( + it, + _status) } } ) @@ -31070,12 +30584,16 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -31086,7 +30604,8 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -31096,7 +30615,8 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte fun `generate`(): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate( + _status) } ) @@ -31108,50 +30628,43 @@ open class Secp256k1PublicKey: Disposable, AutoCloseable, Secp256k1PublicKeyInte } + /** * @suppress */ -public object FfiConverterTypeSecp256k1PublicKey: FfiConverter { - - override fun lower(value: Secp256k1PublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256k1PublicKey: FfiConverter { + override fun lower(value: Secp256k1PublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256k1PublicKey { - return Secp256k1PublicKey(value) + override fun lift(value: Long): Secp256k1PublicKey { + return Secp256k1PublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256k1PublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256k1PublicKey) = 8UL override fun write(value: Secp256k1PublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -31176,13 +30689,13 @@ public object FfiConverterTypeSecp256k1PublicKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -31317,9 +30837,9 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -31330,28 +30850,37 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256k1signature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature(handle, status) } } override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes( + it, + _status) } } ) @@ -31361,12 +30890,16 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -31377,7 +30910,8 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -31387,7 +30921,8 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte fun `generate`(): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate( + _status) } ) @@ -31399,50 +30934,43 @@ open class Secp256k1Signature: Disposable, AutoCloseable, Secp256k1SignatureInte } + /** * @suppress */ -public object FfiConverterTypeSecp256k1Signature: FfiConverter { - - override fun lower(value: Secp256k1Signature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256k1Signature: FfiConverter { + override fun lower(value: Secp256k1Signature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256k1Signature { - return Secp256k1Signature(value) + override fun lift(value: Long): Secp256k1Signature { + return Secp256k1Signature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256k1Signature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256k1Signature) = 8UL override fun write(value: Secp256k1Signature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -31467,13 +30995,13 @@ public object FfiConverterTypeSecp256k1Signature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -31583,7 +31119,7 @@ open class Secp256k1Verifier: Disposable, AutoCloseable, Secp256k1VerifierInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -31595,9 +31131,9 @@ open class Secp256k1Verifier: Disposable, AutoCloseable, Secp256k1VerifierInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -31608,29 +31144,38 @@ open class Secp256k1Verifier: Disposable, AutoCloseable, Secp256k1VerifierInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verifySimple`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -31639,10 +31184,11 @@ open class Secp256k1Verifier: Disposable, AutoCloseable, Secp256k1VerifierInterf @Throws(SdkFfiException::class)override fun `verifyUser`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -31651,55 +31197,54 @@ open class Secp256k1Verifier: Disposable, AutoCloseable, Secp256k1VerifierInterf + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSecp256k1Verifier: FfiConverter { - - override fun lower(value: Secp256k1Verifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256k1Verifier: FfiConverter { + override fun lower(value: Secp256k1Verifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256k1Verifier { - return Secp256k1Verifier(value) + override fun lift(value: Long): Secp256k1Verifier { + return Secp256k1Verifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256k1Verifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256k1Verifier) = 8UL override fun write(value: Secp256k1Verifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -31724,13 +31269,13 @@ public object FfiConverterTypeSecp256k1Verifier: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new( + FfiConverterTypeSecp256k1PublicKey.lower(`publicKey`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -31854,7 +31407,7 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -31866,9 +31419,9 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -31879,28 +31432,37 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey(handle, status) } } override fun `publicKey`(): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key( + it, + _status) } } ) @@ -31913,10 +31475,11 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der( + it, + _status) } } ) @@ -31929,10 +31492,11 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem( + it, + _status) } } ) @@ -31942,10 +31506,11 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: Secp256k1Signature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSecp256k1Signature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSecp256k1Signature.lower(`signature`),_status) } } @@ -31954,10 +31519,11 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK @Throws(SdkFfiException::class)override fun `verifySimple`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -31966,10 +31532,11 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK @Throws(SdkFfiException::class)override fun `verifyUser`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -31978,6 +31545,9 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK + + + companion object { /** @@ -31986,7 +31556,8 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Secp256k1VerifyingKey { return FfiConverterTypeSecp256k1VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -32000,7 +31571,8 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Secp256k1VerifyingKey { return FfiConverterTypeSecp256k1VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -32012,50 +31584,43 @@ open class Secp256k1VerifyingKey: Disposable, AutoCloseable, Secp256k1VerifyingK } + /** * @suppress */ -public object FfiConverterTypeSecp256k1VerifyingKey: FfiConverter { - - override fun lower(value: Secp256k1VerifyingKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256k1VerifyingKey: FfiConverter { + override fun lower(value: Secp256k1VerifyingKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256k1VerifyingKey { - return Secp256k1VerifyingKey(value) + override fun lift(value: Long): Secp256k1VerifyingKey { + return Secp256k1VerifyingKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256k1VerifyingKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256k1VerifyingKey) = 8UL override fun write(value: Secp256k1VerifyingKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -32080,13 +31645,13 @@ public object FfiConverterTypeSecp256k1VerifyingKey: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new( + FfiConverterByteArray.lower(`bytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -32237,7 +31810,7 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -32249,9 +31822,9 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -32262,19 +31835,27 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey(handle, status) } } @@ -32283,10 +31864,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn * Get the public key corresponding to this private key. */override fun `publicKey`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key( + it, + _status) } } ) @@ -32295,10 +31877,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme( + it, + _status) } } ) @@ -32312,10 +31895,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toBech32`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32( + it, + _status) } } ) @@ -32327,10 +31911,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn * Serialize this private key to bytes. */override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes( + it, + _status) } } ) @@ -32343,10 +31928,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der( + it, + _status) } } ) @@ -32359,10 +31945,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem( + it, + _status) } } ) @@ -32375,10 +31962,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `trySign`(`message`: kotlin.ByteArray): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -32391,10 +31979,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `trySignSimple`(`message`: kotlin.ByteArray): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -32407,10 +31996,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ @Throws(SdkFfiException::class)override fun `trySignUser`(`message`: kotlin.ByteArray): UserSignature { return FfiConverterTypeUserSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -32419,10 +32009,11 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn override fun `verifyingKey`(): Secp256r1VerifyingKey { return FfiConverterTypeSecp256r1VerifyingKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key( + it, + _status) } } ) @@ -32432,6 +32023,9 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn + + + companion object { /** @@ -32441,7 +32035,8 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromBech32`(`value`: kotlin.String): Secp256r1PrivateKey { return FfiConverterTypeSecp256r1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32( + FfiConverterString.lower(`value`),_status) } ) @@ -32456,7 +32051,8 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Secp256r1PrivateKey { return FfiConverterTypeSecp256r1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -32470,7 +32066,8 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Secp256r1PrivateKey { return FfiConverterTypeSecp256r1PrivateKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -32483,7 +32080,8 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn */ fun `generate`(): Secp256r1PrivateKey { return FfiConverterTypeSecp256r1PrivateKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate( + _status) } ) @@ -32495,50 +32093,43 @@ open class Secp256r1PrivateKey: Disposable, AutoCloseable, Secp256r1PrivateKeyIn } + /** * @suppress */ -public object FfiConverterTypeSecp256r1PrivateKey: FfiConverter { - - override fun lower(value: Secp256r1PrivateKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256r1PrivateKey: FfiConverter { + override fun lower(value: Secp256r1PrivateKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256r1PrivateKey { - return Secp256r1PrivateKey(value) + override fun lift(value: Long): Secp256r1PrivateKey { + return Secp256r1PrivateKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256r1PrivateKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256r1PrivateKey) = 8UL override fun write(value: Secp256r1PrivateKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -32563,13 +32154,13 @@ public object FfiConverterTypeSecp256r1PrivateKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -32720,9 +32318,9 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -32733,19 +32331,27 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey(handle, status) } } @@ -32760,10 +32366,11 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte * `hash( 0x02 || 33-byte secp256r1 public key)` */override fun `deriveAddress`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address( + it, + _status) } } ) @@ -32775,10 +32382,11 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte * Return the flag for this signature scheme */override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme( + it, + _status) } } ) @@ -32787,10 +32395,11 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes( + it, + _status) } } ) @@ -32800,12 +32409,16 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -32816,7 +32429,8 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -32826,7 +32440,8 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte fun `generate`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate( + _status) } ) @@ -32838,50 +32453,43 @@ open class Secp256r1PublicKey: Disposable, AutoCloseable, Secp256r1PublicKeyInte } + /** * @suppress */ -public object FfiConverterTypeSecp256r1PublicKey: FfiConverter { - - override fun lower(value: Secp256r1PublicKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256r1PublicKey: FfiConverter { + override fun lower(value: Secp256r1PublicKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256r1PublicKey { - return Secp256r1PublicKey(value) + override fun lift(value: Long): Secp256r1PublicKey { + return Secp256r1PublicKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256r1PublicKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256r1PublicKey) = 8UL override fun write(value: Secp256r1PublicKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -32906,13 +32514,13 @@ public object FfiConverterTypeSecp256r1PublicKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -33047,9 +32662,9 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -33060,28 +32675,37 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256r1signature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature(handle, status) } } override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes( + it, + _status) } } ) @@ -33091,12 +32715,16 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte + + + companion object { @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -33107,7 +32735,8 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte @Throws(SdkFfiException::class) fun `fromStr`(`s`: kotlin.String): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str( + FfiConverterString.lower(`s`),_status) } ) @@ -33117,7 +32746,8 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte fun `generate`(): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate( + _status) } ) @@ -33129,50 +32759,43 @@ open class Secp256r1Signature: Disposable, AutoCloseable, Secp256r1SignatureInte } + /** * @suppress */ -public object FfiConverterTypeSecp256r1Signature: FfiConverter { - - override fun lower(value: Secp256r1Signature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256r1Signature: FfiConverter { + override fun lower(value: Secp256r1Signature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256r1Signature { - return Secp256r1Signature(value) + override fun lift(value: Long): Secp256r1Signature { + return Secp256r1Signature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256r1Signature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256r1Signature) = 8UL override fun write(value: Secp256r1Signature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -33197,13 +32820,13 @@ public object FfiConverterTypeSecp256r1Signature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -33313,7 +32944,7 @@ open class Secp256r1Verifier: Disposable, AutoCloseable, Secp256r1VerifierInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -33325,9 +32956,9 @@ open class Secp256r1Verifier: Disposable, AutoCloseable, Secp256r1VerifierInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -33338,29 +32969,38 @@ open class Secp256r1Verifier: Disposable, AutoCloseable, Secp256r1VerifierInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verifySimple`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -33369,10 +33009,11 @@ open class Secp256r1Verifier: Disposable, AutoCloseable, Secp256r1VerifierInterf @Throws(SdkFfiException::class)override fun `verifyUser`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -33381,55 +33022,54 @@ open class Secp256r1Verifier: Disposable, AutoCloseable, Secp256r1VerifierInterf + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSecp256r1Verifier: FfiConverter { - - override fun lower(value: Secp256r1Verifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256r1Verifier: FfiConverter { + override fun lower(value: Secp256r1Verifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256r1Verifier { - return Secp256r1Verifier(value) + override fun lift(value: Long): Secp256r1Verifier { + return Secp256r1Verifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256r1Verifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256r1Verifier) = 8UL override fun write(value: Secp256r1Verifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -33454,13 +33094,13 @@ public object FfiConverterTypeSecp256r1Verifier: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new( + FfiConverterTypeSecp256r1PublicKey.lower(`publicKey`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -33584,7 +33232,7 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -33596,9 +33244,9 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -33609,28 +33257,37 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey(handle, status) } } override fun `publicKey`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key( + it, + _status) } } ) @@ -33643,10 +33300,11 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der( + it, + _status) } } ) @@ -33659,10 +33317,11 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem( + it, + _status) } } ) @@ -33672,10 +33331,11 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: Secp256r1Signature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSecp256r1Signature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSecp256r1Signature.lower(`signature`),_status) } } @@ -33684,10 +33344,11 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK @Throws(SdkFfiException::class)override fun `verifySimple`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -33696,10 +33357,11 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK @Throws(SdkFfiException::class)override fun `verifyUser`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -33708,6 +33370,9 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK + + + companion object { /** @@ -33716,7 +33381,8 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): Secp256r1VerifyingKey { return FfiConverterTypeSecp256r1VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -33730,7 +33396,8 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): Secp256r1VerifyingKey { return FfiConverterTypeSecp256r1VerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -33742,50 +33409,43 @@ open class Secp256r1VerifyingKey: Disposable, AutoCloseable, Secp256r1VerifyingK } + /** * @suppress */ -public object FfiConverterTypeSecp256r1VerifyingKey: FfiConverter { - - override fun lower(value: Secp256r1VerifyingKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSecp256r1VerifyingKey: FfiConverter { + override fun lower(value: Secp256r1VerifyingKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Secp256r1VerifyingKey { - return Secp256r1VerifyingKey(value) + override fun lift(value: Long): Secp256r1VerifyingKey { + return Secp256r1VerifyingKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Secp256r1VerifyingKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Secp256r1VerifyingKey) = 8UL override fun write(value: Secp256r1VerifyingKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -33810,13 +33470,13 @@ public object FfiConverterTypeSecp256r1VerifyingKey: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -33956,9 +33623,9 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -33969,28 +33636,37 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_simplekeypair(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_simplekeypair(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair(handle, status) } } override fun `publicKey`(): MultisigMemberPublicKey { return FfiConverterTypeMultisigMemberPublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key( + it, + _status) } } ) @@ -33999,10 +33675,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme( + it, + _status) } } ) @@ -34016,10 +33693,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface */ @Throws(SdkFfiException::class)override fun `toBech32`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32( + it, + _status) } } ) @@ -34031,10 +33709,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface * Encode a SimpleKeypair as `flag || privkey` in bytes */override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes( + it, + _status) } } ) @@ -34047,10 +33726,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der( + it, + _status) } } ) @@ -34063,10 +33743,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem( + it, + _status) } } ) @@ -34076,10 +33757,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface @Throws(SdkFfiException::class)override fun `trySign`(`message`: kotlin.ByteArray): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign( - it, FfiConverterByteArray.lower(`message`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign( + it, + FfiConverterByteArray.lower(`message`),_status) } } ) @@ -34088,10 +33770,11 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface override fun `verifyingKey`(): SimpleVerifyingKey { return FfiConverterTypeSimpleVerifyingKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key( + it, + _status) } } ) @@ -34101,6 +33784,9 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface + + + companion object { /** @@ -34111,7 +33797,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface @Throws(SdkFfiException::class) fun `fromBech32`(`value`: kotlin.String): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32( + FfiConverterString.lower(`value`),_status) } ) @@ -34125,7 +33812,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -34140,7 +33828,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -34150,7 +33839,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface fun `fromEd25519`(`keypair`: Ed25519PrivateKey): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519( + FfiConverterTypeEd25519PrivateKey.lower(`keypair`),_status) } ) @@ -34164,7 +33854,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -34174,7 +33865,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface fun `fromSecp256k1`(`keypair`: Secp256k1PrivateKey): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1( + FfiConverterTypeSecp256k1PrivateKey.lower(`keypair`),_status) } ) @@ -34184,7 +33876,8 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface fun `fromSecp256r1`(`keypair`: Secp256r1PrivateKey): SimpleKeypair { return FfiConverterTypeSimpleKeypair.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1( + FfiConverterTypeSecp256r1PrivateKey.lower(`keypair`),_status) } ) @@ -34196,50 +33889,43 @@ open class SimpleKeypair: Disposable, AutoCloseable, SimpleKeypairInterface } + /** * @suppress */ -public object FfiConverterTypeSimpleKeypair: FfiConverter { - - override fun lower(value: SimpleKeypair): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSimpleKeypair: FfiConverter { + override fun lower(value: SimpleKeypair): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SimpleKeypair { - return SimpleKeypair(value) + override fun lift(value: Long): SimpleKeypair { + return SimpleKeypair(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SimpleKeypair { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SimpleKeypair) = 8UL override fun write(value: SimpleKeypair, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -34264,13 +33950,13 @@ public object FfiConverterTypeSimpleKeypair: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -34463,9 +34156,9 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -34476,28 +34169,37 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_simplesignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_simplesignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature(handle, status) } } override fun `ed25519PubKey`(): Ed25519PublicKey { return FfiConverterTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key( + it, + _status) } } ) @@ -34506,10 +34208,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `ed25519PubKeyOpt`(): Ed25519PublicKey? { return FfiConverterOptionalTypeEd25519PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt( + it, + _status) } } ) @@ -34518,10 +34221,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `ed25519Sig`(): Ed25519Signature { return FfiConverterTypeEd25519Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig( + it, + _status) } } ) @@ -34530,10 +34234,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `ed25519SigOpt`(): Ed25519Signature? { return FfiConverterOptionalTypeEd25519Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt( + it, + _status) } } ) @@ -34542,10 +34247,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `isEd25519`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519( + it, + _status) } } ) @@ -34554,10 +34260,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `isSecp256k1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1( + it, + _status) } } ) @@ -34566,10 +34273,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `isSecp256r1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1( + it, + _status) } } ) @@ -34578,10 +34286,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme( + it, + _status) } } ) @@ -34590,10 +34299,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256k1PubKey`(): Secp256k1PublicKey { return FfiConverterTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key( + it, + _status) } } ) @@ -34602,10 +34312,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256k1PubKeyOpt`(): Secp256k1PublicKey? { return FfiConverterOptionalTypeSecp256k1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt( + it, + _status) } } ) @@ -34614,10 +34325,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256k1Sig`(): Secp256k1Signature { return FfiConverterTypeSecp256k1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig( + it, + _status) } } ) @@ -34626,10 +34338,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256k1SigOpt`(): Secp256k1Signature? { return FfiConverterOptionalTypeSecp256k1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt( + it, + _status) } } ) @@ -34638,10 +34351,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256r1PubKey`(): Secp256r1PublicKey { return FfiConverterTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key( + it, + _status) } } ) @@ -34650,10 +34364,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256r1PubKeyOpt`(): Secp256r1PublicKey? { return FfiConverterOptionalTypeSecp256r1PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt( + it, + _status) } } ) @@ -34662,10 +34377,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256r1Sig`(): Secp256r1Signature { return FfiConverterTypeSecp256r1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig( + it, + _status) } } ) @@ -34674,10 +34390,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `secp256r1SigOpt`(): Secp256r1Signature? { return FfiConverterOptionalTypeSecp256r1Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt( + it, + _status) } } ) @@ -34686,10 +34403,11 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes( + it, + _status) } } ) @@ -34699,11 +34417,15 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface + + + companion object { fun `newEd25519`(`signature`: Ed25519Signature, `publicKey`: Ed25519PublicKey): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519( + FfiConverterTypeEd25519Signature.lower(`signature`),FfiConverterTypeEd25519PublicKey.lower(`publicKey`),_status) } ) @@ -34713,7 +34435,8 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface fun `newSecp256k1`(`signature`: Secp256k1Signature, `publicKey`: Secp256k1PublicKey): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1( + FfiConverterTypeSecp256k1Signature.lower(`signature`),FfiConverterTypeSecp256k1PublicKey.lower(`publicKey`),_status) } ) @@ -34723,7 +34446,8 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface fun `newSecp256r1`(`signature`: Secp256r1Signature, `publicKey`: Secp256r1PublicKey): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1( + FfiConverterTypeSecp256r1Signature.lower(`signature`),FfiConverterTypeSecp256r1PublicKey.lower(`publicKey`),_status) } ) @@ -34735,50 +34459,43 @@ open class SimpleSignature: Disposable, AutoCloseable, SimpleSignatureInterface } + /** * @suppress */ -public object FfiConverterTypeSimpleSignature: FfiConverter { - - override fun lower(value: SimpleSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSimpleSignature: FfiConverter { + override fun lower(value: SimpleSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SimpleSignature { - return SimpleSignature(value) + override fun lift(value: Long): SimpleSignature { + return SimpleSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SimpleSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SimpleSignature) = 8UL override fun write(value: SimpleSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -34803,13 +34520,13 @@ public object FfiConverterTypeSimpleSignature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -34917,7 +34642,7 @@ open class SimpleVerifier: Disposable, AutoCloseable, SimpleVerifierInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -34929,9 +34654,9 @@ open class SimpleVerifier: Disposable, AutoCloseable, SimpleVerifierInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -34942,29 +34667,38 @@ open class SimpleVerifier: Disposable, AutoCloseable, SimpleVerifierInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_simpleverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_simpleverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -34973,55 +34707,54 @@ open class SimpleVerifier: Disposable, AutoCloseable, SimpleVerifierInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSimpleVerifier: FfiConverter { - - override fun lower(value: SimpleVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSimpleVerifier: FfiConverter { + override fun lower(value: SimpleVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SimpleVerifier { - return SimpleVerifier(value) + override fun lift(value: Long): SimpleVerifier { + return SimpleVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SimpleVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SimpleVerifier) = 8UL override fun write(value: SimpleVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -35046,13 +34779,13 @@ public object FfiConverterTypeSimpleVerifier: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -35179,9 +34919,9 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -35192,28 +34932,37 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey(handle, status) } } override fun `publicKey`(): MultisigMemberPublicKey { return FfiConverterTypeMultisigMemberPublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key( + it, + _status) } } ) @@ -35222,10 +34971,11 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme( + it, + _status) } } ) @@ -35238,10 +34988,11 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte */ @Throws(SdkFfiException::class)override fun `toDer`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der( + it, + _status) } } ) @@ -35254,10 +35005,11 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte */ @Throws(SdkFfiException::class)override fun `toPem`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem( + it, + _status) } } ) @@ -35267,10 +35019,11 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: SimpleSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } } @@ -35279,6 +35032,9 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte + + + companion object { /** @@ -35288,7 +35044,8 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte @Throws(SdkFfiException::class) fun `fromDer`(`bytes`: kotlin.ByteArray): SimpleVerifyingKey { return FfiConverterTypeSimpleVerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -35302,7 +35059,8 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte @Throws(SdkFfiException::class) fun `fromPem`(`s`: kotlin.String): SimpleVerifyingKey { return FfiConverterTypeSimpleVerifyingKey.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem( + FfiConverterString.lower(`s`),_status) } ) @@ -35314,50 +35072,43 @@ open class SimpleVerifyingKey: Disposable, AutoCloseable, SimpleVerifyingKeyInte } + /** * @suppress */ -public object FfiConverterTypeSimpleVerifyingKey: FfiConverter { - - override fun lower(value: SimpleVerifyingKey): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSimpleVerifyingKey: FfiConverter { + override fun lower(value: SimpleVerifyingKey): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SimpleVerifyingKey { - return SimpleVerifyingKey(value) + override fun lift(value: Long): SimpleVerifyingKey { + return SimpleVerifyingKey(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SimpleVerifyingKey { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SimpleVerifyingKey) = 8UL override fun write(value: SimpleVerifyingKey, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -35382,13 +35133,13 @@ public object FfiConverterTypeSimpleVerifyingKey: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new( + FfiConverterTypeArgument.lower(`coin`),FfiConverterSequenceTypeArgument.lower(`amounts`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -35526,7 +35285,7 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -35538,9 +35297,9 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -35551,19 +35310,27 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_splitcoins(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_splitcoins(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins(handle, status) } } @@ -35572,10 +35339,11 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface * The amounts to split off */override fun `amounts`(): List { return FfiConverterSequenceTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts( + it, + _status) } } ) @@ -35587,10 +35355,11 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface * The coin to split */override fun `coin`(): Argument { return FfiConverterTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin( + it, + _status) } } ) @@ -35600,55 +35369,54 @@ open class SplitCoins: Disposable, AutoCloseable, SplitCoinsInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSplitCoins: FfiConverter { - - override fun lower(value: SplitCoins): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSplitCoins: FfiConverter { + override fun lower(value: SplitCoins): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SplitCoins { - return SplitCoins(value) + override fun lift(value: Long): SplitCoins { + return SplitCoins(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SplitCoins { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SplitCoins) = 8UL override fun write(value: SplitCoins, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -35673,13 +35441,13 @@ public object FfiConverterTypeSplitCoins: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -35732,6 +35500,7 @@ public object FfiConverterTypeSplitCoins: FfiConverter { // +// /** * Type information for a move struct * @@ -35780,30 +35549,37 @@ public interface StructTagInterface { open class StructTag: Disposable, AutoCloseable, StructTagInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`address`: Address, `module`: Identifier, `name`: Identifier, `typeParams`: List = listOf()) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new( + FfiConverterTypeAddress.lower(`address`),FfiConverterTypeIdentifier.lower(`module`),FfiConverterTypeIdentifier.lower(`name`),FfiConverterSequenceTypeTypeTag.lower(`typeParams`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -35825,7 +35601,7 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -35837,9 +35613,9 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -35850,28 +35626,37 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_structtag(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_structtag(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag(handle, status) } } override fun `address`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address( + it, + _status) } } ) @@ -35883,10 +35668,11 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface * Checks if this is a Coin type */override fun `coinType`(): TypeTag { return FfiConverterTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type( + it, + _status) } } ) @@ -35898,10 +35684,11 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface * Checks if this is a Coin type */override fun `coinTypeOpt`(): TypeTag? { return FfiConverterOptionalTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt( + it, + _status) } } ) @@ -35909,24 +35696,29 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface + + + + // The local Rust `Display`/`Debug` implementation. override fun toString(): String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display( + it, + _status) } } ) } - companion object { fun `coin`(`typeTag`: TypeTag): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) } ) @@ -35936,7 +35728,8 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface fun `gasCoin`(): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin( + _status) } ) @@ -35946,7 +35739,8 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface fun `stakedIota`(): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota( + _status) } ) @@ -35958,50 +35752,43 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface } + /** * @suppress */ -public object FfiConverterTypeStructTag: FfiConverter { - - override fun lower(value: StructTag): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeStructTag: FfiConverter { + override fun lower(value: StructTag): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): StructTag { - return StructTag(value) + override fun lift(value: Long): StructTag { + return StructTag(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): StructTag { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: StructTag) = 8UL override fun write(value: StructTag, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -36026,13 +35813,13 @@ public object FfiConverterTypeStructTag: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -36085,6 +35872,7 @@ public object FfiConverterTypeStructTag: FfiConverter { // +// /** * System package * @@ -36125,30 +35913,37 @@ public interface SystemPackageInterface { open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`version`: kotlin.ULong, `modules`: List, `dependencies`: List) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new( + FfiConverterULong.lower(`version`),FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -36170,7 +35965,7 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -36182,9 +35977,9 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -36195,28 +35990,37 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_systempackage(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_systempackage(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage(handle, status) } } override fun `dependencies`(): List { return FfiConverterSequenceTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies( + it, + _status) } } ) @@ -36225,10 +36029,11 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface override fun `modules`(): List { return FfiConverterSequenceByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_systempackage_modules( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules( + it, + _status) } } ) @@ -36237,10 +36042,11 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface override fun `version`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_systempackage_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version( + it, + _status) } } ) @@ -36250,55 +36056,54 @@ open class SystemPackage: Disposable, AutoCloseable, SystemPackageInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSystemPackage: FfiConverter { - - override fun lower(value: SystemPackage): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSystemPackage: FfiConverter { + override fun lower(value: SystemPackage): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SystemPackage { - return SystemPackage(value) + override fun lift(value: Long): SystemPackage { + return SystemPackage(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SystemPackage { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SystemPackage) = 8UL override fun write(value: SystemPackage, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -36323,13 +36128,13 @@ public object FfiConverterTypeSystemPackage: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transaction_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new( + FfiConverterTypeTransactionKind.lower(`kind`),FfiConverterTypeAddress.lower(`sender`),FfiConverterTypeGasPayment.lower(`gasPayment`),FfiConverterTypeTransactionExpiration.lower(`expiration`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -36475,7 +36288,7 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -36487,9 +36300,9 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -36500,29 +36313,38 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transaction(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transaction(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction(handle, status) } } @Throws(SdkFfiException::class)override fun `bcsSerialize`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize( + it, + _status) } } ) @@ -36531,10 +36353,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest( + it, + _status) } } ) @@ -36543,10 +36366,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `expiration`(): TransactionExpiration { return FfiConverterTypeTransactionExpiration.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_expiration( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration( + it, + _status) } } ) @@ -36555,10 +36379,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `gasPayment`(): GasPayment { return FfiConverterTypeGasPayment.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment( + it, + _status) } } ) @@ -36567,10 +36392,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `kind`(): TransactionKind { return FfiConverterTypeTransactionKind.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_kind( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind( + it, + _status) } } ) @@ -36579,10 +36405,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `sender`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_sender( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender( + it, + _status) } } ) @@ -36591,10 +36418,11 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface override fun `signingDigest`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest( + it, + _status) } } ) @@ -36604,55 +36432,54 @@ open class Transaction: Disposable, AutoCloseable, TransactionInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTransaction: FfiConverter { - - override fun lower(value: Transaction): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTransaction: FfiConverter { + override fun lower(value: Transaction): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Transaction { - return Transaction(value) + override fun lift(value: Long): Transaction { + return Transaction(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Transaction { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Transaction) = 8UL override fun write(value: Transaction, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -36677,13 +36504,13 @@ public object FfiConverterTypeTransaction: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -36736,6 +36563,7 @@ public object FfiConverterTypeTransaction: FfiConverter { // +// /** * A builder for creating transactions. Use [`finish`](Self::finish) to * finalize the transaction data. @@ -36872,23 +36700,29 @@ public interface TransactionBuilderInterface { open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -36910,7 +36744,7 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -36922,9 +36756,9 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -36935,19 +36769,27 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transactionbuilder(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder(handle, status) } } @@ -36959,15 +36801,15 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dryRun`(`skipChecks`: kotlin.Boolean) : DryRunResult { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run( + uniffiHandle, FfiConverterBoolean.lower(`skipChecks`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeDryRunResult.lift(it) }, // Error FFI converter @@ -36983,15 +36825,15 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `execute`(`keypair`: SimpleKeypair, `waitForFinalization`: kotlin.Boolean) : TransactionEffects? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute( + uniffiHandle, FfiConverterTypeSimpleKeypair.lower(`keypair`),FfiConverterBoolean.lower(`waitForFinalization`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeTransactionEffects.lift(it) }, // Error FFI converter @@ -37007,15 +36849,15 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `executeWithSponsor`(`keypair`: SimpleKeypair, `sponsorKeypair`: SimpleKeypair, `waitForFinalization`: kotlin.Boolean) : TransactionEffects? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor( + uniffiHandle, FfiConverterTypeSimpleKeypair.lower(`keypair`),FfiConverterTypeSimpleKeypair.lower(`sponsorKeypair`),FfiConverterBoolean.lower(`waitForFinalization`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeTransactionEffects.lift(it) }, // Error FFI converter @@ -37028,10 +36870,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Set the expiration of the transaction to be a specific epoch. */override fun `expiration`(`epoch`: kotlin.ULong): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration( - it, FfiConverterULong.lower(`epoch`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration( + it, + FfiConverterULong.lower(`epoch`),_status) } } ) @@ -37046,15 +36889,15 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `finish`() : Transaction { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_pointer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_pointer(future) }, + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTransaction.lift(it) }, // Error FFI converter @@ -37067,10 +36910,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Add a gas object to use to pay for the transaction. */override fun `gas`(`objectId`: ObjectId): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas( - it, FfiConverterTypeObjectId.lower(`objectId`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas( + it, + FfiConverterTypeObjectId.lower(`objectId`),_status) } } ) @@ -37082,10 +36926,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Set the gas budget for the transaction. */override fun `gasBudget`(`budget`: kotlin.ULong): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget( - it, FfiConverterULong.lower(`budget`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget( + it, + FfiConverterULong.lower(`budget`),_status) } } ) @@ -37097,10 +36942,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Set the gas price for the transaction. */override fun `gasPrice`(`price`: kotlin.ULong): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price( - it, FfiConverterULong.lower(`price`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price( + it, + FfiConverterULong.lower(`price`),_status) } } ) @@ -37112,10 +36958,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Set the gas station sponsor. */override fun `gasStationSponsor`(`url`: kotlin.String, `duration`: java.time.Duration?, `headers`: Map>?): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor( - it, FfiConverterString.lower(`url`),FfiConverterOptionalDuration.lower(`duration`),FfiConverterOptionalMapStringSequenceString.lower(`headers`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor( + it, + FfiConverterString.lower(`url`),FfiConverterOptionalDuration.lower(`duration`),FfiConverterOptionalMapStringSequenceString.lower(`headers`),_status) } } ) @@ -37128,10 +36975,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * the type indicated by `type_tag`. */override fun `makeMoveVec`(`elements`: List, `typeTag`: TypeTag, `name`: kotlin.String): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec( - it, FfiConverterSequenceTypePTBArgument.lower(`elements`),FfiConverterTypeTypeTag.lower(`typeTag`),FfiConverterString.lower(`name`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec( + it, + FfiConverterSequenceTypePTBArgument.lower(`elements`),FfiConverterTypeTypeTag.lower(`typeTag`),FfiConverterString.lower(`name`),_status) } } ) @@ -37143,10 +36991,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Merge a list of coins into a single coin, without producing any result. */override fun `mergeCoins`(`coin`: ObjectId, `coinsToMerge`: List): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins( - it, FfiConverterTypeObjectId.lower(`coin`),FfiConverterSequenceTypeObjectId.lower(`coinsToMerge`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins( + it, + FfiConverterTypeObjectId.lower(`coin`),FfiConverterSequenceTypeObjectId.lower(`coinsToMerge`),_status) } } ) @@ -37158,10 +37007,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Call a Move function with the given arguments. */override fun `moveCall`(`package`: Address, `module`: Identifier, `function`: Identifier, `arguments`: List, `typeArgs`: List, `names`: List): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call( - it, FfiConverterTypeAddress.lower(`package`),FfiConverterTypeIdentifier.lower(`module`),FfiConverterTypeIdentifier.lower(`function`),FfiConverterSequenceTypePTBArgument.lower(`arguments`),FfiConverterSequenceTypeTypeTag.lower(`typeArgs`),FfiConverterSequenceString.lower(`names`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call( + it, + FfiConverterTypeAddress.lower(`package`),FfiConverterTypeIdentifier.lower(`module`),FfiConverterTypeIdentifier.lower(`function`),FfiConverterSequenceTypePTBArgument.lower(`arguments`),FfiConverterSequenceTypeTypeTag.lower(`typeArgs`),FfiConverterSequenceString.lower(`names`),_status) } } ) @@ -37185,10 +37035,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * the package */override fun `publish`(`modules`: List, `dependencies`: List, `upgradeCapName`: kotlin.String): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish( - it, FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),FfiConverterString.lower(`upgradeCapName`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish( + it, + FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),FfiConverterString.lower(`upgradeCapName`),_status) } } ) @@ -37201,10 +37052,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * provided then they will be merged. */override fun `sendCoins`(`coins`: List, `recipient`: Address, `amount`: kotlin.ULong?): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins( - it, FfiConverterSequenceTypeObjectId.lower(`coins`),FfiConverterTypeAddress.lower(`recipient`),FfiConverterOptionalULong.lower(`amount`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins( + it, + FfiConverterSequenceTypeObjectId.lower(`coins`),FfiConverterTypeAddress.lower(`recipient`),FfiConverterOptionalULong.lower(`amount`),_status) } } ) @@ -37216,10 +37068,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Send IOTA to a recipient address. */override fun `sendIota`(`recipient`: Address, `amount`: kotlin.ULong?): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota( - it, FfiConverterTypeAddress.lower(`recipient`),FfiConverterOptionalULong.lower(`amount`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota( + it, + FfiConverterTypeAddress.lower(`recipient`),FfiConverterOptionalULong.lower(`amount`),_status) } } ) @@ -37231,10 +37084,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Split a coin by the provided amounts. */override fun `splitCoins`(`coin`: ObjectId, `amounts`: List, `names`: List): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins( - it, FfiConverterTypeObjectId.lower(`coin`),FfiConverterSequenceULong.lower(`amounts`),FfiConverterSequenceString.lower(`names`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins( + it, + FfiConverterTypeObjectId.lower(`coin`),FfiConverterSequenceULong.lower(`amounts`),FfiConverterSequenceString.lower(`names`),_status) } } ) @@ -37246,10 +37100,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * Set the sponsor of the transaction. */override fun `sponsor`(`sponsor`: Address): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor( - it, FfiConverterTypeAddress.lower(`sponsor`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor( + it, + FfiConverterTypeAddress.lower(`sponsor`),_status) } } ) @@ -37262,10 +37117,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * result. */override fun `transferObjects`(`recipient`: Address, `objects`: List): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects( - it, FfiConverterTypeAddress.lower(`recipient`),FfiConverterSequenceTypePTBArgument.lower(`objects`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects( + it, + FfiConverterTypeAddress.lower(`recipient`),FfiConverterSequenceTypePTBArgument.lower(`objects`),_status) } } ) @@ -37287,10 +37143,11 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte * ID, the upgrade policy, and package digest. */override fun `upgrade`(`modules`: List, `dependencies`: List, `package`: ObjectId, `ticket`: PtbArgument, `name`: kotlin.String?): TransactionBuilder { return FfiConverterTypeTransactionBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade( - it, FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),FfiConverterTypeObjectId.lower(`package`),FfiConverterTypePTBArgument.lower(`ticket`),FfiConverterOptionalString.lower(`name`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade( + it, + FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),FfiConverterTypeObjectId.lower(`package`),FfiConverterTypePTBArgument.lower(`ticket`),FfiConverterOptionalString.lower(`name`),_status) } } ) @@ -37300,6 +37157,9 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte + + + companion object { /** @@ -37308,10 +37168,10 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") suspend fun `init`(`sender`: Address, `client`: GraphQlClient) : TransactionBuilder { return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init(FfiConverterTypeAddress.lower(`sender`),FfiConverterTypeGraphQLClient.lower(`client`),), - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_pointer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_pointer(future) }, + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init(FfiConverterTypeAddress.lower(`sender`),FfiConverterTypeGraphQLClient.lower(`client`),), + { future, callback, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTransactionBuilder.lift(it) }, // Error FFI converter @@ -37324,50 +37184,43 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte } + /** * @suppress */ -public object FfiConverterTypeTransactionBuilder: FfiConverter { - - override fun lower(value: TransactionBuilder): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTransactionBuilder: FfiConverter { + override fun lower(value: TransactionBuilder): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TransactionBuilder { - return TransactionBuilder(value) + override fun lift(value: Long): TransactionBuilder { + return TransactionBuilder(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TransactionBuilder { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TransactionBuilder) = 8UL override fun write(value: TransactionBuilder, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -37392,13 +37245,13 @@ public object FfiConverterTypeTransactionBuilder: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -37539,9 +37399,9 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -37552,28 +37412,37 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transactioneffects(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transactioneffects(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects(handle, status) } } override fun `asV1`(): TransactionEffectsV1 { return FfiConverterTypeTransactionEffectsV1.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1( + it, + _status) } } ) @@ -37582,10 +37451,11 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte override fun `digest`(): Digest { return FfiConverterTypeDigest.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest( + it, + _status) } } ) @@ -37594,10 +37464,11 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte override fun `isV1`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1( + it, + _status) } } ) @@ -37607,11 +37478,15 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte + + + companion object { fun `newV1`(`effects`: TransactionEffectsV1): TransactionEffects { return FfiConverterTypeTransactionEffects.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1( + FfiConverterTypeTransactionEffectsV1.lower(`effects`),_status) } ) @@ -37623,50 +37498,43 @@ open class TransactionEffects: Disposable, AutoCloseable, TransactionEffectsInte } + /** * @suppress */ -public object FfiConverterTypeTransactionEffects: FfiConverter { - - override fun lower(value: TransactionEffects): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTransactionEffects: FfiConverter { + override fun lower(value: TransactionEffects): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TransactionEffects { - return TransactionEffects(value) + override fun lift(value: Long): TransactionEffects { + return TransactionEffects(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TransactionEffects { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TransactionEffects) = 8UL override fun write(value: TransactionEffects, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -37691,13 +37559,13 @@ public object FfiConverterTypeTransactionEffects: FfiConverter) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new( + FfiConverterSequenceTypeEvent.lower(`events`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable + + private val wasDestroyed = AtomicBoolean(false) + private val callCounter = AtomicLong(1) + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + @Synchronized + override fun close() { + this.destroy() + } + + internal inline fun callWithHandle(block: (handle: Long) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.get() + if (c == 0L) { + throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the handle being freed concurrently. + try { + return block(this.uniffiCloneHandle()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiCleanAction(private val handle: Long) : Runnable { + override fun run() { + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents(handle, status) + } + } + } + + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } + return uniffiRustCall() { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents(handle, status) + } + } + + override fun `digest`(): Digest { + return FfiConverterTypeDigest.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest( + it, + _status) +} + } + ) + } + + + override fun `events`(): List { + return FfiConverterSequenceTypeEvent.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events( + it, + _status) +} + } + ) + } + + + + + + + + + + /** + * @suppress + */ + companion object + +} + + +/** + * @suppress + */ +public object FfiConverterTypeTransactionEvents: FfiConverter { + override fun lower(value: TransactionEvents): Long { + return value.uniffiCloneHandle() + } + + override fun lift(value: Long): TransactionEvents { + return TransactionEvents(UniffiWithHandle, value) + } + + override fun read(buf: ByteBuffer): TransactionEvents { + return lift(buf.getLong()) + } + + override fun allocationSize(value: TransactionEvents) = 8UL + + override fun write(value: TransactionEvents, buf: ByteBuffer) { + buf.putLong(lower(value)) + } +} + + +// This template implements a class for working with a Rust struct via a handle +// to the live Rust struct on the other side of the FFI. +// +// There's some subtlety here, because we have to be careful not to operate on a Rust +// struct after it has been dropped, and because we must expose a public API for freeing +// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: +// +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to +// the Rust FFI. +// +// * When an instance is no longer needed, its handle should be passed to a +// special destructor function provided by the Rust FFI, which will drop the +// underlying Rust struct. +// +// * Given an instance, calling code is expected to call the special +// `destroy` method in order to free it after use, either by calling it explicitly +// or by using a higher-level helper like the `use` method. Failing to do so risks +// leaking the underlying Rust struct. +// +// * We can't assume that calling code will do the right thing, and must be prepared +// to handle Kotlin method calls executing concurrently with or even after a call to +// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. +// +// * We must never allow Rust code to operate on the underlying Rust struct after +// the destructor has been called, and must never call the destructor more than once. +// Doing so may trigger memory unsafety. +// +// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` +// is implemented to call the destructor when the Kotlin object becomes unreachable. +// This is done in a background thread. This is not a panacea, and client code should be aware that +// 1. the thread may starve if some there are objects that have poorly performing +// `drop` methods or do significant work in their `drop` methods. +// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, +// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). +// +// If we try to implement this with mutual exclusion on access to the handle, there is the +// possibility of a race between a method call and a concurrent call to `destroy`: +// +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. +// * Thread B calls `destroy` and frees the underlying Rust struct. +// * Thread A resumes, passing the already-read handle value to Rust and triggering +// a use-after-free. +// +// One possible solution would be to use a `ReadWriteLock`, with each method call taking +// a read lock (and thus allowed to run concurrently) and the special `destroy` method +// taking a write lock (and thus blocking on live method calls). However, we aim not to +// generate methods with any hidden blocking semantics, and a `destroy` method that might +// block if called incorrectly seems to meet that bar. +// +// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track +// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` +// has been called. These are updated according to the following rules: +// +// * The initial value of the counter is 1, indicating a live object with no in-flight calls. +// The initial value for the flag is false. +// +// * At the start of each method call, we atomically check the counter. +// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. +// If it is nonzero them we atomically increment it by 1 and proceed with the method call. +// +// * At the end of each method call, we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// * When `destroy` is called, we atomically flip the flag from false to true. +// If the flag was already true we silently fail. +// Otherwise we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, +// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. +// +// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been +// called *and* all in-flight method calls have completed, avoiding violating any of the expectations +// of the underlying Rust code. +// +// This makes a cleaner a better alternative to _not_ calling `destroy()` as +// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` +// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner +// thread may be starved, and the app will leak memory. +// +// In this case, `destroy`ing manually may be a better solution. +// +// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects +// with Rust peers are reclaimed: +// +// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: +// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: +// 3. The memory is reclaimed when the process terminates. +// +// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 +// + + +// +/** + * Transaction type + * + * # BCS + * + * The BCS serialized form for this type is defined by the following ABNF: + * + * ```text + * transaction-kind = %x00 ptb + * =/ %x01 change-epoch + * =/ %x02 genesis-transaction + * =/ %x03 consensus-commit-prologue + * =/ %x04 authenticator-state-update + * =/ %x05 (vector end-of-epoch-transaction-kind) + * =/ %x06 randomness-state-update + * =/ %x07 consensus-commit-prologue-v2 + * =/ %x08 consensus-commit-prologue-v3 + * ``` + */ +public interface TransactionKindInterface { + + companion object +} + +/** + * Transaction type + * + * # BCS + * + * The BCS serialized form for this type is defined by the following ABNF: + * + * ```text + * transaction-kind = %x00 ptb + * =/ %x01 change-epoch + * =/ %x02 genesis-transaction + * =/ %x03 consensus-commit-prologue + * =/ %x04 authenticator-state-update + * =/ %x05 (vector end-of-epoch-transaction-kind) + * =/ %x06 randomness-state-update + * =/ %x07 consensus-commit-prologue-v2 + * =/ %x08 consensus-commit-prologue-v3 + * ``` + */ +open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface +{ + + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) + } + + /** + * @suppress + * + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + @Suppress("UNUSED_PARAMETER") + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) + } + + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -37829,7 +38005,7 @@ open class TransactionEvents: Disposable, AutoCloseable, TransactionEventsInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -37841,9 +38017,9 @@ open class TransactionEvents: Disposable, AutoCloseable, TransactionEventsInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -37854,314 +38030,42 @@ open class TransactionEvents: Disposable, AutoCloseable, TransactionEventsInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transactionevents(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind(handle, status) } } } - fun uniffiClonePointer(): Pointer { - return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transactionevents(pointer!!, status) - } - } - - override fun `digest`(): Digest { - return FfiConverterTypeDigest.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest( - it, _status) -} - } - ) - } - - - override fun `events`(): List { - return FfiConverterSequenceTypeEvent.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionevents_events( - it, _status) -} - } - ) - } - - - - - - - companion object - -} - -/** - * @suppress - */ -public object FfiConverterTypeTransactionEvents: FfiConverter { - - override fun lower(value: TransactionEvents): Pointer { - return value.uniffiClonePointer() - } - - override fun lift(value: Pointer): TransactionEvents { - return TransactionEvents(value) - } - - override fun read(buf: ByteBuffer): TransactionEvents { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) - } - - override fun allocationSize(value: TransactionEvents) = 8UL - - override fun write(value: TransactionEvents, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) - } -} - - -// This template implements a class for working with a Rust struct via a Pointer/Arc -// to the live Rust struct on the other side of the FFI. -// -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// -// There's some subtlety here, because we have to be careful not to operate on a Rust -// struct after it has been dropped, and because we must expose a public API for freeing -// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: -// -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to -// the Rust FFI. -// -// * When an instance is no longer needed, its pointer should be passed to a -// special destructor function provided by the Rust FFI, which will drop the -// underlying Rust struct. -// -// * Given an instance, calling code is expected to call the special -// `destroy` method in order to free it after use, either by calling it explicitly -// or by using a higher-level helper like the `use` method. Failing to do so risks -// leaking the underlying Rust struct. -// -// * We can't assume that calling code will do the right thing, and must be prepared -// to handle Kotlin method calls executing concurrently with or even after a call to -// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. -// -// * We must never allow Rust code to operate on the underlying Rust struct after -// the destructor has been called, and must never call the destructor more than once. -// Doing so may trigger memory unsafety. -// -// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` -// is implemented to call the destructor when the Kotlin object becomes unreachable. -// This is done in a background thread. This is not a panacea, and client code should be aware that -// 1. the thread may starve if some there are objects that have poorly performing -// `drop` methods or do significant work in their `drop` methods. -// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, -// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). -// -// If we try to implement this with mutual exclusion on access to the pointer, there is the -// possibility of a race between a method call and a concurrent call to `destroy`: -// -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. -// * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering -// a use-after-free. -// -// One possible solution would be to use a `ReadWriteLock`, with each method call taking -// a read lock (and thus allowed to run concurrently) and the special `destroy` method -// taking a write lock (and thus blocking on live method calls). However, we aim not to -// generate methods with any hidden blocking semantics, and a `destroy` method that might -// block if called incorrectly seems to meet that bar. -// -// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track -// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` -// has been called. These are updated according to the following rules: -// -// * The initial value of the counter is 1, indicating a live object with no in-flight calls. -// The initial value for the flag is false. -// -// * At the start of each method call, we atomically check the counter. -// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. -// If it is nonzero them we atomically increment it by 1 and proceed with the method call. -// -// * At the end of each method call, we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// * When `destroy` is called, we atomically flip the flag from false to true. -// If the flag was already true we silently fail. -// Otherwise we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, -// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. -// -// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been -// called *and* all in-flight method calls have completed, avoiding violating any of the expectations -// of the underlying Rust code. -// -// This makes a cleaner a better alternative to _not_ calling `destroy()` as -// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` -// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner -// thread may be starved, and the app will leak memory. -// -// In this case, `destroy`ing manually may be a better solution. -// -// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects -// with Rust peers are reclaimed: -// -// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: -// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: -// 3. The memory is reclaimed when the process terminates. -// -// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 -// - - -/** - * Transaction type - * - * # BCS - * - * The BCS serialized form for this type is defined by the following ABNF: - * - * ```text - * transaction-kind = %x00 ptb - * =/ %x01 change-epoch - * =/ %x02 genesis-transaction - * =/ %x03 consensus-commit-prologue - * =/ %x04 authenticator-state-update - * =/ %x05 (vector end-of-epoch-transaction-kind) - * =/ %x06 randomness-state-update - * =/ %x07 consensus-commit-prologue-v2 - * =/ %x08 consensus-commit-prologue-v3 - * ``` - */ -public interface TransactionKindInterface { - - companion object -} - -/** - * Transaction type - * - * # BCS - * - * The BCS serialized form for this type is defined by the following ABNF: - * - * ```text - * transaction-kind = %x00 ptb - * =/ %x01 change-epoch - * =/ %x02 genesis-transaction - * =/ %x03 consensus-commit-prologue - * =/ %x04 authenticator-state-update - * =/ %x05 (vector end-of-epoch-transaction-kind) - * =/ %x06 randomness-state-update - * =/ %x07 consensus-commit-prologue-v2 - * =/ %x08 consensus-commit-prologue-v3 - * ``` - */ -open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface -{ - - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - /** - * This constructor can be used to instantiate a fake object. Only used for tests. Any - * attempt to actually use an object constructed this way will fail as there is no - * connected Rust object. + * @suppress */ - @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable - - private val wasDestroyed = AtomicBoolean(false) - private val callCounter = AtomicLong(1) - - override fun destroy() { - // Only allow a single call to this method. - // TODO: maybe we should log a warning if called more than once? - if (this.wasDestroyed.compareAndSet(false, true)) { - // This decrement always matches the initial count of 1 given at creation time. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } - } - } - - @Synchronized - override fun close() { - this.destroy() - } - - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { - // Check and increment the call counter, to keep the object alive. - // This needs a compare-and-set retry loop in case of concurrent updates. - do { - val c = this.callCounter.get() - if (c == 0L) { - throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") - } - if (c == Long.MAX_VALUE) { - throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") - } - } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. - try { - return block(this.uniffiClonePointer()) - } finally { - // This decrement always matches the increment we performed above. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); } - } - - // Use a static inner class instead of a closure so as not to accidentally - // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { - override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transactionkind(ptr, status) - } - } - } - } - - fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transactionkind(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind(handle, status) } } + + + companion object { fun `newAuthenticatorStateUpdateV1`(`tx`: AuthenticatorStateUpdateV1): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1( + FfiConverterTypeAuthenticatorStateUpdateV1.lower(`tx`),_status) } ) @@ -38171,7 +38075,8 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface fun `newConsensusCommitPrologueV1`(`tx`: ConsensusCommitPrologueV1): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1( + FfiConverterTypeConsensusCommitPrologueV1.lower(`tx`),_status) } ) @@ -38181,7 +38086,8 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface fun `newEndOfEpoch`(`tx`: List): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch( + FfiConverterSequenceTypeEndOfEpochTransactionKind.lower(`tx`),_status) } ) @@ -38191,7 +38097,8 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface fun `newGenesis`(`tx`: GenesisTransaction): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis( + FfiConverterTypeGenesisTransaction.lower(`tx`),_status) } ) @@ -38201,7 +38108,8 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface fun `newProgrammableTransaction`(`tx`: ProgrammableTransaction): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction( + FfiConverterTypeProgrammableTransaction.lower(`tx`),_status) } ) @@ -38211,7 +38119,8 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface fun `newRandomnessStateUpdate`(`tx`: RandomnessStateUpdate): TransactionKind { return FfiConverterTypeTransactionKind.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update( + FfiConverterTypeRandomnessStateUpdate.lower(`tx`),_status) } ) @@ -38223,50 +38132,43 @@ open class TransactionKind: Disposable, AutoCloseable, TransactionKindInterface } + /** * @suppress */ -public object FfiConverterTypeTransactionKind: FfiConverter { - - override fun lower(value: TransactionKind): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTransactionKind: FfiConverter { + override fun lower(value: TransactionKind): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TransactionKind { - return TransactionKind(value) + override fun lift(value: Long): TransactionKind { + return TransactionKind(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TransactionKind { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TransactionKind) = 8UL override fun write(value: TransactionKind, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -38291,13 +38193,13 @@ public object FfiConverterTypeTransactionKind: FfiConverter, `address`: Argument) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new( + FfiConverterSequenceTypeArgument.lower(`objects`),FfiConverterTypeArgument.lower(`address`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -38435,7 +38345,7 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -38447,9 +38357,9 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -38460,19 +38370,27 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_transferobjects(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_transferobjects(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects(handle, status) } } @@ -38481,10 +38399,11 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface * The address to transfer ownership to */override fun `address`(): Argument { return FfiConverterTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transferobjects_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address( + it, + _status) } } ) @@ -38496,10 +38415,11 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface * Set of objects to transfer */override fun `objects`(): List { return FfiConverterSequenceTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects( + it, + _status) } } ) @@ -38509,55 +38429,54 @@ open class TransferObjects: Disposable, AutoCloseable, TransferObjectsInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTransferObjects: FfiConverter { - - override fun lower(value: TransferObjects): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTransferObjects: FfiConverter { + override fun lower(value: TransferObjects): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TransferObjects { - return TransferObjects(value) + override fun lift(value: Long): TransferObjects { + return TransferObjects(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TransferObjects { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TransferObjects) = 8UL override fun write(value: TransferObjects, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -38582,13 +38501,13 @@ public object FfiConverterTypeTransferObjects: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -38795,9 +38721,9 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -38808,28 +38734,37 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_typetag(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_typetag(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag(handle, status) } } override fun `asStructTag`(): StructTag { return FfiConverterTypeStructTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag( + it, + _status) } } ) @@ -38838,10 +38773,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `asStructTagOpt`(): StructTag? { return FfiConverterOptionalTypeStructTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt( + it, + _status) } } ) @@ -38850,10 +38786,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `asVectorTypeTag`(): TypeTag { return FfiConverterTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag( + it, + _status) } } ) @@ -38862,10 +38799,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `asVectorTypeTagOpt`(): TypeTag? { return FfiConverterOptionalTypeTypeTag.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt( + it, + _status) } } ) @@ -38874,10 +38812,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isAddress`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address( + it, + _status) } } ) @@ -38886,10 +38825,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isBool`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool( + it, + _status) } } ) @@ -38898,10 +38838,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isSigner`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer( + it, + _status) } } ) @@ -38910,10 +38851,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isStruct`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct( + it, + _status) } } ) @@ -38922,10 +38864,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU128`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128( + it, + _status) } } ) @@ -38934,10 +38877,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU16`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16( + it, + _status) } } ) @@ -38946,10 +38890,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU256`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256( + it, + _status) } } ) @@ -38958,10 +38903,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU32`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32( + it, + _status) } } ) @@ -38970,10 +38916,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU64`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64( + it, + _status) } } ) @@ -38982,10 +38929,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isU8`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8( + it, + _status) } } ) @@ -38994,10 +38942,11 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface override fun `isVector`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector( + it, + _status) } } ) @@ -39005,24 +38954,29 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface + + + + // The local Rust `Display`/`Debug` implementation. override fun toString(): String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display( + it, + _status) } } ) } - companion object { fun `newAddress`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address( + _status) } ) @@ -39032,7 +38986,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newBool`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool( + _status) } ) @@ -39042,7 +38997,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newSigner`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer( + _status) } ) @@ -39052,7 +39008,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newStruct`(`structTag`: StructTag): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct( + FfiConverterTypeStructTag.lower(`structTag`),_status) } ) @@ -39062,7 +39019,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU128`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128( + _status) } ) @@ -39072,7 +39030,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU16`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16( + _status) } ) @@ -39082,7 +39041,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU256`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256( + _status) } ) @@ -39092,7 +39052,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU32`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32( + _status) } ) @@ -39102,7 +39063,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU64`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64( + _status) } ) @@ -39112,7 +39074,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newU8`(): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8( + _status) } ) @@ -39122,7 +39085,8 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface fun `newVector`(`typeTag`: TypeTag): TypeTag { return FfiConverterTypeTypeTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) } ) @@ -39134,50 +39098,43 @@ open class TypeTag: Disposable, AutoCloseable, TypeTagInterface } + /** * @suppress */ -public object FfiConverterTypeTypeTag: FfiConverter { - - override fun lower(value: TypeTag): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTypeTag: FfiConverter { + override fun lower(value: TypeTag): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TypeTag { - return TypeTag(value) + override fun lift(value: Long): TypeTag { + return TypeTag(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TypeTag { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TypeTag) = 8UL override fun write(value: TypeTag, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -39202,13 +39159,13 @@ public object FfiConverterTypeTypeTag: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -39261,6 +39218,7 @@ public object FfiConverterTypeTypeTag: FfiConverter { // +// /** * Command to upgrade an already published package * @@ -39317,30 +39275,37 @@ public interface UpgradeInterface { open class Upgrade: Disposable, AutoCloseable, UpgradeInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`modules`: List, `dependencies`: List, `package`: ObjectId, `ticket`: Argument) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new( + FfiConverterSequenceByteArray.lower(`modules`),FfiConverterSequenceTypeObjectId.lower(`dependencies`),FfiConverterTypeObjectId.lower(`package`),FfiConverterTypeArgument.lower(`ticket`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -39362,7 +39327,7 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -39374,9 +39339,9 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -39387,19 +39352,27 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_upgrade(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_upgrade(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade(handle, status) } } @@ -39408,10 +39381,11 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface * Set of packages that the to-be published package depends on */override fun `dependencies`(): List { return FfiConverterSequenceTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies( + it, + _status) } } ) @@ -39423,10 +39397,11 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface * The serialized move modules */override fun `modules`(): List { return FfiConverterSequenceByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_upgrade_modules( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules( + it, + _status) } } ) @@ -39438,10 +39413,11 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface * Package id of the package to upgrade */override fun `package`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_upgrade_package( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package( + it, + _status) } } ) @@ -39453,10 +39429,11 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface * Ticket authorizing the upgrade */override fun `ticket`(): Argument { return FfiConverterTypeArgument.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket( + it, + _status) } } ) @@ -39466,55 +39443,54 @@ open class Upgrade: Disposable, AutoCloseable, UpgradeInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeUpgrade: FfiConverter { - - override fun lower(value: Upgrade): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeUpgrade: FfiConverter { + override fun lower(value: Upgrade): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Upgrade { - return Upgrade(value) + override fun lift(value: Long): Upgrade { + return Upgrade(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Upgrade { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Upgrade) = 8UL override fun write(value: Upgrade, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -39539,13 +39515,13 @@ public object FfiConverterTypeUpgrade: FfiConverter { // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -39598,6 +39574,7 @@ public object FfiConverterTypeUpgrade: FfiConverter { // +// /** * A signature from a user * @@ -39681,23 +39658,29 @@ public interface UserSignatureInterface { open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -39719,7 +39702,7 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -39731,9 +39714,9 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -39744,28 +39727,37 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_usersignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_usersignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature(handle, status) } } override fun `asMultisig`(): MultisigAggregatedSignature { return FfiConverterTypeMultisigAggregatedSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig( + it, + _status) } } ) @@ -39774,10 +39766,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asMultisigOpt`(): MultisigAggregatedSignature? { return FfiConverterOptionalTypeMultisigAggregatedSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt( + it, + _status) } } ) @@ -39786,10 +39779,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asPasskey`(): PasskeyAuthenticator { return FfiConverterTypePasskeyAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey( + it, + _status) } } ) @@ -39798,10 +39792,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asPasskeyOpt`(): PasskeyAuthenticator? { return FfiConverterOptionalTypePasskeyAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt( + it, + _status) } } ) @@ -39810,10 +39805,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asSimple`(): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple( + it, + _status) } } ) @@ -39822,10 +39818,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asSimpleOpt`(): SimpleSignature? { return FfiConverterOptionalTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt( + it, + _status) } } ) @@ -39834,10 +39831,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asZklogin`(): ZkLoginAuthenticator { return FfiConverterTypeZkLoginAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin( + it, + _status) } } ) @@ -39846,10 +39844,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `asZkloginOpt`(): ZkLoginAuthenticator? { return FfiConverterOptionalTypeZkLoginAuthenticator.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt( + it, + _status) } } ) @@ -39858,10 +39857,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `isMultisig`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig( + it, + _status) } } ) @@ -39870,10 +39870,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `isPasskey`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey( + it, + _status) } } ) @@ -39882,10 +39883,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `isSimple`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple( + it, + _status) } } ) @@ -39894,10 +39896,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `isZklogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin( + it, + _status) } } ) @@ -39909,10 +39912,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface * Return the flag for this signature scheme */override fun `scheme`(): SignatureScheme { return FfiConverterTypeSignatureScheme.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme( + it, + _status) } } ) @@ -39921,10 +39925,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `toBase64`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64( + it, + _status) } } ) @@ -39933,10 +39938,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface override fun `toBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes( + it, + _status) } } ) @@ -39946,12 +39952,16 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface + + + companion object { @Throws(SdkFfiException::class) fun `fromBase64`(`base64`: kotlin.String): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64( + FfiConverterString.lower(`base64`),_status) } ) @@ -39962,7 +39972,8 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface @Throws(SdkFfiException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -39972,7 +39983,8 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface fun `newMultisig`(`signature`: MultisigAggregatedSignature): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig( + FfiConverterTypeMultisigAggregatedSignature.lower(`signature`),_status) } ) @@ -39982,7 +39994,8 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface fun `newPasskey`(`authenticator`: PasskeyAuthenticator): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey( + FfiConverterTypePasskeyAuthenticator.lower(`authenticator`),_status) } ) @@ -39992,7 +40005,8 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface fun `newSimple`(`signature`: SimpleSignature): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple( + FfiConverterTypeSimpleSignature.lower(`signature`),_status) } ) @@ -40002,7 +40016,8 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface fun `newZklogin`(`authenticator`: ZkLoginAuthenticator): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin( + FfiConverterTypeZkLoginAuthenticator.lower(`authenticator`),_status) } ) @@ -40014,50 +40029,43 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } + /** * @suppress */ -public object FfiConverterTypeUserSignature: FfiConverter { - - override fun lower(value: UserSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeUserSignature: FfiConverter { + override fun lower(value: UserSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): UserSignature { - return UserSignature(value) + override fun lift(value: Long): UserSignature { + return UserSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): UserSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: UserSignature) = 8UL override fun write(value: UserSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -40082,13 +40090,13 @@ public object FfiConverterTypeUserSignature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new( + _status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -40206,7 +40222,7 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -40218,9 +40234,9 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -40231,29 +40247,38 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier(handle, status) } } @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: UserSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeUserSignature.lower(`signature`),_status) } } @@ -40261,10 +40286,11 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi override fun `withZkloginVerifier`(`zkloginVerifier`: ZkloginVerifier): UserSignatureVerifier { return FfiConverterTypeUserSignatureVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier( - it, FfiConverterTypeZkloginVerifier.lower(`zkloginVerifier`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier( + it, + FfiConverterTypeZkloginVerifier.lower(`zkloginVerifier`),_status) } } ) @@ -40273,10 +40299,11 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi override fun `zkloginVerifier`(): ZkloginVerifier? { return FfiConverterOptionalTypeZkloginVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier( + it, + _status) } } ) @@ -40286,55 +40313,54 @@ open class UserSignatureVerifier: Disposable, AutoCloseable, UserSignatureVerifi + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeUserSignatureVerifier: FfiConverter { - - override fun lower(value: UserSignatureVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeUserSignatureVerifier: FfiConverter { + override fun lower(value: UserSignatureVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): UserSignatureVerifier { - return UserSignatureVerifier(value) + override fun lift(value: Long): UserSignatureVerifier { + return UserSignatureVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): UserSignatureVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: UserSignatureVerifier) = 8UL override fun write(value: UserSignatureVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -40359,13 +40385,13 @@ public object FfiConverterTypeUserSignatureVerifier: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new( + FfiConverterULong.lower(`epoch`),FfiConverterTypeBls12381Signature.lower(`signature`),FfiConverterByteArray.lower(`bitmapBytes`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -40515,7 +40549,7 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -40527,9 +40561,9 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -40540,29 +40574,38 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature(handle, status) } } @Throws(SdkFfiException::class)override fun `bitmapBytes`(): kotlin.ByteArray { return FfiConverterByteArray.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes( + it, + _status) } } ) @@ -40571,10 +40614,11 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch( + it, + _status) } } ) @@ -40583,10 +40627,11 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg override fun `signature`(): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature( + it, + _status) } } ) @@ -40596,55 +40641,54 @@ open class ValidatorAggregatedSignature: Disposable, AutoCloseable, ValidatorAgg + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeValidatorAggregatedSignature: FfiConverter { - - override fun lower(value: ValidatorAggregatedSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeValidatorAggregatedSignature: FfiConverter { + override fun lower(value: ValidatorAggregatedSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ValidatorAggregatedSignature { - return ValidatorAggregatedSignature(value) + override fun lift(value: Long): ValidatorAggregatedSignature { + return ValidatorAggregatedSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ValidatorAggregatedSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ValidatorAggregatedSignature) = 8UL override fun write(value: ValidatorAggregatedSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -40669,13 +40713,13 @@ public object FfiConverterTypeValidatorAggregatedSignature: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -40792,9 +40843,9 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -40805,29 +40856,38 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator(handle, status) } } @Throws(SdkFfiException::class)override fun `addSignature`(`signature`: ValidatorSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature( - it, FfiConverterTypeValidatorSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature( + it, + FfiConverterTypeValidatorSignature.lower(`signature`),_status) } } @@ -40835,10 +40895,11 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val override fun `committee`(): ValidatorCommittee { return FfiConverterTypeValidatorCommittee.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee( + it, + _status) } } ) @@ -40848,10 +40909,11 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val @Throws(SdkFfiException::class)override fun `finish`(): ValidatorAggregatedSignature { return FfiConverterTypeValidatorAggregatedSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish( + it, + _status) } } ) @@ -40861,12 +40923,16 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val + + + companion object { @Throws(SdkFfiException::class) fun `newCheckpointSummary`(`committee`: ValidatorCommittee, `summary`: CheckpointSummary): ValidatorCommitteeSignatureAggregator { return FfiConverterTypeValidatorCommitteeSignatureAggregator.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary( + FfiConverterTypeValidatorCommittee.lower(`committee`),FfiConverterTypeCheckpointSummary.lower(`summary`),_status) } ) @@ -40878,50 +40944,43 @@ open class ValidatorCommitteeSignatureAggregator: Disposable, AutoCloseable, Val } + /** * @suppress */ -public object FfiConverterTypeValidatorCommitteeSignatureAggregator: FfiConverter { - - override fun lower(value: ValidatorCommitteeSignatureAggregator): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeValidatorCommitteeSignatureAggregator: FfiConverter { + override fun lower(value: ValidatorCommitteeSignatureAggregator): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ValidatorCommitteeSignatureAggregator { - return ValidatorCommitteeSignatureAggregator(value) + override fun lift(value: Long): ValidatorCommitteeSignatureAggregator { + return ValidatorCommitteeSignatureAggregator(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ValidatorCommitteeSignatureAggregator { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ValidatorCommitteeSignatureAggregator) = 8UL override fun write(value: ValidatorCommitteeSignatureAggregator, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -40946,13 +41005,13 @@ public object FfiConverterTypeValidatorCommitteeSignatureAggregator: FfiConverte // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -41005,6 +41064,7 @@ public object FfiConverterTypeValidatorCommitteeSignatureAggregator: FfiConverte // +// public interface ValidatorCommitteeSignatureVerifierInterface { fun `committee`(): ValidatorCommittee @@ -41021,30 +41081,37 @@ public interface ValidatorCommitteeSignatureVerifierInterface { open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, ValidatorCommitteeSignatureVerifierInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`committee`: ValidatorCommittee) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new( + FfiConverterTypeValidatorCommittee.lower(`committee`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -41066,7 +41133,7 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -41078,9 +41145,9 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -41091,28 +41158,37 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier(handle, status) } } override fun `committee`(): ValidatorCommittee { return FfiConverterTypeValidatorCommittee.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee( + it, + _status) } } ) @@ -41122,10 +41198,11 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `signature`: ValidatorSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeValidatorSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeValidatorSignature.lower(`signature`),_status) } } @@ -41134,10 +41211,11 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid @Throws(SdkFfiException::class)override fun `verifyAggregated`(`message`: kotlin.ByteArray, `signature`: ValidatorAggregatedSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeValidatorAggregatedSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeValidatorAggregatedSignature.lower(`signature`),_status) } } @@ -41146,10 +41224,11 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid @Throws(SdkFfiException::class)override fun `verifyCheckpointSummary`(`summary`: CheckpointSummary, `signature`: ValidatorAggregatedSignature) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary( - it, FfiConverterTypeCheckpointSummary.lower(`summary`),FfiConverterTypeValidatorAggregatedSignature.lower(`signature`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary( + it, + FfiConverterTypeCheckpointSummary.lower(`summary`),FfiConverterTypeValidatorAggregatedSignature.lower(`signature`),_status) } } @@ -41158,55 +41237,54 @@ open class ValidatorCommitteeSignatureVerifier: Disposable, AutoCloseable, Valid + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeValidatorCommitteeSignatureVerifier: FfiConverter { - - override fun lower(value: ValidatorCommitteeSignatureVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeValidatorCommitteeSignatureVerifier: FfiConverter { + override fun lower(value: ValidatorCommitteeSignatureVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ValidatorCommitteeSignatureVerifier { - return ValidatorCommitteeSignatureVerifier(value) + override fun lift(value: Long): ValidatorCommitteeSignatureVerifier { + return ValidatorCommitteeSignatureVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ValidatorCommitteeSignatureVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ValidatorCommitteeSignatureVerifier) = 8UL override fun write(value: ValidatorCommitteeSignatureVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -41231,13 +41309,13 @@ public object FfiConverterTypeValidatorCommitteeSignatureVerifier: FfiConverter< // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -41290,6 +41368,7 @@ public object FfiConverterTypeValidatorCommitteeSignatureVerifier: FfiConverter< // +// /** * An execution time observation from a particular validator * @@ -41328,30 +41407,37 @@ public interface ValidatorExecutionTimeObservationInterface { open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, ValidatorExecutionTimeObservationInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`validator`: Bls12381PublicKey, `duration`: java.time.Duration) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new( + FfiConverterTypeBls12381PublicKey.lower(`validator`),FfiConverterDuration.lower(`duration`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -41373,7 +41459,7 @@ open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, Validat this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -41385,9 +41471,9 @@ open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, Validat throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -41398,28 +41484,37 @@ open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, Validat // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation(handle, status) } } override fun `duration`(): java.time.Duration { return FfiConverterDuration.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration( + it, + _status) } } ) @@ -41428,10 +41523,11 @@ open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, Validat override fun `validator`(): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator( + it, + _status) } } ) @@ -41441,55 +41537,54 @@ open class ValidatorExecutionTimeObservation: Disposable, AutoCloseable, Validat + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeValidatorExecutionTimeObservation: FfiConverter { - - override fun lower(value: ValidatorExecutionTimeObservation): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeValidatorExecutionTimeObservation: FfiConverter { + override fun lower(value: ValidatorExecutionTimeObservation): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ValidatorExecutionTimeObservation { - return ValidatorExecutionTimeObservation(value) + override fun lift(value: Long): ValidatorExecutionTimeObservation { + return ValidatorExecutionTimeObservation(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ValidatorExecutionTimeObservation { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ValidatorExecutionTimeObservation) = 8UL override fun write(value: ValidatorExecutionTimeObservation, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -41514,13 +41609,13 @@ public object FfiConverterTypeValidatorExecutionTimeObservation: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new( + FfiConverterULong.lower(`epoch`),FfiConverterTypeBls12381PublicKey.lower(`publicKey`),FfiConverterTypeBls12381Signature.lower(`signature`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -41658,7 +41761,7 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -41670,9 +41773,9 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -41683,28 +41786,37 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_validatorsignature(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_validatorsignature(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature(handle, status) } } override fun `epoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch( + it, + _status) } } ) @@ -41713,10 +41825,11 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte override fun `publicKey`(): Bls12381PublicKey { return FfiConverterTypeBls12381PublicKey.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key( + it, + _status) } } ) @@ -41725,10 +41838,11 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte override fun `signature`(): Bls12381Signature { return FfiConverterTypeBls12381Signature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature( + it, + _status) } } ) @@ -41738,55 +41852,54 @@ open class ValidatorSignature: Disposable, AutoCloseable, ValidatorSignatureInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeValidatorSignature: FfiConverter { - - override fun lower(value: ValidatorSignature): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeValidatorSignature: FfiConverter { + override fun lower(value: ValidatorSignature): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ValidatorSignature { - return ValidatorSignature(value) + override fun lift(value: Long): ValidatorSignature { + return ValidatorSignature(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ValidatorSignature { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ValidatorSignature) = 8UL override fun write(value: ValidatorSignature, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -41811,13 +41924,13 @@ public object FfiConverterTypeValidatorSignature: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new( + FfiConverterTypeObjectId.lower(`objectId`),FfiConverterULong.lower(`version`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -41949,7 +42070,7 @@ open class VersionAssignment: Disposable, AutoCloseable, VersionAssignmentInterf this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -41961,9 +42082,9 @@ open class VersionAssignment: Disposable, AutoCloseable, VersionAssignmentInterf throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -41974,28 +42095,37 @@ open class VersionAssignment: Disposable, AutoCloseable, VersionAssignmentInterf // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_versionassignment(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_versionassignment(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment(handle, status) } } override fun `objectId`(): ObjectId { return FfiConverterTypeObjectId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id( + it, + _status) } } ) @@ -42004,10 +42134,11 @@ open class VersionAssignment: Disposable, AutoCloseable, VersionAssignmentInterf override fun `version`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_versionassignment_version( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version( + it, + _status) } } ) @@ -42017,55 +42148,54 @@ open class VersionAssignment: Disposable, AutoCloseable, VersionAssignmentInterf + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeVersionAssignment: FfiConverter { - - override fun lower(value: VersionAssignment): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeVersionAssignment: FfiConverter { + override fun lower(value: VersionAssignment): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): VersionAssignment { - return VersionAssignment(value) + override fun lift(value: Long): VersionAssignment { + return VersionAssignment(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): VersionAssignment { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: VersionAssignment) = 8UL override fun write(value: VersionAssignment, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -42090,13 +42220,13 @@ public object FfiConverterTypeVersionAssignment: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new( + FfiConverterTypeZkLoginInputs.lower(`inputs`),FfiConverterULong.lower(`maxEpoch`),FfiConverterTypeSimpleSignature.lower(`signature`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -42250,7 +42388,7 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -42262,9 +42400,9 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -42275,28 +42413,37 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator(handle, status) } } override fun `inputs`(): ZkLoginInputs { return FfiConverterTypeZkLoginInputs.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs( + it, + _status) } } ) @@ -42305,10 +42452,11 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator override fun `maxEpoch`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch( + it, + _status) } } ) @@ -42317,10 +42465,11 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator override fun `signature`(): SimpleSignature { return FfiConverterTypeSimpleSignature.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature( + it, + _status) } } ) @@ -42330,55 +42479,54 @@ open class ZkLoginAuthenticator: Disposable, AutoCloseable, ZkLoginAuthenticator + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeZkLoginAuthenticator: FfiConverter { - - override fun lower(value: ZkLoginAuthenticator): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeZkLoginAuthenticator: FfiConverter { + override fun lower(value: ZkLoginAuthenticator): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ZkLoginAuthenticator { - return ZkLoginAuthenticator(value) + override fun lift(value: Long): ZkLoginAuthenticator { + return ZkLoginAuthenticator(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ZkLoginAuthenticator { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ZkLoginAuthenticator) = 8UL override fun write(value: ZkLoginAuthenticator, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -42403,13 +42551,13 @@ public object FfiConverterTypeZkLoginAuthenticator: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new( + FfiConverterTypeZkLoginProof.lower(`proofPoints`),FfiConverterTypeZkLoginClaim.lower(`issBase64Details`),FfiConverterString.lower(`headerBase64`),FfiConverterTypeBn254FieldElement.lower(`addressSeed`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -42559,7 +42715,7 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -42571,9 +42727,9 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -42584,28 +42740,37 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_zklogininputs(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_zklogininputs(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs(handle, status) } } override fun `addressSeed`(): Bn254FieldElement { return FfiConverterTypeBn254FieldElement.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed( + it, + _status) } } ) @@ -42614,10 +42779,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `headerBase64`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64( + it, + _status) } } ) @@ -42626,10 +42792,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `iss`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss( + it, + _status) } } ) @@ -42638,10 +42805,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `issBase64Details`(): ZkLoginClaim { return FfiConverterTypeZkLoginClaim.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details( + it, + _status) } } ) @@ -42650,10 +42818,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `jwkId`(): JwkId { return FfiConverterTypeJwkId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id( + it, + _status) } } ) @@ -42662,10 +42831,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `proofPoints`(): ZkLoginProof { return FfiConverterTypeZkLoginProof.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points( + it, + _status) } } ) @@ -42674,10 +42844,11 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface override fun `publicIdentifier`(): ZkLoginPublicIdentifier { return FfiConverterTypeZkLoginPublicIdentifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier( + it, + _status) } } ) @@ -42687,55 +42858,54 @@ open class ZkLoginInputs: Disposable, AutoCloseable, ZkLoginInputsInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeZkLoginInputs: FfiConverter { - - override fun lower(value: ZkLoginInputs): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeZkLoginInputs: FfiConverter { + override fun lower(value: ZkLoginInputs): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ZkLoginInputs { - return ZkLoginInputs(value) + override fun lift(value: Long): ZkLoginInputs { + return ZkLoginInputs(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ZkLoginInputs { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ZkLoginInputs) = 8UL override fun write(value: ZkLoginInputs, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -42760,13 +42930,13 @@ public object FfiConverterTypeZkLoginInputs: FfiConverter - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new( + FfiConverterTypeCircomG1.lower(`a`),FfiConverterTypeCircomG2.lower(`b`),FfiConverterTypeCircomG1.lower(`c`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -42900,7 +43078,7 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -42912,9 +43090,9 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -42925,28 +43103,37 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_zkloginproof(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_zkloginproof(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof(handle, status) } } override fun `a`(): CircomG1 { return FfiConverterTypeCircomG1.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a( + it, + _status) } } ) @@ -42955,10 +43142,11 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface override fun `b`(): CircomG2 { return FfiConverterTypeCircomG2.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b( + it, + _status) } } ) @@ -42967,10 +43155,11 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface override fun `c`(): CircomG1 { return FfiConverterTypeCircomG1.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c( + it, + _status) } } ) @@ -42980,55 +43169,54 @@ open class ZkLoginProof: Disposable, AutoCloseable, ZkLoginProofInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeZkLoginProof: FfiConverter { - - override fun lower(value: ZkLoginProof): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeZkLoginProof: FfiConverter { + override fun lower(value: ZkLoginProof): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ZkLoginProof { - return ZkLoginProof(value) + override fun lift(value: Long): ZkLoginProof { + return ZkLoginProof(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ZkLoginProof { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ZkLoginProof) = 8UL override fun write(value: ZkLoginProof, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -43053,13 +43241,13 @@ public object FfiConverterTypeZkLoginProof: FfiConverter // 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, // or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). // -// If we try to implement this with mutual exclusion on access to the pointer, there is the +// If we try to implement this with mutual exclusion on access to the handle, there is the // possibility of a race between a method call and a concurrent call to `destroy`: // -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. // * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -43112,6 +43300,7 @@ public object FfiConverterTypeZkLoginProof: FfiConverter // +// /** * Public Key equivalent for Zklogin authenticators * @@ -43264,30 +43453,37 @@ public interface ZkLoginPublicIdentifierInterface { open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIdentifierInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } constructor(`iss`: kotlin.String, `addressSeed`: Bn254FieldElement) : - this( + this(UniffiWithHandle, uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new( + FfiConverterString.lower(`iss`),FfiConverterTypeBn254FieldElement.lower(`addressSeed`),_status) } ) - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -43309,7 +43505,7 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -43321,9 +43517,9 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -43334,28 +43530,37 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier(handle, status) } } override fun `addressSeed`(): Bn254FieldElement { return FfiConverterTypeBn254FieldElement.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed( + it, + _status) } } ) @@ -43373,10 +43578,11 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden * two addresses. */override fun `deriveAddress`(): List
{ return FfiConverterSequenceTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address( + it, + _status) } } ) @@ -43393,10 +43599,11 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden * `hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )` */override fun `deriveAddressPadded`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded( + it, + _status) } } ) @@ -43414,10 +43621,11 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden * unpadded_32_byte_address_seed )` */override fun `deriveAddressUnpadded`(): Address { return FfiConverterTypeAddress.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded( + it, + _status) } } ) @@ -43426,10 +43634,11 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden override fun `iss`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss( + it, + _status) } } ) @@ -43439,55 +43648,54 @@ open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIden + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeZkLoginPublicIdentifier: FfiConverter { - - override fun lower(value: ZkLoginPublicIdentifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeZkLoginPublicIdentifier: FfiConverter { + override fun lower(value: ZkLoginPublicIdentifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ZkLoginPublicIdentifier { - return ZkLoginPublicIdentifier(value) + override fun lift(value: Long): ZkLoginPublicIdentifier { + return ZkLoginPublicIdentifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ZkLoginPublicIdentifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ZkLoginPublicIdentifier) = 8UL override fun write(value: ZkLoginPublicIdentifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // to the live Rust struct on the other side of the FFI. // -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// // There's some subtlety here, because we have to be careful not to operate on a Rust // struct after it has been dropped, and because we must expose a public API for freeing // theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: // -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to // the Rust FFI. // -// * When an instance is no longer needed, its pointer should be passed to a +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -43512,13 +43720,13 @@ public object FfiConverterTypeZkLoginPublicIdentifier: FfiConverter @@ -43585,23 +43794,29 @@ public interface ZkloginVerifierInterface { open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * This constructor can be used to instantiate a fake object. Only used for tests. Any * attempt to actually use an object constructed this way will fail as there is no * connected Rust object. */ @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } - protected val pointer: Pointer? + protected val handle: Long protected val cleanable: UniffiCleaner.Cleanable private val wasDestroyed = AtomicBoolean(false) @@ -43623,7 +43838,7 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> R): R { // Check and increment the call counter, to keep the object alive. // This needs a compare-and-set retry loop in case of concurrent updates. do { @@ -43635,9 +43850,9 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { @@ -43648,28 +43863,37 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_free_zkloginverifier(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier(pointer!!, status) + UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier(handle, status) } } override fun `jwks`(): Map { return FfiConverterMapTypeJwkIdTypeJwk.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks( - it, _status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks( + it, + _status) } } ) @@ -43679,10 +43903,11 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface @Throws(SdkFfiException::class)override fun `verify`(`message`: kotlin.ByteArray, `authenticator`: ZkLoginAuthenticator) = - callWithPointer { + callWithHandle { uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify( - it, FfiConverterByteArray.lower(`message`),FfiConverterTypeZkLoginAuthenticator.lower(`authenticator`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify( + it, + FfiConverterByteArray.lower(`message`),FfiConverterTypeZkLoginAuthenticator.lower(`authenticator`),_status) } } @@ -43690,10 +43915,11 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface override fun `withJwks`(`jwks`: Map): ZkloginVerifier { return FfiConverterTypeZkloginVerifier.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks( - it, FfiConverterMapTypeJwkIdTypeJwk.lower(`jwks`),_status) + UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks( + it, + FfiConverterMapTypeJwkIdTypeJwk.lower(`jwks`),_status) } } ) @@ -43703,6 +43929,9 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface + + + companion object { /** @@ -43711,7 +43940,8 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface */ fun `newDev`(): ZkloginVerifier { return FfiConverterTypeZkloginVerifier.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev( + _status) } ) @@ -43721,7 +43951,8 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface fun `newMainnet`(): ZkloginVerifier { return FfiConverterTypeZkloginVerifier.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet( + UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet( + _status) } ) @@ -43733,31 +43964,27 @@ open class ZkloginVerifier: Disposable, AutoCloseable, ZkloginVerifierInterface } + /** * @suppress */ -public object FfiConverterTypeZkloginVerifier: FfiConverter { - - override fun lower(value: ZkloginVerifier): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeZkloginVerifier: FfiConverter { + override fun lower(value: ZkloginVerifier): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ZkloginVerifier { - return ZkloginVerifier(value) + override fun lift(value: Long): ZkloginVerifier { + return ZkloginVerifier(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ZkloginVerifier { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ZkloginVerifier) = 8UL override fun write(value: ZkloginVerifier, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) + buf.putLong(lower(value)) } } @@ -43778,16 +44005,21 @@ data class ActiveJwk ( /** * Identifier used to uniquely identify a Jwk */ - var `jwkId`: JwkId, + var `jwkId`: JwkId + , /** * The Jwk */ - var `jwk`: Jwk, + var `jwk`: Jwk + , /** * Most recent epoch in which the jwk was validated */ var `epoch`: kotlin.ULong -) { + +){ + + companion object } @@ -43834,12 +44066,16 @@ data class AuthenticatorStateExpire ( /** * Expire JWKs that have a lower epoch than this */ - var `minEpoch`: kotlin.ULong, + var `minEpoch`: kotlin.ULong + , /** * The initial version of the authenticator object that it was shared at. */ var `authenticatorObjInitialSharedVersion`: kotlin.ULong -) { + +){ + + companion object } @@ -43886,17 +44122,23 @@ data class AuthenticatorStateUpdateV1 ( /** * Epoch of the authenticator state update transaction */ - var `epoch`: kotlin.ULong, + var `epoch`: kotlin.ULong + , /** * Consensus round of the authenticator state update */ - var `round`: kotlin.ULong, + var `round`: kotlin.ULong + , /** * newly active jwks */ - var `newActiveJwks`: List, + var `newActiveJwks`: List + , var `authenticatorObjInitialSharedVersion`: kotlin.ULong -) { + +){ + + companion object } @@ -43932,9 +44174,13 @@ public object FfiConverterTypeAuthenticatorStateUpdateV1: FfiConverterRustBuffer data class BatchSendStatus ( - var `status`: BatchSendStatusType, + var `status`: BatchSendStatusType + , var `transferredGasObjects`: FaucetReceipt? -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -43987,22 +44233,37 @@ data class ChangedObject ( /** * Id of the object */ - var `objectId`: ObjectId, + var `objectId`: ObjectId + , /** * State of the object in the store prior to this transaction. */ - var `inputState`: ObjectIn, + var `inputState`: ObjectIn + , /** * State of the object in the store after this transaction. */ - var `outputState`: ObjectOut, + var `outputState`: ObjectOut + , /** * Whether this object ID is created or deleted in this transaction. * This information isn't required by the protocol but is useful for * providing more detailed semantics on object changes. */ var `idOperation`: IdOperation -) : Disposable { + +): Disposable{ + + + // The local Rust `Display`/`Debug` implementation. + override fun toString(): String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_changedobject_uniffi_trait_display(FfiConverterTypeChangedObject.lower(this), + _status) +} + ) + } @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44056,12 +44317,16 @@ data class CheckpointSummaryPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44100,10 +44365,15 @@ public object FfiConverterTypeCheckpointSummaryPage: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44302,12 +44586,16 @@ data class DryRunEffect ( /** * Changes made to arguments that were mutably borrowed by this command. */ - var `mutatedReferences`: List, + var `mutatedReferences`: List + , /** * Return results of this command. */ var `returnValues`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44352,16 +44640,21 @@ data class DryRunMutation ( /** * The transaction argument that was mutated. */ - var `input`: TransactionArgument, + var `input`: TransactionArgument + , /** * The Move type of the mutated value. */ - var `typeTag`: TypeTag, + var `typeTag`: TypeTag + , /** * The BCS representation of the mutated value. */ var `bcs`: kotlin.ByteArray -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44412,21 +44705,27 @@ data class DryRunResult ( /** * The error that occurred during dry run execution, if any. */ - var `error`: kotlin.String?, + var `error`: kotlin.String? + , /** * The intermediate results for each command of the dry run execution, * including contents of mutated references and return values. */ - var `results`: List, + var `results`: List + , /** * The transaction block representing the dry run execution. */ - var `transaction`: SignedTransaction?, + var `transaction`: SignedTransaction? + , /** * The effects of the transaction execution. */ var `effects`: TransactionEffects? -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44479,12 +44778,16 @@ data class DryRunReturn ( /** * The Move type of the return value. */ - var `typeTag`: TypeTag, + var `typeTag`: TypeTag + , /** * The BCS representation of the return value. */ var `bcs`: kotlin.ByteArray -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44530,16 +44833,21 @@ data class DynamicFieldName ( /** * The type name of this dynamic field name */ - var `typeTag`: TypeTag, + var `typeTag`: TypeTag + , /** * The bcs bytes of this dynamic field name */ - var `bcs`: kotlin.ByteArray, + var `bcs`: kotlin.ByteArray + , /** * The json representation of the dynamic field name */ - var `json`: Value? = null -) : Disposable { + var `json`: Value? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44589,16 +44897,21 @@ data class DynamicFieldOutput ( /** * The name of the dynamic field */ - var `name`: DynamicFieldName, + var `name`: DynamicFieldName + , /** * The dynamic field value typename and bcs */ - var `value`: DynamicFieldValue? = null, + var `value`: DynamicFieldValue? = null + , /** * The json representation of the dynamic field value object */ - var `valueAsJson`: Value? = null -) : Disposable { + var `valueAsJson`: Value? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44648,12 +44961,16 @@ data class DynamicFieldOutputPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44695,9 +45012,13 @@ public object FfiConverterTypeDynamicFieldOutputPage: FfiConverterRustBuffer, - var `nextEpochProtocolVersion`: kotlin.ULong, - var `epochCommitments`: List, + var `nextEpochCommittee`: List + , + var `nextEpochProtocolVersion`: kotlin.ULong + , + var `epochCommitments`: List + , var `epochSupplyChange`: kotlin.Long -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44791,83 +45118,101 @@ data class Epoch ( * The epoch's id as a sequence number that starts at 0 and is incremented * by one at every epoch change. */ - var `epochId`: kotlin.ULong, + var `epochId`: kotlin.ULong + , /** * The storage fees paid for transactions executed during the epoch. */ - var `fundInflow`: kotlin.String? = null, + var `fundInflow`: kotlin.String? = null + , /** * The storage fee rebates paid to users who deleted the data associated * with past transactions. */ - var `fundOutflow`: kotlin.String? = null, + var `fundOutflow`: kotlin.String? = null + , /** * The storage fund available in this epoch. * This fund is used to redistribute storage fees from past transactions * to future validators. */ - var `fundSize`: kotlin.String? = null, + var `fundSize`: kotlin.String? = null + , /** * A commitment by the committee at the end of epoch on the contents of the * live object set at that time. This can be used to verify state * snapshots. */ - var `liveObjectSetDigest`: kotlin.String? = null, + var `liveObjectSetDigest`: kotlin.String? = null + , /** * The difference between the fund inflow and outflow, representing * the net amount of storage fees accumulated in this epoch. */ - var `netInflow`: kotlin.String? = null, + var `netInflow`: kotlin.String? = null + , /** * The epoch's corresponding protocol configuration, including the feature * flags and the configuration options. */ - var `protocolConfigs`: ProtocolConfigs? = null, + var `protocolConfigs`: ProtocolConfigs? = null + , /** * The minimum gas price that a quorum of validators are guaranteed to sign * a transaction for. */ - var `referenceGasPrice`: kotlin.String? = null, + var `referenceGasPrice`: kotlin.String? = null + , /** * The epoch's starting timestamp. */ - var `startTimestamp`: kotlin.ULong, + var `startTimestamp`: kotlin.ULong + , /** * The epoch's ending timestamp. Note that this is available only on epochs * that have ended. */ - var `endTimestamp`: kotlin.ULong? = null, + var `endTimestamp`: kotlin.ULong? = null + , /** * The value of the `version` field of `0x5`, the * `0x3::iota::IotaSystemState` object. This version changes whenever * the fields contained in the system state object (held in a dynamic * field attached to `0x5`) change. */ - var `systemStateVersion`: kotlin.ULong? = null, + var `systemStateVersion`: kotlin.ULong? = null + , /** * The total number of checkpoints in this epoch. */ - var `totalCheckpoints`: kotlin.ULong? = null, + var `totalCheckpoints`: kotlin.ULong? = null + , /** * The total amount of gas fees (in IOTA) that were paid in this epoch. */ - var `totalGasFees`: kotlin.String? = null, + var `totalGasFees`: kotlin.String? = null + , /** * The total IOTA rewarded as stake. */ - var `totalStakeRewards`: kotlin.String? = null, + var `totalStakeRewards`: kotlin.String? = null + , /** * The total number of transaction in this epoch. */ - var `totalTransactions`: kotlin.ULong? = null, + var `totalTransactions`: kotlin.ULong? = null + , /** * Validator related properties. For active validators, see * `active_validators` API. * For epochs other than the current the data provided refer to the start * of the epoch. */ - var `validatorSet`: ValidatorSet? = null -) : Disposable { + var `validatorSet`: ValidatorSet? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -44969,12 +45314,16 @@ data class EpochPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45028,38 +45377,48 @@ data class Event ( * Package id of the top-level function invoked by a MoveCall command which * triggered this event to be emitted. */ - var `packageId`: ObjectId, + var `packageId`: ObjectId + , /** * Module name of the top-level function invoked by a MoveCall command * which triggered this event to be emitted. */ - var `module`: kotlin.String, + var `module`: kotlin.String + , /** * Address of the account that sent the transaction where this event was * emitted. */ - var `sender`: Address, + var `sender`: Address + , /** * The type of the event emitted */ - var `type`: kotlin.String, + var `type`: kotlin.String + , /** * BCS serialized bytes of the event */ - var `contents`: kotlin.ByteArray, + var `contents`: kotlin.ByteArray + , /** * UTC timestamp in milliseconds since epoch (1/1/1970) */ - var `timestamp`: kotlin.String, + var `timestamp`: kotlin.String + , /** * Structured contents of a Move value */ - var `data`: kotlin.String, + var `data`: kotlin.String + , /** * Representation of a Move value in JSON */ var `json`: kotlin.String -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45122,11 +45481,17 @@ public object FfiConverterTypeEvent: FfiConverterRustBuffer { data class EventFilter ( - var `emittingModule`: kotlin.String? = null, - var `eventType`: kotlin.String? = null, - var `sender`: Address? = null, - var `transactionDigest`: kotlin.String? = null -) : Disposable { + var `emittingModule`: kotlin.String? = null + , + var `eventType`: kotlin.String? = null + , + var `sender`: Address? = null + , + var `transactionDigest`: kotlin.String? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45180,12 +45545,16 @@ data class EventPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45225,7 +45594,10 @@ public object FfiConverterTypeEventPage: FfiConverterRustBuffer { data class FaucetReceipt ( var `sent`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45261,7 +45633,10 @@ public object FfiConverterTypeFaucetReceipt: FfiConverterRustBuffer, + var `objects`: List + , /** * Owner of the gas objects, either the transaction sender or a sponsor */ - var `owner`: Address, + var `owner`: Address + , /** * Gas unit price to use when charging for computation * * Must be greater-than-or-equal-to the network's current RGP (reference * gas price) */ - var `price`: kotlin.ULong, + var `price`: kotlin.ULong + , /** * Total budget willing to spend for the execution of a transaction */ var `budget`: kotlin.ULong -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45491,20 +45879,26 @@ data class Jwk ( /** * Key type parameter, */ - var `kty`: kotlin.String, + var `kty`: kotlin.String + , /** * RSA public exponent, */ - var `e`: kotlin.String, + var `e`: kotlin.String + , /** * RSA modulus, */ - var `n`: kotlin.String, + var `n`: kotlin.String + , /** * Algorithm parameter, */ var `alg`: kotlin.String -) { + +){ + + companion object } @@ -45554,12 +45948,16 @@ data class JwkId ( /** * The issuer or identity of the OIDC provider. */ - var `iss`: kotlin.String, + var `iss`: kotlin.String + , /** * A key id use to uniquely identify a key from an OIDC provider. */ var `kid`: kotlin.String -) { + +){ + + companion object } @@ -45589,11 +45987,17 @@ public object FfiConverterTypeJwkId: FfiConverterRustBuffer { data class MoveEnum ( - var `abilities`: List? = null, - var `name`: kotlin.String, - var `typeParameters`: List? = null, - var `variants`: List? = null -) { + var `abilities`: List? = null + , + var `name`: kotlin.String + , + var `typeParameters`: List? = null + , + var `variants`: List? = null + +){ + + companion object } @@ -45629,9 +46033,13 @@ public object FfiConverterTypeMoveEnum: FfiConverterRustBuffer { data class MoveEnumConnection ( - var `nodes`: List, + var `nodes`: List + , var `pageInfo`: PageInfo -) { + +){ + + companion object } @@ -45661,9 +46069,13 @@ public object FfiConverterTypeMoveEnumConnection: FfiConverterRustBuffer? = null, + var `fields`: List? = null + , var `name`: kotlin.String -) { + +){ + + companion object } @@ -45693,9 +46105,13 @@ public object FfiConverterTypeMoveEnumVariant: FfiConverterRustBuffer { data class MoveFunctionConnection ( - var `nodes`: List, + var `nodes`: List + , var `pageInfo`: PageInfo -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45767,7 +46187,10 @@ public object FfiConverterTypeMoveFunctionConnection: FfiConverterRustBuffer -) { + +){ + + companion object } @@ -45808,25 +46231,32 @@ data class MoveLocation ( /** * The package id */ - var `package`: ObjectId, + var `package`: ObjectId + , /** * The module name */ - var `module`: kotlin.String, + var `module`: kotlin.String + , /** * The function index */ - var `function`: kotlin.UShort, + var `function`: kotlin.UShort + , /** * Index into the code stream for a jump. The offset is relative to the * beginning of the instruction stream. */ - var `instruction`: kotlin.UShort, + var `instruction`: kotlin.UShort + , /** * The name of the function if available */ - var `functionName`: kotlin.String? = null -) : Disposable { + var `functionName`: kotlin.String? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45877,12 +46307,19 @@ public object FfiConverterTypeMoveLocation: FfiConverterRustBuffer data class MoveModule ( - var `fileFormatVersion`: kotlin.Int, - var `enums`: MoveEnumConnection? = null, - var `friends`: MoveModuleConnection, - var `functions`: MoveFunctionConnection? = null, - var `structs`: MoveStructConnection? = null -) : Disposable { + var `fileFormatVersion`: kotlin.Int + , + var `enums`: MoveEnumConnection? = null + , + var `friends`: MoveModuleConnection + , + var `functions`: MoveFunctionConnection? = null + , + var `structs`: MoveStructConnection? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45933,9 +46370,13 @@ public object FfiConverterTypeMoveModule: FfiConverterRustBuffer { data class MoveModuleConnection ( - var `nodes`: List, + var `nodes`: List + , var `pageInfo`: PageInfo -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -45974,9 +46415,13 @@ public object FfiConverterTypeMoveModuleConnection: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46094,9 +46546,13 @@ public object FfiConverterTypeMovePackagePage: FfiConverterRustBuffer { data class MoveStructConnection ( - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , var `nodes`: List -) { + +){ + + companion object } @@ -46244,11 +46709,17 @@ public object FfiConverterTypeMoveStructConnection: FfiConverterRustBuffer? = null, - var `name`: kotlin.String, - var `fields`: List? = null, - var `typeParameters`: List? = null -) { + var `abilities`: List? = null + , + var `name`: kotlin.String + , + var `fields`: List? = null + , + var `typeParameters`: List? = null + +){ + + companion object } @@ -46284,9 +46755,13 @@ public object FfiConverterTypeMoveStructQuery: FfiConverterRustBuffer, + var `constraints`: List + , var `isPhantom`: kotlin.Boolean -) { + +){ + + companion object } @@ -46323,12 +46798,16 @@ data class NameRegistrationPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46367,10 +46846,15 @@ public object FfiConverterTypeNameRegistrationPage: FfiConverterRustBuffer? = null -) : Disposable { + var `typeTag`: kotlin.String? = null + , + var `owner`: Address? = null + , + var `objectIds`: List? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46420,12 +46904,16 @@ data class ObjectPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46464,10 +46952,15 @@ public object FfiConverterTypeObjectPage: FfiConverterRustBuffer { data class ObjectRef ( - var `address`: ObjectId, - var `digest`: kotlin.String, + var `address`: ObjectId + , + var `digest`: kotlin.String + , var `version`: kotlin.ULong -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46523,10 +47016,15 @@ public object FfiConverterTypeObjectRef: FfiConverterRustBuffer { * ``` */ data class ObjectReference ( - var `objectId`: ObjectId, - var `version`: kotlin.ULong, + var `objectId`: ObjectId + , + var `version`: kotlin.ULong + , var `digest`: Digest -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -46570,7 +47068,10 @@ public object FfiConverterTypeObjectReference: FfiConverterRustBuffer, + var `featureFlags`: List + , /** * List all available configurations and their values. These configurations * can take any value (but they will all be represented in string * form), and do not include feature flags. */ var `configs`: List -) { + +){ + + companion object } @@ -46832,9 +47357,13 @@ public object FfiConverterTypeProtocolConfigs: FfiConverterRustBuffer, + var `enabledFeatures`: List + , /** * Maximum estimated cost of a database query used to serve a GraphQL * request. This is measured in the same units that the database uses @@ -46942,7 +47479,8 @@ data class ServiceConfig ( * Maximum nesting allowed in struct fields when calculating the layout of * a single Move Type. */ - var `maxMoveValueDepth`: kotlin.Int, + var `maxMoveValueDepth`: kotlin.Int + , /** * The maximum number of output nodes in a GraphQL response. * Non-connection nodes have a count of 1, while connection nodes are @@ -46954,39 +47492,47 @@ data class ServiceConfig ( * would be 200 nodes. This is then summed to the count of 10 nodes * at the first level, for a total of 210 nodes. */ - var `maxOutputNodes`: kotlin.Int, + var `maxOutputNodes`: kotlin.Int + , /** * Maximum number of elements allowed on a single page of a connection. */ - var `maxPageSize`: kotlin.Int, + var `maxPageSize`: kotlin.Int + , /** * The maximum depth a GraphQL query can be to be accepted by this service. */ - var `maxQueryDepth`: kotlin.Int, + var `maxQueryDepth`: kotlin.Int + , /** * The maximum number of nodes (field names) the service will accept in a * single query. */ - var `maxQueryNodes`: kotlin.Int, + var `maxQueryNodes`: kotlin.Int + , /** * Maximum length of a query payload string. */ - var `maxQueryPayloadSize`: kotlin.Int, + var `maxQueryPayloadSize`: kotlin.Int + , /** * Maximum nesting allowed in type arguments in Move Types resolved by this * service. */ - var `maxTypeArgumentDepth`: kotlin.Int, + var `maxTypeArgumentDepth`: kotlin.Int + , /** * Maximum number of type arguments passed into a generic instantiation of * a Move Type resolved by this service. */ - var `maxTypeArgumentWidth`: kotlin.Int, + var `maxTypeArgumentWidth`: kotlin.Int + , /** * Maximum number of structs that need to be processed when calculating the * layout of a single Move Type. */ - var `maxTypeNodes`: kotlin.Int, + var `maxTypeNodes`: kotlin.Int + , /** * Maximum time in milliseconds spent waiting for a response from fullnode * after issuing a a transaction to execute. Note that the transaction @@ -46995,13 +47541,17 @@ data class ServiceConfig ( * until the network returns a definite response (success or failure, not * timeout). */ - var `mutationTimeoutMs`: kotlin.Int, + var `mutationTimeoutMs`: kotlin.Int + , /** * Maximum time in milliseconds that will be spent to serve one query * request. */ var `requestTimeoutMs`: kotlin.Int -) { + +){ + + companion object } @@ -47064,9 +47614,13 @@ public object FfiConverterTypeServiceConfig: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47112,12 +47666,16 @@ data class SignedTransactionPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47156,9 +47714,13 @@ public object FfiConverterTypeSignedTransactionPage: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47255,12 +47821,16 @@ data class TransactionEffectsPage ( * Information about the page, such as the cursor and whether there are * more pages. */ - var `pageInfo`: PageInfo, + var `pageInfo`: PageInfo + , /** * The data returned by the server. */ var `data`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47323,42 +47893,51 @@ data class TransactionEffectsV1 ( /** * The status of the execution */ - var `status`: ExecutionStatus, + var `status`: ExecutionStatus + , /** * The epoch when this transaction was executed. */ - var `epoch`: kotlin.ULong, + var `epoch`: kotlin.ULong + , /** * The gas used by this transaction */ - var `gasUsed`: GasCostSummary, + var `gasUsed`: GasCostSummary + , /** * The transaction digest */ - var `transactionDigest`: Digest, + var `transactionDigest`: Digest + , /** * The updated gas object reference, as an index into the `changed_objects` * vector. Having a dedicated field for convenient access. * System transaction that don't require gas will leave this as None. */ - var `gasObjectIndex`: kotlin.UInt? = null, + var `gasObjectIndex`: kotlin.UInt? = null + , /** * The digest of the events emitted during execution, * can be None if the transaction does not emit any event. */ - var `eventsDigest`: Digest? = null, + var `eventsDigest`: Digest? = null + , /** * The set of transaction digests this transaction depends on. */ - var `dependencies`: List, + var `dependencies`: List + , /** * The version number of all the written Move objects by this transaction. */ - var `lamportVersion`: kotlin.ULong, + var `lamportVersion`: kotlin.ULong + , /** * Objects whose state are changed in the object store. */ - var `changedObjects`: List, + var `changedObjects`: List + , /** * Shared objects that are not mutated in this transaction. Unlike owned * objects, read-only shared objects' version are not committed in the @@ -47366,15 +47945,28 @@ data class TransactionEffectsV1 ( * without consensus sequencing, the version needs to be committed in * the effects. */ - var `unchangedSharedObjects`: List, + var `unchangedSharedObjects`: List + , /** * Auxiliary data that are not protocol-critical, generated as part of the * effects but are stored separately. Storing it separately allows us * to avoid bloating the effects with data that are not critical. * It also provides more flexibility on the format and type of the data. */ - var `auxiliaryDataDigest`: Digest? = null -) : Disposable { + var `auxiliaryDataDigest`: Digest? = null + +): Disposable{ + + + // The local Rust `Display`/`Debug` implementation. + override fun toString(): String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsv1_uniffi_trait_display(FfiConverterTypeTransactionEffectsV1.lower(this), + _status) +} + ) + } @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47449,12 +48041,19 @@ public object FfiConverterTypeTransactionEffectsV1: FfiConverterRustBuffer? = null, - var `gasPrice`: kotlin.ULong? = null, - var `gasSponsor`: Address? = null, - var `sender`: Address? = null -) : Disposable { + var `gasBudget`: kotlin.ULong? = null + , + var `gasObjects`: List? = null + , + var `gasPrice`: kotlin.ULong? = null + , + var `gasSponsor`: Address? = null + , + var `sender`: Address? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47505,18 +48104,31 @@ public object FfiConverterTypeTransactionMetadata: FfiConverterRustBuffer? = null, - var `wrappedOrDeletedObject`: ObjectId? = null -) : Disposable { + var `function`: kotlin.String? = null + , + var `kind`: TransactionBlockKindInput? = null + , + var `afterCheckpoint`: kotlin.ULong? = null + , + var `atCheckpoint`: kotlin.ULong? = null + , + var `beforeCheckpoint`: kotlin.ULong? = null + , + var `signAddress`: Address? = null + , + var `recvAddress`: Address? = null + , + var `inputObject`: ObjectId? = null + , + var `changedObject`: ObjectId? = null + , + var `transactionIds`: List? = null + , + var `wrappedOrDeletedObject`: ObjectId? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47602,10 +48214,15 @@ public object FfiConverterTypeTransactionsFilter: FfiConverterRustBuffer { * ``` */ data class UnchangedSharedObject ( - var `objectId`: ObjectId, + var `objectId`: ObjectId + , var `kind`: UnchangedSharedKind -) : Disposable { + +): Disposable{ + + + // The local Rust `Display`/`Debug` implementation. + override fun toString(): String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_iota_sdk_ffi_fn_method_unchangedsharedobject_uniffi_trait_display(FfiConverterTypeUnchangedSharedObject.lower(this), + _status) +} + ) + } @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47714,12 +48344,16 @@ data class UpgradeInfo ( /** * Id of the upgraded packages */ - var `upgradedId`: ObjectId, + var `upgradedId`: ObjectId + , /** * Version of the upgraded package */ var `upgradedVersion`: kotlin.ULong -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -47765,108 +48399,134 @@ data class Validator ( * The APY of this validator in basis points. * To get the APY in percentage, divide by 100. */ - var `apy`: kotlin.Int? = null, + var `apy`: kotlin.Int? = null + , /** * The validator's address. */ - var `address`: Address, + var `address`: Address + , /** * The fee charged by the validator for staking services. */ - var `commissionRate`: kotlin.Int? = null, + var `commissionRate`: kotlin.Int? = null + , /** * Validator's credentials. */ - var `credentials`: ValidatorCredentials? = null, + var `credentials`: ValidatorCredentials? = null + , /** * Validator's description. */ - var `description`: kotlin.String? = null, + var `description`: kotlin.String? = null + , /** * Number of exchange rates in the table. */ - var `exchangeRatesSize`: kotlin.ULong? = null, + var `exchangeRatesSize`: kotlin.ULong? = null + , /** * The reference gas price for this epoch. */ - var `gasPrice`: kotlin.ULong? = null, + var `gasPrice`: kotlin.ULong? = null + , /** * Validator's name. */ - var `name`: kotlin.String? = null, + var `name`: kotlin.String? = null + , /** * Validator's url containing their custom image. */ - var `imageUrl`: kotlin.String? = null, + var `imageUrl`: kotlin.String? = null + , /** * The proposed next epoch fee for the validator's staking services. */ - var `nextEpochCommissionRate`: kotlin.Int? = null, + var `nextEpochCommissionRate`: kotlin.Int? = null + , /** * Validator's credentials for the next epoch. */ - var `nextEpochCredentials`: ValidatorCredentials? = null, + var `nextEpochCredentials`: ValidatorCredentials? = null + , /** * The validator's gas price quote for the next epoch. */ - var `nextEpochGasPrice`: kotlin.ULong? = null, + var `nextEpochGasPrice`: kotlin.ULong? = null + , /** * The total number of IOTA tokens in this pool plus * the pending stake amount for this epoch. */ - var `nextEpochStake`: kotlin.ULong? = null, + var `nextEpochStake`: kotlin.ULong? = null + , /** * The validator's current valid `Cap` object. Validators can delegate * the operation ability to another address. The address holding this `Cap` * object can then update the reference gas price and tallying rule on * behalf of the validator. */ - var `operationCap`: kotlin.ByteArray? = null, + var `operationCap`: kotlin.ByteArray? = null + , /** * Pending pool token withdrawn during the current epoch, emptied at epoch * boundaries. Zero for past epochs. */ - var `pendingPoolTokenWithdraw`: kotlin.ULong? = null, + var `pendingPoolTokenWithdraw`: kotlin.ULong? = null + , /** * Pending stake amount for the current epoch, emptied at epoch boundaries. * Zero for past epochs. */ - var `pendingStake`: kotlin.ULong? = null, + var `pendingStake`: kotlin.ULong? = null + , /** * Pending stake withdrawn during the current epoch, emptied at epoch * boundaries. Zero for past epochs. */ - var `pendingTotalIotaWithdraw`: kotlin.ULong? = null, + var `pendingTotalIotaWithdraw`: kotlin.ULong? = null + , /** * Total number of pool tokens issued by the pool. */ - var `poolTokenBalance`: kotlin.ULong? = null, + var `poolTokenBalance`: kotlin.ULong? = null + , /** * Validator's homepage URL. */ - var `projectUrl`: kotlin.String? = null, + var `projectUrl`: kotlin.String? = null + , /** * The epoch stake rewards will be added here at the end of each epoch. */ - var `rewardsPool`: kotlin.ULong? = null, + var `rewardsPool`: kotlin.ULong? = null + , /** * The epoch at which this pool became active. */ - var `stakingPoolActivationEpoch`: kotlin.ULong? = null, + var `stakingPoolActivationEpoch`: kotlin.ULong? = null + , /** * The ID of this validator's `0x3::staking_pool::StakingPool`. */ - var `stakingPoolId`: ObjectId, + var `stakingPoolId`: ObjectId + , /** * The total number of IOTA tokens in this pool. */ - var `stakingPoolIotaBalance`: kotlin.ULong? = null, + var `stakingPoolIotaBalance`: kotlin.ULong? = null + , /** * The voting power of this validator in basis points (e.g., 100 = 1% * voting power). */ - var `votingPower`: kotlin.Int? = null -) : Disposable { + var `votingPower`: kotlin.Int? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -48005,9 +48665,13 @@ public object FfiConverterTypeValidator: FfiConverterRustBuffer { * ``` */ data class ValidatorCommittee ( - var `epoch`: kotlin.ULong, + var `epoch`: kotlin.ULong + , var `members`: List -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -48058,9 +48722,13 @@ public object FfiConverterTypeValidatorCommittee: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -48143,14 +48815,23 @@ public object FfiConverterTypeValidatorConnection: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -48249,50 +48934,62 @@ data class ValidatorSet ( /** * Object ID of the `Table` storing the inactive staking pools. */ - var `inactivePoolsId`: ObjectId? = null, + var `inactivePoolsId`: ObjectId? = null + , /** * Size of the inactive pools `Table`. */ - var `inactivePoolsSize`: kotlin.Int? = null, + var `inactivePoolsSize`: kotlin.Int? = null + , /** * Object ID of the wrapped object `TableVec` storing the pending active * validators. */ - var `pendingActiveValidatorsId`: ObjectId? = null, + var `pendingActiveValidatorsId`: ObjectId? = null + , /** * Size of the pending active validators table. */ - var `pendingActiveValidatorsSize`: kotlin.Int? = null, + var `pendingActiveValidatorsSize`: kotlin.Int? = null + , /** * Validators that are pending removal from the active validator set, * expressed as indices in to `activeValidators`. */ - var `pendingRemovals`: List? = null, + var `pendingRemovals`: List? = null + , /** * Object ID of the `Table` storing the mapping from staking pool ids to * the addresses of the corresponding validators. This is needed * because a validator's address can potentially change but the object * ID of its pool will not. */ - var `stakingPoolMappingsId`: ObjectId? = null, + var `stakingPoolMappingsId`: ObjectId? = null + , /** * Size of the stake pool mappings `Table`. */ - var `stakingPoolMappingsSize`: kotlin.Int? = null, + var `stakingPoolMappingsSize`: kotlin.Int? = null + , /** * Total amount of stake for all active validators at the beginning of the * epoch. */ - var `totalStake`: kotlin.String? = null, + var `totalStake`: kotlin.String? = null + , /** * Size of the validator candidates `Table`. */ - var `validatorCandidatesSize`: kotlin.Int? = null, + var `validatorCandidatesSize`: kotlin.Int? = null + , /** * Object ID of the `Table` storing the validator candidates. */ - var `validatorCandidatesId`: ObjectId? = null -) : Disposable { + var `validatorCandidatesId`: ObjectId? = null + +): Disposable{ + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -48374,9 +49071,13 @@ public object FfiConverterTypeValidatorSet: FfiConverterRustBuffer * ``` */ data class ZkLoginClaim ( - var `value`: kotlin.String, + var `value`: kotlin.String + , var `indexMod4`: kotlin.UByte -) { + +){ + + companion object } @@ -48502,7 +49203,11 @@ sealed class CommandArgumentError { * Out of bounds access to input or results */ data class IndexOutOfBounds( - val `index`: kotlin.UShort) : CommandArgumentError() { + val `index`: kotlin.UShort) : CommandArgumentError() + + { + + companion object } @@ -48511,7 +49216,11 @@ sealed class CommandArgumentError { */ data class SecondaryIndexOutOfBounds( val `result`: kotlin.UShort, - val `subresult`: kotlin.UShort) : CommandArgumentError() { + val `subresult`: kotlin.UShort) : CommandArgumentError() + + { + + companion object } @@ -48520,7 +49229,11 @@ sealed class CommandArgumentError { * Expected a single result but found either no return value or multiple. */ data class InvalidResultArity( - val `result`: kotlin.UShort) : CommandArgumentError() { + val `result`: kotlin.UShort) : CommandArgumentError() + + { + + companion object } @@ -48881,7 +49594,11 @@ sealed class ExecutionError: Disposable { */ data class ObjectTooBig( val `objectSize`: kotlin.ULong, - val `maxObjectSize`: kotlin.ULong) : ExecutionError() { + val `maxObjectSize`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -48890,7 +49607,11 @@ sealed class ExecutionError: Disposable { */ data class PackageTooBig( val `objectSize`: kotlin.ULong, - val `maxObjectSize`: kotlin.ULong) : ExecutionError() { + val `maxObjectSize`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -48898,7 +49619,11 @@ sealed class ExecutionError: Disposable { * Circular Object Ownership */ data class CircularObjectOwnership( - val `object`: ObjectId) : ExecutionError() { + val `object`: ObjectId) : ExecutionError() + + { + + companion object } @@ -48933,7 +49658,11 @@ sealed class ExecutionError: Disposable { * Arithmetic error, stack overflow, max value depth, etc." */ data class MovePrimitiveRuntime( - val `location`: MoveLocation?) : ExecutionError() { + val `location`: MoveLocation?) : ExecutionError() + + { + + companion object } @@ -48942,7 +49671,11 @@ sealed class ExecutionError: Disposable { */ data class MoveAbort( val `location`: MoveLocation, - val `code`: kotlin.ULong) : ExecutionError() { + val `code`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -48989,7 +49722,11 @@ sealed class ExecutionError: Disposable { */ data class CommandArgument( val `argument`: kotlin.UShort, - val `kind`: CommandArgumentError) : ExecutionError() { + val `kind`: CommandArgumentError) : ExecutionError() + + { + + companion object } @@ -49001,7 +49738,11 @@ sealed class ExecutionError: Disposable { * Index of the problematic type argument */ val `typeArgument`: kotlin.UShort, - val `kind`: TypeArgumentError) : ExecutionError() { + val `kind`: TypeArgumentError) : ExecutionError() + + { + + companion object } @@ -49010,7 +49751,11 @@ sealed class ExecutionError: Disposable { */ data class UnusedValueWithoutDrop( val `result`: kotlin.UShort, - val `subresult`: kotlin.UShort) : ExecutionError() { + val `subresult`: kotlin.UShort) : ExecutionError() + + { + + companion object } @@ -49019,7 +49764,11 @@ sealed class ExecutionError: Disposable { * Unsupported return type for return value */ data class InvalidPublicFunctionReturnType( - val `index`: kotlin.UShort) : ExecutionError() { + val `index`: kotlin.UShort) : ExecutionError() + + { + + companion object } @@ -49034,7 +49783,11 @@ sealed class ExecutionError: Disposable { */ data class EffectsTooLarge( val `currentSize`: kotlin.ULong, - val `maxSize`: kotlin.ULong) : ExecutionError() { + val `maxSize`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -49058,7 +49811,11 @@ sealed class ExecutionError: Disposable { * Invalid package upgrade */ data class PackageUpgrade( - val `kind`: PackageUpgradeError) : ExecutionError() { + val `kind`: PackageUpgradeError) : ExecutionError() + + { + + companion object } @@ -49067,7 +49824,11 @@ sealed class ExecutionError: Disposable { */ data class WrittenObjectsTooLarge( val `objectSize`: kotlin.ULong, - val `maxObjectSize`: kotlin.ULong) : ExecutionError() { + val `maxObjectSize`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -49099,7 +49860,11 @@ sealed class ExecutionError: Disposable { * Certificate is cancelled due to congestion on shared objects */ data class ExecutionCancelledDueToSharedObjectCongestion( - val `congestedObjects`: List) : ExecutionError() { + val `congestedObjects`: List) : ExecutionError() + + { + + companion object } @@ -49109,7 +49874,11 @@ sealed class ExecutionError: Disposable { */ data class ExecutionCancelledDueToSharedObjectCongestionV2( val `congestedObjects`: List, - val `suggestedGasPrice`: kotlin.ULong) : ExecutionError() { + val `suggestedGasPrice`: kotlin.ULong) : ExecutionError() + + { + + companion object } @@ -49118,7 +49887,11 @@ sealed class ExecutionError: Disposable { */ data class AddressDeniedForCoin( val `address`: Address, - val `coinType`: kotlin.String) : ExecutionError() { + val `coinType`: kotlin.String) : ExecutionError() + + { + + companion object } @@ -49126,7 +49899,11 @@ sealed class ExecutionError: Disposable { * Coin type is globally paused for use */ data class CoinTypeGlobalPause( - val `coinType`: kotlin.String) : ExecutionError() { + val `coinType`: kotlin.String) : ExecutionError() + + { + + companion object } @@ -49906,7 +50683,11 @@ sealed class ExecutionStatus: Disposable { /** * The command, if any, during which the error occurred. */ - val `command`: kotlin.ULong?) : ExecutionStatus() { + val `command`: kotlin.ULong?) : ExecutionStatus() + + { + + companion object } @@ -50190,7 +50971,11 @@ sealed class ObjectIn: Disposable { data class Data( val `version`: kotlin.ULong, val `digest`: Digest, - val `owner`: Owner) : ObjectIn() { + val `owner`: Owner) : ObjectIn() + + { + + companion object } @@ -50302,7 +51087,11 @@ sealed class ObjectOut: Disposable { */ data class ObjectWrite( val `digest`: Digest, - val `owner`: Owner) : ObjectOut() { + val `owner`: Owner) : ObjectOut() + + { + + companion object } @@ -50312,7 +51101,11 @@ sealed class ObjectOut: Disposable { */ data class PackageWrite( val `version`: kotlin.ULong, - val `digest`: Digest) : ObjectOut() { + val `digest`: Digest) : ObjectOut() + + { + + companion object } @@ -50444,7 +51237,11 @@ sealed class PackageUpgradeError: Disposable { * Unable to fetch package */ data class UnableToFetchPackage( - val `packageId`: ObjectId) : PackageUpgradeError() { + val `packageId`: ObjectId) : PackageUpgradeError() + + { + + companion object } @@ -50452,7 +51249,11 @@ sealed class PackageUpgradeError: Disposable { * Object is not a package */ data class NotAPackage( - val `objectId`: ObjectId) : PackageUpgradeError() { + val `objectId`: ObjectId) : PackageUpgradeError() + + { + + companion object } @@ -50466,7 +51267,11 @@ sealed class PackageUpgradeError: Disposable { * Digest in upgrade ticket and computed digest differ */ data class DigestDoesNotMatch( - val `digest`: Digest) : PackageUpgradeError() { + val `digest`: Digest) : PackageUpgradeError() + + { + + companion object } @@ -50474,7 +51279,11 @@ sealed class PackageUpgradeError: Disposable { * Upgrade policy is not valid */ data class UnknownUpgradePolicy( - val `policy`: kotlin.UByte) : PackageUpgradeError() { + val `policy`: kotlin.UByte) : PackageUpgradeError() + + { + + companion object } @@ -50483,7 +51292,11 @@ sealed class PackageUpgradeError: Disposable { */ data class PackageIdDoesNotMatch( val `packageId`: ObjectId, - val `ticketId`: ObjectId) : PackageUpgradeError() { + val `ticketId`: ObjectId) : PackageUpgradeError() + + { + + companion object } @@ -50762,7 +51575,11 @@ sealed class TransactionArgument { /** * Index of the programmable transaction block input (0-indexed). */ - val `ix`: kotlin.UInt) : TransactionArgument() { + val `ix`: kotlin.UInt) : TransactionArgument() + + { + + companion object } @@ -50780,7 +51597,11 @@ sealed class TransactionArgument { * of the individual result among the multiple results from * that command (also 0-indexed). */ - val `ix`: kotlin.UInt?) : TransactionArgument() { + val `ix`: kotlin.UInt?) : TransactionArgument() + + { + + companion object } @@ -50916,7 +51737,11 @@ sealed class TransactionExpiration { * is greater than or equal to the current epoch */ data class Epoch( - val v1: kotlin.ULong) : TransactionExpiration() { + val v1: kotlin.ULong) : TransactionExpiration() + + { + + companion object } @@ -51053,7 +51878,11 @@ sealed class UnchangedSharedKind: Disposable { */ data class ReadOnlyRoot( val `version`: kotlin.ULong, - val `digest`: Digest) : UnchangedSharedKind() { + val `digest`: Digest) : UnchangedSharedKind() + + { + + companion object } @@ -51061,7 +51890,11 @@ sealed class UnchangedSharedKind: Disposable { * Deleted shared objects that appear mutably/owned in the input. */ data class MutateDeleted( - val `version`: kotlin.ULong) : UnchangedSharedKind() { + val `version`: kotlin.ULong) : UnchangedSharedKind() + + { + + companion object } @@ -51069,7 +51902,11 @@ sealed class UnchangedSharedKind: Disposable { * Deleted shared objects that appear as read-only in the input. */ data class ReadDeleted( - val `version`: kotlin.ULong) : UnchangedSharedKind() { + val `version`: kotlin.ULong) : UnchangedSharedKind() + + { + + companion object } @@ -51078,7 +51915,11 @@ sealed class UnchangedSharedKind: Disposable { * cancellation reason. */ data class Cancelled( - val `version`: kotlin.ULong) : UnchangedSharedKind() { + val `version`: kotlin.ULong) : UnchangedSharedKind() + + { + + companion object } @@ -55374,7 +56215,8 @@ public typealias FfiConverterTypeValue = FfiConverterString @Throws(SdkFfiException::class) fun `base64Decode`(`input`: kotlin.String): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_func_base64_decode( + UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode( + FfiConverterString.lower(`input`),_status) } ) @@ -55383,7 +56225,8 @@ public typealias FfiConverterTypeValue = FfiConverterString fun `base64Encode`(`input`: kotlin.ByteArray): kotlin.String { return FfiConverterString.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_func_base64_encode( + UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode( + FfiConverterByteArray.lower(`input`),_status) } ) @@ -55393,7 +56236,8 @@ public typealias FfiConverterTypeValue = FfiConverterString @Throws(SdkFfiException::class) fun `hexDecode`(`input`: kotlin.String): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(SdkFfiException) { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_func_hex_decode( + UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode( + FfiConverterString.lower(`input`),_status) } ) @@ -55402,7 +56246,8 @@ public typealias FfiConverterTypeValue = FfiConverterString fun `hexEncode`(`input`: kotlin.ByteArray): kotlin.String { return FfiConverterString.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_func_hex_encode( + UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode( + FfiConverterByteArray.lower(`input`),_status) } ) diff --git a/bindings/python/lib/iota_sdk_ffi.py b/bindings/python/lib/iota_sdk_ffi.py index 76490ef2e..342125599 100644 --- a/bindings/python/lib/iota_sdk_ffi.py +++ b/bindings/python/lib/iota_sdk_ffi.py @@ -1,5 +1,3 @@ - - # This file was autogenerated by some hot garbage in the `uniffi` crate. # Trust me, you don't want to mess with it! @@ -19,6 +17,7 @@ import os import sys import ctypes +from dataclasses import dataclass import enum import struct import contextlib @@ -30,6 +29,7 @@ import asyncio import platform + # Used for default argument values _DEFAULT = object() # type: typing.Any @@ -88,7 +88,7 @@ def consume_with_stream(self): s = _UniffiRustBufferStream.from_rust_buffer(self) yield s if s.remaining() != 0: - raise RuntimeError("junk data left in buffer at end of consume_with_stream") + raise RuntimeError(f"junk data left in buffer at end of consume_with_stream {s.remaining()}") finally: self.free() @@ -102,7 +102,7 @@ def read_with_stream(self): s = _UniffiRustBufferStream.from_rust_buffer(self) yield s if s.remaining() != 0: - raise RuntimeError("junk data left in buffer at end of read_with_stream") + raise RuntimeError(f"junk data left in buffer at end of read_with_stream {s.remaining()}") class _UniffiForeignBytes(ctypes.Structure): _fields_ = [ @@ -309,7 +309,7 @@ def _uniffi_check_call_status(error_ffi_converter, call_status): # with the message. But if that code panics, then it just sends back # an empty buffer. if call_status.error_buf.len > 0: - msg = _UniffiConverterString.lift(call_status.error_buf) + msg = _UniffiFfiConverterString.lift(call_status.error_buf) else: msg = "Unknown rust panic" raise InternalError(msg) @@ -322,7 +322,7 @@ def _uniffi_trait_interface_call(call_status, make_call, write_return_value): return write_return_value(make_call()) except Exception as e: call_status.code = _UniffiRustCallStatus.CALL_UNEXPECTED_ERROR - call_status.error_buf = _UniffiConverterString.lower(repr(e)) + call_status.error_buf = _UniffiFfiConverterString.lower(repr(e)) def _uniffi_trait_interface_call_with_error(call_status, make_call, write_return_value, error_type, lower_error): try: @@ -333,7 +333,12 @@ def _uniffi_trait_interface_call_with_error(call_status, make_call, write_return call_status.error_buf = lower_error(e) except Exception as e: call_status.code = _UniffiRustCallStatus.CALL_UNEXPECTED_ERROR - call_status.error_buf = _UniffiConverterString.lower(repr(e)) + call_status.error_buf = _UniffiFfiConverterString.lower(repr(e)) +# Initial value and increment amount for handles. +# These ensure that Python-generated handles always have the lowest bit set +_UNIFFI_HANDLEMAP_INITIAL = 1 +_UNIFFI_HANDLEMAP_DELTA = 2 + class _UniffiHandleMap: """ A map where inserting, getting and removing data is synchronized with a lock. @@ -343,27 +348,40 @@ def __init__(self): # type Handle = int self._map = {} # type: Dict[Handle, Any] self._lock = threading.Lock() - self._counter = itertools.count() + self._counter = _UNIFFI_HANDLEMAP_INITIAL def insert(self, obj): with self._lock: - handle = next(self._counter) - self._map[handle] = obj - return handle + return self._insert(obj) + + """Low-level insert, this assumes `self._lock` is held.""" + def _insert(self, obj): + handle = self._counter + self._counter += _UNIFFI_HANDLEMAP_DELTA + self._map[handle] = obj + return handle def get(self, handle): try: with self._lock: return self._map[handle] except KeyError: - raise InternalError("_UniffiHandleMap.get: Invalid handle") + raise InternalError(f"_UniffiHandleMap.get: Invalid handle {handle}") + + def clone(self, handle): + try: + with self._lock: + obj = self._map[handle] + return self._insert(obj) + except KeyError: + raise InternalError(f"_UniffiHandleMap.clone: Invalid handle {handle}") def remove(self, handle): try: with self._lock: return self._map.pop(handle) except KeyError: - raise InternalError("_UniffiHandleMap.remove: Invalid handle") + raise InternalError(f"_UniffiHandleMap.remove: Invalid handle: {handle}") def __len__(self): return len(self._map) @@ -454,7 +472,7 @@ def _uniffi_load_indirect(): def _uniffi_check_contract_api_version(lib): # Get the bindings contract version from our ComponentInterface - bindings_contract_version = 29 + bindings_contract_version = 30 # Get the scaffolding contract version by calling the into the dylib scaffolding_contract_version = lib.ffi_iota_sdk_ffi_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version: @@ -469,12 +487,30 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_func_hex_encode() != 34343: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes() != 58901: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex() != 63442: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate() != 48865: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_address_to_bytes() != 57710: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_address_to_hex() != 22032: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas() != 14489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input() != 33966: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result() != 57666: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result() != 44025: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result() != 53358: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate() != 14780: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new() != 52467: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key() != 53765: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme() != 8293: @@ -485,22 +521,46 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key() != 36438: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes() != 6069: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str() != 26128: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate() != 30791: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes() != 9890: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes() != 42745: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str() != 5412: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate() != 58435: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes() != 56969: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new() != 22402: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key() != 59353: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify() != 54718: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes() != 3672: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str() != 21214: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10() != 17556: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded() != 44301: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded() != 33350: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new() != 59199: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest() != 52811: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments() != 52539: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new() != 48694: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge() != 25355: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch() != 49990: @@ -517,6 +577,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages() != 55002: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new() != 52433: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge() != 4379: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned() != 17712: @@ -539,10 +601,14 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set() != 22589: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new() != 27130: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest() != 22345: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info() != 56465: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new() != 16062: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments() != 61600: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest() != 31627: @@ -567,18 +633,42 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data() != 43828: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new() != 65327: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects() != 54822: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures() != 36925: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction() != 58570: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new() != 39786: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new() != 50489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object() != 35349: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_balance() != 29928: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type() != 18211: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_id() != 40013: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector() != 54610: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins() != 1888: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call() != 23161: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish() != 7239: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins() != 59484: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects() != 54265: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade() != 48835: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new() != 50376: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms() != 14198: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest() != 34585: @@ -591,14 +681,32 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index() != 56426: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions() != 929: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions() != 59888: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions() != 10241: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58() != 41234: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes() != 65530: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate() != 8094: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58() != 54638: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes() != 14244: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32() != 16842: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der() != 42838: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem() != 53776: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate() != 53932: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new() != 12862: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key() != 55389: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme() != 8128: @@ -619,14 +727,32 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key() != 59162: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes() != 60403: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str() != 38751: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate() != 46412: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address() != 37757: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme() != 141: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes() != 16656: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes() != 61841: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str() != 39607: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate() != 41607: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes() != 31911: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der() != 1677: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem() != 37214: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new() != 23280: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key() != 55026: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der() != 56779: @@ -639,16 +765,52 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user() != 43622: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create() != 42248: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire() != 58811: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch() != 56235: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2() != 13653: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new() != 22119: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key() != 10295: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations() != 58594: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec() != 1498: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins() != 40848: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point() != 6711: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish() != 6398: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins() != 28564: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects() != 29560: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade() != 26115: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1() != 19098: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new() != 13557: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet() != 41429: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet() != 53173: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet() != 11124: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request() != 13326: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait() != 22484: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status() != 31173: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new() != 35390: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_data() != 26598: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id() != 9601: @@ -659,41 +821,53 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_version() != 36305: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new() != 47990: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events() != 64664: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects() != 14715: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 29559: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new() != 32097: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet() != 6494: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet() != 2330: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet() != 3613: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet() != 48529: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 21511: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance() != 9953: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance() != 49784: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id() != 45619: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 11584: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 53336: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 44363: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 27138: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata() != 10872: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 50359: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 51349: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 12272: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 47213: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind() != 40594: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind() != 44511: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 29988: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 6963: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 58912: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field() != 47284: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 62805: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 29064: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 29086: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 17381: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 61978: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 4371: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 20245: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 52831: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 41079: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -707,31 +881,31 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size() != 44733: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents() != 40412: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents() != 1364: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 49694: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 16600: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 16965: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 56437: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 51355: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 58921: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 51508: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 9436: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs() != 1970: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 14004: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 62483: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 7913: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 23455: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest() != 55024: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 34213: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 22480: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 45891: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 64638: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 62867: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 45651: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 39065: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 53093: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query() != 54586: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -753,22 +927,38 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects() != 27010: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 20537: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 56377: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 22771: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 46218: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 24427: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 25858: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new() != 9398: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str() != 63815: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned() != 33908: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure() != 53404: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving() != 28060: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared() != 61970: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new() != 20934: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements() != 20773: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag() != 31154: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new() != 1506: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin() != 38884: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge() != 44350: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new() != 30411: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments() != 17202: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movecall_function() != 2751: @@ -791,6 +981,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility() != 3892: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new() != 17506: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movepackage_id() != 28435: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table() != 40601: @@ -801,12 +993,18 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movepackage_version() != 22970: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new() != 3396: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap() != 41489: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee() != 17432: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures() != 5488: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message() != 41388: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction() != 27644: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish() != 31014: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier() != 36902: @@ -815,6 +1013,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier() != 10820: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new() != 40069: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address() != 12725: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid() != 45468: @@ -825,6 +1025,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold() != 21653: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new() != 63622: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key() != 7804: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight() != 57194: @@ -877,12 +1079,16 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin() != 65193: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new() != 53197: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify() != 49901: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier() != 20062: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier() != 5971: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str() != 30248: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_name_format() != 66: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_name_is_sln() != 9860: @@ -897,6 +1103,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_name_parent() != 40819: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new() != 19327: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms() != 13855: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_id() != 17049: @@ -905,6 +1113,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str() != 19903: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_object_new() != 41346: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_as_package() != 21763: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt() != 61571: @@ -929,6 +1139,10 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_version() != 18433: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package() != 5274: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct() != 1861: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt() != 50334: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt() != 8956: @@ -937,6 +1151,12 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct() != 58579: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id() != 16970: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes() != 41789: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex() != 30954: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id() != 47819: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address() != 21880: @@ -945,6 +1165,10 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex() != 4418: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package() != 63533: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct() != 65488: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct() != 15094: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt() != 14701: @@ -953,6 +1177,14 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct() != 33698: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address() != 6008: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable() != 51786: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object() != 381: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared() != 36753: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address() != 19200: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt() != 36265: @@ -973,39 +1205,91 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_owner_is_shared() != 6506: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data() != 55474: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address() != 14619: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge() != 28147: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest() != 54344: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json() != 20272: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas() != 10767: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key() != 18555: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id() != 41681: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature() != 5489: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving() != 50553: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address() != 61803: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res() != 47661: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner() != 65008: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared() != 59619: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify() != 19101: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut() != 43242: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes() != 347: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string() != 60971: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest() != 39344: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128() != 33699: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands() != 49868: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16() != 58656: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs() != 25458: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256() != 46000: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies() != 57311: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32() != 13754: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_publish_modules() != 26011: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64() != 6870: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key() != 27155: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8() != 22414: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme() != 60810: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector() != 47179: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32() != 60488: + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data() != 55474: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge() != 28147: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json() != 20272: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key() != 18555: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature() != 5489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new() != 30856: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address() != 61803: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner() != 65008: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new() != 23457: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify() != 19101: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new() != 3617: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes() != 347: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest() != 39344: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new() != 38638: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands() != 49868: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs() != 25458: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new() != 4785: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies() != 57311: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_publish_modules() != 26011: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32() != 34529: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der() != 45448: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem() != 20937: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate() != 49496: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new() != 35513: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key() != 27155: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme() != 60810: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32() != 60488: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes() != 18583: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -1021,18 +1305,38 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key() != 51137: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes() != 20339: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str() != 24158: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate() != 36411: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address() != 48490: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme() != 798: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes() != 49170: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes() != 36237: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str() != 16397: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate() != 63087: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes() != 49705: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new() != 59813: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple() != 36777: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user() != 26362: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der() != 40127: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem() != 40573: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new() != 16080: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key() != 56083: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der() != 21325: @@ -1045,6 +1349,16 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user() != 41639: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32() != 7016: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der() != 63595: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem() != 28166: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate() != 47736: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new() != 32825: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key() != 58075: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme() != 20973: @@ -1065,18 +1379,38 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key() != 55895: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes() != 60002: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str() != 27991: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate() != 49992: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address() != 27344: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme() != 12227: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes() != 21066: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes() != 8469: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str() != 15312: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate() != 40260: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes() != 64948: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new() != 59881: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple() != 18491: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user() != 19940: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der() != 6292: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem() != 20421: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new() != 57317: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key() != 35474: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der() != 49763: @@ -1089,6 +1423,20 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user() != 46052: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32() != 51811: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes() != 9299: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der() != 24923: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519() != 22142: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem() != 2041: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1() != 46546: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1() != 13117: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key() != 11009: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme() != 19826: @@ -1105,6 +1453,12 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key() != 20797: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519() != 65185: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1() != 56524: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1() != 19953: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key() != 36693: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt() != 11858: @@ -1139,8 +1493,14 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes() != 28081: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new() != 34783: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify() != 8441: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der() != 21482: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem() != 11192: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key() != 58667: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme() != 7296: @@ -1151,22 +1511,36 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify() != 22348: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new() != 50321: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts() != 10377: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin() != 17278: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin() != 13756: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() != 37848: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 26004: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() != 30839: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_address() != 18393: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type() != 37745: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt() != 65306: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new() != 25070: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies() != 25411: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules() != 23597: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_version() != 39738: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new() != 4081: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize() != 39185: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_digest() != 52429: @@ -1181,11 +1555,13 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest() != 36608: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run() != 11138: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init() != 29935: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run() != 62992: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute() != 27688: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute() != 1543: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor() != 53109: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor() != 33268: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration() != 5328: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -1197,27 +1573,29 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price() != 7437: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor() != 41106: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor() != 4885: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec() != 49808: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins() != 10444: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call() != 22281: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call() != 33011: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish() != 46833: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins() != 15827: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins() != 38330: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota() != 29895: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota() != 36757: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins() != 34656: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins() != 40929: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor() != 25655: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects() != 16313: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade() != 34068: + if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade() != 43600: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1() != 63561: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1() != 48710: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -1225,14 +1603,52 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1() != 39808: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new() != 1310: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest() != 55750: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_events() != 36651: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1() != 29264: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1() != 27756: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch() != 44556: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis() != 45541: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction() != 9153: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update() != 37051: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new() != 22470: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_address() != 37833: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects() != 24154: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address() != 65087: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool() != 404: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer() != 49791: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct() != 40686: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128() != 24239: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16() != 14922: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256() != 41658: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32() != 59185: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64() != 29045: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8() != 55184: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector() != 2453: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag() != 1715: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt() != 15734: @@ -1263,6 +1679,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector() != 49992: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new() != 61663: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies() != 7113: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_upgrade_modules() != 62138: @@ -1271,6 +1689,18 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket() != 11416: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64() != 8029: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes() != 37499: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig() != 39922: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey() != 25378: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple() != 31310: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin() != 43856: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig() != 36332: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt() != 21895: @@ -1301,24 +1731,32 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes() != 58893: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new() != 32322: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify() != 47797: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier() != 44658: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier() != 9821: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new() != 15846: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes() != 59039: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch() != 54283: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature() != 39125: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary() != 25823: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature() != 13923: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee() != 36159: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish() != 7324: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new() != 17424: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee() != 5093: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify() != 29238: @@ -1327,26 +1765,36 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary() != 36331: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new() != 47546: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration() != 59803: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator() != 10003: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new() != 2599: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch() != 15301: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key() != 16384: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature() != 58273: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new() != 14186: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id() != 50440: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_version() != 51219: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new() != 32812: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs() != 1512: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch() != 9769: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature() != 18838: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new() != 48962: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed() != 4892: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64() != 32056: @@ -1361,12 +1809,16 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier() != 48158: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new() != 19950: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a() != 6891: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b() != 36477: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c() != 10897: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new() != 53294: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed() != 3936: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address() != 14353: @@ -1377,18882 +1829,7310 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss() != 58864: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev() != 44446: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet() != 12123: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks() != 62366: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify() != 29967: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks() != 49665: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes() != 58901: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex() != 63442: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate() != 48865: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas() != 14489: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input() != 33966: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result() != 57666: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result() != 44025: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate() != 14780: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new() != 52467: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes() != 6069: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str() != 26128: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate() != 30791: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes() != 42745: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str() != 5412: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate() != 58435: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new() != 22402: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes() != 3672: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str() != 21214: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10() != 17556: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new() != 59199: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new() != 48694: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new() != 52433: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new() != 27130: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new() != 16062: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new() != 65327: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new() != 39786: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new() != 50489: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object() != 35349: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector() != 54610: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins() != 1888: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call() != 23161: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish() != 7239: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins() != 59484: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects() != 54265: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade() != 48835: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new() != 50376: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions() != 929: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58() != 41234: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes() != 65530: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate() != 8094: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32() != 16842: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der() != 42838: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem() != 53776: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate() != 53932: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new() != 12862: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes() != 60403: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str() != 38751: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate() != 46412: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes() != 61841: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str() != 39607: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate() != 41607: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der() != 1677: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem() != 37214: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new() != 23280: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create() != 42248: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire() != 58811: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch() != 56235: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2() != 13653: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new() != 22119: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec() != 1498: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins() != 40848: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point() != 6711: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish() != 6398: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins() != 28564: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects() != 29560: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade() != 26115: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1() != 19098: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new() != 13557: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet() != 41429: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet() != 53173: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet() != 11124: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new() != 35390: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new() != 47990: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new() != 32097: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet() != 6494: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet() != 2330: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet() != 3613: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet() != 48529: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new() != 9398: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned() != 33908: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure() != 53404: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving() != 28060: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared() != 61970: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new() != 20934: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new() != 1506: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new() != 30411: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new() != 17506: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new() != 3396: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message() != 41388: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction() != 27644: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new() != 40069: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new() != 63622: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new() != 53197: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str() != 30248: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new() != 19327: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_object_new() != 41346: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package() != 5274: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct() != 1861: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id() != 16970: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes() != 41789: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex() != 30954: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package() != 63533: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct() != 65488: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address() != 6008: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable() != 51786: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object() != 381: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared() != 36753: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address() != 14619: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest() != 54344: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas() != 10767: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id() != 41681: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving() != 50553: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res() != 47661: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared() != 59619: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut() != 43242: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string() != 60971: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128() != 33699: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16() != 58656: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256() != 46000: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32() != 13754: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64() != 6870: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8() != 22414: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector() != 47179: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new() != 30856: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new() != 23457: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new() != 3617: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new() != 38638: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new() != 4785: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32() != 34529: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der() != 45448: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem() != 20937: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate() != 49496: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new() != 35513: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes() != 20339: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str() != 24158: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate() != 36411: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes() != 36237: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str() != 16397: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate() != 63087: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new() != 59813: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der() != 40127: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem() != 40573: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new() != 16080: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32() != 7016: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der() != 63595: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem() != 28166: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate() != 47736: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new() != 32825: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes() != 60002: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str() != 27991: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate() != 49992: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes() != 8469: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str() != 15312: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate() != 40260: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new() != 59881: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der() != 6292: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem() != 20421: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new() != 57317: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32() != 51811: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes() != 9299: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der() != 24923: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519() != 22142: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem() != 2041: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1() != 46546: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1() != 13117: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519() != 65185: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1() != 56524: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1() != 19953: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new() != 34783: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der() != 21482: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem() != 11192: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new() != 50321: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin() != 13756: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() != 37848: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() != 30839: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new() != 25070: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new() != 4081: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init() != 29935: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1() != 63561: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new() != 1310: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1() != 29264: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1() != 27756: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch() != 44556: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis() != 45541: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction() != 9153: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update() != 37051: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new() != 22470: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address() != 65087: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool() != 404: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer() != 49791: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct() != 40686: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128() != 24239: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16() != 14922: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256() != 41658: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32() != 59185: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64() != 29045: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8() != 55184: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector() != 2453: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new() != 61663: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64() != 8029: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes() != 37499: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig() != 39922: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey() != 25378: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple() != 31310: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin() != 43856: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new() != 32322: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new() != 15846: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary() != 25823: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new() != 17424: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new() != 47546: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new() != 2599: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new() != 14186: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new() != 32812: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new() != 48962: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new() != 19950: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new() != 53294: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev() != 44446: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet() != 12123: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - -# A ctypes library to expose the extern-C FFI definitions. -# This is an implementation detail which will be called internally by the public API. - -_UniffiLib = _uniffi_load_indirect() -_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8, -) -_UNIFFI_FOREIGN_FUTURE_FREE = ctypes.CFUNCTYPE(None,ctypes.c_uint64, -) -_UNIFFI_CALLBACK_INTERFACE_FREE = ctypes.CFUNCTYPE(None,ctypes.c_uint64, -) -class _UniffiForeignFuture(ctypes.Structure): - _fields_ = [ - ("handle", ctypes.c_uint64), - ("free", _UNIFFI_FOREIGN_FUTURE_FREE), - ] -class _UniffiForeignFutureStructU8(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_uint8), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_U8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructU8, -) -class _UniffiForeignFutureStructI8(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_int8), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_I8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructI8, -) -class _UniffiForeignFutureStructU16(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_uint16), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_U16 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructU16, -) -class _UniffiForeignFutureStructI16(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_int16), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_I16 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructI16, -) -class _UniffiForeignFutureStructU32(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_uint32), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_U32 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructU32, -) -class _UniffiForeignFutureStructI32(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_int32), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_I32 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructI32, -) -class _UniffiForeignFutureStructU64(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_uint64), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_U64 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructU64, -) -class _UniffiForeignFutureStructI64(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_int64), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_I64 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructI64, -) -class _UniffiForeignFutureStructF32(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_float), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_F32 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructF32, -) -class _UniffiForeignFutureStructF64(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_double), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_F64 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructF64, -) -class _UniffiForeignFutureStructPointer(ctypes.Structure): - _fields_ = [ - ("return_value", ctypes.c_void_p), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_POINTER = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructPointer, -) -class _UniffiForeignFutureStructRustBuffer(ctypes.Structure): - _fields_ = [ - ("return_value", _UniffiRustBuffer), - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructRustBuffer, -) -class _UniffiForeignFutureStructVoid(ctypes.Structure): - _fields_ = [ - ("call_status", _UniffiRustCallStatus), - ] -_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructVoid, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input.argtypes = ( - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result.argtypes = ( - ctypes.c_uint16, - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result.argtypes = ( - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_uint64, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.c_uint64, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_uint64, - _UniffiRustBuffer, - ctypes.c_uint64, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new.argtypes = ( - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.c_int8, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new.argtypes = ( - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.argtypes = ( - _UniffiRustBuffer, - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint8, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.restype = ctypes.c_uint8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint32, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels.restype = ctypes.c_uint32 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16.argtypes = ( - ctypes.c_uint16, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32.argtypes = ( - ctypes.c_uint32, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8.argtypes = ( - ctypes.c_uint8, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new.argtypes = ( - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new.argtypes = ( - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new.argtypes = ( - ctypes.c_uint64, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run.argtypes = ( - ctypes.c_void_p, - ctypes.c_int8, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_int8, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_int8, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish.argtypes = ( - ctypes.c_void_p, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new.argtypes = ( - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new.argtypes = ( - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.argtypes = ( - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new.argtypes = ( - ctypes.c_uint64, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_uint64, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.argtypes = ( - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.argtypes = ( - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet.argtypes = ( - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.argtypes = ( - _UniffiForeignBytes, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.argtypes = ( - _UniffiRustBuffer, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.argtypes = ( - _UniffiRustBuffer, - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.restype = ctypes.c_uint8 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.restype = ctypes.c_int8 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.restype = ctypes.c_uint16 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.restype = ctypes.c_int16 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u32.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u32.restype = ctypes.c_uint32 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32.restype = ctypes.c_int32 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64.restype = ctypes.c_uint64 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i64.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i64.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i64.restype = ctypes.c_int64 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f32.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f32.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f32.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f32.restype = ctypes.c_float -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f64.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f64.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f64.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f64.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f64.restype = ctypes.c_double -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_pointer.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_pointer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer.restype = ctypes.c_void_p -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_void.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_void.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void.argtypes = ( - ctypes.c_uint64, -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_decode.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_decode.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_encode.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_encode.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_decode.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_decode.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_encode.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_encode.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_hex.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_hex.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_data.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_function.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_function.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_module.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_module.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_name.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_name.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_modules.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_modules.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_format.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_format.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_sln.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_sln.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_subname.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_subname.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_label.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_label.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_labels.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_labels.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_num_labels.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_num_labels.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_parent.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_parent.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_data.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_type.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_type.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_owner.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_owner.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_object.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_shared.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_shared.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_modules.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_modules.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_events.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_events.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_modules.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_modules.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_version.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_version.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet.restype = ctypes.c_uint16 -_UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.argtypes = ( -) -_UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.restype = ctypes.c_uint32 - -_uniffi_check_contract_api_version(_UniffiLib) -# _uniffi_check_api_checksums(_UniffiLib) - -# Public interface members begin here. - - -class _UniffiConverterUInt8(_UniffiConverterPrimitiveInt): - CLASS_NAME = "u8" - VALUE_MIN = 0 - VALUE_MAX = 2**8 - - @staticmethod - def read(buf): - return buf.read_u8() - - @staticmethod - def write(value, buf): - buf.write_u8(value) - -class _UniffiConverterUInt16(_UniffiConverterPrimitiveInt): - CLASS_NAME = "u16" - VALUE_MIN = 0 - VALUE_MAX = 2**16 - - @staticmethod - def read(buf): - return buf.read_u16() - - @staticmethod - def write(value, buf): - buf.write_u16(value) - -class _UniffiConverterUInt32(_UniffiConverterPrimitiveInt): - CLASS_NAME = "u32" - VALUE_MIN = 0 - VALUE_MAX = 2**32 - - @staticmethod - def read(buf): - return buf.read_u32() - - @staticmethod - def write(value, buf): - buf.write_u32(value) - -class _UniffiConverterInt32(_UniffiConverterPrimitiveInt): - CLASS_NAME = "i32" - VALUE_MIN = -2**31 - VALUE_MAX = 2**31 - - @staticmethod - def read(buf): - return buf.read_i32() - - @staticmethod - def write(value, buf): - buf.write_i32(value) - -class _UniffiConverterUInt64(_UniffiConverterPrimitiveInt): - CLASS_NAME = "u64" - VALUE_MIN = 0 - VALUE_MAX = 2**64 - - @staticmethod - def read(buf): - return buf.read_u64() - - @staticmethod - def write(value, buf): - buf.write_u64(value) - -class _UniffiConverterInt64(_UniffiConverterPrimitiveInt): - CLASS_NAME = "i64" - VALUE_MIN = -2**63 - VALUE_MAX = 2**63 - - @staticmethod - def read(buf): - return buf.read_i64() - - @staticmethod - def write(value, buf): - buf.write_i64(value) - -class _UniffiConverterBool: - @classmethod - def check_lower(cls, value): - return not not value - - @classmethod - def lower(cls, value): - return 1 if value else 0 - - @staticmethod - def lift(value): - return value != 0 - - @classmethod - def read(cls, buf): - return cls.lift(buf.read_u8()) - - @classmethod - def write(cls, value, buf): - buf.write_u8(value) - -class _UniffiConverterString: - @staticmethod - def check_lower(value): - if not isinstance(value, str): - raise TypeError("argument must be str, not {}".format(type(value).__name__)) - return value - - @staticmethod - def read(buf): - size = buf.read_i32() - if size < 0: - raise InternalError("Unexpected negative string length") - utf8_bytes = buf.read(size) - return utf8_bytes.decode("utf-8") - - @staticmethod - def write(value, buf): - utf8_bytes = value.encode("utf-8") - buf.write_i32(len(utf8_bytes)) - buf.write(utf8_bytes) - - @staticmethod - def lift(buf): - with buf.consume_with_stream() as stream: - return stream.read(stream.remaining()).decode("utf-8") - - @staticmethod - def lower(value): - with _UniffiRustBuffer.alloc_with_builder() as builder: - builder.write(value.encode("utf-8")) - return builder.finalize() - -class _UniffiConverterBytes(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - size = buf.read_i32() - if size < 0: - raise InternalError("Unexpected negative byte string length") - return buf.read(size) - - @staticmethod - def check_lower(value): - try: - memoryview(value) - except TypeError: - raise TypeError("a bytes-like object is required, not {!r}".format(type(value).__name__)) - - @staticmethod - def write(value, buf): - buf.write_i32(len(value)) - buf.write(value) - -# The Duration type. -Duration = datetime.timedelta - -# There is a loss of precision when converting from Rust durations, -# which are accurate to the nanosecond, -# to Python durations, which are only accurate to the microsecond. -class _UniffiConverterDuration(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - seconds = buf.read_u64() - microseconds = buf.read_u32() / 1.0e3 - return datetime.timedelta(seconds=seconds, microseconds=microseconds) - - @staticmethod - def check_lower(value): - seconds = value.seconds + value.days * 24 * 3600 - if seconds < 0: - raise ValueError("Invalid duration, must be non-negative") - - @staticmethod - def write(value, buf): - seconds = value.seconds + value.days * 24 * 3600 - nanoseconds = value.microseconds * 1000 - buf.write_i64(seconds) - buf.write_u32(nanoseconds) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -class ActiveJwk: - """ - A new Jwk - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - active-jwk = jwk-id jwk u64 - ``` - """ - - jwk_id: "JwkId" - """ - Identifier used to uniquely identify a Jwk - """ - - jwk: "Jwk" - """ - The Jwk - """ - - epoch: "int" - """ - Most recent epoch in which the jwk was validated - """ - - def __init__(self, *, jwk_id: "JwkId", jwk: "Jwk", epoch: "int"): - self.jwk_id = jwk_id - self.jwk = jwk - self.epoch = epoch - - def __str__(self): - return "ActiveJwk(jwk_id={}, jwk={}, epoch={})".format(self.jwk_id, self.jwk, self.epoch) - - def __eq__(self, other): - if self.jwk_id != other.jwk_id: - return False - if self.jwk != other.jwk: - return False - if self.epoch != other.epoch: - return False - return True - -class _UniffiConverterTypeActiveJwk(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ActiveJwk( - jwk_id=_UniffiConverterTypeJwkId.read(buf), - jwk=_UniffiConverterTypeJwk.read(buf), - epoch=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeJwkId.check_lower(value.jwk_id) - _UniffiConverterTypeJwk.check_lower(value.jwk) - _UniffiConverterUInt64.check_lower(value.epoch) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeJwkId.write(value.jwk_id, buf) - _UniffiConverterTypeJwk.write(value.jwk, buf) - _UniffiConverterUInt64.write(value.epoch, buf) - - -class AuthenticatorStateExpire: - """ - Expire old JWKs - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - authenticator-state-expire = u64 u64 - ``` - """ - - min_epoch: "int" - """ - Expire JWKs that have a lower epoch than this - """ - - authenticator_obj_initial_shared_version: "int" - """ - The initial version of the authenticator object that it was shared at. - """ - - def __init__(self, *, min_epoch: "int", authenticator_obj_initial_shared_version: "int"): - self.min_epoch = min_epoch - self.authenticator_obj_initial_shared_version = authenticator_obj_initial_shared_version - - def __str__(self): - return "AuthenticatorStateExpire(min_epoch={}, authenticator_obj_initial_shared_version={})".format(self.min_epoch, self.authenticator_obj_initial_shared_version) - - def __eq__(self, other): - if self.min_epoch != other.min_epoch: - return False - if self.authenticator_obj_initial_shared_version != other.authenticator_obj_initial_shared_version: - return False - return True - -class _UniffiConverterTypeAuthenticatorStateExpire(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return AuthenticatorStateExpire( - min_epoch=_UniffiConverterUInt64.read(buf), - authenticator_obj_initial_shared_version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.min_epoch) - _UniffiConverterUInt64.check_lower(value.authenticator_obj_initial_shared_version) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.min_epoch, buf) - _UniffiConverterUInt64.write(value.authenticator_obj_initial_shared_version, buf) - - -class AuthenticatorStateUpdateV1: - """ - Update the set of valid JWKs - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - authenticator-state-update = u64 ; epoch - u64 ; round - (vector active-jwk) - u64 ; initial version of the authenticator object - ``` - """ - - epoch: "int" - """ - Epoch of the authenticator state update transaction - """ - - round: "int" - """ - Consensus round of the authenticator state update - """ - - new_active_jwks: "typing.List[ActiveJwk]" - """ - newly active jwks - """ - - authenticator_obj_initial_shared_version: "int" - def __init__(self, *, epoch: "int", round: "int", new_active_jwks: "typing.List[ActiveJwk]", authenticator_obj_initial_shared_version: "int"): - self.epoch = epoch - self.round = round - self.new_active_jwks = new_active_jwks - self.authenticator_obj_initial_shared_version = authenticator_obj_initial_shared_version - - def __str__(self): - return "AuthenticatorStateUpdateV1(epoch={}, round={}, new_active_jwks={}, authenticator_obj_initial_shared_version={})".format(self.epoch, self.round, self.new_active_jwks, self.authenticator_obj_initial_shared_version) - - def __eq__(self, other): - if self.epoch != other.epoch: - return False - if self.round != other.round: - return False - if self.new_active_jwks != other.new_active_jwks: - return False - if self.authenticator_obj_initial_shared_version != other.authenticator_obj_initial_shared_version: - return False - return True - -class _UniffiConverterTypeAuthenticatorStateUpdateV1(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return AuthenticatorStateUpdateV1( - epoch=_UniffiConverterUInt64.read(buf), - round=_UniffiConverterUInt64.read(buf), - new_active_jwks=_UniffiConverterSequenceTypeActiveJwk.read(buf), - authenticator_obj_initial_shared_version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.epoch) - _UniffiConverterUInt64.check_lower(value.round) - _UniffiConverterSequenceTypeActiveJwk.check_lower(value.new_active_jwks) - _UniffiConverterUInt64.check_lower(value.authenticator_obj_initial_shared_version) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.epoch, buf) - _UniffiConverterUInt64.write(value.round, buf) - _UniffiConverterSequenceTypeActiveJwk.write(value.new_active_jwks, buf) - _UniffiConverterUInt64.write(value.authenticator_obj_initial_shared_version, buf) - - -class BatchSendStatus: - status: "BatchSendStatusType" - transferred_gas_objects: "typing.Optional[FaucetReceipt]" - def __init__(self, *, status: "BatchSendStatusType", transferred_gas_objects: "typing.Optional[FaucetReceipt]"): - self.status = status - self.transferred_gas_objects = transferred_gas_objects - - def __str__(self): - return "BatchSendStatus(status={}, transferred_gas_objects={})".format(self.status, self.transferred_gas_objects) - - def __eq__(self, other): - if self.status != other.status: - return False - if self.transferred_gas_objects != other.transferred_gas_objects: - return False - return True - -class _UniffiConverterTypeBatchSendStatus(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return BatchSendStatus( - status=_UniffiConverterTypeBatchSendStatusType.read(buf), - transferred_gas_objects=_UniffiConverterOptionalTypeFaucetReceipt.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeBatchSendStatusType.check_lower(value.status) - _UniffiConverterOptionalTypeFaucetReceipt.check_lower(value.transferred_gas_objects) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeBatchSendStatusType.write(value.status, buf) - _UniffiConverterOptionalTypeFaucetReceipt.write(value.transferred_gas_objects, buf) - - -class ChangedObject: - """ - Input/output state of an object that was changed during execution - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - changed-object = object-id object-in object-out id-operation - ``` - """ - - object_id: "ObjectId" - """ - Id of the object - """ - - input_state: "ObjectIn" - """ - State of the object in the store prior to this transaction. - """ - - output_state: "ObjectOut" - """ - State of the object in the store after this transaction. - """ - - id_operation: "IdOperation" - """ - Whether this object ID is created or deleted in this transaction. - This information isn't required by the protocol but is useful for - providing more detailed semantics on object changes. - """ - - def __init__(self, *, object_id: "ObjectId", input_state: "ObjectIn", output_state: "ObjectOut", id_operation: "IdOperation"): - self.object_id = object_id - self.input_state = input_state - self.output_state = output_state - self.id_operation = id_operation - - def __str__(self): - return "ChangedObject(object_id={}, input_state={}, output_state={}, id_operation={})".format(self.object_id, self.input_state, self.output_state, self.id_operation) - - def __eq__(self, other): - if self.object_id != other.object_id: - return False - if self.input_state != other.input_state: - return False - if self.output_state != other.output_state: - return False - if self.id_operation != other.id_operation: - return False - return True - -class _UniffiConverterTypeChangedObject(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ChangedObject( - object_id=_UniffiConverterTypeObjectId.read(buf), - input_state=_UniffiConverterTypeObjectIn.read(buf), - output_state=_UniffiConverterTypeObjectOut.read(buf), - id_operation=_UniffiConverterTypeIdOperation.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.object_id) - _UniffiConverterTypeObjectIn.check_lower(value.input_state) - _UniffiConverterTypeObjectOut.check_lower(value.output_state) - _UniffiConverterTypeIdOperation.check_lower(value.id_operation) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.object_id, buf) - _UniffiConverterTypeObjectIn.write(value.input_state, buf) - _UniffiConverterTypeObjectOut.write(value.output_state, buf) - _UniffiConverterTypeIdOperation.write(value.id_operation, buf) - - -class CheckpointSummaryPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[CheckpointSummary]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[CheckpointSummary]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "CheckpointSummaryPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeCheckpointSummaryPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return CheckpointSummaryPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeCheckpointSummary.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeCheckpointSummary.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeCheckpointSummary.write(value.data, buf) - - -class CoinInfo: - amount: "int" - id: "ObjectId" - transfer_tx_digest: "Digest" - def __init__(self, *, amount: "int", id: "ObjectId", transfer_tx_digest: "Digest"): - self.amount = amount - self.id = id - self.transfer_tx_digest = transfer_tx_digest - - def __str__(self): - return "CoinInfo(amount={}, id={}, transfer_tx_digest={})".format(self.amount, self.id, self.transfer_tx_digest) - - def __eq__(self, other): - if self.amount != other.amount: - return False - if self.id != other.id: - return False - if self.transfer_tx_digest != other.transfer_tx_digest: - return False - return True - -class _UniffiConverterTypeCoinInfo(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return CoinInfo( - amount=_UniffiConverterUInt64.read(buf), - id=_UniffiConverterTypeObjectId.read(buf), - transfer_tx_digest=_UniffiConverterTypeDigest.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.amount) - _UniffiConverterTypeObjectId.check_lower(value.id) - _UniffiConverterTypeDigest.check_lower(value.transfer_tx_digest) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.amount, buf) - _UniffiConverterTypeObjectId.write(value.id, buf) - _UniffiConverterTypeDigest.write(value.transfer_tx_digest, buf) - - -class CoinMetadata: - """ - The coin metadata associated with the given coin type. - """ - - address: "ObjectId" - """ - The CoinMetadata object ID. - """ - - decimals: "typing.Optional[int]" - """ - The number of decimal places used to represent the token. - """ - - description: "typing.Optional[str]" - """ - Optional description of the token, provided by the creator of the token. - """ - - icon_url: "typing.Optional[str]" - """ - Icon URL of the coin. - """ - - name: "typing.Optional[str]" - """ - Full, official name of the token. - """ - - symbol: "typing.Optional[str]" - """ - The token's identifying abbreviation. - """ - - supply: "typing.Optional[BigInt]" - """ - The overall quantity of tokens that will be issued. - """ - - version: "int" - """ - Version of the token. - """ - - def __init__(self, *, address: "ObjectId", decimals: "typing.Optional[int]" = _DEFAULT, description: "typing.Optional[str]" = _DEFAULT, icon_url: "typing.Optional[str]" = _DEFAULT, name: "typing.Optional[str]" = _DEFAULT, symbol: "typing.Optional[str]" = _DEFAULT, supply: "typing.Optional[BigInt]" = _DEFAULT, version: "int"): - self.address = address - if decimals is _DEFAULT: - self.decimals = None - else: - self.decimals = decimals - if description is _DEFAULT: - self.description = None - else: - self.description = description - if icon_url is _DEFAULT: - self.icon_url = None - else: - self.icon_url = icon_url - if name is _DEFAULT: - self.name = None - else: - self.name = name - if symbol is _DEFAULT: - self.symbol = None - else: - self.symbol = symbol - if supply is _DEFAULT: - self.supply = None - else: - self.supply = supply - self.version = version - - def __str__(self): - return "CoinMetadata(address={}, decimals={}, description={}, icon_url={}, name={}, symbol={}, supply={}, version={})".format(self.address, self.decimals, self.description, self.icon_url, self.name, self.symbol, self.supply, self.version) - - def __eq__(self, other): - if self.address != other.address: - return False - if self.decimals != other.decimals: - return False - if self.description != other.description: - return False - if self.icon_url != other.icon_url: - return False - if self.name != other.name: - return False - if self.symbol != other.symbol: - return False - if self.supply != other.supply: - return False - if self.version != other.version: - return False - return True - -class _UniffiConverterTypeCoinMetadata(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return CoinMetadata( - address=_UniffiConverterTypeObjectId.read(buf), - decimals=_UniffiConverterOptionalInt32.read(buf), - description=_UniffiConverterOptionalString.read(buf), - icon_url=_UniffiConverterOptionalString.read(buf), - name=_UniffiConverterOptionalString.read(buf), - symbol=_UniffiConverterOptionalString.read(buf), - supply=_UniffiConverterOptionalTypeBigInt.read(buf), - version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.address) - _UniffiConverterOptionalInt32.check_lower(value.decimals) - _UniffiConverterOptionalString.check_lower(value.description) - _UniffiConverterOptionalString.check_lower(value.icon_url) - _UniffiConverterOptionalString.check_lower(value.name) - _UniffiConverterOptionalString.check_lower(value.symbol) - _UniffiConverterOptionalTypeBigInt.check_lower(value.supply) - _UniffiConverterUInt64.check_lower(value.version) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.address, buf) - _UniffiConverterOptionalInt32.write(value.decimals, buf) - _UniffiConverterOptionalString.write(value.description, buf) - _UniffiConverterOptionalString.write(value.icon_url, buf) - _UniffiConverterOptionalString.write(value.name, buf) - _UniffiConverterOptionalString.write(value.symbol, buf) - _UniffiConverterOptionalTypeBigInt.write(value.supply, buf) - _UniffiConverterUInt64.write(value.version, buf) - - -class CoinPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[Coin]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[Coin]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "CoinPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeCoinPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return CoinPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeCoin.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeCoin.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeCoin.write(value.data, buf) - - -class DryRunEffect: - """ - Effects of a single command in the dry run, including mutated references - and return values. - """ - - mutated_references: "typing.List[DryRunMutation]" - """ - Changes made to arguments that were mutably borrowed by this command. - """ - - return_values: "typing.List[DryRunReturn]" - """ - Return results of this command. - """ - - def __init__(self, *, mutated_references: "typing.List[DryRunMutation]", return_values: "typing.List[DryRunReturn]"): - self.mutated_references = mutated_references - self.return_values = return_values - - def __str__(self): - return "DryRunEffect(mutated_references={}, return_values={})".format(self.mutated_references, self.return_values) - - def __eq__(self, other): - if self.mutated_references != other.mutated_references: - return False - if self.return_values != other.return_values: - return False - return True - -class _UniffiConverterTypeDryRunEffect(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DryRunEffect( - mutated_references=_UniffiConverterSequenceTypeDryRunMutation.read(buf), - return_values=_UniffiConverterSequenceTypeDryRunReturn.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeDryRunMutation.check_lower(value.mutated_references) - _UniffiConverterSequenceTypeDryRunReturn.check_lower(value.return_values) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeDryRunMutation.write(value.mutated_references, buf) - _UniffiConverterSequenceTypeDryRunReturn.write(value.return_values, buf) - - -class DryRunMutation: - """ - A mutation to an argument that was mutably borrowed by a command. - """ - - input: "TransactionArgument" - """ - The transaction argument that was mutated. - """ - - type_tag: "TypeTag" - """ - The Move type of the mutated value. - """ - - bcs: "bytes" - """ - The BCS representation of the mutated value. - """ - - def __init__(self, *, input: "TransactionArgument", type_tag: "TypeTag", bcs: "bytes"): - self.input = input - self.type_tag = type_tag - self.bcs = bcs - - def __str__(self): - return "DryRunMutation(input={}, type_tag={}, bcs={})".format(self.input, self.type_tag, self.bcs) - - def __eq__(self, other): - if self.input != other.input: - return False - if self.type_tag != other.type_tag: - return False - if self.bcs != other.bcs: - return False - return True - -class _UniffiConverterTypeDryRunMutation(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DryRunMutation( - input=_UniffiConverterTypeTransactionArgument.read(buf), - type_tag=_UniffiConverterTypeTypeTag.read(buf), - bcs=_UniffiConverterBytes.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTransactionArgument.check_lower(value.input) - _UniffiConverterTypeTypeTag.check_lower(value.type_tag) - _UniffiConverterBytes.check_lower(value.bcs) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTransactionArgument.write(value.input, buf) - _UniffiConverterTypeTypeTag.write(value.type_tag, buf) - _UniffiConverterBytes.write(value.bcs, buf) - - -class DryRunResult: - """ - The result of a simulation (dry run), which includes the effects of the - transaction, any errors that may have occurred, and intermediate results for - each command. - """ - - error: "typing.Optional[str]" - """ - The error that occurred during dry run execution, if any. - """ - - results: "typing.List[DryRunEffect]" - """ - The intermediate results for each command of the dry run execution, - including contents of mutated references and return values. - """ - - transaction: "typing.Optional[SignedTransaction]" - """ - The transaction block representing the dry run execution. - """ - - effects: "typing.Optional[TransactionEffects]" - """ - The effects of the transaction execution. - """ - - def __init__(self, *, error: "typing.Optional[str]", results: "typing.List[DryRunEffect]", transaction: "typing.Optional[SignedTransaction]", effects: "typing.Optional[TransactionEffects]"): - self.error = error - self.results = results - self.transaction = transaction - self.effects = effects - - def __str__(self): - return "DryRunResult(error={}, results={}, transaction={}, effects={})".format(self.error, self.results, self.transaction, self.effects) - - def __eq__(self, other): - if self.error != other.error: - return False - if self.results != other.results: - return False - if self.transaction != other.transaction: - return False - if self.effects != other.effects: - return False - return True - -class _UniffiConverterTypeDryRunResult(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DryRunResult( - error=_UniffiConverterOptionalString.read(buf), - results=_UniffiConverterSequenceTypeDryRunEffect.read(buf), - transaction=_UniffiConverterOptionalTypeSignedTransaction.read(buf), - effects=_UniffiConverterOptionalTypeTransactionEffects.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalString.check_lower(value.error) - _UniffiConverterSequenceTypeDryRunEffect.check_lower(value.results) - _UniffiConverterOptionalTypeSignedTransaction.check_lower(value.transaction) - _UniffiConverterOptionalTypeTransactionEffects.check_lower(value.effects) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalString.write(value.error, buf) - _UniffiConverterSequenceTypeDryRunEffect.write(value.results, buf) - _UniffiConverterOptionalTypeSignedTransaction.write(value.transaction, buf) - _UniffiConverterOptionalTypeTransactionEffects.write(value.effects, buf) - - -class DryRunReturn: - """ - A return value from a command in the dry run. - """ - - type_tag: "TypeTag" - """ - The Move type of the return value. - """ - - bcs: "bytes" - """ - The BCS representation of the return value. - """ - - def __init__(self, *, type_tag: "TypeTag", bcs: "bytes"): - self.type_tag = type_tag - self.bcs = bcs - - def __str__(self): - return "DryRunReturn(type_tag={}, bcs={})".format(self.type_tag, self.bcs) - - def __eq__(self, other): - if self.type_tag != other.type_tag: - return False - if self.bcs != other.bcs: - return False - return True - -class _UniffiConverterTypeDryRunReturn(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DryRunReturn( - type_tag=_UniffiConverterTypeTypeTag.read(buf), - bcs=_UniffiConverterBytes.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTypeTag.check_lower(value.type_tag) - _UniffiConverterBytes.check_lower(value.bcs) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTypeTag.write(value.type_tag, buf) - _UniffiConverterBytes.write(value.bcs, buf) - - -class DynamicFieldName: - """ - The name part of a dynamic field, including its type, bcs, and json - representation. - """ - - type_tag: "TypeTag" - """ - The type name of this dynamic field name - """ - - bcs: "bytes" - """ - The bcs bytes of this dynamic field name - """ - - json: "typing.Optional[Value]" - """ - The json representation of the dynamic field name - """ - - def __init__(self, *, type_tag: "TypeTag", bcs: "bytes", json: "typing.Optional[Value]" = _DEFAULT): - self.type_tag = type_tag - self.bcs = bcs - if json is _DEFAULT: - self.json = None - else: - self.json = json - - def __str__(self): - return "DynamicFieldName(type_tag={}, bcs={}, json={})".format(self.type_tag, self.bcs, self.json) - - def __eq__(self, other): - if self.type_tag != other.type_tag: - return False - if self.bcs != other.bcs: - return False - if self.json != other.json: - return False - return True - -class _UniffiConverterTypeDynamicFieldName(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DynamicFieldName( - type_tag=_UniffiConverterTypeTypeTag.read(buf), - bcs=_UniffiConverterBytes.read(buf), - json=_UniffiConverterOptionalTypeValue.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTypeTag.check_lower(value.type_tag) - _UniffiConverterBytes.check_lower(value.bcs) - _UniffiConverterOptionalTypeValue.check_lower(value.json) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTypeTag.write(value.type_tag, buf) - _UniffiConverterBytes.write(value.bcs, buf) - _UniffiConverterOptionalTypeValue.write(value.json, buf) - - -class DynamicFieldOutput: - """ - The output of a dynamic field query, that includes the name, value, and - value's json representation. - """ - - name: "DynamicFieldName" - """ - The name of the dynamic field - """ - - value: "typing.Optional[DynamicFieldValue]" - """ - The dynamic field value typename and bcs - """ - - value_as_json: "typing.Optional[Value]" - """ - The json representation of the dynamic field value object - """ - - def __init__(self, *, name: "DynamicFieldName", value: "typing.Optional[DynamicFieldValue]" = _DEFAULT, value_as_json: "typing.Optional[Value]" = _DEFAULT): - self.name = name - if value is _DEFAULT: - self.value = None - else: - self.value = value - if value_as_json is _DEFAULT: - self.value_as_json = None - else: - self.value_as_json = value_as_json - - def __str__(self): - return "DynamicFieldOutput(name={}, value={}, value_as_json={})".format(self.name, self.value, self.value_as_json) - - def __eq__(self, other): - if self.name != other.name: - return False - if self.value != other.value: - return False - if self.value_as_json != other.value_as_json: - return False - return True - -class _UniffiConverterTypeDynamicFieldOutput(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DynamicFieldOutput( - name=_UniffiConverterTypeDynamicFieldName.read(buf), - value=_UniffiConverterOptionalTypeDynamicFieldValue.read(buf), - value_as_json=_UniffiConverterOptionalTypeValue.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeDynamicFieldName.check_lower(value.name) - _UniffiConverterOptionalTypeDynamicFieldValue.check_lower(value.value) - _UniffiConverterOptionalTypeValue.check_lower(value.value_as_json) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeDynamicFieldName.write(value.name, buf) - _UniffiConverterOptionalTypeDynamicFieldValue.write(value.value, buf) - _UniffiConverterOptionalTypeValue.write(value.value_as_json, buf) - - -class DynamicFieldOutputPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[DynamicFieldOutput]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[DynamicFieldOutput]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "DynamicFieldOutputPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeDynamicFieldOutputPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DynamicFieldOutputPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeDynamicFieldOutput.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeDynamicFieldOutput.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeDynamicFieldOutput.write(value.data, buf) - - -class DynamicFieldValue: - """ - The value part of a dynamic field. - """ - - type_tag: "TypeTag" - bcs: "bytes" - def __init__(self, *, type_tag: "TypeTag", bcs: "bytes"): - self.type_tag = type_tag - self.bcs = bcs - - def __str__(self): - return "DynamicFieldValue(type_tag={}, bcs={})".format(self.type_tag, self.bcs) - - def __eq__(self, other): - if self.type_tag != other.type_tag: - return False - if self.bcs != other.bcs: - return False - return True - -class _UniffiConverterTypeDynamicFieldValue(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return DynamicFieldValue( - type_tag=_UniffiConverterTypeTypeTag.read(buf), - bcs=_UniffiConverterBytes.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTypeTag.check_lower(value.type_tag) - _UniffiConverterBytes.check_lower(value.bcs) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTypeTag.write(value.type_tag, buf) - _UniffiConverterBytes.write(value.bcs, buf) - - -class EndOfEpochData: - next_epoch_committee: "typing.List[ValidatorCommitteeMember]" - next_epoch_protocol_version: "int" - epoch_commitments: "typing.List[CheckpointCommitment]" - epoch_supply_change: "int" - def __init__(self, *, next_epoch_committee: "typing.List[ValidatorCommitteeMember]", next_epoch_protocol_version: "int", epoch_commitments: "typing.List[CheckpointCommitment]", epoch_supply_change: "int"): - self.next_epoch_committee = next_epoch_committee - self.next_epoch_protocol_version = next_epoch_protocol_version - self.epoch_commitments = epoch_commitments - self.epoch_supply_change = epoch_supply_change - - def __str__(self): - return "EndOfEpochData(next_epoch_committee={}, next_epoch_protocol_version={}, epoch_commitments={}, epoch_supply_change={})".format(self.next_epoch_committee, self.next_epoch_protocol_version, self.epoch_commitments, self.epoch_supply_change) - - def __eq__(self, other): - if self.next_epoch_committee != other.next_epoch_committee: - return False - if self.next_epoch_protocol_version != other.next_epoch_protocol_version: - return False - if self.epoch_commitments != other.epoch_commitments: - return False - if self.epoch_supply_change != other.epoch_supply_change: - return False - return True - -class _UniffiConverterTypeEndOfEpochData(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return EndOfEpochData( - next_epoch_committee=_UniffiConverterSequenceTypeValidatorCommitteeMember.read(buf), - next_epoch_protocol_version=_UniffiConverterUInt64.read(buf), - epoch_commitments=_UniffiConverterSequenceTypeCheckpointCommitment.read(buf), - epoch_supply_change=_UniffiConverterInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeValidatorCommitteeMember.check_lower(value.next_epoch_committee) - _UniffiConverterUInt64.check_lower(value.next_epoch_protocol_version) - _UniffiConverterSequenceTypeCheckpointCommitment.check_lower(value.epoch_commitments) - _UniffiConverterInt64.check_lower(value.epoch_supply_change) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeValidatorCommitteeMember.write(value.next_epoch_committee, buf) - _UniffiConverterUInt64.write(value.next_epoch_protocol_version, buf) - _UniffiConverterSequenceTypeCheckpointCommitment.write(value.epoch_commitments, buf) - _UniffiConverterInt64.write(value.epoch_supply_change, buf) - - -class Epoch: - epoch_id: "int" - """ - The epoch's id as a sequence number that starts at 0 and is incremented - by one at every epoch change. - """ - - fund_inflow: "typing.Optional[str]" - """ - The storage fees paid for transactions executed during the epoch. - """ - - fund_outflow: "typing.Optional[str]" - """ - The storage fee rebates paid to users who deleted the data associated - with past transactions. - """ - - fund_size: "typing.Optional[str]" - """ - The storage fund available in this epoch. - This fund is used to redistribute storage fees from past transactions - to future validators. - """ - - live_object_set_digest: "typing.Optional[str]" - """ - A commitment by the committee at the end of epoch on the contents of the - live object set at that time. This can be used to verify state - snapshots. - """ - - net_inflow: "typing.Optional[str]" - """ - The difference between the fund inflow and outflow, representing - the net amount of storage fees accumulated in this epoch. - """ - - protocol_configs: "typing.Optional[ProtocolConfigs]" - """ - The epoch's corresponding protocol configuration, including the feature - flags and the configuration options. - """ - - reference_gas_price: "typing.Optional[str]" - """ - The minimum gas price that a quorum of validators are guaranteed to sign - a transaction for. - """ - - start_timestamp: "int" - """ - The epoch's starting timestamp. - """ - - end_timestamp: "typing.Optional[int]" - """ - The epoch's ending timestamp. Note that this is available only on epochs - that have ended. - """ - - system_state_version: "typing.Optional[int]" - """ - The value of the `version` field of `0x5`, the - `0x3::iota::IotaSystemState` object. This version changes whenever - the fields contained in the system state object (held in a dynamic - field attached to `0x5`) change. - """ - - total_checkpoints: "typing.Optional[int]" - """ - The total number of checkpoints in this epoch. - """ - - total_gas_fees: "typing.Optional[str]" - """ - The total amount of gas fees (in IOTA) that were paid in this epoch. - """ - - total_stake_rewards: "typing.Optional[str]" - """ - The total IOTA rewarded as stake. - """ - - total_transactions: "typing.Optional[int]" - """ - The total number of transaction in this epoch. - """ - - validator_set: "typing.Optional[ValidatorSet]" - """ - Validator related properties. For active validators, see - `active_validators` API. - For epochs other than the current the data provided refer to the start - of the epoch. - """ - - def __init__(self, *, epoch_id: "int", fund_inflow: "typing.Optional[str]" = _DEFAULT, fund_outflow: "typing.Optional[str]" = _DEFAULT, fund_size: "typing.Optional[str]" = _DEFAULT, live_object_set_digest: "typing.Optional[str]" = _DEFAULT, net_inflow: "typing.Optional[str]" = _DEFAULT, protocol_configs: "typing.Optional[ProtocolConfigs]" = _DEFAULT, reference_gas_price: "typing.Optional[str]" = _DEFAULT, start_timestamp: "int", end_timestamp: "typing.Optional[int]" = _DEFAULT, system_state_version: "typing.Optional[int]" = _DEFAULT, total_checkpoints: "typing.Optional[int]" = _DEFAULT, total_gas_fees: "typing.Optional[str]" = _DEFAULT, total_stake_rewards: "typing.Optional[str]" = _DEFAULT, total_transactions: "typing.Optional[int]" = _DEFAULT, validator_set: "typing.Optional[ValidatorSet]" = _DEFAULT): - self.epoch_id = epoch_id - if fund_inflow is _DEFAULT: - self.fund_inflow = None - else: - self.fund_inflow = fund_inflow - if fund_outflow is _DEFAULT: - self.fund_outflow = None - else: - self.fund_outflow = fund_outflow - if fund_size is _DEFAULT: - self.fund_size = None - else: - self.fund_size = fund_size - if live_object_set_digest is _DEFAULT: - self.live_object_set_digest = None - else: - self.live_object_set_digest = live_object_set_digest - if net_inflow is _DEFAULT: - self.net_inflow = None - else: - self.net_inflow = net_inflow - if protocol_configs is _DEFAULT: - self.protocol_configs = None - else: - self.protocol_configs = protocol_configs - if reference_gas_price is _DEFAULT: - self.reference_gas_price = None - else: - self.reference_gas_price = reference_gas_price - self.start_timestamp = start_timestamp - if end_timestamp is _DEFAULT: - self.end_timestamp = None - else: - self.end_timestamp = end_timestamp - if system_state_version is _DEFAULT: - self.system_state_version = None - else: - self.system_state_version = system_state_version - if total_checkpoints is _DEFAULT: - self.total_checkpoints = None - else: - self.total_checkpoints = total_checkpoints - if total_gas_fees is _DEFAULT: - self.total_gas_fees = None - else: - self.total_gas_fees = total_gas_fees - if total_stake_rewards is _DEFAULT: - self.total_stake_rewards = None - else: - self.total_stake_rewards = total_stake_rewards - if total_transactions is _DEFAULT: - self.total_transactions = None - else: - self.total_transactions = total_transactions - if validator_set is _DEFAULT: - self.validator_set = None - else: - self.validator_set = validator_set - - def __str__(self): - return "Epoch(epoch_id={}, fund_inflow={}, fund_outflow={}, fund_size={}, live_object_set_digest={}, net_inflow={}, protocol_configs={}, reference_gas_price={}, start_timestamp={}, end_timestamp={}, system_state_version={}, total_checkpoints={}, total_gas_fees={}, total_stake_rewards={}, total_transactions={}, validator_set={})".format(self.epoch_id, self.fund_inflow, self.fund_outflow, self.fund_size, self.live_object_set_digest, self.net_inflow, self.protocol_configs, self.reference_gas_price, self.start_timestamp, self.end_timestamp, self.system_state_version, self.total_checkpoints, self.total_gas_fees, self.total_stake_rewards, self.total_transactions, self.validator_set) - - def __eq__(self, other): - if self.epoch_id != other.epoch_id: - return False - if self.fund_inflow != other.fund_inflow: - return False - if self.fund_outflow != other.fund_outflow: - return False - if self.fund_size != other.fund_size: - return False - if self.live_object_set_digest != other.live_object_set_digest: - return False - if self.net_inflow != other.net_inflow: - return False - if self.protocol_configs != other.protocol_configs: - return False - if self.reference_gas_price != other.reference_gas_price: - return False - if self.start_timestamp != other.start_timestamp: - return False - if self.end_timestamp != other.end_timestamp: - return False - if self.system_state_version != other.system_state_version: - return False - if self.total_checkpoints != other.total_checkpoints: - return False - if self.total_gas_fees != other.total_gas_fees: - return False - if self.total_stake_rewards != other.total_stake_rewards: - return False - if self.total_transactions != other.total_transactions: - return False - if self.validator_set != other.validator_set: - return False - return True - -class _UniffiConverterTypeEpoch(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Epoch( - epoch_id=_UniffiConverterUInt64.read(buf), - fund_inflow=_UniffiConverterOptionalString.read(buf), - fund_outflow=_UniffiConverterOptionalString.read(buf), - fund_size=_UniffiConverterOptionalString.read(buf), - live_object_set_digest=_UniffiConverterOptionalString.read(buf), - net_inflow=_UniffiConverterOptionalString.read(buf), - protocol_configs=_UniffiConverterOptionalTypeProtocolConfigs.read(buf), - reference_gas_price=_UniffiConverterOptionalString.read(buf), - start_timestamp=_UniffiConverterUInt64.read(buf), - end_timestamp=_UniffiConverterOptionalUInt64.read(buf), - system_state_version=_UniffiConverterOptionalUInt64.read(buf), - total_checkpoints=_UniffiConverterOptionalUInt64.read(buf), - total_gas_fees=_UniffiConverterOptionalString.read(buf), - total_stake_rewards=_UniffiConverterOptionalString.read(buf), - total_transactions=_UniffiConverterOptionalUInt64.read(buf), - validator_set=_UniffiConverterOptionalTypeValidatorSet.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.epoch_id) - _UniffiConverterOptionalString.check_lower(value.fund_inflow) - _UniffiConverterOptionalString.check_lower(value.fund_outflow) - _UniffiConverterOptionalString.check_lower(value.fund_size) - _UniffiConverterOptionalString.check_lower(value.live_object_set_digest) - _UniffiConverterOptionalString.check_lower(value.net_inflow) - _UniffiConverterOptionalTypeProtocolConfigs.check_lower(value.protocol_configs) - _UniffiConverterOptionalString.check_lower(value.reference_gas_price) - _UniffiConverterUInt64.check_lower(value.start_timestamp) - _UniffiConverterOptionalUInt64.check_lower(value.end_timestamp) - _UniffiConverterOptionalUInt64.check_lower(value.system_state_version) - _UniffiConverterOptionalUInt64.check_lower(value.total_checkpoints) - _UniffiConverterOptionalString.check_lower(value.total_gas_fees) - _UniffiConverterOptionalString.check_lower(value.total_stake_rewards) - _UniffiConverterOptionalUInt64.check_lower(value.total_transactions) - _UniffiConverterOptionalTypeValidatorSet.check_lower(value.validator_set) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.epoch_id, buf) - _UniffiConverterOptionalString.write(value.fund_inflow, buf) - _UniffiConverterOptionalString.write(value.fund_outflow, buf) - _UniffiConverterOptionalString.write(value.fund_size, buf) - _UniffiConverterOptionalString.write(value.live_object_set_digest, buf) - _UniffiConverterOptionalString.write(value.net_inflow, buf) - _UniffiConverterOptionalTypeProtocolConfigs.write(value.protocol_configs, buf) - _UniffiConverterOptionalString.write(value.reference_gas_price, buf) - _UniffiConverterUInt64.write(value.start_timestamp, buf) - _UniffiConverterOptionalUInt64.write(value.end_timestamp, buf) - _UniffiConverterOptionalUInt64.write(value.system_state_version, buf) - _UniffiConverterOptionalUInt64.write(value.total_checkpoints, buf) - _UniffiConverterOptionalString.write(value.total_gas_fees, buf) - _UniffiConverterOptionalString.write(value.total_stake_rewards, buf) - _UniffiConverterOptionalUInt64.write(value.total_transactions, buf) - _UniffiConverterOptionalTypeValidatorSet.write(value.validator_set, buf) - - -class EpochPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[Epoch]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[Epoch]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "EpochPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeEpochPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return EpochPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeEpoch.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeEpoch.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeEpoch.write(value.data, buf) - - -class Event: - """ - An event - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - event = object-id identifier address struct-tag bytes - ``` - """ - - package_id: "ObjectId" - """ - Package id of the top-level function invoked by a MoveCall command which - triggered this event to be emitted. - """ - - module: "str" - """ - Module name of the top-level function invoked by a MoveCall command - which triggered this event to be emitted. - """ - - sender: "Address" - """ - Address of the account that sent the transaction where this event was - emitted. - """ - - type: "str" - """ - The type of the event emitted - """ - - contents: "bytes" - """ - BCS serialized bytes of the event - """ - - timestamp: "str" - """ - UTC timestamp in milliseconds since epoch (1/1/1970) - """ - - data: "str" - """ - Structured contents of a Move value - """ - - json: "str" - """ - Representation of a Move value in JSON - """ - - def __init__(self, *, package_id: "ObjectId", module: "str", sender: "Address", type: "str", contents: "bytes", timestamp: "str", data: "str", json: "str"): - self.package_id = package_id - self.module = module - self.sender = sender - self.type = type - self.contents = contents - self.timestamp = timestamp - self.data = data - self.json = json - - def __str__(self): - return "Event(package_id={}, module={}, sender={}, type={}, contents={}, timestamp={}, data={}, json={})".format(self.package_id, self.module, self.sender, self.type, self.contents, self.timestamp, self.data, self.json) - - def __eq__(self, other): - if self.package_id != other.package_id: - return False - if self.module != other.module: - return False - if self.sender != other.sender: - return False - if self.type != other.type: - return False - if self.contents != other.contents: - return False - if self.timestamp != other.timestamp: - return False - if self.data != other.data: - return False - if self.json != other.json: - return False - return True - -class _UniffiConverterTypeEvent(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Event( - package_id=_UniffiConverterTypeObjectId.read(buf), - module=_UniffiConverterString.read(buf), - sender=_UniffiConverterTypeAddress.read(buf), - type=_UniffiConverterString.read(buf), - contents=_UniffiConverterBytes.read(buf), - timestamp=_UniffiConverterString.read(buf), - data=_UniffiConverterString.read(buf), - json=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.package_id) - _UniffiConverterString.check_lower(value.module) - _UniffiConverterTypeAddress.check_lower(value.sender) - _UniffiConverterString.check_lower(value.type) - _UniffiConverterBytes.check_lower(value.contents) - _UniffiConverterString.check_lower(value.timestamp) - _UniffiConverterString.check_lower(value.data) - _UniffiConverterString.check_lower(value.json) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.package_id, buf) - _UniffiConverterString.write(value.module, buf) - _UniffiConverterTypeAddress.write(value.sender, buf) - _UniffiConverterString.write(value.type, buf) - _UniffiConverterBytes.write(value.contents, buf) - _UniffiConverterString.write(value.timestamp, buf) - _UniffiConverterString.write(value.data, buf) - _UniffiConverterString.write(value.json, buf) - - -class EventFilter: - emitting_module: "typing.Optional[str]" - event_type: "typing.Optional[str]" - sender: "typing.Optional[Address]" - transaction_digest: "typing.Optional[str]" - def __init__(self, *, emitting_module: "typing.Optional[str]" = _DEFAULT, event_type: "typing.Optional[str]" = _DEFAULT, sender: "typing.Optional[Address]" = _DEFAULT, transaction_digest: "typing.Optional[str]" = _DEFAULT): - if emitting_module is _DEFAULT: - self.emitting_module = None - else: - self.emitting_module = emitting_module - if event_type is _DEFAULT: - self.event_type = None - else: - self.event_type = event_type - if sender is _DEFAULT: - self.sender = None - else: - self.sender = sender - if transaction_digest is _DEFAULT: - self.transaction_digest = None - else: - self.transaction_digest = transaction_digest - - def __str__(self): - return "EventFilter(emitting_module={}, event_type={}, sender={}, transaction_digest={})".format(self.emitting_module, self.event_type, self.sender, self.transaction_digest) - - def __eq__(self, other): - if self.emitting_module != other.emitting_module: - return False - if self.event_type != other.event_type: - return False - if self.sender != other.sender: - return False - if self.transaction_digest != other.transaction_digest: - return False - return True - -class _UniffiConverterTypeEventFilter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return EventFilter( - emitting_module=_UniffiConverterOptionalString.read(buf), - event_type=_UniffiConverterOptionalString.read(buf), - sender=_UniffiConverterOptionalTypeAddress.read(buf), - transaction_digest=_UniffiConverterOptionalString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalString.check_lower(value.emitting_module) - _UniffiConverterOptionalString.check_lower(value.event_type) - _UniffiConverterOptionalTypeAddress.check_lower(value.sender) - _UniffiConverterOptionalString.check_lower(value.transaction_digest) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalString.write(value.emitting_module, buf) - _UniffiConverterOptionalString.write(value.event_type, buf) - _UniffiConverterOptionalTypeAddress.write(value.sender, buf) - _UniffiConverterOptionalString.write(value.transaction_digest, buf) - - -class EventPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[Event]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[Event]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "EventPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeEventPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return EventPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeEvent.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeEvent.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeEvent.write(value.data, buf) - - -class FaucetReceipt: - sent: "typing.List[CoinInfo]" - def __init__(self, *, sent: "typing.List[CoinInfo]"): - self.sent = sent - - def __str__(self): - return "FaucetReceipt(sent={})".format(self.sent) - - def __eq__(self, other): - if self.sent != other.sent: - return False - return True - -class _UniffiConverterTypeFaucetReceipt(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return FaucetReceipt( - sent=_UniffiConverterSequenceTypeCoinInfo.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeCoinInfo.check_lower(value.sent) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeCoinInfo.write(value.sent, buf) - - -class GasCostSummary: - """ - Summary of gas charges. - - Storage is charged independently of computation. - There are 3 parts to the storage charges: - `storage_cost`: it is the charge of storage at the time the transaction is - executed. The cost of storage is the number of bytes of the - objects being mutated multiplied by a variable storage cost - per byte `storage_rebate`: this is the amount a user gets back when - manipulating an object. The `storage_rebate` is the - `storage_cost` for an object minus fees. `non_refundable_storage_fee`: not - all the value of the object storage cost is - given back to user and there is a small fraction that - is kept by the system. This value tracks that charge. - - When looking at a gas cost summary the amount charged to the user is - `computation_cost + storage_cost - storage_rebate` - and that is the amount that is deducted from the gas coins. - `non_refundable_storage_fee` is collected from the objects being - mutated/deleted and it is tracked by the system in storage funds. - - Objects deleted, including the older versions of objects mutated, have the - storage field on the objects added up to a pool of "potential rebate". This - rebate then is reduced by the "nonrefundable rate" such that: - `potential_rebate(storage cost of deleted/mutated objects) = - storage_rebate + non_refundable_storage_fee` - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - gas-cost-summary = u64 ; computation-cost - u64 ; storage-cost - u64 ; storage-rebate - u64 ; non-refundable-storage-fee - ``` - """ - - computation_cost: "int" - """ - Cost of computation/execution - """ - - computation_cost_burned: "int" - """ - The burned component of the computation/execution costs - """ - - storage_cost: "int" - """ - Storage cost, it's the sum of all storage cost for all objects created - or mutated. - """ - - storage_rebate: "int" - """ - The amount of storage cost refunded to the user for all objects deleted - or mutated in the transaction. - """ - - non_refundable_storage_fee: "int" - """ - The fee for the rebate. The portion of the storage rebate kept by the - system. - """ - - def __init__(self, *, computation_cost: "int", computation_cost_burned: "int", storage_cost: "int", storage_rebate: "int", non_refundable_storage_fee: "int"): - self.computation_cost = computation_cost - self.computation_cost_burned = computation_cost_burned - self.storage_cost = storage_cost - self.storage_rebate = storage_rebate - self.non_refundable_storage_fee = non_refundable_storage_fee - - def __str__(self): - return "GasCostSummary(computation_cost={}, computation_cost_burned={}, storage_cost={}, storage_rebate={}, non_refundable_storage_fee={})".format(self.computation_cost, self.computation_cost_burned, self.storage_cost, self.storage_rebate, self.non_refundable_storage_fee) - - def __eq__(self, other): - if self.computation_cost != other.computation_cost: - return False - if self.computation_cost_burned != other.computation_cost_burned: - return False - if self.storage_cost != other.storage_cost: - return False - if self.storage_rebate != other.storage_rebate: - return False - if self.non_refundable_storage_fee != other.non_refundable_storage_fee: - return False - return True - -class _UniffiConverterTypeGasCostSummary(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return GasCostSummary( - computation_cost=_UniffiConverterUInt64.read(buf), - computation_cost_burned=_UniffiConverterUInt64.read(buf), - storage_cost=_UniffiConverterUInt64.read(buf), - storage_rebate=_UniffiConverterUInt64.read(buf), - non_refundable_storage_fee=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.computation_cost) - _UniffiConverterUInt64.check_lower(value.computation_cost_burned) - _UniffiConverterUInt64.check_lower(value.storage_cost) - _UniffiConverterUInt64.check_lower(value.storage_rebate) - _UniffiConverterUInt64.check_lower(value.non_refundable_storage_fee) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.computation_cost, buf) - _UniffiConverterUInt64.write(value.computation_cost_burned, buf) - _UniffiConverterUInt64.write(value.storage_cost, buf) - _UniffiConverterUInt64.write(value.storage_rebate, buf) - _UniffiConverterUInt64.write(value.non_refundable_storage_fee, buf) - - -class GasPayment: - """ - Payment information for executing a transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - gas-payment = (vector object-ref) ; gas coin objects - address ; owner - u64 ; price - u64 ; budget - ``` - """ - - objects: "typing.List[ObjectReference]" - owner: "Address" - """ - Owner of the gas objects, either the transaction sender or a sponsor - """ - - price: "int" - """ - Gas unit price to use when charging for computation - - Must be greater-than-or-equal-to the network's current RGP (reference - gas price) - """ - - budget: "int" - """ - Total budget willing to spend for the execution of a transaction - """ - - def __init__(self, *, objects: "typing.List[ObjectReference]", owner: "Address", price: "int", budget: "int"): - self.objects = objects - self.owner = owner - self.price = price - self.budget = budget - - def __str__(self): - return "GasPayment(objects={}, owner={}, price={}, budget={})".format(self.objects, self.owner, self.price, self.budget) - - def __eq__(self, other): - if self.objects != other.objects: - return False - if self.owner != other.owner: - return False - if self.price != other.price: - return False - if self.budget != other.budget: - return False - return True - -class _UniffiConverterTypeGasPayment(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return GasPayment( - objects=_UniffiConverterSequenceTypeObjectReference.read(buf), - owner=_UniffiConverterTypeAddress.read(buf), - price=_UniffiConverterUInt64.read(buf), - budget=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeObjectReference.check_lower(value.objects) - _UniffiConverterTypeAddress.check_lower(value.owner) - _UniffiConverterUInt64.check_lower(value.price) - _UniffiConverterUInt64.check_lower(value.budget) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeObjectReference.write(value.objects, buf) - _UniffiConverterTypeAddress.write(value.owner, buf) - _UniffiConverterUInt64.write(value.price, buf) - _UniffiConverterUInt64.write(value.budget, buf) - - -class GqlAddress: - address: "Address" - def __init__(self, *, address: "Address"): - self.address = address - - def __str__(self): - return "GqlAddress(address={})".format(self.address) - - def __eq__(self, other): - if self.address != other.address: - return False - return True - -class _UniffiConverterTypeGqlAddress(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return GqlAddress( - address=_UniffiConverterTypeAddress.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeAddress.check_lower(value.address) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeAddress.write(value.address, buf) - - -class Jwk: - """ - A JSON Web Key - - Struct that contains info for a JWK. A list of them for different kids can - be retrieved from the JWK endpoint (e.g. ). - The JWK is used to verify the JWT token. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - jwk = string string string string - ``` - """ - - kty: "str" - """ - Key type parameter, - """ - - e: "str" - """ - RSA public exponent, - """ - - n: "str" - """ - RSA modulus, - """ - - alg: "str" - """ - Algorithm parameter, - """ - - def __init__(self, *, kty: "str", e: "str", n: "str", alg: "str"): - self.kty = kty - self.e = e - self.n = n - self.alg = alg - - def __str__(self): - return "Jwk(kty={}, e={}, n={}, alg={})".format(self.kty, self.e, self.n, self.alg) - - def __eq__(self, other): - if self.kty != other.kty: - return False - if self.e != other.e: - return False - if self.n != other.n: - return False - if self.alg != other.alg: - return False - return True - -class _UniffiConverterTypeJwk(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Jwk( - kty=_UniffiConverterString.read(buf), - e=_UniffiConverterString.read(buf), - n=_UniffiConverterString.read(buf), - alg=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.kty) - _UniffiConverterString.check_lower(value.e) - _UniffiConverterString.check_lower(value.n) - _UniffiConverterString.check_lower(value.alg) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.kty, buf) - _UniffiConverterString.write(value.e, buf) - _UniffiConverterString.write(value.n, buf) - _UniffiConverterString.write(value.alg, buf) - - -class JwkId: - """ - Key to uniquely identify a JWK - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - jwk-id = string string - ``` - """ - - iss: "str" - """ - The issuer or identity of the OIDC provider. - """ - - kid: "str" - """ - A key id use to uniquely identify a key from an OIDC provider. - """ - - def __init__(self, *, iss: "str", kid: "str"): - self.iss = iss - self.kid = kid - - def __str__(self): - return "JwkId(iss={}, kid={})".format(self.iss, self.kid) - - def __eq__(self, other): - if self.iss != other.iss: - return False - if self.kid != other.kid: - return False - return True - -class _UniffiConverterTypeJwkId(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return JwkId( - iss=_UniffiConverterString.read(buf), - kid=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.iss) - _UniffiConverterString.check_lower(value.kid) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.iss, buf) - _UniffiConverterString.write(value.kid, buf) - - -class MoveEnum: - abilities: "typing.Optional[typing.List[MoveAbility]]" - name: "str" - type_parameters: "typing.Optional[typing.List[MoveStructTypeParameter]]" - variants: "typing.Optional[typing.List[MoveEnumVariant]]" - def __init__(self, *, abilities: "typing.Optional[typing.List[MoveAbility]]" = _DEFAULT, name: "str", type_parameters: "typing.Optional[typing.List[MoveStructTypeParameter]]" = _DEFAULT, variants: "typing.Optional[typing.List[MoveEnumVariant]]" = _DEFAULT): - if abilities is _DEFAULT: - self.abilities = None - else: - self.abilities = abilities - self.name = name - if type_parameters is _DEFAULT: - self.type_parameters = None - else: - self.type_parameters = type_parameters - if variants is _DEFAULT: - self.variants = None - else: - self.variants = variants - - def __str__(self): - return "MoveEnum(abilities={}, name={}, type_parameters={}, variants={})".format(self.abilities, self.name, self.type_parameters, self.variants) - - def __eq__(self, other): - if self.abilities != other.abilities: - return False - if self.name != other.name: - return False - if self.type_parameters != other.type_parameters: - return False - if self.variants != other.variants: - return False - return True - -class _UniffiConverterTypeMoveEnum(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveEnum( - abilities=_UniffiConverterOptionalSequenceTypeMoveAbility.read(buf), - name=_UniffiConverterString.read(buf), - type_parameters=_UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.read(buf), - variants=_UniffiConverterOptionalSequenceTypeMoveEnumVariant.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalSequenceTypeMoveAbility.check_lower(value.abilities) - _UniffiConverterString.check_lower(value.name) - _UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.check_lower(value.type_parameters) - _UniffiConverterOptionalSequenceTypeMoveEnumVariant.check_lower(value.variants) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalSequenceTypeMoveAbility.write(value.abilities, buf) - _UniffiConverterString.write(value.name, buf) - _UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.write(value.type_parameters, buf) - _UniffiConverterOptionalSequenceTypeMoveEnumVariant.write(value.variants, buf) - - -class MoveEnumConnection: - nodes: "typing.List[MoveEnum]" - page_info: "PageInfo" - def __init__(self, *, nodes: "typing.List[MoveEnum]", page_info: "PageInfo"): - self.nodes = nodes - self.page_info = page_info - - def __str__(self): - return "MoveEnumConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) - - def __eq__(self, other): - if self.nodes != other.nodes: - return False - if self.page_info != other.page_info: - return False - return True - -class _UniffiConverterTypeMoveEnumConnection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveEnumConnection( - nodes=_UniffiConverterSequenceTypeMoveEnum.read(buf), - page_info=_UniffiConverterTypePageInfo.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeMoveEnum.check_lower(value.nodes) - _UniffiConverterTypePageInfo.check_lower(value.page_info) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeMoveEnum.write(value.nodes, buf) - _UniffiConverterTypePageInfo.write(value.page_info, buf) - - -class MoveEnumVariant: - fields: "typing.Optional[typing.List[MoveField]]" - name: "str" - def __init__(self, *, fields: "typing.Optional[typing.List[MoveField]]" = _DEFAULT, name: "str"): - if fields is _DEFAULT: - self.fields = None - else: - self.fields = fields - self.name = name - - def __str__(self): - return "MoveEnumVariant(fields={}, name={})".format(self.fields, self.name) - - def __eq__(self, other): - if self.fields != other.fields: - return False - if self.name != other.name: - return False - return True - -class _UniffiConverterTypeMoveEnumVariant(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveEnumVariant( - fields=_UniffiConverterOptionalSequenceTypeMoveField.read(buf), - name=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalSequenceTypeMoveField.check_lower(value.fields) - _UniffiConverterString.check_lower(value.name) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalSequenceTypeMoveField.write(value.fields, buf) - _UniffiConverterString.write(value.name, buf) - - -class MoveField: - name: "str" - type: "typing.Optional[OpenMoveType]" - def __init__(self, *, name: "str", type: "typing.Optional[OpenMoveType]" = _DEFAULT): - self.name = name - if type is _DEFAULT: - self.type = None - else: - self.type = type - - def __str__(self): - return "MoveField(name={}, type={})".format(self.name, self.type) - - def __eq__(self, other): - if self.name != other.name: - return False - if self.type != other.type: - return False - return True - -class _UniffiConverterTypeMoveField(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveField( - name=_UniffiConverterString.read(buf), - type=_UniffiConverterOptionalTypeOpenMoveType.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.name) - _UniffiConverterOptionalTypeOpenMoveType.check_lower(value.type) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.name, buf) - _UniffiConverterOptionalTypeOpenMoveType.write(value.type, buf) - - -class MoveFunctionConnection: - nodes: "typing.List[MoveFunction]" - page_info: "PageInfo" - def __init__(self, *, nodes: "typing.List[MoveFunction]", page_info: "PageInfo"): - self.nodes = nodes - self.page_info = page_info - - def __str__(self): - return "MoveFunctionConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) - - def __eq__(self, other): - if self.nodes != other.nodes: - return False - if self.page_info != other.page_info: - return False - return True - -class _UniffiConverterTypeMoveFunctionConnection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveFunctionConnection( - nodes=_UniffiConverterSequenceTypeMoveFunction.read(buf), - page_info=_UniffiConverterTypePageInfo.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeMoveFunction.check_lower(value.nodes) - _UniffiConverterTypePageInfo.check_lower(value.page_info) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeMoveFunction.write(value.nodes, buf) - _UniffiConverterTypePageInfo.write(value.page_info, buf) - - -class MoveFunctionTypeParameter: - constraints: "typing.List[MoveAbility]" - def __init__(self, *, constraints: "typing.List[MoveAbility]"): - self.constraints = constraints - - def __str__(self): - return "MoveFunctionTypeParameter(constraints={})".format(self.constraints) - - def __eq__(self, other): - if self.constraints != other.constraints: - return False - return True - -class _UniffiConverterTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveFunctionTypeParameter( - constraints=_UniffiConverterSequenceTypeMoveAbility.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeMoveAbility.check_lower(value.constraints) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeMoveAbility.write(value.constraints, buf) - - -class MoveLocation: - """ - Location in move bytecode where an error occurred - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - move-location = object-id identifier u16 u16 (option identifier) - ``` - """ - - package: "ObjectId" - """ - The package id - """ - - module: "str" - """ - The module name - """ - - function: "int" - """ - The function index - """ - - instruction: "int" - """ - Index into the code stream for a jump. The offset is relative to the - beginning of the instruction stream. - """ - - function_name: "typing.Optional[str]" - """ - The name of the function if available - """ - - def __init__(self, *, package: "ObjectId", module: "str", function: "int", instruction: "int", function_name: "typing.Optional[str]" = _DEFAULT): - self.package = package - self.module = module - self.function = function - self.instruction = instruction - if function_name is _DEFAULT: - self.function_name = None - else: - self.function_name = function_name - - def __str__(self): - return "MoveLocation(package={}, module={}, function={}, instruction={}, function_name={})".format(self.package, self.module, self.function, self.instruction, self.function_name) - - def __eq__(self, other): - if self.package != other.package: - return False - if self.module != other.module: - return False - if self.function != other.function: - return False - if self.instruction != other.instruction: - return False - if self.function_name != other.function_name: - return False - return True - -class _UniffiConverterTypeMoveLocation(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveLocation( - package=_UniffiConverterTypeObjectId.read(buf), - module=_UniffiConverterString.read(buf), - function=_UniffiConverterUInt16.read(buf), - instruction=_UniffiConverterUInt16.read(buf), - function_name=_UniffiConverterOptionalString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.package) - _UniffiConverterString.check_lower(value.module) - _UniffiConverterUInt16.check_lower(value.function) - _UniffiConverterUInt16.check_lower(value.instruction) - _UniffiConverterOptionalString.check_lower(value.function_name) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.package, buf) - _UniffiConverterString.write(value.module, buf) - _UniffiConverterUInt16.write(value.function, buf) - _UniffiConverterUInt16.write(value.instruction, buf) - _UniffiConverterOptionalString.write(value.function_name, buf) - - -class MoveModule: - file_format_version: "int" - enums: "typing.Optional[MoveEnumConnection]" - friends: "MoveModuleConnection" - functions: "typing.Optional[MoveFunctionConnection]" - structs: "typing.Optional[MoveStructConnection]" - def __init__(self, *, file_format_version: "int", enums: "typing.Optional[MoveEnumConnection]" = _DEFAULT, friends: "MoveModuleConnection", functions: "typing.Optional[MoveFunctionConnection]" = _DEFAULT, structs: "typing.Optional[MoveStructConnection]" = _DEFAULT): - self.file_format_version = file_format_version - if enums is _DEFAULT: - self.enums = None - else: - self.enums = enums - self.friends = friends - if functions is _DEFAULT: - self.functions = None - else: - self.functions = functions - if structs is _DEFAULT: - self.structs = None - else: - self.structs = structs - - def __str__(self): - return "MoveModule(file_format_version={}, enums={}, friends={}, functions={}, structs={})".format(self.file_format_version, self.enums, self.friends, self.functions, self.structs) - - def __eq__(self, other): - if self.file_format_version != other.file_format_version: - return False - if self.enums != other.enums: - return False - if self.friends != other.friends: - return False - if self.functions != other.functions: - return False - if self.structs != other.structs: - return False - return True - -class _UniffiConverterTypeMoveModule(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveModule( - file_format_version=_UniffiConverterInt32.read(buf), - enums=_UniffiConverterOptionalTypeMoveEnumConnection.read(buf), - friends=_UniffiConverterTypeMoveModuleConnection.read(buf), - functions=_UniffiConverterOptionalTypeMoveFunctionConnection.read(buf), - structs=_UniffiConverterOptionalTypeMoveStructConnection.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterInt32.check_lower(value.file_format_version) - _UniffiConverterOptionalTypeMoveEnumConnection.check_lower(value.enums) - _UniffiConverterTypeMoveModuleConnection.check_lower(value.friends) - _UniffiConverterOptionalTypeMoveFunctionConnection.check_lower(value.functions) - _UniffiConverterOptionalTypeMoveStructConnection.check_lower(value.structs) - - @staticmethod - def write(value, buf): - _UniffiConverterInt32.write(value.file_format_version, buf) - _UniffiConverterOptionalTypeMoveEnumConnection.write(value.enums, buf) - _UniffiConverterTypeMoveModuleConnection.write(value.friends, buf) - _UniffiConverterOptionalTypeMoveFunctionConnection.write(value.functions, buf) - _UniffiConverterOptionalTypeMoveStructConnection.write(value.structs, buf) - - -class MoveModuleConnection: - nodes: "typing.List[MoveModuleQuery]" - page_info: "PageInfo" - def __init__(self, *, nodes: "typing.List[MoveModuleQuery]", page_info: "PageInfo"): - self.nodes = nodes - self.page_info = page_info - - def __str__(self): - return "MoveModuleConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) - - def __eq__(self, other): - if self.nodes != other.nodes: - return False - if self.page_info != other.page_info: - return False - return True - -class _UniffiConverterTypeMoveModuleConnection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveModuleConnection( - nodes=_UniffiConverterSequenceTypeMoveModuleQuery.read(buf), - page_info=_UniffiConverterTypePageInfo.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeMoveModuleQuery.check_lower(value.nodes) - _UniffiConverterTypePageInfo.check_lower(value.page_info) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeMoveModuleQuery.write(value.nodes, buf) - _UniffiConverterTypePageInfo.write(value.page_info, buf) - - -class MoveModuleQuery: - package: "MovePackageQuery" - name: "str" - def __init__(self, *, package: "MovePackageQuery", name: "str"): - self.package = package - self.name = name - - def __str__(self): - return "MoveModuleQuery(package={}, name={})".format(self.package, self.name) - - def __eq__(self, other): - if self.package != other.package: - return False - if self.name != other.name: - return False - return True - -class _UniffiConverterTypeMoveModuleQuery(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveModuleQuery( - package=_UniffiConverterTypeMovePackageQuery.read(buf), - name=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeMovePackageQuery.check_lower(value.package) - _UniffiConverterString.check_lower(value.name) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeMovePackageQuery.write(value.package, buf) - _UniffiConverterString.write(value.name, buf) - - -class MoveObject: - bcs: "typing.Optional[Base64]" - def __init__(self, *, bcs: "typing.Optional[Base64]" = _DEFAULT): - if bcs is _DEFAULT: - self.bcs = None - else: - self.bcs = bcs - - def __str__(self): - return "MoveObject(bcs={})".format(self.bcs) - - def __eq__(self, other): - if self.bcs != other.bcs: - return False - return True - -class _UniffiConverterTypeMoveObject(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveObject( - bcs=_UniffiConverterOptionalTypeBase64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalTypeBase64.check_lower(value.bcs) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalTypeBase64.write(value.bcs, buf) - - -class MovePackagePage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[MovePackage]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[MovePackage]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "MovePackagePage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeMovePackagePage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MovePackagePage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeMovePackage.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeMovePackage.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeMovePackage.write(value.data, buf) - - -class MovePackageQuery: - address: "Address" - bcs: "typing.Optional[Base64]" - def __init__(self, *, address: "Address", bcs: "typing.Optional[Base64]" = _DEFAULT): - self.address = address - if bcs is _DEFAULT: - self.bcs = None - else: - self.bcs = bcs - - def __str__(self): - return "MovePackageQuery(address={}, bcs={})".format(self.address, self.bcs) - - def __eq__(self, other): - if self.address != other.address: - return False - if self.bcs != other.bcs: - return False - return True - -class _UniffiConverterTypeMovePackageQuery(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MovePackageQuery( - address=_UniffiConverterTypeAddress.read(buf), - bcs=_UniffiConverterOptionalTypeBase64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeAddress.check_lower(value.address) - _UniffiConverterOptionalTypeBase64.check_lower(value.bcs) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeAddress.write(value.address, buf) - _UniffiConverterOptionalTypeBase64.write(value.bcs, buf) - - -class MoveStruct: - """ - A move struct - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - object-move-struct = compressed-struct-tag bool u64 object-contents - - compressed-struct-tag = other-struct-type / gas-coin-type / staked-iota-type / coin-type - other-struct-type = %x00 struct-tag - gas-coin-type = %x01 - staked-iota-type = %x02 - coin-type = %x03 type-tag - - ; first 32 bytes of the contents are the object's object-id - object-contents = uleb128 (object-id *OCTET) ; length followed by contents - ``` - """ - - struct_type: "StructTag" - """ - The type of this object - """ - - version: "int" - """ - Number that increases each time a tx takes this object as a mutable - input This is a lamport timestamp, not a sequentially increasing - version - """ - - contents: "bytes" - """ - BCS bytes of a Move struct value - """ - - def __init__(self, *, struct_type: "StructTag", version: "int", contents: "bytes"): - self.struct_type = struct_type - self.version = version - self.contents = contents - - def __str__(self): - return "MoveStruct(struct_type={}, version={}, contents={})".format(self.struct_type, self.version, self.contents) - - def __eq__(self, other): - if self.struct_type != other.struct_type: - return False - if self.version != other.version: - return False - if self.contents != other.contents: - return False - return True - -class _UniffiConverterTypeMoveStruct(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveStruct( - struct_type=_UniffiConverterTypeStructTag.read(buf), - version=_UniffiConverterUInt64.read(buf), - contents=_UniffiConverterBytes.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeStructTag.check_lower(value.struct_type) - _UniffiConverterUInt64.check_lower(value.version) - _UniffiConverterBytes.check_lower(value.contents) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeStructTag.write(value.struct_type, buf) - _UniffiConverterUInt64.write(value.version, buf) - _UniffiConverterBytes.write(value.contents, buf) - - -class MoveStructConnection: - page_info: "PageInfo" - nodes: "typing.List[MoveStructQuery]" - def __init__(self, *, page_info: "PageInfo", nodes: "typing.List[MoveStructQuery]"): - self.page_info = page_info - self.nodes = nodes - - def __str__(self): - return "MoveStructConnection(page_info={}, nodes={})".format(self.page_info, self.nodes) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.nodes != other.nodes: - return False - return True - -class _UniffiConverterTypeMoveStructConnection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveStructConnection( - page_info=_UniffiConverterTypePageInfo.read(buf), - nodes=_UniffiConverterSequenceTypeMoveStructQuery.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeMoveStructQuery.check_lower(value.nodes) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeMoveStructQuery.write(value.nodes, buf) - - -class MoveStructQuery: - abilities: "typing.Optional[typing.List[MoveAbility]]" - name: "str" - fields: "typing.Optional[typing.List[MoveField]]" - type_parameters: "typing.Optional[typing.List[MoveStructTypeParameter]]" - def __init__(self, *, abilities: "typing.Optional[typing.List[MoveAbility]]" = _DEFAULT, name: "str", fields: "typing.Optional[typing.List[MoveField]]" = _DEFAULT, type_parameters: "typing.Optional[typing.List[MoveStructTypeParameter]]" = _DEFAULT): - if abilities is _DEFAULT: - self.abilities = None - else: - self.abilities = abilities - self.name = name - if fields is _DEFAULT: - self.fields = None - else: - self.fields = fields - if type_parameters is _DEFAULT: - self.type_parameters = None - else: - self.type_parameters = type_parameters - - def __str__(self): - return "MoveStructQuery(abilities={}, name={}, fields={}, type_parameters={})".format(self.abilities, self.name, self.fields, self.type_parameters) - - def __eq__(self, other): - if self.abilities != other.abilities: - return False - if self.name != other.name: - return False - if self.fields != other.fields: - return False - if self.type_parameters != other.type_parameters: - return False - return True - -class _UniffiConverterTypeMoveStructQuery(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveStructQuery( - abilities=_UniffiConverterOptionalSequenceTypeMoveAbility.read(buf), - name=_UniffiConverterString.read(buf), - fields=_UniffiConverterOptionalSequenceTypeMoveField.read(buf), - type_parameters=_UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalSequenceTypeMoveAbility.check_lower(value.abilities) - _UniffiConverterString.check_lower(value.name) - _UniffiConverterOptionalSequenceTypeMoveField.check_lower(value.fields) - _UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.check_lower(value.type_parameters) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalSequenceTypeMoveAbility.write(value.abilities, buf) - _UniffiConverterString.write(value.name, buf) - _UniffiConverterOptionalSequenceTypeMoveField.write(value.fields, buf) - _UniffiConverterOptionalSequenceTypeMoveStructTypeParameter.write(value.type_parameters, buf) - - -class MoveStructTypeParameter: - constraints: "typing.List[MoveAbility]" - is_phantom: "bool" - def __init__(self, *, constraints: "typing.List[MoveAbility]", is_phantom: "bool"): - self.constraints = constraints - self.is_phantom = is_phantom - - def __str__(self): - return "MoveStructTypeParameter(constraints={}, is_phantom={})".format(self.constraints, self.is_phantom) - - def __eq__(self, other): - if self.constraints != other.constraints: - return False - if self.is_phantom != other.is_phantom: - return False - return True - -class _UniffiConverterTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return MoveStructTypeParameter( - constraints=_UniffiConverterSequenceTypeMoveAbility.read(buf), - is_phantom=_UniffiConverterBool.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterSequenceTypeMoveAbility.check_lower(value.constraints) - _UniffiConverterBool.check_lower(value.is_phantom) - - @staticmethod - def write(value, buf): - _UniffiConverterSequenceTypeMoveAbility.write(value.constraints, buf) - _UniffiConverterBool.write(value.is_phantom, buf) - - -class NameRegistrationPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[NameRegistration]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[NameRegistration]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "NameRegistrationPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeNameRegistrationPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return NameRegistrationPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeNameRegistration.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeNameRegistration.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeNameRegistration.write(value.data, buf) - - -class ObjectFilter: - type_tag: "typing.Optional[str]" - owner: "typing.Optional[Address]" - object_ids: "typing.Optional[typing.List[ObjectId]]" - def __init__(self, *, type_tag: "typing.Optional[str]" = _DEFAULT, owner: "typing.Optional[Address]" = _DEFAULT, object_ids: "typing.Optional[typing.List[ObjectId]]" = _DEFAULT): - if type_tag is _DEFAULT: - self.type_tag = None - else: - self.type_tag = type_tag - if owner is _DEFAULT: - self.owner = None - else: - self.owner = owner - if object_ids is _DEFAULT: - self.object_ids = None - else: - self.object_ids = object_ids - - def __str__(self): - return "ObjectFilter(type_tag={}, owner={}, object_ids={})".format(self.type_tag, self.owner, self.object_ids) - - def __eq__(self, other): - if self.type_tag != other.type_tag: - return False - if self.owner != other.owner: - return False - if self.object_ids != other.object_ids: - return False - return True - -class _UniffiConverterTypeObjectFilter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ObjectFilter( - type_tag=_UniffiConverterOptionalString.read(buf), - owner=_UniffiConverterOptionalTypeAddress.read(buf), - object_ids=_UniffiConverterOptionalSequenceTypeObjectId.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalString.check_lower(value.type_tag) - _UniffiConverterOptionalTypeAddress.check_lower(value.owner) - _UniffiConverterOptionalSequenceTypeObjectId.check_lower(value.object_ids) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalString.write(value.type_tag, buf) - _UniffiConverterOptionalTypeAddress.write(value.owner, buf) - _UniffiConverterOptionalSequenceTypeObjectId.write(value.object_ids, buf) - - -class ObjectPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[Object]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[Object]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "ObjectPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeObjectPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ObjectPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeObject.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeObject.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeObject.write(value.data, buf) - - -class ObjectRef: - address: "ObjectId" - digest: "str" - version: "int" - def __init__(self, *, address: "ObjectId", digest: "str", version: "int"): - self.address = address - self.digest = digest - self.version = version - - def __str__(self): - return "ObjectRef(address={}, digest={}, version={})".format(self.address, self.digest, self.version) - - def __eq__(self, other): - if self.address != other.address: - return False - if self.digest != other.digest: - return False - if self.version != other.version: - return False - return True - -class _UniffiConverterTypeObjectRef(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ObjectRef( - address=_UniffiConverterTypeObjectId.read(buf), - digest=_UniffiConverterString.read(buf), - version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.address) - _UniffiConverterString.check_lower(value.digest) - _UniffiConverterUInt64.check_lower(value.version) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.address, buf) - _UniffiConverterString.write(value.digest, buf) - _UniffiConverterUInt64.write(value.version, buf) - - -class ObjectReference: - """ - Reference to an object - - Contains sufficient information to uniquely identify a specific object. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - object-ref = object-id u64 digest - ``` - """ - - object_id: "ObjectId" - version: "int" - digest: "Digest" - def __init__(self, *, object_id: "ObjectId", version: "int", digest: "Digest"): - self.object_id = object_id - self.version = version - self.digest = digest - - def __str__(self): - return "ObjectReference(object_id={}, version={}, digest={})".format(self.object_id, self.version, self.digest) - - def __eq__(self, other): - if self.object_id != other.object_id: - return False - if self.version != other.version: - return False - if self.digest != other.digest: - return False - return True - -class _UniffiConverterTypeObjectReference(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ObjectReference( - object_id=_UniffiConverterTypeObjectId.read(buf), - version=_UniffiConverterUInt64.read(buf), - digest=_UniffiConverterTypeDigest.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.object_id) - _UniffiConverterUInt64.check_lower(value.version) - _UniffiConverterTypeDigest.check_lower(value.digest) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.object_id, buf) - _UniffiConverterUInt64.write(value.version, buf) - _UniffiConverterTypeDigest.write(value.digest, buf) - - -class OpenMoveType: - repr: "str" - def __init__(self, *, repr: "str"): - self.repr = repr - - def __str__(self): - return "OpenMoveType(repr={})".format(self.repr) - - def __eq__(self, other): - if self.repr != other.repr: - return False - return True - -class _UniffiConverterTypeOpenMoveType(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return OpenMoveType( - repr=_UniffiConverterString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.repr) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.repr, buf) - - -class PageInfo: - """ - Information about pagination in a connection. - """ - - has_previous_page: "bool" - """ - When paginating backwards, are there more items? - """ - - has_next_page: "bool" - """ - Are there more items when paginating forwards? - """ - - start_cursor: "typing.Optional[str]" - """ - When paginating backwards, the cursor to continue. - """ - - end_cursor: "typing.Optional[str]" - """ - When paginating forwards, the cursor to continue. - """ - - def __init__(self, *, has_previous_page: "bool", has_next_page: "bool", start_cursor: "typing.Optional[str]" = _DEFAULT, end_cursor: "typing.Optional[str]" = _DEFAULT): - self.has_previous_page = has_previous_page - self.has_next_page = has_next_page - if start_cursor is _DEFAULT: - self.start_cursor = None - else: - self.start_cursor = start_cursor - if end_cursor is _DEFAULT: - self.end_cursor = None - else: - self.end_cursor = end_cursor - - def __str__(self): - return "PageInfo(has_previous_page={}, has_next_page={}, start_cursor={}, end_cursor={})".format(self.has_previous_page, self.has_next_page, self.start_cursor, self.end_cursor) - - def __eq__(self, other): - if self.has_previous_page != other.has_previous_page: - return False - if self.has_next_page != other.has_next_page: - return False - if self.start_cursor != other.start_cursor: - return False - if self.end_cursor != other.end_cursor: - return False - return True - -class _UniffiConverterTypePageInfo(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return PageInfo( - has_previous_page=_UniffiConverterBool.read(buf), - has_next_page=_UniffiConverterBool.read(buf), - start_cursor=_UniffiConverterOptionalString.read(buf), - end_cursor=_UniffiConverterOptionalString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterBool.check_lower(value.has_previous_page) - _UniffiConverterBool.check_lower(value.has_next_page) - _UniffiConverterOptionalString.check_lower(value.start_cursor) - _UniffiConverterOptionalString.check_lower(value.end_cursor) - - @staticmethod - def write(value, buf): - _UniffiConverterBool.write(value.has_previous_page, buf) - _UniffiConverterBool.write(value.has_next_page, buf) - _UniffiConverterOptionalString.write(value.start_cursor, buf) - _UniffiConverterOptionalString.write(value.end_cursor, buf) - - -class PaginationFilter: - """ - Pagination options for querying the GraphQL server. It defaults to forward - pagination with the GraphQL server's max page size. - """ - - direction: "Direction" - """ - The direction of pagination. - """ - - cursor: "typing.Optional[str]" - """ - An opaque cursor used for pagination. - """ - - limit: "typing.Optional[int]" - """ - The maximum number of items to return. If this is omitted, it will - lazily query the service configuration for the max page size. - """ - - def __init__(self, *, direction: "Direction", cursor: "typing.Optional[str]" = _DEFAULT, limit: "typing.Optional[int]" = _DEFAULT): - self.direction = direction - if cursor is _DEFAULT: - self.cursor = None - else: - self.cursor = cursor - if limit is _DEFAULT: - self.limit = None - else: - self.limit = limit - - def __str__(self): - return "PaginationFilter(direction={}, cursor={}, limit={})".format(self.direction, self.cursor, self.limit) - - def __eq__(self, other): - if self.direction != other.direction: - return False - if self.cursor != other.cursor: - return False - if self.limit != other.limit: - return False - return True - -class _UniffiConverterTypePaginationFilter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return PaginationFilter( - direction=_UniffiConverterTypeDirection.read(buf), - cursor=_UniffiConverterOptionalString.read(buf), - limit=_UniffiConverterOptionalInt32.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeDirection.check_lower(value.direction) - _UniffiConverterOptionalString.check_lower(value.cursor) - _UniffiConverterOptionalInt32.check_lower(value.limit) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeDirection.write(value.direction, buf) - _UniffiConverterOptionalString.write(value.cursor, buf) - _UniffiConverterOptionalInt32.write(value.limit, buf) - - -class ProtocolConfigAttr: - """ - A key-value protocol configuration attribute. - """ - - key: "str" - value: "typing.Optional[str]" - def __init__(self, *, key: "str", value: "typing.Optional[str]"): - self.key = key - self.value = value - - def __str__(self): - return "ProtocolConfigAttr(key={}, value={})".format(self.key, self.value) - - def __eq__(self, other): - if self.key != other.key: - return False - if self.value != other.value: - return False - return True - -class _UniffiConverterTypeProtocolConfigAttr(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ProtocolConfigAttr( - key=_UniffiConverterString.read(buf), - value=_UniffiConverterOptionalString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.key) - _UniffiConverterOptionalString.check_lower(value.value) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.key, buf) - _UniffiConverterOptionalString.write(value.value, buf) - - -class ProtocolConfigFeatureFlag: - """ - Feature flags are a form of boolean configuration that are usually used to - gate features while they are in development. Once a lag has been enabled, it - is rare for it to be disabled. - """ - - key: "str" - value: "bool" - def __init__(self, *, key: "str", value: "bool"): - self.key = key - self.value = value - - def __str__(self): - return "ProtocolConfigFeatureFlag(key={}, value={})".format(self.key, self.value) - - def __eq__(self, other): - if self.key != other.key: - return False - if self.value != other.value: - return False - return True - -class _UniffiConverterTypeProtocolConfigFeatureFlag(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ProtocolConfigFeatureFlag( - key=_UniffiConverterString.read(buf), - value=_UniffiConverterBool.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.key) - _UniffiConverterBool.check_lower(value.value) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.key, buf) - _UniffiConverterBool.write(value.value, buf) - - -class ProtocolConfigs: - """ - Information about the configuration of the protocol. - Constants that control how the chain operates. - These can only change during protocol upgrades which happen on epoch - boundaries. - """ - - protocol_version: "int" - """ - The protocol is not required to change on every epoch boundary, so the - protocol version tracks which change to the protocol these configs - are from. - """ - - feature_flags: "typing.List[ProtocolConfigFeatureFlag]" - """ - List all available feature flags and their values. Feature flags are a - form of boolean configuration that are usually used to gate features - while they are in development. Once a flag has been enabled, it is - rare for it to be disabled. - """ - - configs: "typing.List[ProtocolConfigAttr]" - """ - List all available configurations and their values. These configurations - can take any value (but they will all be represented in string - form), and do not include feature flags. - """ - - def __init__(self, *, protocol_version: "int", feature_flags: "typing.List[ProtocolConfigFeatureFlag]", configs: "typing.List[ProtocolConfigAttr]"): - self.protocol_version = protocol_version - self.feature_flags = feature_flags - self.configs = configs - - def __str__(self): - return "ProtocolConfigs(protocol_version={}, feature_flags={}, configs={})".format(self.protocol_version, self.feature_flags, self.configs) - - def __eq__(self, other): - if self.protocol_version != other.protocol_version: - return False - if self.feature_flags != other.feature_flags: - return False - if self.configs != other.configs: - return False - return True - -class _UniffiConverterTypeProtocolConfigs(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ProtocolConfigs( - protocol_version=_UniffiConverterUInt64.read(buf), - feature_flags=_UniffiConverterSequenceTypeProtocolConfigFeatureFlag.read(buf), - configs=_UniffiConverterSequenceTypeProtocolConfigAttr.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.protocol_version) - _UniffiConverterSequenceTypeProtocolConfigFeatureFlag.check_lower(value.feature_flags) - _UniffiConverterSequenceTypeProtocolConfigAttr.check_lower(value.configs) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.protocol_version, buf) - _UniffiConverterSequenceTypeProtocolConfigFeatureFlag.write(value.feature_flags, buf) - _UniffiConverterSequenceTypeProtocolConfigAttr.write(value.configs, buf) - - -class Query: - query: "str" - variables: "typing.Optional[Value]" - def __init__(self, *, query: "str", variables: "typing.Optional[Value]" = _DEFAULT): - self.query = query - if variables is _DEFAULT: - self.variables = None - else: - self.variables = variables - - def __str__(self): - return "Query(query={}, variables={})".format(self.query, self.variables) - - def __eq__(self, other): - if self.query != other.query: - return False - if self.variables != other.variables: - return False - return True - -class _UniffiConverterTypeQuery(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Query( - query=_UniffiConverterString.read(buf), - variables=_UniffiConverterOptionalTypeValue.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.query) - _UniffiConverterOptionalTypeValue.check_lower(value.variables) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.query, buf) - _UniffiConverterOptionalTypeValue.write(value.variables, buf) - - -class RandomnessStateUpdate: - """ - Randomness update - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - randomness-state-update = u64 u64 bytes u64 - ``` - """ - - epoch: "int" - """ - Epoch of the randomness state update transaction - """ - - randomness_round: "int" - """ - Randomness round of the update - """ - - random_bytes: "bytes" - """ - Updated random bytes - """ - - randomness_obj_initial_shared_version: "int" - """ - The initial version of the randomness object that it was shared at - """ - - def __init__(self, *, epoch: "int", randomness_round: "int", random_bytes: "bytes", randomness_obj_initial_shared_version: "int"): - self.epoch = epoch - self.randomness_round = randomness_round - self.random_bytes = random_bytes - self.randomness_obj_initial_shared_version = randomness_obj_initial_shared_version - - def __str__(self): - return "RandomnessStateUpdate(epoch={}, randomness_round={}, random_bytes={}, randomness_obj_initial_shared_version={})".format(self.epoch, self.randomness_round, self.random_bytes, self.randomness_obj_initial_shared_version) - - def __eq__(self, other): - if self.epoch != other.epoch: - return False - if self.randomness_round != other.randomness_round: - return False - if self.random_bytes != other.random_bytes: - return False - if self.randomness_obj_initial_shared_version != other.randomness_obj_initial_shared_version: - return False - return True - -class _UniffiConverterTypeRandomnessStateUpdate(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return RandomnessStateUpdate( - epoch=_UniffiConverterUInt64.read(buf), - randomness_round=_UniffiConverterUInt64.read(buf), - random_bytes=_UniffiConverterBytes.read(buf), - randomness_obj_initial_shared_version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.epoch) - _UniffiConverterUInt64.check_lower(value.randomness_round) - _UniffiConverterBytes.check_lower(value.random_bytes) - _UniffiConverterUInt64.check_lower(value.randomness_obj_initial_shared_version) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.epoch, buf) - _UniffiConverterUInt64.write(value.randomness_round, buf) - _UniffiConverterBytes.write(value.random_bytes, buf) - _UniffiConverterUInt64.write(value.randomness_obj_initial_shared_version, buf) - - -class ServiceConfig: - default_page_size: "int" - """ - Default number of elements allowed on a single page of a connection. - """ - - enabled_features: "typing.List[Feature]" - """ - List of all features that are enabled on this RPC service. - """ - - max_move_value_depth: "int" - """ - Maximum estimated cost of a database query used to serve a GraphQL - request. This is measured in the same units that the database uses - in EXPLAIN queries. - Maximum nesting allowed in struct fields when calculating the layout of - a single Move Type. - """ - - max_output_nodes: "int" - """ - The maximum number of output nodes in a GraphQL response. - Non-connection nodes have a count of 1, while connection nodes are - counted as the specified 'first' or 'last' number of items, or the - default_page_size as set by the server if those arguments are not - set. Counts accumulate multiplicatively down the query tree. For - example, if a query starts with a connection of first: 10 and has a - field to a connection with last: 20, the count at the second level - would be 200 nodes. This is then summed to the count of 10 nodes - at the first level, for a total of 210 nodes. - """ - - max_page_size: "int" - """ - Maximum number of elements allowed on a single page of a connection. - """ - - max_query_depth: "int" - """ - The maximum depth a GraphQL query can be to be accepted by this service. - """ - - max_query_nodes: "int" - """ - The maximum number of nodes (field names) the service will accept in a - single query. - """ - - max_query_payload_size: "int" - """ - Maximum length of a query payload string. - """ - - max_type_argument_depth: "int" - """ - Maximum nesting allowed in type arguments in Move Types resolved by this - service. - """ - - max_type_argument_width: "int" - """ - Maximum number of type arguments passed into a generic instantiation of - a Move Type resolved by this service. - """ - - max_type_nodes: "int" - """ - Maximum number of structs that need to be processed when calculating the - layout of a single Move Type. - """ - - mutation_timeout_ms: "int" - """ - Maximum time in milliseconds spent waiting for a response from fullnode - after issuing a a transaction to execute. Note that the transaction - may still succeed even in the case of a timeout. Transactions are - idempotent, so a transaction that times out should be resubmitted - until the network returns a definite response (success or failure, not - timeout). - """ - - request_timeout_ms: "int" - """ - Maximum time in milliseconds that will be spent to serve one query - request. - """ - - def __init__(self, *, default_page_size: "int", enabled_features: "typing.List[Feature]", max_move_value_depth: "int", max_output_nodes: "int", max_page_size: "int", max_query_depth: "int", max_query_nodes: "int", max_query_payload_size: "int", max_type_argument_depth: "int", max_type_argument_width: "int", max_type_nodes: "int", mutation_timeout_ms: "int", request_timeout_ms: "int"): - self.default_page_size = default_page_size - self.enabled_features = enabled_features - self.max_move_value_depth = max_move_value_depth - self.max_output_nodes = max_output_nodes - self.max_page_size = max_page_size - self.max_query_depth = max_query_depth - self.max_query_nodes = max_query_nodes - self.max_query_payload_size = max_query_payload_size - self.max_type_argument_depth = max_type_argument_depth - self.max_type_argument_width = max_type_argument_width - self.max_type_nodes = max_type_nodes - self.mutation_timeout_ms = mutation_timeout_ms - self.request_timeout_ms = request_timeout_ms - - def __str__(self): - return "ServiceConfig(default_page_size={}, enabled_features={}, max_move_value_depth={}, max_output_nodes={}, max_page_size={}, max_query_depth={}, max_query_nodes={}, max_query_payload_size={}, max_type_argument_depth={}, max_type_argument_width={}, max_type_nodes={}, mutation_timeout_ms={}, request_timeout_ms={})".format(self.default_page_size, self.enabled_features, self.max_move_value_depth, self.max_output_nodes, self.max_page_size, self.max_query_depth, self.max_query_nodes, self.max_query_payload_size, self.max_type_argument_depth, self.max_type_argument_width, self.max_type_nodes, self.mutation_timeout_ms, self.request_timeout_ms) - - def __eq__(self, other): - if self.default_page_size != other.default_page_size: - return False - if self.enabled_features != other.enabled_features: - return False - if self.max_move_value_depth != other.max_move_value_depth: - return False - if self.max_output_nodes != other.max_output_nodes: - return False - if self.max_page_size != other.max_page_size: - return False - if self.max_query_depth != other.max_query_depth: - return False - if self.max_query_nodes != other.max_query_nodes: - return False - if self.max_query_payload_size != other.max_query_payload_size: - return False - if self.max_type_argument_depth != other.max_type_argument_depth: - return False - if self.max_type_argument_width != other.max_type_argument_width: - return False - if self.max_type_nodes != other.max_type_nodes: - return False - if self.mutation_timeout_ms != other.mutation_timeout_ms: - return False - if self.request_timeout_ms != other.request_timeout_ms: - return False - return True - -class _UniffiConverterTypeServiceConfig(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ServiceConfig( - default_page_size=_UniffiConverterInt32.read(buf), - enabled_features=_UniffiConverterSequenceTypeFeature.read(buf), - max_move_value_depth=_UniffiConverterInt32.read(buf), - max_output_nodes=_UniffiConverterInt32.read(buf), - max_page_size=_UniffiConverterInt32.read(buf), - max_query_depth=_UniffiConverterInt32.read(buf), - max_query_nodes=_UniffiConverterInt32.read(buf), - max_query_payload_size=_UniffiConverterInt32.read(buf), - max_type_argument_depth=_UniffiConverterInt32.read(buf), - max_type_argument_width=_UniffiConverterInt32.read(buf), - max_type_nodes=_UniffiConverterInt32.read(buf), - mutation_timeout_ms=_UniffiConverterInt32.read(buf), - request_timeout_ms=_UniffiConverterInt32.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterInt32.check_lower(value.default_page_size) - _UniffiConverterSequenceTypeFeature.check_lower(value.enabled_features) - _UniffiConverterInt32.check_lower(value.max_move_value_depth) - _UniffiConverterInt32.check_lower(value.max_output_nodes) - _UniffiConverterInt32.check_lower(value.max_page_size) - _UniffiConverterInt32.check_lower(value.max_query_depth) - _UniffiConverterInt32.check_lower(value.max_query_nodes) - _UniffiConverterInt32.check_lower(value.max_query_payload_size) - _UniffiConverterInt32.check_lower(value.max_type_argument_depth) - _UniffiConverterInt32.check_lower(value.max_type_argument_width) - _UniffiConverterInt32.check_lower(value.max_type_nodes) - _UniffiConverterInt32.check_lower(value.mutation_timeout_ms) - _UniffiConverterInt32.check_lower(value.request_timeout_ms) - - @staticmethod - def write(value, buf): - _UniffiConverterInt32.write(value.default_page_size, buf) - _UniffiConverterSequenceTypeFeature.write(value.enabled_features, buf) - _UniffiConverterInt32.write(value.max_move_value_depth, buf) - _UniffiConverterInt32.write(value.max_output_nodes, buf) - _UniffiConverterInt32.write(value.max_page_size, buf) - _UniffiConverterInt32.write(value.max_query_depth, buf) - _UniffiConverterInt32.write(value.max_query_nodes, buf) - _UniffiConverterInt32.write(value.max_query_payload_size, buf) - _UniffiConverterInt32.write(value.max_type_argument_depth, buf) - _UniffiConverterInt32.write(value.max_type_argument_width, buf) - _UniffiConverterInt32.write(value.max_type_nodes, buf) - _UniffiConverterInt32.write(value.mutation_timeout_ms, buf) - _UniffiConverterInt32.write(value.request_timeout_ms, buf) - - -class SignedTransaction: - transaction: "Transaction" - signatures: "typing.List[UserSignature]" - def __init__(self, *, transaction: "Transaction", signatures: "typing.List[UserSignature]"): - self.transaction = transaction - self.signatures = signatures - - def __str__(self): - return "SignedTransaction(transaction={}, signatures={})".format(self.transaction, self.signatures) - - def __eq__(self, other): - if self.transaction != other.transaction: - return False - if self.signatures != other.signatures: - return False - return True - -class _UniffiConverterTypeSignedTransaction(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return SignedTransaction( - transaction=_UniffiConverterTypeTransaction.read(buf), - signatures=_UniffiConverterSequenceTypeUserSignature.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTransaction.check_lower(value.transaction) - _UniffiConverterSequenceTypeUserSignature.check_lower(value.signatures) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTransaction.write(value.transaction, buf) - _UniffiConverterSequenceTypeUserSignature.write(value.signatures, buf) - - -class SignedTransactionPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[SignedTransaction]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[SignedTransaction]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "SignedTransactionPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeSignedTransactionPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return SignedTransactionPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeSignedTransaction.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeSignedTransaction.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeSignedTransaction.write(value.data, buf) - - -class TransactionDataEffects: - tx: "SignedTransaction" - effects: "TransactionEffects" - def __init__(self, *, tx: "SignedTransaction", effects: "TransactionEffects"): - self.tx = tx - self.effects = effects - - def __str__(self): - return "TransactionDataEffects(tx={}, effects={})".format(self.tx, self.effects) - - def __eq__(self, other): - if self.tx != other.tx: - return False - if self.effects != other.effects: - return False - return True - -class _UniffiConverterTypeTransactionDataEffects(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionDataEffects( - tx=_UniffiConverterTypeSignedTransaction.read(buf), - effects=_UniffiConverterTypeTransactionEffects.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeSignedTransaction.check_lower(value.tx) - _UniffiConverterTypeTransactionEffects.check_lower(value.effects) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeSignedTransaction.write(value.tx, buf) - _UniffiConverterTypeTransactionEffects.write(value.effects, buf) - - -class TransactionDataEffectsPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[TransactionDataEffects]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[TransactionDataEffects]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "TransactionDataEffectsPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeTransactionDataEffectsPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionDataEffectsPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeTransactionDataEffects.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeTransactionDataEffects.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeTransactionDataEffects.write(value.data, buf) - - -class TransactionEffectsPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[TransactionEffects]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[TransactionEffects]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "TransactionEffectsPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeTransactionEffectsPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionEffectsPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeTransactionEffects.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeTransactionEffects.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeTransactionEffects.write(value.data, buf) - - -class TransactionEffectsV1: - """ - Version 1 of TransactionEffects - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - effects-v1 = execution-status - u64 ; epoch - gas-cost-summary - digest ; transaction digest - (option u32) ; gas object index - (option digest) ; events digest - (vector digest) ; list of transaction dependencies - u64 ; lamport version - (vector changed-object) - (vector unchanged-shared-object) - (option digest) ; auxiliary data digest - ``` - """ - - status: "ExecutionStatus" - """ - The status of the execution - """ - - epoch: "int" - """ - The epoch when this transaction was executed. - """ - - gas_used: "GasCostSummary" - """ - The gas used by this transaction - """ - - transaction_digest: "Digest" - """ - The transaction digest - """ - - gas_object_index: "typing.Optional[int]" - """ - The updated gas object reference, as an index into the `changed_objects` - vector. Having a dedicated field for convenient access. - System transaction that don't require gas will leave this as None. - """ - - events_digest: "typing.Optional[Digest]" - """ - The digest of the events emitted during execution, - can be None if the transaction does not emit any event. - """ - - dependencies: "typing.List[Digest]" - """ - The set of transaction digests this transaction depends on. - """ - - lamport_version: "int" - """ - The version number of all the written Move objects by this transaction. - """ - - changed_objects: "typing.List[ChangedObject]" - """ - Objects whose state are changed in the object store. - """ - - unchanged_shared_objects: "typing.List[UnchangedSharedObject]" - """ - Shared objects that are not mutated in this transaction. Unlike owned - objects, read-only shared objects' version are not committed in the - transaction, and in order for a node to catch up and execute it - without consensus sequencing, the version needs to be committed in - the effects. - """ - - auxiliary_data_digest: "typing.Optional[Digest]" - """ - Auxiliary data that are not protocol-critical, generated as part of the - effects but are stored separately. Storing it separately allows us - to avoid bloating the effects with data that are not critical. - It also provides more flexibility on the format and type of the data. - """ - - def __init__(self, *, status: "ExecutionStatus", epoch: "int", gas_used: "GasCostSummary", transaction_digest: "Digest", gas_object_index: "typing.Optional[int]" = _DEFAULT, events_digest: "typing.Optional[Digest]" = _DEFAULT, dependencies: "typing.List[Digest]", lamport_version: "int", changed_objects: "typing.List[ChangedObject]", unchanged_shared_objects: "typing.List[UnchangedSharedObject]", auxiliary_data_digest: "typing.Optional[Digest]" = _DEFAULT): - self.status = status - self.epoch = epoch - self.gas_used = gas_used - self.transaction_digest = transaction_digest - if gas_object_index is _DEFAULT: - self.gas_object_index = None - else: - self.gas_object_index = gas_object_index - if events_digest is _DEFAULT: - self.events_digest = None - else: - self.events_digest = events_digest - self.dependencies = dependencies - self.lamport_version = lamport_version - self.changed_objects = changed_objects - self.unchanged_shared_objects = unchanged_shared_objects - if auxiliary_data_digest is _DEFAULT: - self.auxiliary_data_digest = None - else: - self.auxiliary_data_digest = auxiliary_data_digest - - def __str__(self): - return "TransactionEffectsV1(status={}, epoch={}, gas_used={}, transaction_digest={}, gas_object_index={}, events_digest={}, dependencies={}, lamport_version={}, changed_objects={}, unchanged_shared_objects={}, auxiliary_data_digest={})".format(self.status, self.epoch, self.gas_used, self.transaction_digest, self.gas_object_index, self.events_digest, self.dependencies, self.lamport_version, self.changed_objects, self.unchanged_shared_objects, self.auxiliary_data_digest) - - def __eq__(self, other): - if self.status != other.status: - return False - if self.epoch != other.epoch: - return False - if self.gas_used != other.gas_used: - return False - if self.transaction_digest != other.transaction_digest: - return False - if self.gas_object_index != other.gas_object_index: - return False - if self.events_digest != other.events_digest: - return False - if self.dependencies != other.dependencies: - return False - if self.lamport_version != other.lamport_version: - return False - if self.changed_objects != other.changed_objects: - return False - if self.unchanged_shared_objects != other.unchanged_shared_objects: - return False - if self.auxiliary_data_digest != other.auxiliary_data_digest: - return False - return True - -class _UniffiConverterTypeTransactionEffectsV1(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionEffectsV1( - status=_UniffiConverterTypeExecutionStatus.read(buf), - epoch=_UniffiConverterUInt64.read(buf), - gas_used=_UniffiConverterTypeGasCostSummary.read(buf), - transaction_digest=_UniffiConverterTypeDigest.read(buf), - gas_object_index=_UniffiConverterOptionalUInt32.read(buf), - events_digest=_UniffiConverterOptionalTypeDigest.read(buf), - dependencies=_UniffiConverterSequenceTypeDigest.read(buf), - lamport_version=_UniffiConverterUInt64.read(buf), - changed_objects=_UniffiConverterSequenceTypeChangedObject.read(buf), - unchanged_shared_objects=_UniffiConverterSequenceTypeUnchangedSharedObject.read(buf), - auxiliary_data_digest=_UniffiConverterOptionalTypeDigest.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeExecutionStatus.check_lower(value.status) - _UniffiConverterUInt64.check_lower(value.epoch) - _UniffiConverterTypeGasCostSummary.check_lower(value.gas_used) - _UniffiConverterTypeDigest.check_lower(value.transaction_digest) - _UniffiConverterOptionalUInt32.check_lower(value.gas_object_index) - _UniffiConverterOptionalTypeDigest.check_lower(value.events_digest) - _UniffiConverterSequenceTypeDigest.check_lower(value.dependencies) - _UniffiConverterUInt64.check_lower(value.lamport_version) - _UniffiConverterSequenceTypeChangedObject.check_lower(value.changed_objects) - _UniffiConverterSequenceTypeUnchangedSharedObject.check_lower(value.unchanged_shared_objects) - _UniffiConverterOptionalTypeDigest.check_lower(value.auxiliary_data_digest) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeExecutionStatus.write(value.status, buf) - _UniffiConverterUInt64.write(value.epoch, buf) - _UniffiConverterTypeGasCostSummary.write(value.gas_used, buf) - _UniffiConverterTypeDigest.write(value.transaction_digest, buf) - _UniffiConverterOptionalUInt32.write(value.gas_object_index, buf) - _UniffiConverterOptionalTypeDigest.write(value.events_digest, buf) - _UniffiConverterSequenceTypeDigest.write(value.dependencies, buf) - _UniffiConverterUInt64.write(value.lamport_version, buf) - _UniffiConverterSequenceTypeChangedObject.write(value.changed_objects, buf) - _UniffiConverterSequenceTypeUnchangedSharedObject.write(value.unchanged_shared_objects, buf) - _UniffiConverterOptionalTypeDigest.write(value.auxiliary_data_digest, buf) - - -class TransactionMetadata: - gas_budget: "typing.Optional[int]" - gas_objects: "typing.Optional[typing.List[ObjectRef]]" - gas_price: "typing.Optional[int]" - gas_sponsor: "typing.Optional[Address]" - sender: "typing.Optional[Address]" - def __init__(self, *, gas_budget: "typing.Optional[int]" = _DEFAULT, gas_objects: "typing.Optional[typing.List[ObjectRef]]" = _DEFAULT, gas_price: "typing.Optional[int]" = _DEFAULT, gas_sponsor: "typing.Optional[Address]" = _DEFAULT, sender: "typing.Optional[Address]" = _DEFAULT): - if gas_budget is _DEFAULT: - self.gas_budget = None - else: - self.gas_budget = gas_budget - if gas_objects is _DEFAULT: - self.gas_objects = None - else: - self.gas_objects = gas_objects - if gas_price is _DEFAULT: - self.gas_price = None - else: - self.gas_price = gas_price - if gas_sponsor is _DEFAULT: - self.gas_sponsor = None - else: - self.gas_sponsor = gas_sponsor - if sender is _DEFAULT: - self.sender = None - else: - self.sender = sender - - def __str__(self): - return "TransactionMetadata(gas_budget={}, gas_objects={}, gas_price={}, gas_sponsor={}, sender={})".format(self.gas_budget, self.gas_objects, self.gas_price, self.gas_sponsor, self.sender) - - def __eq__(self, other): - if self.gas_budget != other.gas_budget: - return False - if self.gas_objects != other.gas_objects: - return False - if self.gas_price != other.gas_price: - return False - if self.gas_sponsor != other.gas_sponsor: - return False - if self.sender != other.sender: - return False - return True - -class _UniffiConverterTypeTransactionMetadata(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionMetadata( - gas_budget=_UniffiConverterOptionalUInt64.read(buf), - gas_objects=_UniffiConverterOptionalSequenceTypeObjectRef.read(buf), - gas_price=_UniffiConverterOptionalUInt64.read(buf), - gas_sponsor=_UniffiConverterOptionalTypeAddress.read(buf), - sender=_UniffiConverterOptionalTypeAddress.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalUInt64.check_lower(value.gas_budget) - _UniffiConverterOptionalSequenceTypeObjectRef.check_lower(value.gas_objects) - _UniffiConverterOptionalUInt64.check_lower(value.gas_price) - _UniffiConverterOptionalTypeAddress.check_lower(value.gas_sponsor) - _UniffiConverterOptionalTypeAddress.check_lower(value.sender) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalUInt64.write(value.gas_budget, buf) - _UniffiConverterOptionalSequenceTypeObjectRef.write(value.gas_objects, buf) - _UniffiConverterOptionalUInt64.write(value.gas_price, buf) - _UniffiConverterOptionalTypeAddress.write(value.gas_sponsor, buf) - _UniffiConverterOptionalTypeAddress.write(value.sender, buf) - - -class TransactionsFilter: - function: "typing.Optional[str]" - kind: "typing.Optional[TransactionBlockKindInput]" - after_checkpoint: "typing.Optional[int]" - at_checkpoint: "typing.Optional[int]" - before_checkpoint: "typing.Optional[int]" - sign_address: "typing.Optional[Address]" - recv_address: "typing.Optional[Address]" - input_object: "typing.Optional[ObjectId]" - changed_object: "typing.Optional[ObjectId]" - transaction_ids: "typing.Optional[typing.List[str]]" - wrapped_or_deleted_object: "typing.Optional[ObjectId]" - def __init__(self, *, function: "typing.Optional[str]" = _DEFAULT, kind: "typing.Optional[TransactionBlockKindInput]" = _DEFAULT, after_checkpoint: "typing.Optional[int]" = _DEFAULT, at_checkpoint: "typing.Optional[int]" = _DEFAULT, before_checkpoint: "typing.Optional[int]" = _DEFAULT, sign_address: "typing.Optional[Address]" = _DEFAULT, recv_address: "typing.Optional[Address]" = _DEFAULT, input_object: "typing.Optional[ObjectId]" = _DEFAULT, changed_object: "typing.Optional[ObjectId]" = _DEFAULT, transaction_ids: "typing.Optional[typing.List[str]]" = _DEFAULT, wrapped_or_deleted_object: "typing.Optional[ObjectId]" = _DEFAULT): - if function is _DEFAULT: - self.function = None - else: - self.function = function - if kind is _DEFAULT: - self.kind = None - else: - self.kind = kind - if after_checkpoint is _DEFAULT: - self.after_checkpoint = None - else: - self.after_checkpoint = after_checkpoint - if at_checkpoint is _DEFAULT: - self.at_checkpoint = None - else: - self.at_checkpoint = at_checkpoint - if before_checkpoint is _DEFAULT: - self.before_checkpoint = None - else: - self.before_checkpoint = before_checkpoint - if sign_address is _DEFAULT: - self.sign_address = None - else: - self.sign_address = sign_address - if recv_address is _DEFAULT: - self.recv_address = None - else: - self.recv_address = recv_address - if input_object is _DEFAULT: - self.input_object = None - else: - self.input_object = input_object - if changed_object is _DEFAULT: - self.changed_object = None - else: - self.changed_object = changed_object - if transaction_ids is _DEFAULT: - self.transaction_ids = None - else: - self.transaction_ids = transaction_ids - if wrapped_or_deleted_object is _DEFAULT: - self.wrapped_or_deleted_object = None - else: - self.wrapped_or_deleted_object = wrapped_or_deleted_object - - def __str__(self): - return "TransactionsFilter(function={}, kind={}, after_checkpoint={}, at_checkpoint={}, before_checkpoint={}, sign_address={}, recv_address={}, input_object={}, changed_object={}, transaction_ids={}, wrapped_or_deleted_object={})".format(self.function, self.kind, self.after_checkpoint, self.at_checkpoint, self.before_checkpoint, self.sign_address, self.recv_address, self.input_object, self.changed_object, self.transaction_ids, self.wrapped_or_deleted_object) - - def __eq__(self, other): - if self.function != other.function: - return False - if self.kind != other.kind: - return False - if self.after_checkpoint != other.after_checkpoint: - return False - if self.at_checkpoint != other.at_checkpoint: - return False - if self.before_checkpoint != other.before_checkpoint: - return False - if self.sign_address != other.sign_address: - return False - if self.recv_address != other.recv_address: - return False - if self.input_object != other.input_object: - return False - if self.changed_object != other.changed_object: - return False - if self.transaction_ids != other.transaction_ids: - return False - if self.wrapped_or_deleted_object != other.wrapped_or_deleted_object: - return False - return True - -class _UniffiConverterTypeTransactionsFilter(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TransactionsFilter( - function=_UniffiConverterOptionalString.read(buf), - kind=_UniffiConverterOptionalTypeTransactionBlockKindInput.read(buf), - after_checkpoint=_UniffiConverterOptionalUInt64.read(buf), - at_checkpoint=_UniffiConverterOptionalUInt64.read(buf), - before_checkpoint=_UniffiConverterOptionalUInt64.read(buf), - sign_address=_UniffiConverterOptionalTypeAddress.read(buf), - recv_address=_UniffiConverterOptionalTypeAddress.read(buf), - input_object=_UniffiConverterOptionalTypeObjectId.read(buf), - changed_object=_UniffiConverterOptionalTypeObjectId.read(buf), - transaction_ids=_UniffiConverterOptionalSequenceString.read(buf), - wrapped_or_deleted_object=_UniffiConverterOptionalTypeObjectId.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalString.check_lower(value.function) - _UniffiConverterOptionalTypeTransactionBlockKindInput.check_lower(value.kind) - _UniffiConverterOptionalUInt64.check_lower(value.after_checkpoint) - _UniffiConverterOptionalUInt64.check_lower(value.at_checkpoint) - _UniffiConverterOptionalUInt64.check_lower(value.before_checkpoint) - _UniffiConverterOptionalTypeAddress.check_lower(value.sign_address) - _UniffiConverterOptionalTypeAddress.check_lower(value.recv_address) - _UniffiConverterOptionalTypeObjectId.check_lower(value.input_object) - _UniffiConverterOptionalTypeObjectId.check_lower(value.changed_object) - _UniffiConverterOptionalSequenceString.check_lower(value.transaction_ids) - _UniffiConverterOptionalTypeObjectId.check_lower(value.wrapped_or_deleted_object) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalString.write(value.function, buf) - _UniffiConverterOptionalTypeTransactionBlockKindInput.write(value.kind, buf) - _UniffiConverterOptionalUInt64.write(value.after_checkpoint, buf) - _UniffiConverterOptionalUInt64.write(value.at_checkpoint, buf) - _UniffiConverterOptionalUInt64.write(value.before_checkpoint, buf) - _UniffiConverterOptionalTypeAddress.write(value.sign_address, buf) - _UniffiConverterOptionalTypeAddress.write(value.recv_address, buf) - _UniffiConverterOptionalTypeObjectId.write(value.input_object, buf) - _UniffiConverterOptionalTypeObjectId.write(value.changed_object, buf) - _UniffiConverterOptionalSequenceString.write(value.transaction_ids, buf) - _UniffiConverterOptionalTypeObjectId.write(value.wrapped_or_deleted_object, buf) - - -class TypeOrigin: - """ - Identifies a struct and the module it was defined in - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - type-origin = identifier identifier object-id - ``` - """ - - module_name: "Identifier" - struct_name: "Identifier" - package: "ObjectId" - def __init__(self, *, module_name: "Identifier", struct_name: "Identifier", package: "ObjectId"): - self.module_name = module_name - self.struct_name = struct_name - self.package = package - - def __str__(self): - return "TypeOrigin(module_name={}, struct_name={}, package={})".format(self.module_name, self.struct_name, self.package) - - def __eq__(self, other): - if self.module_name != other.module_name: - return False - if self.struct_name != other.struct_name: - return False - if self.package != other.package: - return False - return True - -class _UniffiConverterTypeTypeOrigin(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return TypeOrigin( - module_name=_UniffiConverterTypeIdentifier.read(buf), - struct_name=_UniffiConverterTypeIdentifier.read(buf), - package=_UniffiConverterTypeObjectId.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeIdentifier.check_lower(value.module_name) - _UniffiConverterTypeIdentifier.check_lower(value.struct_name) - _UniffiConverterTypeObjectId.check_lower(value.package) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeIdentifier.write(value.module_name, buf) - _UniffiConverterTypeIdentifier.write(value.struct_name, buf) - _UniffiConverterTypeObjectId.write(value.package, buf) - - -class UnchangedSharedObject: - """ - A shared object that wasn't changed during execution - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - unchanged-shared-object = object-id unchanged-shared-object-kind - ``` - """ - - object_id: "ObjectId" - kind: "UnchangedSharedKind" - def __init__(self, *, object_id: "ObjectId", kind: "UnchangedSharedKind"): - self.object_id = object_id - self.kind = kind - - def __str__(self): - return "UnchangedSharedObject(object_id={}, kind={})".format(self.object_id, self.kind) - - def __eq__(self, other): - if self.object_id != other.object_id: - return False - if self.kind != other.kind: - return False - return True - -class _UniffiConverterTypeUnchangedSharedObject(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return UnchangedSharedObject( - object_id=_UniffiConverterTypeObjectId.read(buf), - kind=_UniffiConverterTypeUnchangedSharedKind.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.object_id) - _UniffiConverterTypeUnchangedSharedKind.check_lower(value.kind) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.object_id, buf) - _UniffiConverterTypeUnchangedSharedKind.write(value.kind, buf) - - -class UpgradeInfo: - """ - Upgraded package info for the linkage table - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - upgrade-info = object-id u64 - ``` - """ - - upgraded_id: "ObjectId" - """ - Id of the upgraded packages - """ - - upgraded_version: "int" - """ - Version of the upgraded package - """ - - def __init__(self, *, upgraded_id: "ObjectId", upgraded_version: "int"): - self.upgraded_id = upgraded_id - self.upgraded_version = upgraded_version - - def __str__(self): - return "UpgradeInfo(upgraded_id={}, upgraded_version={})".format(self.upgraded_id, self.upgraded_version) - - def __eq__(self, other): - if self.upgraded_id != other.upgraded_id: - return False - if self.upgraded_version != other.upgraded_version: - return False - return True - -class _UniffiConverterTypeUpgradeInfo(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return UpgradeInfo( - upgraded_id=_UniffiConverterTypeObjectId.read(buf), - upgraded_version=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeObjectId.check_lower(value.upgraded_id) - _UniffiConverterUInt64.check_lower(value.upgraded_version) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeObjectId.write(value.upgraded_id, buf) - _UniffiConverterUInt64.write(value.upgraded_version, buf) - - -class Validator: - """ - Represents a validator in the system. - """ - - apy: "typing.Optional[int]" - """ - The APY of this validator in basis points. - To get the APY in percentage, divide by 100. - """ - - address: "Address" - """ - The validator's address. - """ - - commission_rate: "typing.Optional[int]" - """ - The fee charged by the validator for staking services. - """ - - credentials: "typing.Optional[ValidatorCredentials]" - """ - Validator's credentials. - """ - - description: "typing.Optional[str]" - """ - Validator's description. - """ - - exchange_rates_size: "typing.Optional[int]" - """ - Number of exchange rates in the table. - """ - - gas_price: "typing.Optional[int]" - """ - The reference gas price for this epoch. - """ - - name: "typing.Optional[str]" - """ - Validator's name. - """ - - image_url: "typing.Optional[str]" - """ - Validator's url containing their custom image. - """ - - next_epoch_commission_rate: "typing.Optional[int]" - """ - The proposed next epoch fee for the validator's staking services. - """ - - next_epoch_credentials: "typing.Optional[ValidatorCredentials]" - """ - Validator's credentials for the next epoch. - """ - - next_epoch_gas_price: "typing.Optional[int]" - """ - The validator's gas price quote for the next epoch. - """ - - next_epoch_stake: "typing.Optional[int]" - """ - The total number of IOTA tokens in this pool plus - the pending stake amount for this epoch. - """ - - operation_cap: "typing.Optional[bytes]" - """ - The validator's current valid `Cap` object. Validators can delegate - the operation ability to another address. The address holding this `Cap` - object can then update the reference gas price and tallying rule on - behalf of the validator. - """ - - pending_pool_token_withdraw: "typing.Optional[int]" - """ - Pending pool token withdrawn during the current epoch, emptied at epoch - boundaries. Zero for past epochs. - """ - - pending_stake: "typing.Optional[int]" - """ - Pending stake amount for the current epoch, emptied at epoch boundaries. - Zero for past epochs. - """ - - pending_total_iota_withdraw: "typing.Optional[int]" - """ - Pending stake withdrawn during the current epoch, emptied at epoch - boundaries. Zero for past epochs. - """ - - pool_token_balance: "typing.Optional[int]" - """ - Total number of pool tokens issued by the pool. - """ - - project_url: "typing.Optional[str]" - """ - Validator's homepage URL. - """ - - rewards_pool: "typing.Optional[int]" - """ - The epoch stake rewards will be added here at the end of each epoch. - """ - - staking_pool_activation_epoch: "typing.Optional[int]" - """ - The epoch at which this pool became active. - """ - - staking_pool_id: "ObjectId" - """ - The ID of this validator's `0x3::staking_pool::StakingPool`. - """ - - staking_pool_iota_balance: "typing.Optional[int]" - """ - The total number of IOTA tokens in this pool. - """ - - voting_power: "typing.Optional[int]" - """ - The voting power of this validator in basis points (e.g., 100 = 1% - voting power). - """ - - def __init__(self, *, apy: "typing.Optional[int]" = _DEFAULT, address: "Address", commission_rate: "typing.Optional[int]" = _DEFAULT, credentials: "typing.Optional[ValidatorCredentials]" = _DEFAULT, description: "typing.Optional[str]" = _DEFAULT, exchange_rates_size: "typing.Optional[int]" = _DEFAULT, gas_price: "typing.Optional[int]" = _DEFAULT, name: "typing.Optional[str]" = _DEFAULT, image_url: "typing.Optional[str]" = _DEFAULT, next_epoch_commission_rate: "typing.Optional[int]" = _DEFAULT, next_epoch_credentials: "typing.Optional[ValidatorCredentials]" = _DEFAULT, next_epoch_gas_price: "typing.Optional[int]" = _DEFAULT, next_epoch_stake: "typing.Optional[int]" = _DEFAULT, operation_cap: "typing.Optional[bytes]" = _DEFAULT, pending_pool_token_withdraw: "typing.Optional[int]" = _DEFAULT, pending_stake: "typing.Optional[int]" = _DEFAULT, pending_total_iota_withdraw: "typing.Optional[int]" = _DEFAULT, pool_token_balance: "typing.Optional[int]" = _DEFAULT, project_url: "typing.Optional[str]" = _DEFAULT, rewards_pool: "typing.Optional[int]" = _DEFAULT, staking_pool_activation_epoch: "typing.Optional[int]" = _DEFAULT, staking_pool_id: "ObjectId", staking_pool_iota_balance: "typing.Optional[int]" = _DEFAULT, voting_power: "typing.Optional[int]" = _DEFAULT): - if apy is _DEFAULT: - self.apy = None - else: - self.apy = apy - self.address = address - if commission_rate is _DEFAULT: - self.commission_rate = None - else: - self.commission_rate = commission_rate - if credentials is _DEFAULT: - self.credentials = None - else: - self.credentials = credentials - if description is _DEFAULT: - self.description = None - else: - self.description = description - if exchange_rates_size is _DEFAULT: - self.exchange_rates_size = None - else: - self.exchange_rates_size = exchange_rates_size - if gas_price is _DEFAULT: - self.gas_price = None - else: - self.gas_price = gas_price - if name is _DEFAULT: - self.name = None - else: - self.name = name - if image_url is _DEFAULT: - self.image_url = None - else: - self.image_url = image_url - if next_epoch_commission_rate is _DEFAULT: - self.next_epoch_commission_rate = None - else: - self.next_epoch_commission_rate = next_epoch_commission_rate - if next_epoch_credentials is _DEFAULT: - self.next_epoch_credentials = None - else: - self.next_epoch_credentials = next_epoch_credentials - if next_epoch_gas_price is _DEFAULT: - self.next_epoch_gas_price = None - else: - self.next_epoch_gas_price = next_epoch_gas_price - if next_epoch_stake is _DEFAULT: - self.next_epoch_stake = None - else: - self.next_epoch_stake = next_epoch_stake - if operation_cap is _DEFAULT: - self.operation_cap = None - else: - self.operation_cap = operation_cap - if pending_pool_token_withdraw is _DEFAULT: - self.pending_pool_token_withdraw = None - else: - self.pending_pool_token_withdraw = pending_pool_token_withdraw - if pending_stake is _DEFAULT: - self.pending_stake = None - else: - self.pending_stake = pending_stake - if pending_total_iota_withdraw is _DEFAULT: - self.pending_total_iota_withdraw = None - else: - self.pending_total_iota_withdraw = pending_total_iota_withdraw - if pool_token_balance is _DEFAULT: - self.pool_token_balance = None - else: - self.pool_token_balance = pool_token_balance - if project_url is _DEFAULT: - self.project_url = None - else: - self.project_url = project_url - if rewards_pool is _DEFAULT: - self.rewards_pool = None - else: - self.rewards_pool = rewards_pool - if staking_pool_activation_epoch is _DEFAULT: - self.staking_pool_activation_epoch = None - else: - self.staking_pool_activation_epoch = staking_pool_activation_epoch - self.staking_pool_id = staking_pool_id - if staking_pool_iota_balance is _DEFAULT: - self.staking_pool_iota_balance = None - else: - self.staking_pool_iota_balance = staking_pool_iota_balance - if voting_power is _DEFAULT: - self.voting_power = None - else: - self.voting_power = voting_power - - def __str__(self): - return "Validator(apy={}, address={}, commission_rate={}, credentials={}, description={}, exchange_rates_size={}, gas_price={}, name={}, image_url={}, next_epoch_commission_rate={}, next_epoch_credentials={}, next_epoch_gas_price={}, next_epoch_stake={}, operation_cap={}, pending_pool_token_withdraw={}, pending_stake={}, pending_total_iota_withdraw={}, pool_token_balance={}, project_url={}, rewards_pool={}, staking_pool_activation_epoch={}, staking_pool_id={}, staking_pool_iota_balance={}, voting_power={})".format(self.apy, self.address, self.commission_rate, self.credentials, self.description, self.exchange_rates_size, self.gas_price, self.name, self.image_url, self.next_epoch_commission_rate, self.next_epoch_credentials, self.next_epoch_gas_price, self.next_epoch_stake, self.operation_cap, self.pending_pool_token_withdraw, self.pending_stake, self.pending_total_iota_withdraw, self.pool_token_balance, self.project_url, self.rewards_pool, self.staking_pool_activation_epoch, self.staking_pool_id, self.staking_pool_iota_balance, self.voting_power) - - def __eq__(self, other): - if self.apy != other.apy: - return False - if self.address != other.address: - return False - if self.commission_rate != other.commission_rate: - return False - if self.credentials != other.credentials: - return False - if self.description != other.description: - return False - if self.exchange_rates_size != other.exchange_rates_size: - return False - if self.gas_price != other.gas_price: - return False - if self.name != other.name: - return False - if self.image_url != other.image_url: - return False - if self.next_epoch_commission_rate != other.next_epoch_commission_rate: - return False - if self.next_epoch_credentials != other.next_epoch_credentials: - return False - if self.next_epoch_gas_price != other.next_epoch_gas_price: - return False - if self.next_epoch_stake != other.next_epoch_stake: - return False - if self.operation_cap != other.operation_cap: - return False - if self.pending_pool_token_withdraw != other.pending_pool_token_withdraw: - return False - if self.pending_stake != other.pending_stake: - return False - if self.pending_total_iota_withdraw != other.pending_total_iota_withdraw: - return False - if self.pool_token_balance != other.pool_token_balance: - return False - if self.project_url != other.project_url: - return False - if self.rewards_pool != other.rewards_pool: - return False - if self.staking_pool_activation_epoch != other.staking_pool_activation_epoch: - return False - if self.staking_pool_id != other.staking_pool_id: - return False - if self.staking_pool_iota_balance != other.staking_pool_iota_balance: - return False - if self.voting_power != other.voting_power: - return False - return True - -class _UniffiConverterTypeValidator(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Validator( - apy=_UniffiConverterOptionalInt32.read(buf), - address=_UniffiConverterTypeAddress.read(buf), - commission_rate=_UniffiConverterOptionalInt32.read(buf), - credentials=_UniffiConverterOptionalTypeValidatorCredentials.read(buf), - description=_UniffiConverterOptionalString.read(buf), - exchange_rates_size=_UniffiConverterOptionalUInt64.read(buf), - gas_price=_UniffiConverterOptionalUInt64.read(buf), - name=_UniffiConverterOptionalString.read(buf), - image_url=_UniffiConverterOptionalString.read(buf), - next_epoch_commission_rate=_UniffiConverterOptionalInt32.read(buf), - next_epoch_credentials=_UniffiConverterOptionalTypeValidatorCredentials.read(buf), - next_epoch_gas_price=_UniffiConverterOptionalUInt64.read(buf), - next_epoch_stake=_UniffiConverterOptionalUInt64.read(buf), - operation_cap=_UniffiConverterOptionalBytes.read(buf), - pending_pool_token_withdraw=_UniffiConverterOptionalUInt64.read(buf), - pending_stake=_UniffiConverterOptionalUInt64.read(buf), - pending_total_iota_withdraw=_UniffiConverterOptionalUInt64.read(buf), - pool_token_balance=_UniffiConverterOptionalUInt64.read(buf), - project_url=_UniffiConverterOptionalString.read(buf), - rewards_pool=_UniffiConverterOptionalUInt64.read(buf), - staking_pool_activation_epoch=_UniffiConverterOptionalUInt64.read(buf), - staking_pool_id=_UniffiConverterTypeObjectId.read(buf), - staking_pool_iota_balance=_UniffiConverterOptionalUInt64.read(buf), - voting_power=_UniffiConverterOptionalInt32.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalInt32.check_lower(value.apy) - _UniffiConverterTypeAddress.check_lower(value.address) - _UniffiConverterOptionalInt32.check_lower(value.commission_rate) - _UniffiConverterOptionalTypeValidatorCredentials.check_lower(value.credentials) - _UniffiConverterOptionalString.check_lower(value.description) - _UniffiConverterOptionalUInt64.check_lower(value.exchange_rates_size) - _UniffiConverterOptionalUInt64.check_lower(value.gas_price) - _UniffiConverterOptionalString.check_lower(value.name) - _UniffiConverterOptionalString.check_lower(value.image_url) - _UniffiConverterOptionalInt32.check_lower(value.next_epoch_commission_rate) - _UniffiConverterOptionalTypeValidatorCredentials.check_lower(value.next_epoch_credentials) - _UniffiConverterOptionalUInt64.check_lower(value.next_epoch_gas_price) - _UniffiConverterOptionalUInt64.check_lower(value.next_epoch_stake) - _UniffiConverterOptionalBytes.check_lower(value.operation_cap) - _UniffiConverterOptionalUInt64.check_lower(value.pending_pool_token_withdraw) - _UniffiConverterOptionalUInt64.check_lower(value.pending_stake) - _UniffiConverterOptionalUInt64.check_lower(value.pending_total_iota_withdraw) - _UniffiConverterOptionalUInt64.check_lower(value.pool_token_balance) - _UniffiConverterOptionalString.check_lower(value.project_url) - _UniffiConverterOptionalUInt64.check_lower(value.rewards_pool) - _UniffiConverterOptionalUInt64.check_lower(value.staking_pool_activation_epoch) - _UniffiConverterTypeObjectId.check_lower(value.staking_pool_id) - _UniffiConverterOptionalUInt64.check_lower(value.staking_pool_iota_balance) - _UniffiConverterOptionalInt32.check_lower(value.voting_power) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalInt32.write(value.apy, buf) - _UniffiConverterTypeAddress.write(value.address, buf) - _UniffiConverterOptionalInt32.write(value.commission_rate, buf) - _UniffiConverterOptionalTypeValidatorCredentials.write(value.credentials, buf) - _UniffiConverterOptionalString.write(value.description, buf) - _UniffiConverterOptionalUInt64.write(value.exchange_rates_size, buf) - _UniffiConverterOptionalUInt64.write(value.gas_price, buf) - _UniffiConverterOptionalString.write(value.name, buf) - _UniffiConverterOptionalString.write(value.image_url, buf) - _UniffiConverterOptionalInt32.write(value.next_epoch_commission_rate, buf) - _UniffiConverterOptionalTypeValidatorCredentials.write(value.next_epoch_credentials, buf) - _UniffiConverterOptionalUInt64.write(value.next_epoch_gas_price, buf) - _UniffiConverterOptionalUInt64.write(value.next_epoch_stake, buf) - _UniffiConverterOptionalBytes.write(value.operation_cap, buf) - _UniffiConverterOptionalUInt64.write(value.pending_pool_token_withdraw, buf) - _UniffiConverterOptionalUInt64.write(value.pending_stake, buf) - _UniffiConverterOptionalUInt64.write(value.pending_total_iota_withdraw, buf) - _UniffiConverterOptionalUInt64.write(value.pool_token_balance, buf) - _UniffiConverterOptionalString.write(value.project_url, buf) - _UniffiConverterOptionalUInt64.write(value.rewards_pool, buf) - _UniffiConverterOptionalUInt64.write(value.staking_pool_activation_epoch, buf) - _UniffiConverterTypeObjectId.write(value.staking_pool_id, buf) - _UniffiConverterOptionalUInt64.write(value.staking_pool_iota_balance, buf) - _UniffiConverterOptionalInt32.write(value.voting_power, buf) - - -class ValidatorCommittee: - """ - The Validator Set for a particular epoch. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-committee = u64 ; epoch - (vector validator-committee-member) - ``` - """ - - epoch: "int" - members: "typing.List[ValidatorCommitteeMember]" - def __init__(self, *, epoch: "int", members: "typing.List[ValidatorCommitteeMember]"): - self.epoch = epoch - self.members = members - - def __str__(self): - return "ValidatorCommittee(epoch={}, members={})".format(self.epoch, self.members) - - def __eq__(self, other): - if self.epoch != other.epoch: - return False - if self.members != other.members: - return False - return True - -class _UniffiConverterTypeValidatorCommittee(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorCommittee( - epoch=_UniffiConverterUInt64.read(buf), - members=_UniffiConverterSequenceTypeValidatorCommitteeMember.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterUInt64.check_lower(value.epoch) - _UniffiConverterSequenceTypeValidatorCommitteeMember.check_lower(value.members) - - @staticmethod - def write(value, buf): - _UniffiConverterUInt64.write(value.epoch, buf) - _UniffiConverterSequenceTypeValidatorCommitteeMember.write(value.members, buf) - - -class ValidatorCommitteeMember: - """ - A member of a Validator Committee - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-committee-member = bls-public-key - u64 ; stake - ``` - """ - - public_key: "Bls12381PublicKey" - stake: "int" - def __init__(self, *, public_key: "Bls12381PublicKey", stake: "int"): - self.public_key = public_key - self.stake = stake - - def __str__(self): - return "ValidatorCommitteeMember(public_key={}, stake={})".format(self.public_key, self.stake) - - def __eq__(self, other): - if self.public_key != other.public_key: - return False - if self.stake != other.stake: - return False - return True - -class _UniffiConverterTypeValidatorCommitteeMember(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorCommitteeMember( - public_key=_UniffiConverterTypeBls12381PublicKey.read(buf), - stake=_UniffiConverterUInt64.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeBls12381PublicKey.check_lower(value.public_key) - _UniffiConverterUInt64.check_lower(value.stake) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeBls12381PublicKey.write(value.public_key, buf) - _UniffiConverterUInt64.write(value.stake, buf) - - -class ValidatorConnection: - page_info: "PageInfo" - nodes: "typing.List[Validator]" - def __init__(self, *, page_info: "PageInfo", nodes: "typing.List[Validator]"): - self.page_info = page_info - self.nodes = nodes - - def __str__(self): - return "ValidatorConnection(page_info={}, nodes={})".format(self.page_info, self.nodes) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.nodes != other.nodes: - return False - return True - -class _UniffiConverterTypeValidatorConnection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorConnection( - page_info=_UniffiConverterTypePageInfo.read(buf), - nodes=_UniffiConverterSequenceTypeValidator.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeValidator.check_lower(value.nodes) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeValidator.write(value.nodes, buf) - - -class ValidatorCredentials: - """ - The credentials related fields associated with a validator. - """ - - authority_pub_key: "typing.Optional[Base64]" - network_pub_key: "typing.Optional[Base64]" - protocol_pub_key: "typing.Optional[Base64]" - proof_of_possession: "typing.Optional[Base64]" - net_address: "typing.Optional[str]" - p2p_address: "typing.Optional[str]" - primary_address: "typing.Optional[str]" - def __init__(self, *, authority_pub_key: "typing.Optional[Base64]" = _DEFAULT, network_pub_key: "typing.Optional[Base64]" = _DEFAULT, protocol_pub_key: "typing.Optional[Base64]" = _DEFAULT, proof_of_possession: "typing.Optional[Base64]" = _DEFAULT, net_address: "typing.Optional[str]" = _DEFAULT, p2p_address: "typing.Optional[str]" = _DEFAULT, primary_address: "typing.Optional[str]" = _DEFAULT): - if authority_pub_key is _DEFAULT: - self.authority_pub_key = None - else: - self.authority_pub_key = authority_pub_key - if network_pub_key is _DEFAULT: - self.network_pub_key = None - else: - self.network_pub_key = network_pub_key - if protocol_pub_key is _DEFAULT: - self.protocol_pub_key = None - else: - self.protocol_pub_key = protocol_pub_key - if proof_of_possession is _DEFAULT: - self.proof_of_possession = None - else: - self.proof_of_possession = proof_of_possession - if net_address is _DEFAULT: - self.net_address = None - else: - self.net_address = net_address - if p2p_address is _DEFAULT: - self.p2p_address = None - else: - self.p2p_address = p2p_address - if primary_address is _DEFAULT: - self.primary_address = None - else: - self.primary_address = primary_address - - def __str__(self): - return "ValidatorCredentials(authority_pub_key={}, network_pub_key={}, protocol_pub_key={}, proof_of_possession={}, net_address={}, p2p_address={}, primary_address={})".format(self.authority_pub_key, self.network_pub_key, self.protocol_pub_key, self.proof_of_possession, self.net_address, self.p2p_address, self.primary_address) - - def __eq__(self, other): - if self.authority_pub_key != other.authority_pub_key: - return False - if self.network_pub_key != other.network_pub_key: - return False - if self.protocol_pub_key != other.protocol_pub_key: - return False - if self.proof_of_possession != other.proof_of_possession: - return False - if self.net_address != other.net_address: - return False - if self.p2p_address != other.p2p_address: - return False - if self.primary_address != other.primary_address: - return False - return True - -class _UniffiConverterTypeValidatorCredentials(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorCredentials( - authority_pub_key=_UniffiConverterOptionalTypeBase64.read(buf), - network_pub_key=_UniffiConverterOptionalTypeBase64.read(buf), - protocol_pub_key=_UniffiConverterOptionalTypeBase64.read(buf), - proof_of_possession=_UniffiConverterOptionalTypeBase64.read(buf), - net_address=_UniffiConverterOptionalString.read(buf), - p2p_address=_UniffiConverterOptionalString.read(buf), - primary_address=_UniffiConverterOptionalString.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalTypeBase64.check_lower(value.authority_pub_key) - _UniffiConverterOptionalTypeBase64.check_lower(value.network_pub_key) - _UniffiConverterOptionalTypeBase64.check_lower(value.protocol_pub_key) - _UniffiConverterOptionalTypeBase64.check_lower(value.proof_of_possession) - _UniffiConverterOptionalString.check_lower(value.net_address) - _UniffiConverterOptionalString.check_lower(value.p2p_address) - _UniffiConverterOptionalString.check_lower(value.primary_address) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalTypeBase64.write(value.authority_pub_key, buf) - _UniffiConverterOptionalTypeBase64.write(value.network_pub_key, buf) - _UniffiConverterOptionalTypeBase64.write(value.protocol_pub_key, buf) - _UniffiConverterOptionalTypeBase64.write(value.proof_of_possession, buf) - _UniffiConverterOptionalString.write(value.net_address, buf) - _UniffiConverterOptionalString.write(value.p2p_address, buf) - _UniffiConverterOptionalString.write(value.primary_address, buf) - - -class ValidatorPage: - """ - A page of items returned by the GraphQL server. - """ - - page_info: "PageInfo" - """ - Information about the page, such as the cursor and whether there are - more pages. - """ - - data: "typing.List[Validator]" - """ - The data returned by the server. - """ - - def __init__(self, *, page_info: "PageInfo", data: "typing.List[Validator]"): - self.page_info = page_info - self.data = data - - def __str__(self): - return "ValidatorPage(page_info={}, data={})".format(self.page_info, self.data) - - def __eq__(self, other): - if self.page_info != other.page_info: - return False - if self.data != other.data: - return False - return True - -class _UniffiConverterTypeValidatorPage(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorPage( - page_info=_UniffiConverterTypePageInfo.read(buf), - data=_UniffiConverterSequenceTypeValidator.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypePageInfo.check_lower(value.page_info) - _UniffiConverterSequenceTypeValidator.check_lower(value.data) - - @staticmethod - def write(value, buf): - _UniffiConverterTypePageInfo.write(value.page_info, buf) - _UniffiConverterSequenceTypeValidator.write(value.data, buf) - - -class ValidatorSet: - inactive_pools_id: "typing.Optional[ObjectId]" - """ - Object ID of the `Table` storing the inactive staking pools. - """ - - inactive_pools_size: "typing.Optional[int]" - """ - Size of the inactive pools `Table`. - """ - - pending_active_validators_id: "typing.Optional[ObjectId]" - """ - Object ID of the wrapped object `TableVec` storing the pending active - validators. - """ - - pending_active_validators_size: "typing.Optional[int]" - """ - Size of the pending active validators table. - """ - - pending_removals: "typing.Optional[typing.List[int]]" - """ - Validators that are pending removal from the active validator set, - expressed as indices in to `activeValidators`. - """ - - staking_pool_mappings_id: "typing.Optional[ObjectId]" - """ - Object ID of the `Table` storing the mapping from staking pool ids to - the addresses of the corresponding validators. This is needed - because a validator's address can potentially change but the object - ID of its pool will not. - """ - - staking_pool_mappings_size: "typing.Optional[int]" - """ - Size of the stake pool mappings `Table`. - """ - - total_stake: "typing.Optional[str]" - """ - Total amount of stake for all active validators at the beginning of the - epoch. - """ - - validator_candidates_size: "typing.Optional[int]" - """ - Size of the validator candidates `Table`. - """ - - validator_candidates_id: "typing.Optional[ObjectId]" - """ - Object ID of the `Table` storing the validator candidates. - """ - - def __init__(self, *, inactive_pools_id: "typing.Optional[ObjectId]" = _DEFAULT, inactive_pools_size: "typing.Optional[int]" = _DEFAULT, pending_active_validators_id: "typing.Optional[ObjectId]" = _DEFAULT, pending_active_validators_size: "typing.Optional[int]" = _DEFAULT, pending_removals: "typing.Optional[typing.List[int]]" = _DEFAULT, staking_pool_mappings_id: "typing.Optional[ObjectId]" = _DEFAULT, staking_pool_mappings_size: "typing.Optional[int]" = _DEFAULT, total_stake: "typing.Optional[str]" = _DEFAULT, validator_candidates_size: "typing.Optional[int]" = _DEFAULT, validator_candidates_id: "typing.Optional[ObjectId]" = _DEFAULT): - if inactive_pools_id is _DEFAULT: - self.inactive_pools_id = None - else: - self.inactive_pools_id = inactive_pools_id - if inactive_pools_size is _DEFAULT: - self.inactive_pools_size = None - else: - self.inactive_pools_size = inactive_pools_size - if pending_active_validators_id is _DEFAULT: - self.pending_active_validators_id = None - else: - self.pending_active_validators_id = pending_active_validators_id - if pending_active_validators_size is _DEFAULT: - self.pending_active_validators_size = None - else: - self.pending_active_validators_size = pending_active_validators_size - if pending_removals is _DEFAULT: - self.pending_removals = None - else: - self.pending_removals = pending_removals - if staking_pool_mappings_id is _DEFAULT: - self.staking_pool_mappings_id = None - else: - self.staking_pool_mappings_id = staking_pool_mappings_id - if staking_pool_mappings_size is _DEFAULT: - self.staking_pool_mappings_size = None - else: - self.staking_pool_mappings_size = staking_pool_mappings_size - if total_stake is _DEFAULT: - self.total_stake = None - else: - self.total_stake = total_stake - if validator_candidates_size is _DEFAULT: - self.validator_candidates_size = None - else: - self.validator_candidates_size = validator_candidates_size - if validator_candidates_id is _DEFAULT: - self.validator_candidates_id = None - else: - self.validator_candidates_id = validator_candidates_id - - def __str__(self): - return "ValidatorSet(inactive_pools_id={}, inactive_pools_size={}, pending_active_validators_id={}, pending_active_validators_size={}, pending_removals={}, staking_pool_mappings_id={}, staking_pool_mappings_size={}, total_stake={}, validator_candidates_size={}, validator_candidates_id={})".format(self.inactive_pools_id, self.inactive_pools_size, self.pending_active_validators_id, self.pending_active_validators_size, self.pending_removals, self.staking_pool_mappings_id, self.staking_pool_mappings_size, self.total_stake, self.validator_candidates_size, self.validator_candidates_id) - - def __eq__(self, other): - if self.inactive_pools_id != other.inactive_pools_id: - return False - if self.inactive_pools_size != other.inactive_pools_size: - return False - if self.pending_active_validators_id != other.pending_active_validators_id: - return False - if self.pending_active_validators_size != other.pending_active_validators_size: - return False - if self.pending_removals != other.pending_removals: - return False - if self.staking_pool_mappings_id != other.staking_pool_mappings_id: - return False - if self.staking_pool_mappings_size != other.staking_pool_mappings_size: - return False - if self.total_stake != other.total_stake: - return False - if self.validator_candidates_size != other.validator_candidates_size: - return False - if self.validator_candidates_id != other.validator_candidates_id: - return False - return True - -class _UniffiConverterTypeValidatorSet(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ValidatorSet( - inactive_pools_id=_UniffiConverterOptionalTypeObjectId.read(buf), - inactive_pools_size=_UniffiConverterOptionalInt32.read(buf), - pending_active_validators_id=_UniffiConverterOptionalTypeObjectId.read(buf), - pending_active_validators_size=_UniffiConverterOptionalInt32.read(buf), - pending_removals=_UniffiConverterOptionalSequenceInt32.read(buf), - staking_pool_mappings_id=_UniffiConverterOptionalTypeObjectId.read(buf), - staking_pool_mappings_size=_UniffiConverterOptionalInt32.read(buf), - total_stake=_UniffiConverterOptionalString.read(buf), - validator_candidates_size=_UniffiConverterOptionalInt32.read(buf), - validator_candidates_id=_UniffiConverterOptionalTypeObjectId.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterOptionalTypeObjectId.check_lower(value.inactive_pools_id) - _UniffiConverterOptionalInt32.check_lower(value.inactive_pools_size) - _UniffiConverterOptionalTypeObjectId.check_lower(value.pending_active_validators_id) - _UniffiConverterOptionalInt32.check_lower(value.pending_active_validators_size) - _UniffiConverterOptionalSequenceInt32.check_lower(value.pending_removals) - _UniffiConverterOptionalTypeObjectId.check_lower(value.staking_pool_mappings_id) - _UniffiConverterOptionalInt32.check_lower(value.staking_pool_mappings_size) - _UniffiConverterOptionalString.check_lower(value.total_stake) - _UniffiConverterOptionalInt32.check_lower(value.validator_candidates_size) - _UniffiConverterOptionalTypeObjectId.check_lower(value.validator_candidates_id) - - @staticmethod - def write(value, buf): - _UniffiConverterOptionalTypeObjectId.write(value.inactive_pools_id, buf) - _UniffiConverterOptionalInt32.write(value.inactive_pools_size, buf) - _UniffiConverterOptionalTypeObjectId.write(value.pending_active_validators_id, buf) - _UniffiConverterOptionalInt32.write(value.pending_active_validators_size, buf) - _UniffiConverterOptionalSequenceInt32.write(value.pending_removals, buf) - _UniffiConverterOptionalTypeObjectId.write(value.staking_pool_mappings_id, buf) - _UniffiConverterOptionalInt32.write(value.staking_pool_mappings_size, buf) - _UniffiConverterOptionalString.write(value.total_stake, buf) - _UniffiConverterOptionalInt32.write(value.validator_candidates_size, buf) - _UniffiConverterOptionalTypeObjectId.write(value.validator_candidates_id, buf) - - -class ZkLoginClaim: - """ - A claim of the iss in a zklogin proof - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - zklogin-claim = string u8 - ``` - """ - - value: "str" - index_mod_4: "int" - def __init__(self, *, value: "str", index_mod_4: "int"): - self.value = value - self.index_mod_4 = index_mod_4 - - def __str__(self): - return "ZkLoginClaim(value={}, index_mod_4={})".format(self.value, self.index_mod_4) - - def __eq__(self, other): - if self.value != other.value: - return False - if self.index_mod_4 != other.index_mod_4: - return False - return True - -class _UniffiConverterTypeZkLoginClaim(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return ZkLoginClaim( - value=_UniffiConverterString.read(buf), - index_mod_4=_UniffiConverterUInt8.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterString.check_lower(value.value) - _UniffiConverterUInt8.check_lower(value.index_mod_4) - - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value.value, buf) - _UniffiConverterUInt8.write(value.index_mod_4, buf) - - - - - -class BatchSendStatusType(enum.Enum): - IN_PROGRESS = 0 - - SUCCEEDED = 1 - - DISCARDED = 2 - - - -class _UniffiConverterTypeBatchSendStatusType(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return BatchSendStatusType.IN_PROGRESS - if variant == 2: - return BatchSendStatusType.SUCCEEDED - if variant == 3: - return BatchSendStatusType.DISCARDED - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == BatchSendStatusType.IN_PROGRESS: - return - if value == BatchSendStatusType.SUCCEEDED: - return - if value == BatchSendStatusType.DISCARDED: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == BatchSendStatusType.IN_PROGRESS: - buf.write_i32(1) - if value == BatchSendStatusType.SUCCEEDED: - buf.write_i32(2) - if value == BatchSendStatusType.DISCARDED: - buf.write_i32(3) - - - - - - - -class CommandArgumentError: - """ - An error with an argument to a command - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - command-argument-error = type-mismatch - =/ invalid-bcs-bytes - =/ invalid-usage-of-pure-argument - =/ invalid-argument-to-private-entry-function - =/ index-out-of-bounds - =/ secondary-index-out-of-bound - =/ invalid-result-arity - =/ invalid-gas-coin-usage - =/ invalid-value-usage - =/ invalid-object-by-value - =/ invalid-object-by-mut-ref - =/ shared-object-operation-not-allowed - - type-mismatch = %x00 - invalid-bcs-bytes = %x01 - invalid-usage-of-pure-argument = %x02 - invalid-argument-to-private-entry-function = %x03 - index-out-of-bounds = %x04 u16 - secondary-index-out-of-bound = %x05 u16 u16 - invalid-result-arity = %x06 u16 - invalid-gas-coin-usage = %x07 - invalid-value-usage = %x08 - invalid-object-by-value = %x09 - invalid-object-by-mut-ref = %x0a - shared-object-operation-not-allowed = %x0b - ``` - """ - - def __init__(self): - raise RuntimeError("CommandArgumentError cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class TYPE_MISMATCH: - """ - The type of the value does not match the expected type - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.TYPE_MISMATCH()".format() - - def __eq__(self, other): - if not other.is_TYPE_MISMATCH(): - return False - return True - - class INVALID_BCS_BYTES: - """ - The argument cannot be deserialized into a value of the specified type - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_BCS_BYTES()".format() - - def __eq__(self, other): - if not other.is_INVALID_BCS_BYTES(): - return False - return True - - class INVALID_USAGE_OF_PURE_ARGUMENT: - """ - The argument cannot be instantiated from raw bytes - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT()".format() - - def __eq__(self, other): - if not other.is_INVALID_USAGE_OF_PURE_ARGUMENT(): - return False - return True - - class INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION: - """ - Invalid argument to private entry function. - Private entry functions cannot take arguments from other Move functions. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION()".format() - - def __eq__(self, other): - if not other.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): - return False - return True - - class INDEX_OUT_OF_BOUNDS: - """ - Out of bounds access to input or results - """ - - index: "int" - - def __init__(self,index: "int"): - self.index = index - - def __str__(self): - return "CommandArgumentError.INDEX_OUT_OF_BOUNDS(index={})".format(self.index) - - def __eq__(self, other): - if not other.is_INDEX_OUT_OF_BOUNDS(): - return False - if self.index != other.index: - return False - return True - - class SECONDARY_INDEX_OUT_OF_BOUNDS: - """ - Out of bounds access to subresult - """ - - result: "int" - subresult: "int" - - def __init__(self,result: "int", subresult: "int"): - self.result = result - self.subresult = subresult - - def __str__(self): - return "CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS(result={}, subresult={})".format(self.result, self.subresult) - - def __eq__(self, other): - if not other.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): - return False - if self.result != other.result: - return False - if self.subresult != other.subresult: - return False - return True - - class INVALID_RESULT_ARITY: - """ - Invalid usage of result. - Expected a single result but found either no return value or multiple. - """ - - result: "int" - - def __init__(self,result: "int"): - self.result = result - - def __str__(self): - return "CommandArgumentError.INVALID_RESULT_ARITY(result={})".format(self.result) - - def __eq__(self, other): - if not other.is_INVALID_RESULT_ARITY(): - return False - if self.result != other.result: - return False - return True - - class INVALID_GAS_COIN_USAGE: - """ - Invalid usage of Gas coin. - The Gas coin can only be used by-value with a TransferObjects command. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_GAS_COIN_USAGE()".format() - - def __eq__(self, other): - if not other.is_INVALID_GAS_COIN_USAGE(): - return False - return True - - class INVALID_VALUE_USAGE: - """ - Invalid usage of move value. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_VALUE_USAGE()".format() - - def __eq__(self, other): - if not other.is_INVALID_VALUE_USAGE(): - return False - return True - - class INVALID_OBJECT_BY_VALUE: - """ - Immutable objects cannot be passed by-value. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_OBJECT_BY_VALUE()".format() - - def __eq__(self, other): - if not other.is_INVALID_OBJECT_BY_VALUE(): - return False - return True - - class INVALID_OBJECT_BY_MUT_REF: - """ - Immutable objects cannot be passed by mutable reference, &mut. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.INVALID_OBJECT_BY_MUT_REF()".format() - - def __eq__(self, other): - if not other.is_INVALID_OBJECT_BY_MUT_REF(): - return False - return True - - class SHARED_OBJECT_OPERATION_NOT_ALLOWED: - """ - Shared object operations such a wrapping, freezing, or converting to - owned are not allowed. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED()".format() - - def __eq__(self, other): - if not other.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_TYPE_MISMATCH(self) -> bool: - return isinstance(self, CommandArgumentError.TYPE_MISMATCH) - def is_type_mismatch(self) -> bool: - return isinstance(self, CommandArgumentError.TYPE_MISMATCH) - def is_INVALID_BCS_BYTES(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_BCS_BYTES) - def is_invalid_bcs_bytes(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_BCS_BYTES) - def is_INVALID_USAGE_OF_PURE_ARGUMENT(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT) - def is_invalid_usage_of_pure_argument(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT) - def is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION) - def is_invalid_argument_to_private_entry_function(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION) - def is_INDEX_OUT_OF_BOUNDS(self) -> bool: - return isinstance(self, CommandArgumentError.INDEX_OUT_OF_BOUNDS) - def is_index_out_of_bounds(self) -> bool: - return isinstance(self, CommandArgumentError.INDEX_OUT_OF_BOUNDS) - def is_SECONDARY_INDEX_OUT_OF_BOUNDS(self) -> bool: - return isinstance(self, CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS) - def is_secondary_index_out_of_bounds(self) -> bool: - return isinstance(self, CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS) - def is_INVALID_RESULT_ARITY(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_RESULT_ARITY) - def is_invalid_result_arity(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_RESULT_ARITY) - def is_INVALID_GAS_COIN_USAGE(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_GAS_COIN_USAGE) - def is_invalid_gas_coin_usage(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_GAS_COIN_USAGE) - def is_INVALID_VALUE_USAGE(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_VALUE_USAGE) - def is_invalid_value_usage(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_VALUE_USAGE) - def is_INVALID_OBJECT_BY_VALUE(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_VALUE) - def is_invalid_object_by_value(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_VALUE) - def is_INVALID_OBJECT_BY_MUT_REF(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_MUT_REF) - def is_invalid_object_by_mut_ref(self) -> bool: - return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_MUT_REF) - def is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(self) -> bool: - return isinstance(self, CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) - def is_shared_object_operation_not_allowed(self) -> bool: - return isinstance(self, CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -CommandArgumentError.TYPE_MISMATCH = type("CommandArgumentError.TYPE_MISMATCH", (CommandArgumentError.TYPE_MISMATCH, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_BCS_BYTES = type("CommandArgumentError.INVALID_BCS_BYTES", (CommandArgumentError.INVALID_BCS_BYTES, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT = type("CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT", (CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION = type("CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION", (CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INDEX_OUT_OF_BOUNDS = type("CommandArgumentError.INDEX_OUT_OF_BOUNDS", (CommandArgumentError.INDEX_OUT_OF_BOUNDS, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS = type("CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS", (CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_RESULT_ARITY = type("CommandArgumentError.INVALID_RESULT_ARITY", (CommandArgumentError.INVALID_RESULT_ARITY, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_GAS_COIN_USAGE = type("CommandArgumentError.INVALID_GAS_COIN_USAGE", (CommandArgumentError.INVALID_GAS_COIN_USAGE, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_VALUE_USAGE = type("CommandArgumentError.INVALID_VALUE_USAGE", (CommandArgumentError.INVALID_VALUE_USAGE, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_OBJECT_BY_VALUE = type("CommandArgumentError.INVALID_OBJECT_BY_VALUE", (CommandArgumentError.INVALID_OBJECT_BY_VALUE, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.INVALID_OBJECT_BY_MUT_REF = type("CommandArgumentError.INVALID_OBJECT_BY_MUT_REF", (CommandArgumentError.INVALID_OBJECT_BY_MUT_REF, CommandArgumentError,), {}) # type: ignore -CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED = type("CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED", (CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED, CommandArgumentError,), {}) # type: ignore - - - - -class _UniffiConverterTypeCommandArgumentError(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return CommandArgumentError.TYPE_MISMATCH( - ) - if variant == 2: - return CommandArgumentError.INVALID_BCS_BYTES( - ) - if variant == 3: - return CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT( - ) - if variant == 4: - return CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION( - ) - if variant == 5: - return CommandArgumentError.INDEX_OUT_OF_BOUNDS( - _UniffiConverterUInt16.read(buf), - ) - if variant == 6: - return CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS( - _UniffiConverterUInt16.read(buf), - _UniffiConverterUInt16.read(buf), - ) - if variant == 7: - return CommandArgumentError.INVALID_RESULT_ARITY( - _UniffiConverterUInt16.read(buf), - ) - if variant == 8: - return CommandArgumentError.INVALID_GAS_COIN_USAGE( - ) - if variant == 9: - return CommandArgumentError.INVALID_VALUE_USAGE( - ) - if variant == 10: - return CommandArgumentError.INVALID_OBJECT_BY_VALUE( - ) - if variant == 11: - return CommandArgumentError.INVALID_OBJECT_BY_MUT_REF( - ) - if variant == 12: - return CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED( - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_TYPE_MISMATCH(): - return - if value.is_INVALID_BCS_BYTES(): - return - if value.is_INVALID_USAGE_OF_PURE_ARGUMENT(): - return - if value.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): - return - if value.is_INDEX_OUT_OF_BOUNDS(): - _UniffiConverterUInt16.check_lower(value.index) - return - if value.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): - _UniffiConverterUInt16.check_lower(value.result) - _UniffiConverterUInt16.check_lower(value.subresult) - return - if value.is_INVALID_RESULT_ARITY(): - _UniffiConverterUInt16.check_lower(value.result) - return - if value.is_INVALID_GAS_COIN_USAGE(): - return - if value.is_INVALID_VALUE_USAGE(): - return - if value.is_INVALID_OBJECT_BY_VALUE(): - return - if value.is_INVALID_OBJECT_BY_MUT_REF(): - return - if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_TYPE_MISMATCH(): - buf.write_i32(1) - if value.is_INVALID_BCS_BYTES(): - buf.write_i32(2) - if value.is_INVALID_USAGE_OF_PURE_ARGUMENT(): - buf.write_i32(3) - if value.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): - buf.write_i32(4) - if value.is_INDEX_OUT_OF_BOUNDS(): - buf.write_i32(5) - _UniffiConverterUInt16.write(value.index, buf) - if value.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): - buf.write_i32(6) - _UniffiConverterUInt16.write(value.result, buf) - _UniffiConverterUInt16.write(value.subresult, buf) - if value.is_INVALID_RESULT_ARITY(): - buf.write_i32(7) - _UniffiConverterUInt16.write(value.result, buf) - if value.is_INVALID_GAS_COIN_USAGE(): - buf.write_i32(8) - if value.is_INVALID_VALUE_USAGE(): - buf.write_i32(9) - if value.is_INVALID_OBJECT_BY_VALUE(): - buf.write_i32(10) - if value.is_INVALID_OBJECT_BY_MUT_REF(): - buf.write_i32(11) - if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - buf.write_i32(12) - - - - - - - -class Direction(enum.Enum): - """ - Pagination direction. - """ - - FORWARD = 0 - - BACKWARD = 1 - - - -class _UniffiConverterTypeDirection(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return Direction.FORWARD - if variant == 2: - return Direction.BACKWARD - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == Direction.FORWARD: - return - if value == Direction.BACKWARD: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == Direction.FORWARD: - buf.write_i32(1) - if value == Direction.BACKWARD: - buf.write_i32(2) - - - - - - - -class ExecutionError: - """ - An error that can occur during the execution of a transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - - execution-error = insufficient-gas - =/ invalid-gas-object - =/ invariant-violation - =/ feature-not-yet-supported - =/ object-too-big - =/ package-too-big - =/ circular-object-ownership - =/ insufficient-coin-balance - =/ coin-balance-overflow - =/ publish-error-non-zero-address - =/ iota-move-verification-error - =/ move-primitive-runtime-error - =/ move-abort - =/ vm-verification-or-deserialization-error - =/ vm-invariant-violation - =/ function-not-found - =/ arity-mismatch - =/ type-arity-mismatch - =/ non-entry-function-invoked - =/ command-argument-error - =/ type-argument-error - =/ unused-value-without-drop - =/ invalid-public-function-return-type - =/ invalid-transfer-object - =/ effects-too-large - =/ publish-upgrade-missing-dependency - =/ publish-upgrade-dependency-downgrade - =/ package-upgrade-error - =/ written-objects-too-large - =/ certificate-denied - =/ iota-move-verification-timeout - =/ shared-object-operation-not-allowed - =/ input-object-deleted - =/ execution-cancelled-due-to-shared-object-congestion - =/ address-denied-for-coin - =/ coin-type-global-pause - =/ execution-cancelled-due-to-randomness-unavailable - - insufficient-gas = %x00 - invalid-gas-object = %x01 - invariant-violation = %x02 - feature-not-yet-supported = %x03 - object-too-big = %x04 u64 u64 - package-too-big = %x05 u64 u64 - circular-object-ownership = %x06 object-id - insufficient-coin-balance = %x07 - coin-balance-overflow = %x08 - publish-error-non-zero-address = %x09 - iota-move-verification-error = %x0a - move-primitive-runtime-error = %x0b (option move-location) - move-abort = %x0c move-location u64 - vm-verification-or-deserialization-error = %x0d - vm-invariant-violation = %x0e - function-not-found = %x0f - arity-mismatch = %x10 - type-arity-mismatch = %x11 - non-entry-function-invoked = %x12 - command-argument-error = %x13 u16 command-argument-error - type-argument-error = %x14 u16 type-argument-error - unused-value-without-drop = %x15 u16 u16 - invalid-public-function-return-type = %x16 u16 - invalid-transfer-object = %x17 - effects-too-large = %x18 u64 u64 - publish-upgrade-missing-dependency = %x19 - publish-upgrade-dependency-downgrade = %x1a - package-upgrade-error = %x1b package-upgrade-error - written-objects-too-large = %x1c u64 u64 - certificate-denied = %x1d - iota-move-verification-timeout = %x1e - shared-object-operation-not-allowed = %x1f - input-object-deleted = %x20 - execution-cancelled-due-to-shared-object-congestion = %x21 (vector object-id) - address-denied-for-coin = %x22 address string - coin-type-global-pause = %x23 string - execution-cancelled-due-to-randomness-unavailable = %x24 - ``` - """ - - def __init__(self): - raise RuntimeError("ExecutionError cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class INSUFFICIENT_GAS: - """ - Insufficient Gas - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INSUFFICIENT_GAS()".format() - - def __eq__(self, other): - if not other.is_INSUFFICIENT_GAS(): - return False - return True - - class INVALID_GAS_OBJECT: - """ - Invalid Gas Object. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INVALID_GAS_OBJECT()".format() - - def __eq__(self, other): - if not other.is_INVALID_GAS_OBJECT(): - return False - return True - - class INVARIANT_VIOLATION: - """ - Invariant Violation - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INVARIANT_VIOLATION()".format() - - def __eq__(self, other): - if not other.is_INVARIANT_VIOLATION(): - return False - return True - - class FEATURE_NOT_YET_SUPPORTED: - """ - Attempted to used feature that is not supported yet - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.FEATURE_NOT_YET_SUPPORTED()".format() - - def __eq__(self, other): - if not other.is_FEATURE_NOT_YET_SUPPORTED(): - return False - return True - - class OBJECT_TOO_BIG: - """ - Move object is larger than the maximum allowed size - """ - - object_size: "int" - max_object_size: "int" - - def __init__(self,object_size: "int", max_object_size: "int"): - self.object_size = object_size - self.max_object_size = max_object_size - - def __str__(self): - return "ExecutionError.OBJECT_TOO_BIG(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) - - def __eq__(self, other): - if not other.is_OBJECT_TOO_BIG(): - return False - if self.object_size != other.object_size: - return False - if self.max_object_size != other.max_object_size: - return False - return True - - class PACKAGE_TOO_BIG: - """ - Package is larger than the maximum allowed size - """ - - object_size: "int" - max_object_size: "int" - - def __init__(self,object_size: "int", max_object_size: "int"): - self.object_size = object_size - self.max_object_size = max_object_size - - def __str__(self): - return "ExecutionError.PACKAGE_TOO_BIG(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) - - def __eq__(self, other): - if not other.is_PACKAGE_TOO_BIG(): - return False - if self.object_size != other.object_size: - return False - if self.max_object_size != other.max_object_size: - return False - return True - - class CIRCULAR_OBJECT_OWNERSHIP: - """ - Circular Object Ownership - """ - - object: "ObjectId" - - def __init__(self,object: "ObjectId"): - self.object = object - - def __str__(self): - return "ExecutionError.CIRCULAR_OBJECT_OWNERSHIP(object={})".format(self.object) - - def __eq__(self, other): - if not other.is_CIRCULAR_OBJECT_OWNERSHIP(): - return False - if self.object != other.object: - return False - return True - - class INSUFFICIENT_COIN_BALANCE: - """ - Insufficient coin balance for requested operation - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INSUFFICIENT_COIN_BALANCE()".format() - - def __eq__(self, other): - if not other.is_INSUFFICIENT_COIN_BALANCE(): - return False - return True - - class COIN_BALANCE_OVERFLOW: - """ - Coin balance overflowed an u64 - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.COIN_BALANCE_OVERFLOW()".format() - - def __eq__(self, other): - if not other.is_COIN_BALANCE_OVERFLOW(): - return False - return True - - class PUBLISH_ERROR_NON_ZERO_ADDRESS: - """ - Publish Error, Non-zero Address. - The modules in the package must have their self-addresses set to zero. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS()".format() - - def __eq__(self, other): - if not other.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): - return False - return True - - class IOTA_MOVE_VERIFICATION: - """ - IOTA Move Bytecode Verification Error. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.IOTA_MOVE_VERIFICATION()".format() - - def __eq__(self, other): - if not other.is_IOTA_MOVE_VERIFICATION(): - return False - return True - - class MOVE_PRIMITIVE_RUNTIME: - """ - Error from a non-abort instruction. - Possible causes: - Arithmetic error, stack overflow, max value depth, etc." - """ - - location: "typing.Optional[MoveLocation]" - - def __init__(self,location: "typing.Optional[MoveLocation]"): - self.location = location - - def __str__(self): - return "ExecutionError.MOVE_PRIMITIVE_RUNTIME(location={})".format(self.location) - - def __eq__(self, other): - if not other.is_MOVE_PRIMITIVE_RUNTIME(): - return False - if self.location != other.location: - return False - return True - - class MOVE_ABORT: - """ - Move runtime abort - """ - - location: "MoveLocation" - code: "int" - - def __init__(self,location: "MoveLocation", code: "int"): - self.location = location - self.code = code - - def __str__(self): - return "ExecutionError.MOVE_ABORT(location={}, code={})".format(self.location, self.code) - - def __eq__(self, other): - if not other.is_MOVE_ABORT(): - return False - if self.location != other.location: - return False - if self.code != other.code: - return False - return True - - class VM_VERIFICATION_OR_DESERIALIZATION: - """ - Bytecode verification error. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION()".format() - - def __eq__(self, other): - if not other.is_VM_VERIFICATION_OR_DESERIALIZATION(): - return False - return True - - class VM_INVARIANT_VIOLATION: - """ - MoveVm invariant violation - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.VM_INVARIANT_VIOLATION()".format() - - def __eq__(self, other): - if not other.is_VM_INVARIANT_VIOLATION(): - return False - return True - - class FUNCTION_NOT_FOUND: - """ - Function not found - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.FUNCTION_NOT_FOUND()".format() - - def __eq__(self, other): - if not other.is_FUNCTION_NOT_FOUND(): - return False - return True - - class ARITY_MISMATCH: - """ - Arity mismatch for Move function. - The number of arguments does not match the number of parameters - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.ARITY_MISMATCH()".format() - - def __eq__(self, other): - if not other.is_ARITY_MISMATCH(): - return False - return True - - class TYPE_ARITY_MISMATCH: - """ - Type arity mismatch for Move function. - Mismatch between the number of actual versus expected type arguments. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.TYPE_ARITY_MISMATCH()".format() - - def __eq__(self, other): - if not other.is_TYPE_ARITY_MISMATCH(): - return False - return True - - class NON_ENTRY_FUNCTION_INVOKED: - """ - Non Entry Function Invoked. Move Call must start with an entry function. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.NON_ENTRY_FUNCTION_INVOKED()".format() - - def __eq__(self, other): - if not other.is_NON_ENTRY_FUNCTION_INVOKED(): - return False - return True - - class COMMAND_ARGUMENT: - """ - Invalid command argument - """ - - argument: "int" - kind: "CommandArgumentError" - - def __init__(self,argument: "int", kind: "CommandArgumentError"): - self.argument = argument - self.kind = kind - - def __str__(self): - return "ExecutionError.COMMAND_ARGUMENT(argument={}, kind={})".format(self.argument, self.kind) - - def __eq__(self, other): - if not other.is_COMMAND_ARGUMENT(): - return False - if self.argument != other.argument: - return False - if self.kind != other.kind: - return False - return True - - class TYPE_ARGUMENT: - """ - Type argument error - """ - - type_argument: "int" - """ - Index of the problematic type argument - """ - - kind: "TypeArgumentError" - - def __init__(self,type_argument: "int", kind: "TypeArgumentError"): - self.type_argument = type_argument - self.kind = kind - - def __str__(self): - return "ExecutionError.TYPE_ARGUMENT(type_argument={}, kind={})".format(self.type_argument, self.kind) - - def __eq__(self, other): - if not other.is_TYPE_ARGUMENT(): - return False - if self.type_argument != other.type_argument: - return False - if self.kind != other.kind: - return False - return True - - class UNUSED_VALUE_WITHOUT_DROP: - """ - Unused result without the drop ability. - """ - - result: "int" - subresult: "int" - - def __init__(self,result: "int", subresult: "int"): - self.result = result - self.subresult = subresult - - def __str__(self): - return "ExecutionError.UNUSED_VALUE_WITHOUT_DROP(result={}, subresult={})".format(self.result, self.subresult) - - def __eq__(self, other): - if not other.is_UNUSED_VALUE_WITHOUT_DROP(): - return False - if self.result != other.result: - return False - if self.subresult != other.subresult: - return False - return True - - class INVALID_PUBLIC_FUNCTION_RETURN_TYPE: - """ - Invalid public Move function signature. - Unsupported return type for return value - """ - - index: "int" - - def __init__(self,index: "int"): - self.index = index - - def __str__(self): - return "ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE(index={})".format(self.index) - - def __eq__(self, other): - if not other.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): - return False - if self.index != other.index: - return False - return True - - class INVALID_TRANSFER_OBJECT: - """ - Invalid Transfer Object, object does not have public transfer. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INVALID_TRANSFER_OBJECT()".format() - - def __eq__(self, other): - if not other.is_INVALID_TRANSFER_OBJECT(): - return False - return True - - class EFFECTS_TOO_LARGE: - """ - Effects from the transaction are too large - """ - - current_size: "int" - max_size: "int" - - def __init__(self,current_size: "int", max_size: "int"): - self.current_size = current_size - self.max_size = max_size - - def __str__(self): - return "ExecutionError.EFFECTS_TOO_LARGE(current_size={}, max_size={})".format(self.current_size, self.max_size) - - def __eq__(self, other): - if not other.is_EFFECTS_TOO_LARGE(): - return False - if self.current_size != other.current_size: - return False - if self.max_size != other.max_size: - return False - return True - - class PUBLISH_UPGRADE_MISSING_DEPENDENCY: - """ - Publish or Upgrade is missing dependency - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY()".format() - - def __eq__(self, other): - if not other.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): - return False - return True - - class PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE: - """ - Publish or Upgrade dependency downgrade. - - Indirect (transitive) dependency of published or upgraded package has - been assigned an on-chain version that is less than the version - required by one of the package's transitive dependencies. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE()".format() - - def __eq__(self, other): - if not other.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): - return False - return True - - class PACKAGE_UPGRADE: - """ - Invalid package upgrade - """ - - kind: "PackageUpgradeError" - - def __init__(self,kind: "PackageUpgradeError"): - self.kind = kind - - def __str__(self): - return "ExecutionError.PACKAGE_UPGRADE(kind={})".format(self.kind) - - def __eq__(self, other): - if not other.is_PACKAGE_UPGRADE(): - return False - if self.kind != other.kind: - return False - return True - - class WRITTEN_OBJECTS_TOO_LARGE: - """ - Indicates the transaction tried to write objects too large to storage - """ - - object_size: "int" - max_object_size: "int" - - def __init__(self,object_size: "int", max_object_size: "int"): - self.object_size = object_size - self.max_object_size = max_object_size - - def __str__(self): - return "ExecutionError.WRITTEN_OBJECTS_TOO_LARGE(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) - - def __eq__(self, other): - if not other.is_WRITTEN_OBJECTS_TOO_LARGE(): - return False - if self.object_size != other.object_size: - return False - if self.max_object_size != other.max_object_size: - return False - return True - - class CERTIFICATE_DENIED: - """ - Certificate is on the deny list - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.CERTIFICATE_DENIED()".format() - - def __eq__(self, other): - if not other.is_CERTIFICATE_DENIED(): - return False - return True - - class IOTA_MOVE_VERIFICATION_TIMEOUT: - """ - IOTA Move Bytecode verification timed out. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT()".format() - - def __eq__(self, other): - if not other.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): - return False - return True - - class SHARED_OBJECT_OPERATION_NOT_ALLOWED: - """ - The requested shared object operation is not allowed - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED()".format() - - def __eq__(self, other): - if not other.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - return False - return True - - class INPUT_OBJECT_DELETED: - """ - Requested shared object has been deleted - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INPUT_OBJECT_DELETED()".format() - - def __eq__(self, other): - if not other.is_INPUT_OBJECT_DELETED(): - return False - return True - - class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION: - """ - Certificate is cancelled due to congestion on shared objects - """ - - congested_objects: "typing.List[ObjectId]" - - def __init__(self,congested_objects: "typing.List[ObjectId]"): - self.congested_objects = congested_objects - - def __str__(self): - return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(congested_objects={})".format(self.congested_objects) - - def __eq__(self, other): - if not other.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): - return False - if self.congested_objects != other.congested_objects: - return False - return True - - class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2: - """ - Certificate is cancelled due to congestion on shared objects; - suggested gas price can be used to give this certificate more priority. - """ - - congested_objects: "typing.List[ObjectId]" - suggested_gas_price: "int" - - def __init__(self,congested_objects: "typing.List[ObjectId]", suggested_gas_price: "int"): - self.congested_objects = congested_objects - self.suggested_gas_price = suggested_gas_price - - def __str__(self): - return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(congested_objects={}, suggested_gas_price={})".format(self.congested_objects, self.suggested_gas_price) - - def __eq__(self, other): - if not other.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): - return False - if self.congested_objects != other.congested_objects: - return False - if self.suggested_gas_price != other.suggested_gas_price: - return False - return True - - class ADDRESS_DENIED_FOR_COIN: - """ - Address is denied for this coin type - """ - - address: "Address" - coin_type: "str" - - def __init__(self,address: "Address", coin_type: "str"): - self.address = address - self.coin_type = coin_type - - def __str__(self): - return "ExecutionError.ADDRESS_DENIED_FOR_COIN(address={}, coin_type={})".format(self.address, self.coin_type) - - def __eq__(self, other): - if not other.is_ADDRESS_DENIED_FOR_COIN(): - return False - if self.address != other.address: - return False - if self.coin_type != other.coin_type: - return False - return True - - class COIN_TYPE_GLOBAL_PAUSE: - """ - Coin type is globally paused for use - """ - - coin_type: "str" - - def __init__(self,coin_type: "str"): - self.coin_type = coin_type - - def __str__(self): - return "ExecutionError.COIN_TYPE_GLOBAL_PAUSE(coin_type={})".format(self.coin_type) - - def __eq__(self, other): - if not other.is_COIN_TYPE_GLOBAL_PAUSE(): - return False - if self.coin_type != other.coin_type: - return False - return True - - class EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE: - """ - Certificate is cancelled because randomness could not be generated this - epoch - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE()".format() - - def __eq__(self, other): - if not other.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): - return False - return True - - class INVALID_LINKAGE: - """ - A valid linkage was unable to be determined for the transaction or one - of its commands. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionError.INVALID_LINKAGE()".format() - - def __eq__(self, other): - if not other.is_INVALID_LINKAGE(): - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_INSUFFICIENT_GAS(self) -> bool: - return isinstance(self, ExecutionError.INSUFFICIENT_GAS) - def is_insufficient_gas(self) -> bool: - return isinstance(self, ExecutionError.INSUFFICIENT_GAS) - def is_INVALID_GAS_OBJECT(self) -> bool: - return isinstance(self, ExecutionError.INVALID_GAS_OBJECT) - def is_invalid_gas_object(self) -> bool: - return isinstance(self, ExecutionError.INVALID_GAS_OBJECT) - def is_INVARIANT_VIOLATION(self) -> bool: - return isinstance(self, ExecutionError.INVARIANT_VIOLATION) - def is_invariant_violation(self) -> bool: - return isinstance(self, ExecutionError.INVARIANT_VIOLATION) - def is_FEATURE_NOT_YET_SUPPORTED(self) -> bool: - return isinstance(self, ExecutionError.FEATURE_NOT_YET_SUPPORTED) - def is_feature_not_yet_supported(self) -> bool: - return isinstance(self, ExecutionError.FEATURE_NOT_YET_SUPPORTED) - def is_OBJECT_TOO_BIG(self) -> bool: - return isinstance(self, ExecutionError.OBJECT_TOO_BIG) - def is_object_too_big(self) -> bool: - return isinstance(self, ExecutionError.OBJECT_TOO_BIG) - def is_PACKAGE_TOO_BIG(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_TOO_BIG) - def is_package_too_big(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_TOO_BIG) - def is_CIRCULAR_OBJECT_OWNERSHIP(self) -> bool: - return isinstance(self, ExecutionError.CIRCULAR_OBJECT_OWNERSHIP) - def is_circular_object_ownership(self) -> bool: - return isinstance(self, ExecutionError.CIRCULAR_OBJECT_OWNERSHIP) - def is_INSUFFICIENT_COIN_BALANCE(self) -> bool: - return isinstance(self, ExecutionError.INSUFFICIENT_COIN_BALANCE) - def is_insufficient_coin_balance(self) -> bool: - return isinstance(self, ExecutionError.INSUFFICIENT_COIN_BALANCE) - def is_COIN_BALANCE_OVERFLOW(self) -> bool: - return isinstance(self, ExecutionError.COIN_BALANCE_OVERFLOW) - def is_coin_balance_overflow(self) -> bool: - return isinstance(self, ExecutionError.COIN_BALANCE_OVERFLOW) - def is_PUBLISH_ERROR_NON_ZERO_ADDRESS(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) - def is_publish_error_non_zero_address(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) - def is_IOTA_MOVE_VERIFICATION(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) - def is_iota_move_verification(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) - def is_MOVE_PRIMITIVE_RUNTIME(self) -> bool: - return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) - def is_move_primitive_runtime(self) -> bool: - return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) - def is_MOVE_ABORT(self) -> bool: - return isinstance(self, ExecutionError.MOVE_ABORT) - def is_move_abort(self) -> bool: - return isinstance(self, ExecutionError.MOVE_ABORT) - def is_VM_VERIFICATION_OR_DESERIALIZATION(self) -> bool: - return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) - def is_vm_verification_or_deserialization(self) -> bool: - return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) - def is_VM_INVARIANT_VIOLATION(self) -> bool: - return isinstance(self, ExecutionError.VM_INVARIANT_VIOLATION) - def is_vm_invariant_violation(self) -> bool: - return isinstance(self, ExecutionError.VM_INVARIANT_VIOLATION) - def is_FUNCTION_NOT_FOUND(self) -> bool: - return isinstance(self, ExecutionError.FUNCTION_NOT_FOUND) - def is_function_not_found(self) -> bool: - return isinstance(self, ExecutionError.FUNCTION_NOT_FOUND) - def is_ARITY_MISMATCH(self) -> bool: - return isinstance(self, ExecutionError.ARITY_MISMATCH) - def is_arity_mismatch(self) -> bool: - return isinstance(self, ExecutionError.ARITY_MISMATCH) - def is_TYPE_ARITY_MISMATCH(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARITY_MISMATCH) - def is_type_arity_mismatch(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARITY_MISMATCH) - def is_NON_ENTRY_FUNCTION_INVOKED(self) -> bool: - return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) - def is_non_entry_function_invoked(self) -> bool: - return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) - def is_COMMAND_ARGUMENT(self) -> bool: - return isinstance(self, ExecutionError.COMMAND_ARGUMENT) - def is_command_argument(self) -> bool: - return isinstance(self, ExecutionError.COMMAND_ARGUMENT) - def is_TYPE_ARGUMENT(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARGUMENT) - def is_type_argument(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARGUMENT) - def is_UNUSED_VALUE_WITHOUT_DROP(self) -> bool: - return isinstance(self, ExecutionError.UNUSED_VALUE_WITHOUT_DROP) - def is_unused_value_without_drop(self) -> bool: - return isinstance(self, ExecutionError.UNUSED_VALUE_WITHOUT_DROP) - def is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(self) -> bool: - return isinstance(self, ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE) - def is_invalid_public_function_return_type(self) -> bool: - return isinstance(self, ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE) - def is_INVALID_TRANSFER_OBJECT(self) -> bool: - return isinstance(self, ExecutionError.INVALID_TRANSFER_OBJECT) - def is_invalid_transfer_object(self) -> bool: - return isinstance(self, ExecutionError.INVALID_TRANSFER_OBJECT) - def is_EFFECTS_TOO_LARGE(self) -> bool: - return isinstance(self, ExecutionError.EFFECTS_TOO_LARGE) - def is_effects_too_large(self) -> bool: - return isinstance(self, ExecutionError.EFFECTS_TOO_LARGE) - def is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY) - def is_publish_upgrade_missing_dependency(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY) - def is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) - def is_publish_upgrade_dependency_downgrade(self) -> bool: - return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) - def is_PACKAGE_UPGRADE(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_UPGRADE) - def is_package_upgrade(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_UPGRADE) - def is_WRITTEN_OBJECTS_TOO_LARGE(self) -> bool: - return isinstance(self, ExecutionError.WRITTEN_OBJECTS_TOO_LARGE) - def is_written_objects_too_large(self) -> bool: - return isinstance(self, ExecutionError.WRITTEN_OBJECTS_TOO_LARGE) - def is_CERTIFICATE_DENIED(self) -> bool: - return isinstance(self, ExecutionError.CERTIFICATE_DENIED) - def is_certificate_denied(self) -> bool: - return isinstance(self, ExecutionError.CERTIFICATE_DENIED) - def is_IOTA_MOVE_VERIFICATION_TIMEOUT(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT) - def is_iota_move_verification_timeout(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT) - def is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(self) -> bool: - return isinstance(self, ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) - def is_shared_object_operation_not_allowed(self) -> bool: - return isinstance(self, ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) - def is_INPUT_OBJECT_DELETED(self) -> bool: - return isinstance(self, ExecutionError.INPUT_OBJECT_DELETED) - def is_input_object_deleted(self) -> bool: - return isinstance(self, ExecutionError.INPUT_OBJECT_DELETED) - def is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION) - def is_execution_cancelled_due_to_shared_object_congestion(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION) - def is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2) - def is_execution_cancelled_due_to_shared_object_congestion_v2(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2) - def is_ADDRESS_DENIED_FOR_COIN(self) -> bool: - return isinstance(self, ExecutionError.ADDRESS_DENIED_FOR_COIN) - def is_address_denied_for_coin(self) -> bool: - return isinstance(self, ExecutionError.ADDRESS_DENIED_FOR_COIN) - def is_COIN_TYPE_GLOBAL_PAUSE(self) -> bool: - return isinstance(self, ExecutionError.COIN_TYPE_GLOBAL_PAUSE) - def is_coin_type_global_pause(self) -> bool: - return isinstance(self, ExecutionError.COIN_TYPE_GLOBAL_PAUSE) - def is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE) - def is_execution_cancelled_due_to_randomness_unavailable(self) -> bool: - return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE) - def is_INVALID_LINKAGE(self) -> bool: - return isinstance(self, ExecutionError.INVALID_LINKAGE) - def is_invalid_linkage(self) -> bool: - return isinstance(self, ExecutionError.INVALID_LINKAGE) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -ExecutionError.INSUFFICIENT_GAS = type("ExecutionError.INSUFFICIENT_GAS", (ExecutionError.INSUFFICIENT_GAS, ExecutionError,), {}) # type: ignore -ExecutionError.INVALID_GAS_OBJECT = type("ExecutionError.INVALID_GAS_OBJECT", (ExecutionError.INVALID_GAS_OBJECT, ExecutionError,), {}) # type: ignore -ExecutionError.INVARIANT_VIOLATION = type("ExecutionError.INVARIANT_VIOLATION", (ExecutionError.INVARIANT_VIOLATION, ExecutionError,), {}) # type: ignore -ExecutionError.FEATURE_NOT_YET_SUPPORTED = type("ExecutionError.FEATURE_NOT_YET_SUPPORTED", (ExecutionError.FEATURE_NOT_YET_SUPPORTED, ExecutionError,), {}) # type: ignore -ExecutionError.OBJECT_TOO_BIG = type("ExecutionError.OBJECT_TOO_BIG", (ExecutionError.OBJECT_TOO_BIG, ExecutionError,), {}) # type: ignore -ExecutionError.PACKAGE_TOO_BIG = type("ExecutionError.PACKAGE_TOO_BIG", (ExecutionError.PACKAGE_TOO_BIG, ExecutionError,), {}) # type: ignore -ExecutionError.CIRCULAR_OBJECT_OWNERSHIP = type("ExecutionError.CIRCULAR_OBJECT_OWNERSHIP", (ExecutionError.CIRCULAR_OBJECT_OWNERSHIP, ExecutionError,), {}) # type: ignore -ExecutionError.INSUFFICIENT_COIN_BALANCE = type("ExecutionError.INSUFFICIENT_COIN_BALANCE", (ExecutionError.INSUFFICIENT_COIN_BALANCE, ExecutionError,), {}) # type: ignore -ExecutionError.COIN_BALANCE_OVERFLOW = type("ExecutionError.COIN_BALANCE_OVERFLOW", (ExecutionError.COIN_BALANCE_OVERFLOW, ExecutionError,), {}) # type: ignore -ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS = type("ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS", (ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS, ExecutionError,), {}) # type: ignore -ExecutionError.IOTA_MOVE_VERIFICATION = type("ExecutionError.IOTA_MOVE_VERIFICATION", (ExecutionError.IOTA_MOVE_VERIFICATION, ExecutionError,), {}) # type: ignore -ExecutionError.MOVE_PRIMITIVE_RUNTIME = type("ExecutionError.MOVE_PRIMITIVE_RUNTIME", (ExecutionError.MOVE_PRIMITIVE_RUNTIME, ExecutionError,), {}) # type: ignore -ExecutionError.MOVE_ABORT = type("ExecutionError.MOVE_ABORT", (ExecutionError.MOVE_ABORT, ExecutionError,), {}) # type: ignore -ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION = type("ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION", (ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION, ExecutionError,), {}) # type: ignore -ExecutionError.VM_INVARIANT_VIOLATION = type("ExecutionError.VM_INVARIANT_VIOLATION", (ExecutionError.VM_INVARIANT_VIOLATION, ExecutionError,), {}) # type: ignore -ExecutionError.FUNCTION_NOT_FOUND = type("ExecutionError.FUNCTION_NOT_FOUND", (ExecutionError.FUNCTION_NOT_FOUND, ExecutionError,), {}) # type: ignore -ExecutionError.ARITY_MISMATCH = type("ExecutionError.ARITY_MISMATCH", (ExecutionError.ARITY_MISMATCH, ExecutionError,), {}) # type: ignore -ExecutionError.TYPE_ARITY_MISMATCH = type("ExecutionError.TYPE_ARITY_MISMATCH", (ExecutionError.TYPE_ARITY_MISMATCH, ExecutionError,), {}) # type: ignore -ExecutionError.NON_ENTRY_FUNCTION_INVOKED = type("ExecutionError.NON_ENTRY_FUNCTION_INVOKED", (ExecutionError.NON_ENTRY_FUNCTION_INVOKED, ExecutionError,), {}) # type: ignore -ExecutionError.COMMAND_ARGUMENT = type("ExecutionError.COMMAND_ARGUMENT", (ExecutionError.COMMAND_ARGUMENT, ExecutionError,), {}) # type: ignore -ExecutionError.TYPE_ARGUMENT = type("ExecutionError.TYPE_ARGUMENT", (ExecutionError.TYPE_ARGUMENT, ExecutionError,), {}) # type: ignore -ExecutionError.UNUSED_VALUE_WITHOUT_DROP = type("ExecutionError.UNUSED_VALUE_WITHOUT_DROP", (ExecutionError.UNUSED_VALUE_WITHOUT_DROP, ExecutionError,), {}) # type: ignore -ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE = type("ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE", (ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE, ExecutionError,), {}) # type: ignore -ExecutionError.INVALID_TRANSFER_OBJECT = type("ExecutionError.INVALID_TRANSFER_OBJECT", (ExecutionError.INVALID_TRANSFER_OBJECT, ExecutionError,), {}) # type: ignore -ExecutionError.EFFECTS_TOO_LARGE = type("ExecutionError.EFFECTS_TOO_LARGE", (ExecutionError.EFFECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore -ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY = type("ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY", (ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY, ExecutionError,), {}) # type: ignore -ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE = type("ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE", (ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE, ExecutionError,), {}) # type: ignore -ExecutionError.PACKAGE_UPGRADE = type("ExecutionError.PACKAGE_UPGRADE", (ExecutionError.PACKAGE_UPGRADE, ExecutionError,), {}) # type: ignore -ExecutionError.WRITTEN_OBJECTS_TOO_LARGE = type("ExecutionError.WRITTEN_OBJECTS_TOO_LARGE", (ExecutionError.WRITTEN_OBJECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore -ExecutionError.CERTIFICATE_DENIED = type("ExecutionError.CERTIFICATE_DENIED", (ExecutionError.CERTIFICATE_DENIED, ExecutionError,), {}) # type: ignore -ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT = type("ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT", (ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT, ExecutionError,), {}) # type: ignore -ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED = type("ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED", (ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED, ExecutionError,), {}) # type: ignore -ExecutionError.INPUT_OBJECT_DELETED = type("ExecutionError.INPUT_OBJECT_DELETED", (ExecutionError.INPUT_OBJECT_DELETED, ExecutionError,), {}) # type: ignore -ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION, ExecutionError,), {}) # type: ignore -ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2 = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2, ExecutionError,), {}) # type: ignore -ExecutionError.ADDRESS_DENIED_FOR_COIN = type("ExecutionError.ADDRESS_DENIED_FOR_COIN", (ExecutionError.ADDRESS_DENIED_FOR_COIN, ExecutionError,), {}) # type: ignore -ExecutionError.COIN_TYPE_GLOBAL_PAUSE = type("ExecutionError.COIN_TYPE_GLOBAL_PAUSE", (ExecutionError.COIN_TYPE_GLOBAL_PAUSE, ExecutionError,), {}) # type: ignore -ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE, ExecutionError,), {}) # type: ignore -ExecutionError.INVALID_LINKAGE = type("ExecutionError.INVALID_LINKAGE", (ExecutionError.INVALID_LINKAGE, ExecutionError,), {}) # type: ignore - - - - -class _UniffiConverterTypeExecutionError(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return ExecutionError.INSUFFICIENT_GAS( - ) - if variant == 2: - return ExecutionError.INVALID_GAS_OBJECT( - ) - if variant == 3: - return ExecutionError.INVARIANT_VIOLATION( - ) - if variant == 4: - return ExecutionError.FEATURE_NOT_YET_SUPPORTED( - ) - if variant == 5: - return ExecutionError.OBJECT_TOO_BIG( - _UniffiConverterUInt64.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 6: - return ExecutionError.PACKAGE_TOO_BIG( - _UniffiConverterUInt64.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 7: - return ExecutionError.CIRCULAR_OBJECT_OWNERSHIP( - _UniffiConverterTypeObjectId.read(buf), - ) - if variant == 8: - return ExecutionError.INSUFFICIENT_COIN_BALANCE( - ) - if variant == 9: - return ExecutionError.COIN_BALANCE_OVERFLOW( - ) - if variant == 10: - return ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS( - ) - if variant == 11: - return ExecutionError.IOTA_MOVE_VERIFICATION( - ) - if variant == 12: - return ExecutionError.MOVE_PRIMITIVE_RUNTIME( - _UniffiConverterOptionalTypeMoveLocation.read(buf), - ) - if variant == 13: - return ExecutionError.MOVE_ABORT( - _UniffiConverterTypeMoveLocation.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 14: - return ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION( - ) - if variant == 15: - return ExecutionError.VM_INVARIANT_VIOLATION( - ) - if variant == 16: - return ExecutionError.FUNCTION_NOT_FOUND( - ) - if variant == 17: - return ExecutionError.ARITY_MISMATCH( - ) - if variant == 18: - return ExecutionError.TYPE_ARITY_MISMATCH( - ) - if variant == 19: - return ExecutionError.NON_ENTRY_FUNCTION_INVOKED( - ) - if variant == 20: - return ExecutionError.COMMAND_ARGUMENT( - _UniffiConverterUInt16.read(buf), - _UniffiConverterTypeCommandArgumentError.read(buf), - ) - if variant == 21: - return ExecutionError.TYPE_ARGUMENT( - _UniffiConverterUInt16.read(buf), - _UniffiConverterTypeTypeArgumentError.read(buf), - ) - if variant == 22: - return ExecutionError.UNUSED_VALUE_WITHOUT_DROP( - _UniffiConverterUInt16.read(buf), - _UniffiConverterUInt16.read(buf), - ) - if variant == 23: - return ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE( - _UniffiConverterUInt16.read(buf), - ) - if variant == 24: - return ExecutionError.INVALID_TRANSFER_OBJECT( - ) - if variant == 25: - return ExecutionError.EFFECTS_TOO_LARGE( - _UniffiConverterUInt64.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 26: - return ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY( - ) - if variant == 27: - return ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE( - ) - if variant == 28: - return ExecutionError.PACKAGE_UPGRADE( - _UniffiConverterTypePackageUpgradeError.read(buf), - ) - if variant == 29: - return ExecutionError.WRITTEN_OBJECTS_TOO_LARGE( - _UniffiConverterUInt64.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 30: - return ExecutionError.CERTIFICATE_DENIED( - ) - if variant == 31: - return ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT( - ) - if variant == 32: - return ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED( - ) - if variant == 33: - return ExecutionError.INPUT_OBJECT_DELETED( - ) - if variant == 34: - return ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION( - _UniffiConverterSequenceTypeObjectId.read(buf), - ) - if variant == 35: - return ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2( - _UniffiConverterSequenceTypeObjectId.read(buf), - _UniffiConverterUInt64.read(buf), - ) - if variant == 36: - return ExecutionError.ADDRESS_DENIED_FOR_COIN( - _UniffiConverterTypeAddress.read(buf), - _UniffiConverterString.read(buf), - ) - if variant == 37: - return ExecutionError.COIN_TYPE_GLOBAL_PAUSE( - _UniffiConverterString.read(buf), - ) - if variant == 38: - return ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE( - ) - if variant == 39: - return ExecutionError.INVALID_LINKAGE( - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_INSUFFICIENT_GAS(): - return - if value.is_INVALID_GAS_OBJECT(): - return - if value.is_INVARIANT_VIOLATION(): - return - if value.is_FEATURE_NOT_YET_SUPPORTED(): - return - if value.is_OBJECT_TOO_BIG(): - _UniffiConverterUInt64.check_lower(value.object_size) - _UniffiConverterUInt64.check_lower(value.max_object_size) - return - if value.is_PACKAGE_TOO_BIG(): - _UniffiConverterUInt64.check_lower(value.object_size) - _UniffiConverterUInt64.check_lower(value.max_object_size) - return - if value.is_CIRCULAR_OBJECT_OWNERSHIP(): - _UniffiConverterTypeObjectId.check_lower(value.object) - return - if value.is_INSUFFICIENT_COIN_BALANCE(): - return - if value.is_COIN_BALANCE_OVERFLOW(): - return - if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): - return - if value.is_IOTA_MOVE_VERIFICATION(): - return - if value.is_MOVE_PRIMITIVE_RUNTIME(): - _UniffiConverterOptionalTypeMoveLocation.check_lower(value.location) - return - if value.is_MOVE_ABORT(): - _UniffiConverterTypeMoveLocation.check_lower(value.location) - _UniffiConverterUInt64.check_lower(value.code) - return - if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): - return - if value.is_VM_INVARIANT_VIOLATION(): - return - if value.is_FUNCTION_NOT_FOUND(): - return - if value.is_ARITY_MISMATCH(): - return - if value.is_TYPE_ARITY_MISMATCH(): - return - if value.is_NON_ENTRY_FUNCTION_INVOKED(): - return - if value.is_COMMAND_ARGUMENT(): - _UniffiConverterUInt16.check_lower(value.argument) - _UniffiConverterTypeCommandArgumentError.check_lower(value.kind) - return - if value.is_TYPE_ARGUMENT(): - _UniffiConverterUInt16.check_lower(value.type_argument) - _UniffiConverterTypeTypeArgumentError.check_lower(value.kind) - return - if value.is_UNUSED_VALUE_WITHOUT_DROP(): - _UniffiConverterUInt16.check_lower(value.result) - _UniffiConverterUInt16.check_lower(value.subresult) - return - if value.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): - _UniffiConverterUInt16.check_lower(value.index) - return - if value.is_INVALID_TRANSFER_OBJECT(): - return - if value.is_EFFECTS_TOO_LARGE(): - _UniffiConverterUInt64.check_lower(value.current_size) - _UniffiConverterUInt64.check_lower(value.max_size) - return - if value.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): - return - if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): - return - if value.is_PACKAGE_UPGRADE(): - _UniffiConverterTypePackageUpgradeError.check_lower(value.kind) - return - if value.is_WRITTEN_OBJECTS_TOO_LARGE(): - _UniffiConverterUInt64.check_lower(value.object_size) - _UniffiConverterUInt64.check_lower(value.max_object_size) - return - if value.is_CERTIFICATE_DENIED(): - return - if value.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): - return - if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - return - if value.is_INPUT_OBJECT_DELETED(): - return - if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): - _UniffiConverterSequenceTypeObjectId.check_lower(value.congested_objects) - return - if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): - _UniffiConverterSequenceTypeObjectId.check_lower(value.congested_objects) - _UniffiConverterUInt64.check_lower(value.suggested_gas_price) - return - if value.is_ADDRESS_DENIED_FOR_COIN(): - _UniffiConverterTypeAddress.check_lower(value.address) - _UniffiConverterString.check_lower(value.coin_type) - return - if value.is_COIN_TYPE_GLOBAL_PAUSE(): - _UniffiConverterString.check_lower(value.coin_type) - return - if value.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): - return - if value.is_INVALID_LINKAGE(): - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_INSUFFICIENT_GAS(): - buf.write_i32(1) - if value.is_INVALID_GAS_OBJECT(): - buf.write_i32(2) - if value.is_INVARIANT_VIOLATION(): - buf.write_i32(3) - if value.is_FEATURE_NOT_YET_SUPPORTED(): - buf.write_i32(4) - if value.is_OBJECT_TOO_BIG(): - buf.write_i32(5) - _UniffiConverterUInt64.write(value.object_size, buf) - _UniffiConverterUInt64.write(value.max_object_size, buf) - if value.is_PACKAGE_TOO_BIG(): - buf.write_i32(6) - _UniffiConverterUInt64.write(value.object_size, buf) - _UniffiConverterUInt64.write(value.max_object_size, buf) - if value.is_CIRCULAR_OBJECT_OWNERSHIP(): - buf.write_i32(7) - _UniffiConverterTypeObjectId.write(value.object, buf) - if value.is_INSUFFICIENT_COIN_BALANCE(): - buf.write_i32(8) - if value.is_COIN_BALANCE_OVERFLOW(): - buf.write_i32(9) - if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): - buf.write_i32(10) - if value.is_IOTA_MOVE_VERIFICATION(): - buf.write_i32(11) - if value.is_MOVE_PRIMITIVE_RUNTIME(): - buf.write_i32(12) - _UniffiConverterOptionalTypeMoveLocation.write(value.location, buf) - if value.is_MOVE_ABORT(): - buf.write_i32(13) - _UniffiConverterTypeMoveLocation.write(value.location, buf) - _UniffiConverterUInt64.write(value.code, buf) - if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): - buf.write_i32(14) - if value.is_VM_INVARIANT_VIOLATION(): - buf.write_i32(15) - if value.is_FUNCTION_NOT_FOUND(): - buf.write_i32(16) - if value.is_ARITY_MISMATCH(): - buf.write_i32(17) - if value.is_TYPE_ARITY_MISMATCH(): - buf.write_i32(18) - if value.is_NON_ENTRY_FUNCTION_INVOKED(): - buf.write_i32(19) - if value.is_COMMAND_ARGUMENT(): - buf.write_i32(20) - _UniffiConverterUInt16.write(value.argument, buf) - _UniffiConverterTypeCommandArgumentError.write(value.kind, buf) - if value.is_TYPE_ARGUMENT(): - buf.write_i32(21) - _UniffiConverterUInt16.write(value.type_argument, buf) - _UniffiConverterTypeTypeArgumentError.write(value.kind, buf) - if value.is_UNUSED_VALUE_WITHOUT_DROP(): - buf.write_i32(22) - _UniffiConverterUInt16.write(value.result, buf) - _UniffiConverterUInt16.write(value.subresult, buf) - if value.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): - buf.write_i32(23) - _UniffiConverterUInt16.write(value.index, buf) - if value.is_INVALID_TRANSFER_OBJECT(): - buf.write_i32(24) - if value.is_EFFECTS_TOO_LARGE(): - buf.write_i32(25) - _UniffiConverterUInt64.write(value.current_size, buf) - _UniffiConverterUInt64.write(value.max_size, buf) - if value.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): - buf.write_i32(26) - if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): - buf.write_i32(27) - if value.is_PACKAGE_UPGRADE(): - buf.write_i32(28) - _UniffiConverterTypePackageUpgradeError.write(value.kind, buf) - if value.is_WRITTEN_OBJECTS_TOO_LARGE(): - buf.write_i32(29) - _UniffiConverterUInt64.write(value.object_size, buf) - _UniffiConverterUInt64.write(value.max_object_size, buf) - if value.is_CERTIFICATE_DENIED(): - buf.write_i32(30) - if value.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): - buf.write_i32(31) - if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): - buf.write_i32(32) - if value.is_INPUT_OBJECT_DELETED(): - buf.write_i32(33) - if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): - buf.write_i32(34) - _UniffiConverterSequenceTypeObjectId.write(value.congested_objects, buf) - if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): - buf.write_i32(35) - _UniffiConverterSequenceTypeObjectId.write(value.congested_objects, buf) - _UniffiConverterUInt64.write(value.suggested_gas_price, buf) - if value.is_ADDRESS_DENIED_FOR_COIN(): - buf.write_i32(36) - _UniffiConverterTypeAddress.write(value.address, buf) - _UniffiConverterString.write(value.coin_type, buf) - if value.is_COIN_TYPE_GLOBAL_PAUSE(): - buf.write_i32(37) - _UniffiConverterString.write(value.coin_type, buf) - if value.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): - buf.write_i32(38) - if value.is_INVALID_LINKAGE(): - buf.write_i32(39) - - - - - - - -class ExecutionStatus: - """ - The status of an executed Transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - execution-status = success / failure - success = %x00 - failure = %x01 execution-error (option u64) - ```xx - """ - - def __init__(self): - raise RuntimeError("ExecutionStatus cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class SUCCESS: - """ - The Transaction successfully executed. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ExecutionStatus.SUCCESS()".format() - - def __eq__(self, other): - if not other.is_SUCCESS(): - return False - return True - - class FAILURE: - """ - The Transaction didn't execute successfully. - - Failed transactions are still committed to the blockchain but any - intended effects are rolled back to prior to this transaction - executing with the caveat that gas objects are still smashed and gas - usage is still charged. - """ - - error: "ExecutionError" - """ - The error encountered during execution. - """ - - command: "typing.Optional[int]" - """ - The command, if any, during which the error occurred. - """ - - - def __init__(self,error: "ExecutionError", command: "typing.Optional[int]"): - self.error = error - self.command = command - - def __str__(self): - return "ExecutionStatus.FAILURE(error={}, command={})".format(self.error, self.command) - - def __eq__(self, other): - if not other.is_FAILURE(): - return False - if self.error != other.error: - return False - if self.command != other.command: - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_SUCCESS(self) -> bool: - return isinstance(self, ExecutionStatus.SUCCESS) - def is_success(self) -> bool: - return isinstance(self, ExecutionStatus.SUCCESS) - def is_FAILURE(self) -> bool: - return isinstance(self, ExecutionStatus.FAILURE) - def is_failure(self) -> bool: - return isinstance(self, ExecutionStatus.FAILURE) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -ExecutionStatus.SUCCESS = type("ExecutionStatus.SUCCESS", (ExecutionStatus.SUCCESS, ExecutionStatus,), {}) # type: ignore -ExecutionStatus.FAILURE = type("ExecutionStatus.FAILURE", (ExecutionStatus.FAILURE, ExecutionStatus,), {}) # type: ignore - - - - -class _UniffiConverterTypeExecutionStatus(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return ExecutionStatus.SUCCESS( - ) - if variant == 2: - return ExecutionStatus.FAILURE( - _UniffiConverterTypeExecutionError.read(buf), - _UniffiConverterOptionalUInt64.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_SUCCESS(): - return - if value.is_FAILURE(): - _UniffiConverterTypeExecutionError.check_lower(value.error) - _UniffiConverterOptionalUInt64.check_lower(value.command) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_SUCCESS(): - buf.write_i32(1) - if value.is_FAILURE(): - buf.write_i32(2) - _UniffiConverterTypeExecutionError.write(value.error, buf) - _UniffiConverterOptionalUInt64.write(value.command, buf) - - - - - - - -class Feature(enum.Enum): - ANALYTICS = 0 - - COINS = 1 - - DYNAMIC_FIELDS = 2 - - SUBSCRIPTIONS = 3 - - SYSTEM_STATE = 4 - - - -class _UniffiConverterTypeFeature(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return Feature.ANALYTICS - if variant == 2: - return Feature.COINS - if variant == 3: - return Feature.DYNAMIC_FIELDS - if variant == 4: - return Feature.SUBSCRIPTIONS - if variant == 5: - return Feature.SYSTEM_STATE - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == Feature.ANALYTICS: - return - if value == Feature.COINS: - return - if value == Feature.DYNAMIC_FIELDS: - return - if value == Feature.SUBSCRIPTIONS: - return - if value == Feature.SYSTEM_STATE: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == Feature.ANALYTICS: - buf.write_i32(1) - if value == Feature.COINS: - buf.write_i32(2) - if value == Feature.DYNAMIC_FIELDS: - buf.write_i32(3) - if value == Feature.SUBSCRIPTIONS: - buf.write_i32(4) - if value == Feature.SYSTEM_STATE: - buf.write_i32(5) - - - - - - - -class IdOperation(enum.Enum): - """ - Defines what happened to an ObjectId during execution - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - id-operation = id-operation-none - =/ id-operation-created - =/ id-operation-deleted - - id-operation-none = %x00 - id-operation-created = %x01 - id-operation-deleted = %x02 - ``` - """ - - NONE = 0 - - CREATED = 1 - - DELETED = 2 - - - -class _UniffiConverterTypeIdOperation(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return IdOperation.NONE - if variant == 2: - return IdOperation.CREATED - if variant == 3: - return IdOperation.DELETED - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == IdOperation.NONE: - return - if value == IdOperation.CREATED: - return - if value == IdOperation.DELETED: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == IdOperation.NONE: - buf.write_i32(1) - if value == IdOperation.CREATED: - buf.write_i32(2) - if value == IdOperation.DELETED: - buf.write_i32(3) - - - - - - - -class MoveAbility(enum.Enum): - COPY = 0 - - DROP = 1 - - KEY = 2 - - STORE = 3 - - - -class _UniffiConverterTypeMoveAbility(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return MoveAbility.COPY - if variant == 2: - return MoveAbility.DROP - if variant == 3: - return MoveAbility.KEY - if variant == 4: - return MoveAbility.STORE - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == MoveAbility.COPY: - return - if value == MoveAbility.DROP: - return - if value == MoveAbility.KEY: - return - if value == MoveAbility.STORE: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == MoveAbility.COPY: - buf.write_i32(1) - if value == MoveAbility.DROP: - buf.write_i32(2) - if value == MoveAbility.KEY: - buf.write_i32(3) - if value == MoveAbility.STORE: - buf.write_i32(4) - - - - - - - -class MoveVisibility(enum.Enum): - PUBLIC = 0 - - PRIVATE = 1 - - FRIEND = 2 - - - -class _UniffiConverterTypeMoveVisibility(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return MoveVisibility.PUBLIC - if variant == 2: - return MoveVisibility.PRIVATE - if variant == 3: - return MoveVisibility.FRIEND - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == MoveVisibility.PUBLIC: - return - if value == MoveVisibility.PRIVATE: - return - if value == MoveVisibility.FRIEND: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == MoveVisibility.PUBLIC: - buf.write_i32(1) - if value == MoveVisibility.PRIVATE: - buf.write_i32(2) - if value == MoveVisibility.FRIEND: - buf.write_i32(3) - - - - - - - -class NameFormat(enum.Enum): - """ - Two different view options for a name. - `At` -> `test@example` | `Dot` -> `test.example.iota` - """ - - AT = 0 - - DOT = 1 - - - -class _UniffiConverterTypeNameFormat(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return NameFormat.AT - if variant == 2: - return NameFormat.DOT - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == NameFormat.AT: - return - if value == NameFormat.DOT: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == NameFormat.AT: - buf.write_i32(1) - if value == NameFormat.DOT: - buf.write_i32(2) - - - - - - - -class ObjectIn: - """ - State of an object prior to execution - - If an object exists (at root-level) in the store prior to this transaction, - it should be Data, otherwise it's Missing, e.g. wrapped objects should be - Missing. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - object-in = object-in-missing / object-in-data - - object-in-missing = %x00 - object-in-data = %x01 u64 digest owner - ``` - """ - - def __init__(self): - raise RuntimeError("ObjectIn cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class MISSING: - - def __init__(self,): - pass - - def __str__(self): - return "ObjectIn.MISSING()".format() - - def __eq__(self, other): - if not other.is_MISSING(): - return False - return True - - class DATA: - """ - The old version, digest and owner. - """ - - version: "int" - digest: "Digest" - owner: "Owner" - - def __init__(self,version: "int", digest: "Digest", owner: "Owner"): - self.version = version - self.digest = digest - self.owner = owner - - def __str__(self): - return "ObjectIn.DATA(version={}, digest={}, owner={})".format(self.version, self.digest, self.owner) - - def __eq__(self, other): - if not other.is_DATA(): - return False - if self.version != other.version: - return False - if self.digest != other.digest: - return False - if self.owner != other.owner: - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_MISSING(self) -> bool: - return isinstance(self, ObjectIn.MISSING) - def is_missing(self) -> bool: - return isinstance(self, ObjectIn.MISSING) - def is_DATA(self) -> bool: - return isinstance(self, ObjectIn.DATA) - def is_data(self) -> bool: - return isinstance(self, ObjectIn.DATA) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -ObjectIn.MISSING = type("ObjectIn.MISSING", (ObjectIn.MISSING, ObjectIn,), {}) # type: ignore -ObjectIn.DATA = type("ObjectIn.DATA", (ObjectIn.DATA, ObjectIn,), {}) # type: ignore - - - - -class _UniffiConverterTypeObjectIn(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return ObjectIn.MISSING( - ) - if variant == 2: - return ObjectIn.DATA( - _UniffiConverterUInt64.read(buf), - _UniffiConverterTypeDigest.read(buf), - _UniffiConverterTypeOwner.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_MISSING(): - return - if value.is_DATA(): - _UniffiConverterUInt64.check_lower(value.version) - _UniffiConverterTypeDigest.check_lower(value.digest) - _UniffiConverterTypeOwner.check_lower(value.owner) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_MISSING(): - buf.write_i32(1) - if value.is_DATA(): - buf.write_i32(2) - _UniffiConverterUInt64.write(value.version, buf) - _UniffiConverterTypeDigest.write(value.digest, buf) - _UniffiConverterTypeOwner.write(value.owner, buf) - - - - - - - -class ObjectOut: - """ - State of an object after execution - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - object-out = object-out-missing - =/ object-out-object-write - =/ object-out-package-write - - - object-out-missing = %x00 - object-out-object-write = %x01 digest owner - object-out-package-write = %x02 version digest - ``` - """ - - def __init__(self): - raise RuntimeError("ObjectOut cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class MISSING: - """ - Same definition as in ObjectIn. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "ObjectOut.MISSING()".format() - - def __eq__(self, other): - if not other.is_MISSING(): - return False - return True - - class OBJECT_WRITE: - """ - Any written object, including all of mutated, created, unwrapped today. - """ - - digest: "Digest" - owner: "Owner" - - def __init__(self,digest: "Digest", owner: "Owner"): - self.digest = digest - self.owner = owner - - def __str__(self): - return "ObjectOut.OBJECT_WRITE(digest={}, owner={})".format(self.digest, self.owner) - - def __eq__(self, other): - if not other.is_OBJECT_WRITE(): - return False - if self.digest != other.digest: - return False - if self.owner != other.owner: - return False - return True - - class PACKAGE_WRITE: - """ - Packages writes need to be tracked separately with version because - we don't use lamport version for package publish and upgrades. - """ - - version: "int" - digest: "Digest" - - def __init__(self,version: "int", digest: "Digest"): - self.version = version - self.digest = digest - - def __str__(self): - return "ObjectOut.PACKAGE_WRITE(version={}, digest={})".format(self.version, self.digest) - - def __eq__(self, other): - if not other.is_PACKAGE_WRITE(): - return False - if self.version != other.version: - return False - if self.digest != other.digest: - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_MISSING(self) -> bool: - return isinstance(self, ObjectOut.MISSING) - def is_missing(self) -> bool: - return isinstance(self, ObjectOut.MISSING) - def is_OBJECT_WRITE(self) -> bool: - return isinstance(self, ObjectOut.OBJECT_WRITE) - def is_object_write(self) -> bool: - return isinstance(self, ObjectOut.OBJECT_WRITE) - def is_PACKAGE_WRITE(self) -> bool: - return isinstance(self, ObjectOut.PACKAGE_WRITE) - def is_package_write(self) -> bool: - return isinstance(self, ObjectOut.PACKAGE_WRITE) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -ObjectOut.MISSING = type("ObjectOut.MISSING", (ObjectOut.MISSING, ObjectOut,), {}) # type: ignore -ObjectOut.OBJECT_WRITE = type("ObjectOut.OBJECT_WRITE", (ObjectOut.OBJECT_WRITE, ObjectOut,), {}) # type: ignore -ObjectOut.PACKAGE_WRITE = type("ObjectOut.PACKAGE_WRITE", (ObjectOut.PACKAGE_WRITE, ObjectOut,), {}) # type: ignore - - - - -class _UniffiConverterTypeObjectOut(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return ObjectOut.MISSING( - ) - if variant == 2: - return ObjectOut.OBJECT_WRITE( - _UniffiConverterTypeDigest.read(buf), - _UniffiConverterTypeOwner.read(buf), - ) - if variant == 3: - return ObjectOut.PACKAGE_WRITE( - _UniffiConverterUInt64.read(buf), - _UniffiConverterTypeDigest.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_MISSING(): - return - if value.is_OBJECT_WRITE(): - _UniffiConverterTypeDigest.check_lower(value.digest) - _UniffiConverterTypeOwner.check_lower(value.owner) - return - if value.is_PACKAGE_WRITE(): - _UniffiConverterUInt64.check_lower(value.version) - _UniffiConverterTypeDigest.check_lower(value.digest) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_MISSING(): - buf.write_i32(1) - if value.is_OBJECT_WRITE(): - buf.write_i32(2) - _UniffiConverterTypeDigest.write(value.digest, buf) - _UniffiConverterTypeOwner.write(value.owner, buf) - if value.is_PACKAGE_WRITE(): - buf.write_i32(3) - _UniffiConverterUInt64.write(value.version, buf) - _UniffiConverterTypeDigest.write(value.digest, buf) - - - - - - - -class PackageUpgradeError: - """ - An error with a upgrading a package - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - package-upgrade-error = unable-to-fetch-package / - not-a-package / - incompatible-upgrade / - digest-does-not-match / - unknown-upgrade-policy / - package-id-does-not-match - - unable-to-fetch-package = %x00 object-id - not-a-package = %x01 object-id - incompatible-upgrade = %x02 - digest-does-not-match = %x03 digest - unknown-upgrade-policy = %x04 u8 - package-id-does-not-match = %x05 object-id object-id - ``` - """ - - def __init__(self): - raise RuntimeError("PackageUpgradeError cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class UNABLE_TO_FETCH_PACKAGE: - """ - Unable to fetch package - """ - - package_id: "ObjectId" - - def __init__(self,package_id: "ObjectId"): - self.package_id = package_id - - def __str__(self): - return "PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE(package_id={})".format(self.package_id) - - def __eq__(self, other): - if not other.is_UNABLE_TO_FETCH_PACKAGE(): - return False - if self.package_id != other.package_id: - return False - return True - - class NOT_A_PACKAGE: - """ - Object is not a package - """ - - object_id: "ObjectId" - - def __init__(self,object_id: "ObjectId"): - self.object_id = object_id - - def __str__(self): - return "PackageUpgradeError.NOT_A_PACKAGE(object_id={})".format(self.object_id) - - def __eq__(self, other): - if not other.is_NOT_A_PACKAGE(): - return False - if self.object_id != other.object_id: - return False - return True - - class INCOMPATIBLE_UPGRADE: - """ - Package upgrade is incompatible with previous version - """ - - - def __init__(self,): - pass - - def __str__(self): - return "PackageUpgradeError.INCOMPATIBLE_UPGRADE()".format() - - def __eq__(self, other): - if not other.is_INCOMPATIBLE_UPGRADE(): - return False - return True - - class DIGEST_DOES_NOT_MATCH: - """ - Digest in upgrade ticket and computed digest differ - """ - - digest: "Digest" - - def __init__(self,digest: "Digest"): - self.digest = digest - - def __str__(self): - return "PackageUpgradeError.DIGEST_DOES_NOT_MATCH(digest={})".format(self.digest) - - def __eq__(self, other): - if not other.is_DIGEST_DOES_NOT_MATCH(): - return False - if self.digest != other.digest: - return False - return True - - class UNKNOWN_UPGRADE_POLICY: - """ - Upgrade policy is not valid - """ - - policy: "int" - - def __init__(self,policy: "int"): - self.policy = policy - - def __str__(self): - return "PackageUpgradeError.UNKNOWN_UPGRADE_POLICY(policy={})".format(self.policy) - - def __eq__(self, other): - if not other.is_UNKNOWN_UPGRADE_POLICY(): - return False - if self.policy != other.policy: - return False - return True - - class PACKAGE_ID_DOES_NOT_MATCH: - """ - PackageId does not matach PackageId in upgrade ticket - """ - - package_id: "ObjectId" - ticket_id: "ObjectId" - - def __init__(self,package_id: "ObjectId", ticket_id: "ObjectId"): - self.package_id = package_id - self.ticket_id = ticket_id - - def __str__(self): - return "PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH(package_id={}, ticket_id={})".format(self.package_id, self.ticket_id) - - def __eq__(self, other): - if not other.is_PACKAGE_ID_DOES_NOT_MATCH(): - return False - if self.package_id != other.package_id: - return False - if self.ticket_id != other.ticket_id: - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_UNABLE_TO_FETCH_PACKAGE(self) -> bool: - return isinstance(self, PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE) - def is_unable_to_fetch_package(self) -> bool: - return isinstance(self, PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE) - def is_NOT_A_PACKAGE(self) -> bool: - return isinstance(self, PackageUpgradeError.NOT_A_PACKAGE) - def is_not_a_package(self) -> bool: - return isinstance(self, PackageUpgradeError.NOT_A_PACKAGE) - def is_INCOMPATIBLE_UPGRADE(self) -> bool: - return isinstance(self, PackageUpgradeError.INCOMPATIBLE_UPGRADE) - def is_incompatible_upgrade(self) -> bool: - return isinstance(self, PackageUpgradeError.INCOMPATIBLE_UPGRADE) - def is_DIGEST_DOES_NOT_MATCH(self) -> bool: - return isinstance(self, PackageUpgradeError.DIGEST_DOES_NOT_MATCH) - def is_digest_does_not_match(self) -> bool: - return isinstance(self, PackageUpgradeError.DIGEST_DOES_NOT_MATCH) - def is_UNKNOWN_UPGRADE_POLICY(self) -> bool: - return isinstance(self, PackageUpgradeError.UNKNOWN_UPGRADE_POLICY) - def is_unknown_upgrade_policy(self) -> bool: - return isinstance(self, PackageUpgradeError.UNKNOWN_UPGRADE_POLICY) - def is_PACKAGE_ID_DOES_NOT_MATCH(self) -> bool: - return isinstance(self, PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH) - def is_package_id_does_not_match(self) -> bool: - return isinstance(self, PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE = type("PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE", (PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE, PackageUpgradeError,), {}) # type: ignore -PackageUpgradeError.NOT_A_PACKAGE = type("PackageUpgradeError.NOT_A_PACKAGE", (PackageUpgradeError.NOT_A_PACKAGE, PackageUpgradeError,), {}) # type: ignore -PackageUpgradeError.INCOMPATIBLE_UPGRADE = type("PackageUpgradeError.INCOMPATIBLE_UPGRADE", (PackageUpgradeError.INCOMPATIBLE_UPGRADE, PackageUpgradeError,), {}) # type: ignore -PackageUpgradeError.DIGEST_DOES_NOT_MATCH = type("PackageUpgradeError.DIGEST_DOES_NOT_MATCH", (PackageUpgradeError.DIGEST_DOES_NOT_MATCH, PackageUpgradeError,), {}) # type: ignore -PackageUpgradeError.UNKNOWN_UPGRADE_POLICY = type("PackageUpgradeError.UNKNOWN_UPGRADE_POLICY", (PackageUpgradeError.UNKNOWN_UPGRADE_POLICY, PackageUpgradeError,), {}) # type: ignore -PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH = type("PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH", (PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH, PackageUpgradeError,), {}) # type: ignore - - - - -class _UniffiConverterTypePackageUpgradeError(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE( - _UniffiConverterTypeObjectId.read(buf), - ) - if variant == 2: - return PackageUpgradeError.NOT_A_PACKAGE( - _UniffiConverterTypeObjectId.read(buf), - ) - if variant == 3: - return PackageUpgradeError.INCOMPATIBLE_UPGRADE( - ) - if variant == 4: - return PackageUpgradeError.DIGEST_DOES_NOT_MATCH( - _UniffiConverterTypeDigest.read(buf), - ) - if variant == 5: - return PackageUpgradeError.UNKNOWN_UPGRADE_POLICY( - _UniffiConverterUInt8.read(buf), - ) - if variant == 6: - return PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH( - _UniffiConverterTypeObjectId.read(buf), - _UniffiConverterTypeObjectId.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_UNABLE_TO_FETCH_PACKAGE(): - _UniffiConverterTypeObjectId.check_lower(value.package_id) - return - if value.is_NOT_A_PACKAGE(): - _UniffiConverterTypeObjectId.check_lower(value.object_id) - return - if value.is_INCOMPATIBLE_UPGRADE(): - return - if value.is_DIGEST_DOES_NOT_MATCH(): - _UniffiConverterTypeDigest.check_lower(value.digest) - return - if value.is_UNKNOWN_UPGRADE_POLICY(): - _UniffiConverterUInt8.check_lower(value.policy) - return - if value.is_PACKAGE_ID_DOES_NOT_MATCH(): - _UniffiConverterTypeObjectId.check_lower(value.package_id) - _UniffiConverterTypeObjectId.check_lower(value.ticket_id) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_UNABLE_TO_FETCH_PACKAGE(): - buf.write_i32(1) - _UniffiConverterTypeObjectId.write(value.package_id, buf) - if value.is_NOT_A_PACKAGE(): - buf.write_i32(2) - _UniffiConverterTypeObjectId.write(value.object_id, buf) - if value.is_INCOMPATIBLE_UPGRADE(): - buf.write_i32(3) - if value.is_DIGEST_DOES_NOT_MATCH(): - buf.write_i32(4) - _UniffiConverterTypeDigest.write(value.digest, buf) - if value.is_UNKNOWN_UPGRADE_POLICY(): - buf.write_i32(5) - _UniffiConverterUInt8.write(value.policy, buf) - if value.is_PACKAGE_ID_DOES_NOT_MATCH(): - buf.write_i32(6) - _UniffiConverterTypeObjectId.write(value.package_id, buf) - _UniffiConverterTypeObjectId.write(value.ticket_id, buf) - - - - -# SdkFfiError -# We want to define each variant as a nested class that's also a subclass, -# which is tricky in Python. To accomplish this we're going to create each -# class separately, then manually add the child classes to the base class's -# __dict__. All of this happens in dummy class to avoid polluting the module -# namespace. -class SdkFfiError(Exception): - pass - -_UniffiTempSdkFfiError = SdkFfiError - -class SdkFfiError: # type: ignore - class Generic(_UniffiTempSdkFfiError): - - def __repr__(self): - return "SdkFfiError.Generic({})".format(repr(str(self))) - _UniffiTempSdkFfiError.Generic = Generic # type: ignore - -SdkFfiError = _UniffiTempSdkFfiError # type: ignore -del _UniffiTempSdkFfiError - - -class _UniffiConverterTypeSdkFfiError(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return SdkFfiError.Generic( - _UniffiConverterString.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if isinstance(value, SdkFfiError.Generic): - return - - @staticmethod - def write(value, buf): - if isinstance(value, SdkFfiError.Generic): - buf.write_i32(1) - - - - - -class SignatureScheme(enum.Enum): - """ - Flag use to disambiguate the signature schemes supported by IOTA. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - signature-scheme = ed25519-flag / secp256k1-flag / secp256r1-flag / - multisig-flag / bls-flag / zklogin-flag / passkey-flag - ed25519-flag = %x00 - secp256k1-flag = %x01 - secp256r1-flag = %x02 - multisig-flag = %x03 - bls-flag = %x04 - zklogin-flag = %x05 - passkey-flag = %x06 - ``` - """ - - ED25519 = 0 - - SECP256K1 = 1 - - SECP256R1 = 2 - - MULTISIG = 3 - - BLS12381 = 4 - - ZK_LOGIN = 5 - - PASSKEY = 6 - - - -class _UniffiConverterTypeSignatureScheme(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return SignatureScheme.ED25519 - if variant == 2: - return SignatureScheme.SECP256K1 - if variant == 3: - return SignatureScheme.SECP256R1 - if variant == 4: - return SignatureScheme.MULTISIG - if variant == 5: - return SignatureScheme.BLS12381 - if variant == 6: - return SignatureScheme.ZK_LOGIN - if variant == 7: - return SignatureScheme.PASSKEY - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == SignatureScheme.ED25519: - return - if value == SignatureScheme.SECP256K1: - return - if value == SignatureScheme.SECP256R1: - return - if value == SignatureScheme.MULTISIG: - return - if value == SignatureScheme.BLS12381: - return - if value == SignatureScheme.ZK_LOGIN: - return - if value == SignatureScheme.PASSKEY: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == SignatureScheme.ED25519: - buf.write_i32(1) - if value == SignatureScheme.SECP256K1: - buf.write_i32(2) - if value == SignatureScheme.SECP256R1: - buf.write_i32(3) - if value == SignatureScheme.MULTISIG: - buf.write_i32(4) - if value == SignatureScheme.BLS12381: - buf.write_i32(5) - if value == SignatureScheme.ZK_LOGIN: - buf.write_i32(6) - if value == SignatureScheme.PASSKEY: - buf.write_i32(7) - - - - - - - -class TransactionArgument: - """ - A transaction argument used in programmable transactions. - """ - - def __init__(self): - raise RuntimeError("TransactionArgument cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class GAS_COIN: - """ - Reference to the gas coin. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "TransactionArgument.GAS_COIN()".format() - - def __eq__(self, other): - if not other.is_GAS_COIN(): - return False - return True - - class INPUT: - """ - An input to the programmable transaction block. - """ - - ix: "int" - """ - Index of the programmable transaction block input (0-indexed). - """ - - - def __init__(self,ix: "int"): - self.ix = ix - - def __str__(self): - return "TransactionArgument.INPUT(ix={})".format(self.ix) - - def __eq__(self, other): - if not other.is_INPUT(): - return False - if self.ix != other.ix: - return False - return True - - class RESULT: - """ - The result of another transaction command. - """ - - cmd: "int" - """ - The index of the previous command (0-indexed) that returned this - result. - """ - - ix: "typing.Optional[int]" - """ - If the previous command returns multiple values, this is the index - of the individual result among the multiple results from - that command (also 0-indexed). - """ - - - def __init__(self,cmd: "int", ix: "typing.Optional[int]"): - self.cmd = cmd - self.ix = ix - - def __str__(self): - return "TransactionArgument.RESULT(cmd={}, ix={})".format(self.cmd, self.ix) - - def __eq__(self, other): - if not other.is_RESULT(): - return False - if self.cmd != other.cmd: - return False - if self.ix != other.ix: - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_GAS_COIN(self) -> bool: - return isinstance(self, TransactionArgument.GAS_COIN) - def is_gas_coin(self) -> bool: - return isinstance(self, TransactionArgument.GAS_COIN) - def is_INPUT(self) -> bool: - return isinstance(self, TransactionArgument.INPUT) - def is_input(self) -> bool: - return isinstance(self, TransactionArgument.INPUT) - def is_RESULT(self) -> bool: - return isinstance(self, TransactionArgument.RESULT) - def is_result(self) -> bool: - return isinstance(self, TransactionArgument.RESULT) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -TransactionArgument.GAS_COIN = type("TransactionArgument.GAS_COIN", (TransactionArgument.GAS_COIN, TransactionArgument,), {}) # type: ignore -TransactionArgument.INPUT = type("TransactionArgument.INPUT", (TransactionArgument.INPUT, TransactionArgument,), {}) # type: ignore -TransactionArgument.RESULT = type("TransactionArgument.RESULT", (TransactionArgument.RESULT, TransactionArgument,), {}) # type: ignore - - - - -class _UniffiConverterTypeTransactionArgument(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return TransactionArgument.GAS_COIN( - ) - if variant == 2: - return TransactionArgument.INPUT( - _UniffiConverterUInt32.read(buf), - ) - if variant == 3: - return TransactionArgument.RESULT( - _UniffiConverterUInt32.read(buf), - _UniffiConverterOptionalUInt32.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_GAS_COIN(): - return - if value.is_INPUT(): - _UniffiConverterUInt32.check_lower(value.ix) - return - if value.is_RESULT(): - _UniffiConverterUInt32.check_lower(value.cmd) - _UniffiConverterOptionalUInt32.check_lower(value.ix) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_GAS_COIN(): - buf.write_i32(1) - if value.is_INPUT(): - buf.write_i32(2) - _UniffiConverterUInt32.write(value.ix, buf) - if value.is_RESULT(): - buf.write_i32(3) - _UniffiConverterUInt32.write(value.cmd, buf) - _UniffiConverterOptionalUInt32.write(value.ix, buf) - - - - - - - -class TransactionBlockKindInput(enum.Enum): - SYSTEM_TX = 0 - - PROGRAMMABLE_TX = 1 - - GENESIS = 2 - - CONSENSUS_COMMIT_PROLOGUE_V1 = 3 - - AUTHENTICATOR_STATE_UPDATE_V1 = 4 - - RANDOMNESS_STATE_UPDATE = 5 - - END_OF_EPOCH_TX = 6 - - - -class _UniffiConverterTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return TransactionBlockKindInput.SYSTEM_TX - if variant == 2: - return TransactionBlockKindInput.PROGRAMMABLE_TX - if variant == 3: - return TransactionBlockKindInput.GENESIS - if variant == 4: - return TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1 - if variant == 5: - return TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1 - if variant == 6: - return TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE - if variant == 7: - return TransactionBlockKindInput.END_OF_EPOCH_TX - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == TransactionBlockKindInput.SYSTEM_TX: - return - if value == TransactionBlockKindInput.PROGRAMMABLE_TX: - return - if value == TransactionBlockKindInput.GENESIS: - return - if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: - return - if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: - return - if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: - return - if value == TransactionBlockKindInput.END_OF_EPOCH_TX: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == TransactionBlockKindInput.SYSTEM_TX: - buf.write_i32(1) - if value == TransactionBlockKindInput.PROGRAMMABLE_TX: - buf.write_i32(2) - if value == TransactionBlockKindInput.GENESIS: - buf.write_i32(3) - if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: - buf.write_i32(4) - if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: - buf.write_i32(5) - if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: - buf.write_i32(6) - if value == TransactionBlockKindInput.END_OF_EPOCH_TX: - buf.write_i32(7) - - - - - - - -class TransactionExpiration: - """ - A TTL for a transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - transaction-expiration = %x00 ; none - =/ %x01 u64 ; epoch - ``` - """ - - def __init__(self): - raise RuntimeError("TransactionExpiration cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class NONE: - """ - The transaction has no expiration - """ - - - def __init__(self,): - pass - - def __str__(self): - return "TransactionExpiration.NONE()".format() - - def __eq__(self, other): - if not other.is_NONE(): - return False - return True - - class EPOCH: - """ - Validators wont sign a transaction unless the expiration Epoch - is greater than or equal to the current epoch - """ - - def __init__(self, *values): - if len(values) != 1: - raise TypeError(f"Expected 1 arguments, found {len(values)}") - self._values = values - - def __getitem__(self, index): - return self._values[index] - - def __str__(self): - return f"TransactionExpiration.EPOCH{self._values!r}" - - def __eq__(self, other): - if not other.is_EPOCH(): - return False - return self._values == other._values - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_NONE(self) -> bool: - return isinstance(self, TransactionExpiration.NONE) - def is_none(self) -> bool: - return isinstance(self, TransactionExpiration.NONE) - def is_EPOCH(self) -> bool: - return isinstance(self, TransactionExpiration.EPOCH) - def is_epoch(self) -> bool: - return isinstance(self, TransactionExpiration.EPOCH) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -TransactionExpiration.NONE = type("TransactionExpiration.NONE", (TransactionExpiration.NONE, TransactionExpiration,), {}) # type: ignore -TransactionExpiration.EPOCH = type("TransactionExpiration.EPOCH", (TransactionExpiration.EPOCH, TransactionExpiration,), {}) # type: ignore - - - - -class _UniffiConverterTypeTransactionExpiration(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return TransactionExpiration.NONE( - ) - if variant == 2: - return TransactionExpiration.EPOCH( - _UniffiConverterUInt64.read(buf), - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_NONE(): - return - if value.is_EPOCH(): - _UniffiConverterUInt64.check_lower(value._values[0]) - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_NONE(): - buf.write_i32(1) - if value.is_EPOCH(): - buf.write_i32(2) - _UniffiConverterUInt64.write(value._values[0], buf) - - - - - - - -class TypeArgumentError(enum.Enum): - """ - An error with a type argument - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - type-argument-error = type-not-found / constraint-not-satisfied - type-not-found = %x00 - constraint-not-satisfied = %x01 - ``` - """ - - TYPE_NOT_FOUND = 0 - """ - A type was not found in the module specified - """ - - - CONSTRAINT_NOT_SATISFIED = 1 - """ - A type provided did not match the specified constraint - """ - - - - -class _UniffiConverterTypeTypeArgumentError(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return TypeArgumentError.TYPE_NOT_FOUND - if variant == 2: - return TypeArgumentError.CONSTRAINT_NOT_SATISFIED - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value == TypeArgumentError.TYPE_NOT_FOUND: - return - if value == TypeArgumentError.CONSTRAINT_NOT_SATISFIED: - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value == TypeArgumentError.TYPE_NOT_FOUND: - buf.write_i32(1) - if value == TypeArgumentError.CONSTRAINT_NOT_SATISFIED: - buf.write_i32(2) - - - - - - - -class UnchangedSharedKind: - """ - Type of unchanged shared object - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - unchanged-shared-object-kind = read-only-root - =/ mutate-deleted - =/ read-deleted - =/ cancelled - =/ per-epoch-config - - read-only-root = %x00 u64 digest - mutate-deleted = %x01 u64 - read-deleted = %x02 u64 - cancelled = %x03 u64 - per-epoch-config = %x04 - ``` - """ - - def __init__(self): - raise RuntimeError("UnchangedSharedKind cannot be instantiated directly") - - # Each enum variant is a nested class of the enum itself. - class READ_ONLY_ROOT: - """ - Read-only shared objects from the input. We don't really need - ObjectDigest for protocol correctness, but it will make it easier to - verify untrusted read. - """ - - version: "int" - digest: "Digest" - - def __init__(self,version: "int", digest: "Digest"): - self.version = version - self.digest = digest - - def __str__(self): - return "UnchangedSharedKind.READ_ONLY_ROOT(version={}, digest={})".format(self.version, self.digest) - - def __eq__(self, other): - if not other.is_READ_ONLY_ROOT(): - return False - if self.version != other.version: - return False - if self.digest != other.digest: - return False - return True - - class MUTATE_DELETED: - """ - Deleted shared objects that appear mutably/owned in the input. - """ - - version: "int" - - def __init__(self,version: "int"): - self.version = version - - def __str__(self): - return "UnchangedSharedKind.MUTATE_DELETED(version={})".format(self.version) - - def __eq__(self, other): - if not other.is_MUTATE_DELETED(): - return False - if self.version != other.version: - return False - return True - - class READ_DELETED: - """ - Deleted shared objects that appear as read-only in the input. - """ - - version: "int" - - def __init__(self,version: "int"): - self.version = version - - def __str__(self): - return "UnchangedSharedKind.READ_DELETED(version={})".format(self.version) - - def __eq__(self, other): - if not other.is_READ_DELETED(): - return False - if self.version != other.version: - return False - return True - - class CANCELLED: - """ - Shared objects in cancelled transaction. The sequence number embed - cancellation reason. - """ - - version: "int" - - def __init__(self,version: "int"): - self.version = version - - def __str__(self): - return "UnchangedSharedKind.CANCELLED(version={})".format(self.version) - - def __eq__(self, other): - if not other.is_CANCELLED(): - return False - if self.version != other.version: - return False - return True - - class PER_EPOCH_CONFIG: - """ - Read of a per-epoch config object that should remain the same during an - epoch. - """ - - - def __init__(self,): - pass - - def __str__(self): - return "UnchangedSharedKind.PER_EPOCH_CONFIG()".format() - - def __eq__(self, other): - if not other.is_PER_EPOCH_CONFIG(): - return False - return True - - - - # For each variant, we have `is_NAME` and `is_name` methods for easily checking - # whether an instance is that variant. - def is_READ_ONLY_ROOT(self) -> bool: - return isinstance(self, UnchangedSharedKind.READ_ONLY_ROOT) - def is_read_only_root(self) -> bool: - return isinstance(self, UnchangedSharedKind.READ_ONLY_ROOT) - def is_MUTATE_DELETED(self) -> bool: - return isinstance(self, UnchangedSharedKind.MUTATE_DELETED) - def is_mutate_deleted(self) -> bool: - return isinstance(self, UnchangedSharedKind.MUTATE_DELETED) - def is_READ_DELETED(self) -> bool: - return isinstance(self, UnchangedSharedKind.READ_DELETED) - def is_read_deleted(self) -> bool: - return isinstance(self, UnchangedSharedKind.READ_DELETED) - def is_CANCELLED(self) -> bool: - return isinstance(self, UnchangedSharedKind.CANCELLED) - def is_cancelled(self) -> bool: - return isinstance(self, UnchangedSharedKind.CANCELLED) - def is_PER_EPOCH_CONFIG(self) -> bool: - return isinstance(self, UnchangedSharedKind.PER_EPOCH_CONFIG) - def is_per_epoch_config(self) -> bool: - return isinstance(self, UnchangedSharedKind.PER_EPOCH_CONFIG) - - -# Now, a little trick - we make each nested variant class be a subclass of the main -# enum class, so that method calls and instance checks etc will work intuitively. -# We might be able to do this a little more neatly with a metaclass, but this'll do. -UnchangedSharedKind.READ_ONLY_ROOT = type("UnchangedSharedKind.READ_ONLY_ROOT", (UnchangedSharedKind.READ_ONLY_ROOT, UnchangedSharedKind,), {}) # type: ignore -UnchangedSharedKind.MUTATE_DELETED = type("UnchangedSharedKind.MUTATE_DELETED", (UnchangedSharedKind.MUTATE_DELETED, UnchangedSharedKind,), {}) # type: ignore -UnchangedSharedKind.READ_DELETED = type("UnchangedSharedKind.READ_DELETED", (UnchangedSharedKind.READ_DELETED, UnchangedSharedKind,), {}) # type: ignore -UnchangedSharedKind.CANCELLED = type("UnchangedSharedKind.CANCELLED", (UnchangedSharedKind.CANCELLED, UnchangedSharedKind,), {}) # type: ignore -UnchangedSharedKind.PER_EPOCH_CONFIG = type("UnchangedSharedKind.PER_EPOCH_CONFIG", (UnchangedSharedKind.PER_EPOCH_CONFIG, UnchangedSharedKind,), {}) # type: ignore - - - - -class _UniffiConverterTypeUnchangedSharedKind(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - variant = buf.read_i32() - if variant == 1: - return UnchangedSharedKind.READ_ONLY_ROOT( - _UniffiConverterUInt64.read(buf), - _UniffiConverterTypeDigest.read(buf), - ) - if variant == 2: - return UnchangedSharedKind.MUTATE_DELETED( - _UniffiConverterUInt64.read(buf), - ) - if variant == 3: - return UnchangedSharedKind.READ_DELETED( - _UniffiConverterUInt64.read(buf), - ) - if variant == 4: - return UnchangedSharedKind.CANCELLED( - _UniffiConverterUInt64.read(buf), - ) - if variant == 5: - return UnchangedSharedKind.PER_EPOCH_CONFIG( - ) - raise InternalError("Raw enum value doesn't match any cases") - - @staticmethod - def check_lower(value): - if value.is_READ_ONLY_ROOT(): - _UniffiConverterUInt64.check_lower(value.version) - _UniffiConverterTypeDigest.check_lower(value.digest) - return - if value.is_MUTATE_DELETED(): - _UniffiConverterUInt64.check_lower(value.version) - return - if value.is_READ_DELETED(): - _UniffiConverterUInt64.check_lower(value.version) - return - if value.is_CANCELLED(): - _UniffiConverterUInt64.check_lower(value.version) - return - if value.is_PER_EPOCH_CONFIG(): - return - raise ValueError(value) - - @staticmethod - def write(value, buf): - if value.is_READ_ONLY_ROOT(): - buf.write_i32(1) - _UniffiConverterUInt64.write(value.version, buf) - _UniffiConverterTypeDigest.write(value.digest, buf) - if value.is_MUTATE_DELETED(): - buf.write_i32(2) - _UniffiConverterUInt64.write(value.version, buf) - if value.is_READ_DELETED(): - buf.write_i32(3) - _UniffiConverterUInt64.write(value.version, buf) - if value.is_CANCELLED(): - buf.write_i32(4) - _UniffiConverterUInt64.write(value.version, buf) - if value.is_PER_EPOCH_CONFIG(): - buf.write_i32(5) - - - - - -class _UniffiConverterOptionalUInt32(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterUInt32.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterUInt32.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterUInt32.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalInt32(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterInt32.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterInt32.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterInt32.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalUInt64(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterUInt64.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterUInt64.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterUInt64.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalBool(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterBool.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterBool.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterBool.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalString(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterString.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterString.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterString.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalBytes(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterBytes.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterBytes.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterBytes.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalDuration(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterDuration.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterDuration.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterDuration.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeAddress(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeAddress.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeAddress.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeAddress.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeArgument(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeArgument.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeArgument.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeArgument.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeCheckpointSummary(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeCheckpointSummary.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeCheckpointSummary.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeCheckpointSummary.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeDigest(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeDigest.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeDigest.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeDigest.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeEd25519PublicKey(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeEd25519PublicKey.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeEd25519PublicKey.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeEd25519PublicKey.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeEd25519Signature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeEd25519Signature.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeEd25519Signature.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeEd25519Signature.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveFunction(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveFunction.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveFunction.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveFunction.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMovePackage(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMovePackage.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMovePackage.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMovePackage.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMultisigAggregatedSignature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMultisigAggregatedSignature.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMultisigAggregatedSignature.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMultisigAggregatedSignature.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeName(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeName.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeName.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeName.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeObject(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeObject.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeObject.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeObject.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeObjectId(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeObjectId.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeObjectId.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeObjectId.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypePasskeyAuthenticator(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypePasskeyAuthenticator.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypePasskeyAuthenticator.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypePasskeyAuthenticator.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSecp256k1PublicKey(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSecp256k1PublicKey.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSecp256k1PublicKey.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSecp256k1PublicKey.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSecp256k1Signature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSecp256k1Signature.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSecp256k1Signature.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSecp256k1Signature.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSecp256r1PublicKey(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSecp256r1PublicKey.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSecp256r1PublicKey.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSecp256r1PublicKey.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSecp256r1Signature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSecp256r1Signature.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSecp256r1Signature.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSecp256r1Signature.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSimpleSignature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSimpleSignature.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSimpleSignature.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSimpleSignature.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeStructTag(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeStructTag.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeStructTag.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeStructTag.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeTransactionEffects(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeTransactionEffects.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeTransactionEffects.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeTransactionEffects.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeTypeTag(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeTypeTag.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeTypeTag.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeTypeTag.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeZkLoginAuthenticator(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeZkLoginAuthenticator.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeZkLoginAuthenticator.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeZkLoginAuthenticator.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeZkLoginPublicIdentifier(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeZkLoginPublicIdentifier.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeZkLoginPublicIdentifier.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeZkLoginPublicIdentifier.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeZkloginVerifier(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeZkloginVerifier.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeZkloginVerifier.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeZkloginVerifier.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeBatchSendStatus(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeBatchSendStatus.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeBatchSendStatus.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeBatchSendStatus.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeCoinMetadata(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeCoinMetadata.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeCoinMetadata.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeCoinMetadata.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeDynamicFieldOutput(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeDynamicFieldOutput.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeDynamicFieldOutput.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeDynamicFieldOutput.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeDynamicFieldValue(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeDynamicFieldValue.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeDynamicFieldValue.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeDynamicFieldValue.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeEndOfEpochData(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeEndOfEpochData.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeEndOfEpochData.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeEndOfEpochData.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeEpoch(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeEpoch.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeEpoch.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeEpoch.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeEventFilter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeEventFilter.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeEventFilter.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeEventFilter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeFaucetReceipt(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeFaucetReceipt.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeFaucetReceipt.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeFaucetReceipt.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveEnumConnection(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveEnumConnection.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveEnumConnection.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveEnumConnection.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveFunctionConnection(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveFunctionConnection.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveFunctionConnection.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveFunctionConnection.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveLocation(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveLocation.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveLocation.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveLocation.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveModule(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveModule.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveModule.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveModule.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveStruct(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveStruct.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveStruct.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveStruct.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveStructConnection(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveStructConnection.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveStructConnection.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveStructConnection.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeObjectFilter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeObjectFilter.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeObjectFilter.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeObjectFilter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeOpenMoveType(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeOpenMoveType.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeOpenMoveType.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeOpenMoveType.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypePaginationFilter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypePaginationFilter.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypePaginationFilter.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypePaginationFilter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeProtocolConfigs.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeProtocolConfigs.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeProtocolConfigs.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeSignedTransaction.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeSignedTransaction.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeSignedTransaction.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeTransactionDataEffects(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeTransactionDataEffects.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeTransactionDataEffects.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeTransactionDataEffects.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeTransactionsFilter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeTransactionsFilter.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeTransactionsFilter.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeTransactionsFilter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeValidatorCredentials(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeValidatorCredentials.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeValidatorCredentials.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeValidatorCredentials.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeValidatorSet(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeValidatorSet.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeValidatorSet.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeValidatorSet.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeMoveVisibility(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeMoveVisibility.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeMoveVisibility.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeMoveVisibility.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeNameFormat(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeNameFormat.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeNameFormat.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeNameFormat.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeTransactionBlockKindInput.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterTypeTransactionBlockKindInput.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeTransactionBlockKindInput.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalSequenceInt32(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceInt32.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterSequenceInt32.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceInt32.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalSequenceString(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceString.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterSequenceString.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceString.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalSequenceTypeObjectId(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeObjectId.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterSequenceTypeObjectId.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeObjectId.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalSequenceTypeMoveEnumVariant(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeMoveEnumVariant.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - - buf.write_u8(1) - _UniffiConverterSequenceTypeMoveEnumVariant.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeMoveEnumVariant.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") - - - -class _UniffiConverterOptionalSequenceTypeMoveField(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeMoveField.check_lower(value) - - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - buf.write_u8(1) - _UniffiConverterSequenceTypeMoveField.write(value, buf) - - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeMoveField.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +# A ctypes library to expose the extern-C FFI definitions. +# This is an implementation detail which will be called internally by the public API. +_UniffiLib = _uniffi_load_indirect() +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.argtypes = ( + _UniffiForeignBytes, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.restype = _UniffiRustBuffer +_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8, +) +_UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64, +) +class _UniffiForeignFutureDroppedCallbackStruct(ctypes.Structure): + _fields_ = [ + ("handle", ctypes.c_uint64), + ("free", _UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK), + ] +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.restype = ctypes.c_uint8 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.restype = ctypes.c_int8 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.restype = ctypes.c_uint16 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.restype = ctypes.c_int16 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u32.restype = ctypes.c_uint32 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32.restype = ctypes.c_int32 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64.restype = ctypes.c_uint64 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i64.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i64.restype = ctypes.c_int64 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f32.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f32.restype = ctypes.c_float +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f64.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_f64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_f64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_f64.restype = ctypes.c_double +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f64.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_f64.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_rust_buffer.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_void.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_void.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changedobject_uniffi_trait_display.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changedobject_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsv1_uniffi_trait_display.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsv1_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_unchangedsharedobject_uniffi_trait_display.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_unchangedsharedobject_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input.argtypes = ( + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result.argtypes = ( + ctypes.c_uint16, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result.argtypes = ( + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_int8, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint8, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.restype = ctypes.c_uint8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint32, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels.restype = ctypes.c_uint32 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16.argtypes = ( + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32.argtypes = ( + ctypes.c_uint32, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8.argtypes = ( + ctypes.c_uint8, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run.argtypes = ( + ctypes.c_uint64, + ctypes.c_int8, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_int8, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_int8, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks.restype = ctypes.c_uint64 +_UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.argtypes = ( +) +_UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.restype = ctypes.c_uint32 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_decode.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_decode.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_encode.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_base64_encode.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_decode.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_decode.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_encode.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_func_hex_encode.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_hex.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_address_to_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_gas.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_input.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_nested_result.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_argument_new_result.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_argument_get_nested_result.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381privatekey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_sign_checkpoint_summary.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_try_sign.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381privatekey_verifying_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381verifyingkey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381verifyingkey_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_cancelledtransaction_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_cancelledtransaction_version_assignments.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepoch_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_computation_charge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_epoch_start_timestamp_ms.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_non_refundable_storage_fee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_protocol_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_charge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_storage_rebate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepoch_system_packages.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_changeepochv2_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_computation_charge_burned.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_epoch_start_timestamp_ms.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_non_refundable_storage_fee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_protocol_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_charge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_storage_rebate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_changeepochv2_system_packages.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontents_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontents_transaction_info.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointsummary_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_checkpoint_commitments.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_content_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_end_of_epoch_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_epoch_rolling_gas_cost_summary.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_network_total_transactions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_previous_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_sequence_number.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_signing_message.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_timestamp_ms.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummary_version_specific_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointtransactioninfo_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_signatures.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointtransactioninfo_transaction.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_make_move_vector.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_merge_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_move_call.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_publish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_split_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_transfer_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_command_new_upgrade.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitprologuev1_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_commit_timestamp_ms.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_commit_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_consensus_determined_version_assignments.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_round.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitprologuev1_sub_dag_index.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensusdeterminedversionassignments_new_cancelled_transactions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_as_cancelled_transactions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensusdeterminedversionassignments_is_cancelled_transactions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_try_sign_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519privatekey_verifying_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519verifyingkey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519verifyingkey_verify_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_create.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_authenticator_state_expire.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_new_change_epoch_v2.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservation_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_executiontimeobservation_observations.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_make_move_vec.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_merge_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_move_entry_point.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_publish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_split_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_transfer_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservationkey_new_upgrade.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_executiontimeobservations_new_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_devnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_localnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_new_testnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesisobject_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_object_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_owner.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesisobject_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_genesistransaction_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_events.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_genesistransaction_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_localnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_mainnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_registrations.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_run_query.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_identifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_identifier_as_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_immutable_or_owned.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_pure.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_receiving.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_input_new_shared.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_makemovevector_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_elements.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_makemovevector_type_tag.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_mergecoins_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_function.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_function.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_module.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_module.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movecall_type_arguments.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_is_entry.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_name.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_name.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_parameters.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_return_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_type_parameters.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movefunction_visibility.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_linkage_table.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_modules.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_modules.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_type_origin_table.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackage_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_message.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregator_new_with_transaction.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_finish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregator_with_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigverifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_with_zklogin_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigverifier_zklogin_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_name_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_format.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_format.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_sln.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_sln.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_subname.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_is_subname.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_label.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_label.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_labels.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_labels.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_num_labels.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_num_labels.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_parent.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_name_parent.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_nameregistration_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_expiration_timestamp_ms.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_nameregistration_name_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_package_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_object_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_owner.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_owner.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_previous_transaction.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_storage_rebate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdata_new_move_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_package_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_as_struct_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdata_is_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_derive_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_derive_dynamic_child_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objecttype_new_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_as_struct_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objecttype_is_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_immutable.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_owner_new_shared.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_address_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_object_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_as_shared_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_immutable.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_owner_is_shared.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_gas.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_object_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_receiving.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_res.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_shared_mut.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_string.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u128.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u16.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u256.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_u8.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ptbargument_vector.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeypublickey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeypublickey_inner.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_passkeyverifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_personalmessage_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_message_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_personalmessage_signing_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_programmabletransaction_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_commands.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_programmabletransaction_inputs.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_publish_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_dependencies.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_modules.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_publish_modules.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_try_sign_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1privatekey_verifying_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifier_verify_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1verifyingkey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1verifyingkey_verify_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_try_sign_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1privatekey_verifying_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifier_verify_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1verifyingkey_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1verifyingkey_verify_user.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplekeypair_from_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bech32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_try_sign.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplekeypair_verifying_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simplesignature_new_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_der.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_to_pem.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simpleverifyingkey_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_amounts.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_bcs_serialize.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_signing_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionbuilder_init.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_dry_run.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_execute_with_sponsor.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_expiration.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_finish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_make_move_vec.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_merge_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_move_call.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_publish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_send_iota.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_split_coins.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_sponsor.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_transfer_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_upgrade.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_new_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionevents_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_digest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_events.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionevents_events.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_authenticator_state_update_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_consensus_commit_prologue_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_end_of_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_genesis.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_programmable_transaction.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_new_randomness_state_update.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transferobjects_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transferobjects_objects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_bool.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_signer.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u128.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u16.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u256.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_u8.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_typetag_new_vector.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_struct_tag_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_as_vector_type_tag_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_bool.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_signer.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_struct.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u128.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u16.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u256.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u32.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_u8.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_typetag_is_vector.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_upgrade_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_dependencies.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_modules.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_modules.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_package.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_package.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_with_zklogin_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignatureverifier_zklogin_verifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatoraggregatedsignature_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_bitmap_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatoraggregatedsignature_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_add_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_committee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureaggregator_finish.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorcommitteesignatureverifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_committee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_aggregated.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorcommitteesignatureverifier_verify_checkpoint_summary.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorexecutiontimeobservation_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_duration.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorexecutiontimeobservation_validator.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_validatorsignature_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorsignature_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_versionassignment_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_object_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_version.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_versionassignment_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_jwk_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_public_identifier.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_padded.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_derive_address_unpadded.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_dev.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginverifier_new_mainnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_jwks.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_verify.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginverifier_with_jwks.restype = ctypes.c_uint16 +_uniffi_check_contract_api_version(_UniffiLib) +# _uniffi_check_api_checksums(_UniffiLib) -class _UniffiConverterOptionalSequenceTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeMoveFunctionTypeParameter.check_lower(value) +# RustFuturePoll values +_UNIFFI_RUST_FUTURE_POLL_READY = 0 +_UNIFFI_RUST_FUTURE_POLL_WAKE = 1 - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return +# Stores futures for _uniffi_continuation_callback +_UniffiContinuationHandleMap = _UniffiHandleMap() - buf.write_u8(1) - _UniffiConverterSequenceTypeMoveFunctionTypeParameter.write(value, buf) +_UNIFFI_GLOBAL_EVENT_LOOP = None - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeMoveFunctionTypeParameter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +""" +Set the event loop to use for async functions +This is needed if some async functions run outside of the eventloop, for example: + - A non-eventloop thread is spawned, maybe from `EventLoop.run_in_executor` or maybe from the + Rust code spawning its own thread. + - The Rust code calls an async callback method from a sync callback function, using something + like `pollster` to block on the async call. +In this case, we need an event loop to run the Python async function, but there's no eventloop set +for the thread. Use `uniffi_set_event_loop` to force an eventloop to be used in this case. +""" +def uniffi_set_event_loop(eventloop: asyncio.BaseEventLoop): + global _UNIFFI_GLOBAL_EVENT_LOOP + _UNIFFI_GLOBAL_EVENT_LOOP = eventloop -class _UniffiConverterOptionalSequenceTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeMoveStructTypeParameter.check_lower(value) +def _uniffi_get_event_loop(): + if _UNIFFI_GLOBAL_EVENT_LOOP is not None: + return _UNIFFI_GLOBAL_EVENT_LOOP + else: + return asyncio.get_running_loop() - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return +# Continuation callback for async functions +# lift the return value or error and resolve the future, causing the async function to resume. +@_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK +def _uniffi_continuation_callback(future_ptr, poll_code): + (eventloop, future) = _UniffiContinuationHandleMap.remove(future_ptr) + eventloop.call_soon_threadsafe(_uniffi_set_future_result, future, poll_code) - buf.write_u8(1) - _UniffiConverterSequenceTypeMoveStructTypeParameter.write(value, buf) +def _uniffi_set_future_result(future, poll_code): + if not future.cancelled(): + future.set_result(poll_code) - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeMoveStructTypeParameter.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, lift_func, error_ffi_converter): + try: + eventloop = _uniffi_get_event_loop() + # Loop and poll until we see a _UNIFFI_RUST_FUTURE_POLL_READY value + while True: + future = eventloop.create_future() + ffi_poll( + rust_future, + _uniffi_continuation_callback, + _UniffiContinuationHandleMap.insert((eventloop, future)), + ) + poll_code = await future + if poll_code == _UNIFFI_RUST_FUTURE_POLL_READY: + break + return lift_func( + _uniffi_rust_call_with_error(error_ffi_converter, ffi_complete, rust_future) + ) + finally: + ffi_free(rust_future) -class _UniffiConverterOptionalSequenceTypeObjectRef(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeObjectRef.check_lower(value) +# Public interface members begin here. - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return - buf.write_u8(1) - _UniffiConverterSequenceTypeObjectRef.write(value, buf) +class _UniffiFfiConverterString: + @staticmethod + def check_lower(value): + if not isinstance(value, str): + raise TypeError("argument must be str, not {}".format(type(value).__name__)) + return value - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeObjectRef.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") + @staticmethod + def read(buf): + size = buf.read_i32() + if size < 0: + raise InternalError("Unexpected negative string length") + utf8_bytes = buf.read(size) + return utf8_bytes.decode("utf-8") + @staticmethod + def write(value, buf): + utf8_bytes = value.encode("utf-8") + buf.write_i32(len(utf8_bytes)) + buf.write(utf8_bytes) + @staticmethod + def lift(buf): + with buf.consume_with_stream() as stream: + return stream.read(stream.remaining()).decode("utf-8") -class _UniffiConverterOptionalSequenceTypeOpenMoveType(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeOpenMoveType.check_lower(value) + @staticmethod + def lower(value): + with _UniffiRustBuffer.alloc_with_builder() as builder: + builder.write(value.encode("utf-8")) + return builder.finalize() - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return +@dataclass +class JwkId: + """ + Key to uniquely identify a JWK - buf.write_u8(1) - _UniffiConverterSequenceTypeOpenMoveType.write(value, buf) + # BCS - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeOpenMoveType.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") + The BCS serialized form for this type is defined by the following ABNF: + ```text + jwk-id = string string + ``` +""" + def __init__(self, *, iss:str, kid:str): + self.iss = iss + self.kid = kid + + + + def __str__(self): + return "JwkId(iss={}, kid={})".format(self.iss, self.kid) + def __eq__(self, other): + if self.iss != other.iss: + return False + if self.kid != other.kid: + return False + return True -class _UniffiConverterOptionalSequenceTypeMoveAbility(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterSequenceTypeMoveAbility.check_lower(value) +class _UniffiFfiConverterTypeJwkId(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return JwkId( + iss=_UniffiFfiConverterString.read(buf), + kid=_UniffiFfiConverterString.read(buf), + ) - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.iss) + _UniffiFfiConverterString.check_lower(value.kid) - buf.write_u8(1) - _UniffiConverterSequenceTypeMoveAbility.write(value, buf) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.iss, buf) + _UniffiFfiConverterString.write(value.kid, buf) - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterSequenceTypeMoveAbility.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +@dataclass +class Jwk: + """ + A JSON Web Key + Struct that contains info for a JWK. A list of them for different kids can + be retrieved from the JWK endpoint (e.g. ). + The JWK is used to verify the JWT token. + # BCS -class _UniffiConverterOptionalMapStringSequenceString(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterMapStringSequenceString.check_lower(value) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return + ```text + jwk = string string string string + ``` +""" + def __init__(self, *, kty:str, e:str, n:str, alg:str): + self.kty = kty + self.e = e + self.n = n + self.alg = alg + + - buf.write_u8(1) - _UniffiConverterMapStringSequenceString.write(value, buf) + + def __str__(self): + return "Jwk(kty={}, e={}, n={}, alg={})".format(self.kty, self.e, self.n, self.alg) + def __eq__(self, other): + if self.kty != other.kty: + return False + if self.e != other.e: + return False + if self.n != other.n: + return False + if self.alg != other.alg: + return False + return True - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterMapStringSequenceString.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterTypeJwk(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return Jwk( + kty=_UniffiFfiConverterString.read(buf), + e=_UniffiFfiConverterString.read(buf), + n=_UniffiFfiConverterString.read(buf), + alg=_UniffiFfiConverterString.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.kty) + _UniffiFfiConverterString.check_lower(value.e) + _UniffiFfiConverterString.check_lower(value.n) + _UniffiFfiConverterString.check_lower(value.alg) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.kty, buf) + _UniffiFfiConverterString.write(value.e, buf) + _UniffiFfiConverterString.write(value.n, buf) + _UniffiFfiConverterString.write(value.alg, buf) -class _UniffiConverterOptionalTypeBase64(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeBase64.check_lower(value) +class _UniffiFfiConverterUInt64(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u64" + VALUE_MIN = 0 + VALUE_MAX = 2**64 - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return + @staticmethod + def read(buf): + return buf.read_u64() + + @staticmethod + def write(value, buf): + buf.write_u64(value) - buf.write_u8(1) - _UniffiConverterTypeBase64.write(value, buf) +@dataclass +class ActiveJwk: + """ + A new Jwk - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeBase64.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + active-jwk = jwk-id jwk u64 + ``` +""" + def __init__(self, *, jwk_id:JwkId, jwk:Jwk, epoch:int): + self.jwk_id = jwk_id + self.jwk = jwk + self.epoch = epoch + + -class _UniffiConverterOptionalTypeBigInt(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeBigInt.check_lower(value) + + def __str__(self): + return "ActiveJwk(jwk_id={}, jwk={}, epoch={})".format(self.jwk_id, self.jwk, self.epoch) + def __eq__(self, other): + if self.jwk_id != other.jwk_id: + return False + if self.jwk != other.jwk: + return False + if self.epoch != other.epoch: + return False + return True - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return +class _UniffiFfiConverterTypeActiveJwk(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ActiveJwk( + jwk_id=_UniffiFfiConverterTypeJwkId.read(buf), + jwk=_UniffiFfiConverterTypeJwk.read(buf), + epoch=_UniffiFfiConverterUInt64.read(buf), + ) - buf.write_u8(1) - _UniffiConverterTypeBigInt.write(value, buf) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeJwkId.check_lower(value.jwk_id) + _UniffiFfiConverterTypeJwk.check_lower(value.jwk) + _UniffiFfiConverterUInt64.check_lower(value.epoch) - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeBigInt.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeJwkId.write(value.jwk_id, buf) + _UniffiFfiConverterTypeJwk.write(value.jwk, buf) + _UniffiFfiConverterUInt64.write(value.epoch, buf) +@dataclass +class AuthenticatorStateExpire: + """ + Expire old JWKs + # BCS -class _UniffiConverterOptionalTypeValue(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - if value is not None: - _UniffiConverterTypeValue.check_lower(value) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - if value is None: - buf.write_u8(0) - return + ```text + authenticator-state-expire = u64 u64 + ``` +""" + def __init__(self, *, min_epoch:int, authenticator_obj_initial_shared_version:int): + self.min_epoch = min_epoch + self.authenticator_obj_initial_shared_version = authenticator_obj_initial_shared_version + + - buf.write_u8(1) - _UniffiConverterTypeValue.write(value, buf) + + def __str__(self): + return "AuthenticatorStateExpire(min_epoch={}, authenticator_obj_initial_shared_version={})".format(self.min_epoch, self.authenticator_obj_initial_shared_version) + def __eq__(self, other): + if self.min_epoch != other.min_epoch: + return False + if self.authenticator_obj_initial_shared_version != other.authenticator_obj_initial_shared_version: + return False + return True - @classmethod - def read(cls, buf): - flag = buf.read_u8() - if flag == 0: - return None - elif flag == 1: - return _UniffiConverterTypeValue.read(buf) - else: - raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterTypeAuthenticatorStateExpire(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return AuthenticatorStateExpire( + min_epoch=_UniffiFfiConverterUInt64.read(buf), + authenticator_obj_initial_shared_version=_UniffiFfiConverterUInt64.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.min_epoch) + _UniffiFfiConverterUInt64.check_lower(value.authenticator_obj_initial_shared_version) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.min_epoch, buf) + _UniffiFfiConverterUInt64.write(value.authenticator_obj_initial_shared_version, buf) -class _UniffiConverterSequenceInt32(_UniffiConverterRustBuffer): +class _UniffiFfiConverterSequenceTypeActiveJwk(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterInt32.check_lower(item) + _UniffiFfiConverterTypeActiveJwk.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterInt32.write(item, buf) + _UniffiFfiConverterTypeActiveJwk.write(item, buf) @classmethod def read(cls, buf): @@ -20261,798 +9141,1609 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterInt32.read(buf) for i in range(count) + _UniffiFfiConverterTypeActiveJwk.read(buf) for i in range(count) ] +@dataclass +class AuthenticatorStateUpdateV1: + """ + Update the set of valid JWKs + # BCS -class _UniffiConverterSequenceUInt64(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterUInt64.check_lower(item) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterUInt64.write(item, buf) + ```text + authenticator-state-update = u64 ; epoch + u64 ; round + (vector active-jwk) + u64 ; initial version of the authenticator object + ``` +""" + def __init__(self, *, epoch:int, round:int, new_active_jwks:typing.List[ActiveJwk], authenticator_obj_initial_shared_version:int): + self.epoch = epoch + self.round = round + self.new_active_jwks = new_active_jwks + self.authenticator_obj_initial_shared_version = authenticator_obj_initial_shared_version + + - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + + def __str__(self): + return "AuthenticatorStateUpdateV1(epoch={}, round={}, new_active_jwks={}, authenticator_obj_initial_shared_version={})".format(self.epoch, self.round, self.new_active_jwks, self.authenticator_obj_initial_shared_version) + def __eq__(self, other): + if self.epoch != other.epoch: + return False + if self.round != other.round: + return False + if self.new_active_jwks != other.new_active_jwks: + return False + if self.authenticator_obj_initial_shared_version != other.authenticator_obj_initial_shared_version: + return False + return True - return [ - _UniffiConverterUInt64.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeAuthenticatorStateUpdateV1(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return AuthenticatorStateUpdateV1( + epoch=_UniffiFfiConverterUInt64.read(buf), + round=_UniffiFfiConverterUInt64.read(buf), + new_active_jwks=_UniffiFfiConverterSequenceTypeActiveJwk.read(buf), + authenticator_obj_initial_shared_version=_UniffiFfiConverterUInt64.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.epoch) + _UniffiFfiConverterUInt64.check_lower(value.round) + _UniffiFfiConverterSequenceTypeActiveJwk.check_lower(value.new_active_jwks) + _UniffiFfiConverterUInt64.check_lower(value.authenticator_obj_initial_shared_version) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.epoch, buf) + _UniffiFfiConverterUInt64.write(value.round, buf) + _UniffiFfiConverterSequenceTypeActiveJwk.write(value.new_active_jwks, buf) + _UniffiFfiConverterUInt64.write(value.authenticator_obj_initial_shared_version, buf) -class _UniffiConverterSequenceString(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterString.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterString.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterString.read(buf) for i in range(count) - ] +class BatchSendStatusType(enum.Enum): + + IN_PROGRESS = 0 + + SUCCEEDED = 1 + + DISCARDED = 2 + -class _UniffiConverterSequenceBytes(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterBytes.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterBytes.write(item, buf) +class _UniffiFfiConverterTypeBatchSendStatusType(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return BatchSendStatusType.IN_PROGRESS + if variant == 2: + return BatchSendStatusType.SUCCEEDED + if variant == 3: + return BatchSendStatusType.DISCARDED + raise InternalError("Raw enum value doesn't match any cases") - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + @staticmethod + def check_lower(value): + if value == BatchSendStatusType.IN_PROGRESS: + return + if value == BatchSendStatusType.SUCCEEDED: + return + if value == BatchSendStatusType.DISCARDED: + return + raise ValueError(value) + + @staticmethod + def write(value, buf): + if value == BatchSendStatusType.IN_PROGRESS: + buf.write_i32(1) + if value == BatchSendStatusType.SUCCEEDED: + buf.write_i32(2) + if value == BatchSendStatusType.DISCARDED: + buf.write_i32(3) + + + +class _UniffiFfiConverterBytes(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + size = buf.read_i32() + if size < 0: + raise InternalError("Unexpected negative byte string length") + return buf.read(size) + + @staticmethod + def check_lower(value): + try: + memoryview(value) + except TypeError: + raise TypeError("a bytes-like object is required, not {!r}".format(type(value).__name__)) + + @staticmethod + def write(value, buf): + buf.write_i32(len(value)) + buf.write(value) + + +class AddressProtocol(typing.Protocol): + """ + Unique identifier for an Account on the IOTA blockchain. + + An `Address` is a 32-byte pseudonymous identifier used to uniquely identify + an account and asset-ownership on the IOTA blockchain. Often, human-readable + addresses are encoded in hexadecimal with a `0x` prefix. For example, this + is a valid IOTA address: + `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. - return [ - _UniffiConverterBytes.read(buf) for i in range(count) - ] + ``` + use iota_types::Address; + let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; + let address = Address::from_hex(hex).unwrap(); + println!("Address: {}", address); + assert_eq!(hex, address.to_string()); + ``` + # Deriving an Address -class _UniffiConverterSequenceTypeAddress(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeAddress.check_lower(item) + Addresses are cryptographically derived from a number of user account + authenticators, the simplest of which is an + [`Ed25519PublicKey`](iota_types::Ed25519PublicKey). - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeAddress.write(item, buf) + Deriving an address consists of the Blake2b256 hash of the sequence of bytes + of its corresponding authenticator, prefixed with a domain-separator (except + ed25519, for compatibility reasons). For each other authenticator, this + domain-separator is the single byte-value of its + [`SignatureScheme`](iota_types::SignatureScheme) flag. E.g. `hash(signature + schema flag || authenticator bytes)`. - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + Each authenticator has a method for deriving its `Address` as well as + documentation for the specifics of how the derivation is done. See + [`Ed25519PublicKey::derive_address`] for an example. - return [ - _UniffiConverterTypeAddress.read(buf) for i in range(count) - ] + [`Ed25519PublicKey::derive_address`]: iota_types::Ed25519PublicKey::derive_address + ## Relationship to ObjectIds + [`ObjectId`]s and [`Address`]es share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure that, + cryptographically, there won't be any overlap, e.g. there can't be a + valid `Object` who's `ObjectId` is equal to that of the `Address` of a user + account. -class _UniffiConverterSequenceTypeArgument(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeArgument.check_lower(item) + [`ObjectId`]: iota_types::ObjectId - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeArgument.write(item, buf) + # BCS - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + An `Address`'s BCS serialized form is defined by the following: - return [ - _UniffiConverterTypeArgument.read(buf) for i in range(count) - ] + ```text + address = 32OCTET + ``` +""" + + def to_bytes(self, ) -> bytes: + raise NotImplementedError + def to_hex(self, ) -> str: + raise NotImplementedError +class Address(AddressProtocol): + """ + Unique identifier for an Account on the IOTA blockchain. + An `Address` is a 32-byte pseudonymous identifier used to uniquely identify + an account and asset-ownership on the IOTA blockchain. Often, human-readable + addresses are encoded in hexadecimal with a `0x` prefix. For example, this + is a valid IOTA address: + `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. -class _UniffiConverterSequenceTypeCancelledTransaction(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCancelledTransaction.check_lower(item) + ``` + use iota_types::Address; - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCancelledTransaction.write(item, buf) + let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; + let address = Address::from_hex(hex).unwrap(); + println!("Address: {}", address); + assert_eq!(hex, address.to_string()); + ``` - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + # Deriving an Address - return [ - _UniffiConverterTypeCancelledTransaction.read(buf) for i in range(count) - ] + Addresses are cryptographically derived from a number of user account + authenticators, the simplest of which is an + [`Ed25519PublicKey`](iota_types::Ed25519PublicKey). + Deriving an address consists of the Blake2b256 hash of the sequence of bytes + of its corresponding authenticator, prefixed with a domain-separator (except + ed25519, for compatibility reasons). For each other authenticator, this + domain-separator is the single byte-value of its + [`SignatureScheme`](iota_types::SignatureScheme) flag. E.g. `hash(signature + schema flag || authenticator bytes)`. + Each authenticator has a method for deriving its `Address` as well as + documentation for the specifics of how the derivation is done. See + [`Ed25519PublicKey::derive_address`] for an example. -class _UniffiConverterSequenceTypeCheckpointCommitment(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCheckpointCommitment.check_lower(item) + [`Ed25519PublicKey::derive_address`]: iota_types::Ed25519PublicKey::derive_address - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCheckpointCommitment.write(item, buf) + ## Relationship to ObjectIds - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + [`ObjectId`]s and [`Address`]es share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure that, + cryptographically, there won't be any overlap, e.g. there can't be a + valid `Object` who's `ObjectId` is equal to that of the `Address` of a user + account. - return [ - _UniffiConverterTypeCheckpointCommitment.read(buf) for i in range(count) - ] + [`ObjectId`]: iota_types::ObjectId + # BCS + An `Address`'s BCS serialized form is defined by the following: -class _UniffiConverterSequenceTypeCheckpointSummary(_UniffiConverterRustBuffer): + ```text + address = 32OCTET + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCheckpointSummary.check_lower(item) - + def from_bytes(cls, bytes: bytes) -> Address: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCheckpointSummary.write(item, buf) - + def from_hex(cls, hex: str) -> Address: + + _UniffiFfiConverterString.check_lower(hex) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(hex), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeCheckpointSummary.read(buf) for i in range(count) - ] + def generate(cls, ) -> Address: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address, self._handle) -class _UniffiConverterSequenceTypeCheckpointTransactionInfo(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCheckpointTransactionInfo.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_hex(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCheckpointTransactionInfo.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeCheckpointTransactionInfo.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeAddress: + @staticmethod + def lift(value: int) -> Address: + return Address._uniffi_make_instance(value) -class _UniffiConverterSequenceTypeCoin(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCoin.check_lower(item) + @staticmethod + def check_lower(value: Address): + if not isinstance(value, Address): + raise TypeError("Expected Address instance, {} found".format(type(value).__name__)) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCoin.write(item, buf) + @staticmethod + def lower(value: Address) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeCoin.read(buf) for i in range(count) - ] - + def read(cls, buf: _UniffiRustBuffer) -> Address: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Address, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) -class _UniffiConverterSequenceTypeCommand(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalTypeTypeTag(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCommand.check_lower(item) + if value is not None: + _UniffiFfiConverterTypeTypeTag.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCommand.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeTypeTag.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTypeTag.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return [ - _UniffiConverterTypeCommand.read(buf) for i in range(count) - ] +class StructTagProtocol(typing.Protocol): + """ + Type information for a move struct + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + struct-tag = address ; address of the package + identifier ; name of the module + identifier ; name of the type + (vector type-tag) ; type parameters + ``` +""" + + def address(self, ) -> Address: + raise NotImplementedError + def coin_type(self, ) -> TypeTag: + """ + Checks if this is a Coin type +""" + raise NotImplementedError + def coin_type_opt(self, ) -> typing.Optional[TypeTag]: + """ + Checks if this is a Coin type +""" + raise NotImplementedError + +class StructTag(StructTagProtocol): + """ + Type information for a move struct + # BCS -class _UniffiConverterSequenceTypeDigest(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeDigest.check_lower(item) + The BCS serialized form for this type is defined by the following ABNF: + ```text + struct-tag = address ; address of the package + identifier ; name of the module + identifier ; name of the type + (vector type-tag) ; type parameters + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeDigest.write(item, buf) - + def coin(cls, type_tag: TypeTag) -> StructTag: + + _UniffiFfiConverterTypeTypeTag.check_lower(type_tag) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTypeTag.lower(type_tag), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeDigest.read(buf) for i in range(count) - ] + def gas_coin(cls, ) -> StructTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, address: Address,module: Identifier,name: Identifier,type_params: typing.Union[object, typing.List[TypeTag]] = _DEFAULT): + + _UniffiFfiConverterTypeAddress.check_lower(address) + + _UniffiFfiConverterTypeIdentifier.check_lower(module) + + _UniffiFfiConverterTypeIdentifier.check_lower(name) + + if type_params is _DEFAULT: + type_params = [] + _UniffiFfiConverterSequenceTypeTypeTag.check_lower(type_params) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterTypeIdentifier.lower(module), + _UniffiFfiConverterTypeIdentifier.lower(name), + _UniffiFfiConverterSequenceTypeTypeTag.lower(type_params), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + @classmethod + def staked_iota(cls, ) -> StructTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag, self._handle) -class _UniffiConverterSequenceTypeEndOfEpochTransactionKind(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeEndOfEpochTransactionKind.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def address(self, ) -> Address: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def coin_type(self, ) -> TypeTag: + """ + Checks if this is a Coin type +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def coin_type_opt(self, ) -> typing.Optional[TypeTag]: + """ + Checks if this is a Coin type +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeEndOfEpochTransactionKind.write(item, buf) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeEndOfEpochTransactionKind.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeStructTag: + @staticmethod + def lift(value: int) -> StructTag: + return StructTag._uniffi_make_instance(value) + @staticmethod + def check_lower(value: StructTag): + if not isinstance(value, StructTag): + raise TypeError("Expected StructTag instance, {} found".format(type(value).__name__)) -class _UniffiConverterSequenceTypeExecutionTimeObservation(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeExecutionTimeObservation.check_lower(item) + @staticmethod + def lower(value: StructTag) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeExecutionTimeObservation.write(item, buf) + def read(cls, buf: _UniffiRustBuffer) -> StructTag: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeExecutionTimeObservation.read(buf) for i in range(count) - ] - - + def write(cls, value: StructTag, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) -class _UniffiConverterSequenceTypeGenesisObject(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalTypeStructTag(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeGenesisObject.check_lower(item) + if value is not None: + _UniffiFfiConverterTypeStructTag.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeGenesisObject.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeStructTag.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeStructTag.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return [ - _UniffiConverterTypeGenesisObject.read(buf) for i in range(count) - ] +class _UniffiFfiConverterBoolean: + @classmethod + def check_lower(cls, value): + return not not value + @classmethod + def lower(cls, value): + return 1 if value else 0 + @staticmethod + def lift(value): + return value != 0 -class _UniffiConverterSequenceTypeInput(_UniffiConverterRustBuffer): @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeInput.check_lower(item) + def read(cls, buf): + return cls.lift(buf.read_u8()) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeInput.write(item, buf) + buf.write_u8(value) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeInput.read(buf) for i in range(count) - ] +class TypeTagProtocol(typing.Protocol): + """ + Type of a move value + # BCS + The BCS serialized form for this type is defined by the following ABNF: -class _UniffiConverterSequenceTypeMoveFunction(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveFunction.check_lower(item) + ```text + type-tag = type-tag-u8 \ + type-tag-u16 \ + type-tag-u32 \ + type-tag-u64 \ + type-tag-u128 \ + type-tag-u256 \ + type-tag-bool \ + type-tag-address \ + type-tag-signer \ + type-tag-vector \ + type-tag-struct - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveFunction.write(item, buf) + type-tag-u8 = %x01 + type-tag-u16 = %x08 + type-tag-u32 = %x09 + type-tag-u64 = %x02 + type-tag-u128 = %x03 + type-tag-u256 = %x0a + type-tag-bool = %x00 + type-tag-address = %x04 + type-tag-signer = %x05 + type-tag-vector = %x06 type-tag + type-tag-struct = %x07 struct-tag + ``` +""" + + def as_struct_tag(self, ) -> StructTag: + raise NotImplementedError + def as_struct_tag_opt(self, ) -> typing.Optional[StructTag]: + raise NotImplementedError + def as_vector_type_tag(self, ) -> TypeTag: + raise NotImplementedError + def as_vector_type_tag_opt(self, ) -> typing.Optional[TypeTag]: + raise NotImplementedError + def is_address(self, ) -> bool: + raise NotImplementedError + def is_bool(self, ) -> bool: + raise NotImplementedError + def is_signer(self, ) -> bool: + raise NotImplementedError + def is_struct(self, ) -> bool: + raise NotImplementedError + def is_u128(self, ) -> bool: + raise NotImplementedError + def is_u16(self, ) -> bool: + raise NotImplementedError + def is_u256(self, ) -> bool: + raise NotImplementedError + def is_u32(self, ) -> bool: + raise NotImplementedError + def is_u64(self, ) -> bool: + raise NotImplementedError + def is_u8(self, ) -> bool: + raise NotImplementedError + def is_vector(self, ) -> bool: + raise NotImplementedError - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") +class TypeTag(TypeTagProtocol): + """ + Type of a move value - return [ - _UniffiConverterTypeMoveFunction.read(buf) for i in range(count) - ] + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + type-tag = type-tag-u8 \ + type-tag-u16 \ + type-tag-u32 \ + type-tag-u64 \ + type-tag-u128 \ + type-tag-u256 \ + type-tag-bool \ + type-tag-address \ + type-tag-signer \ + type-tag-vector \ + type-tag-struct -class _UniffiConverterSequenceTypeMovePackage(_UniffiConverterRustBuffer): + type-tag-u8 = %x01 + type-tag-u16 = %x08 + type-tag-u32 = %x09 + type-tag-u64 = %x02 + type-tag-u128 = %x03 + type-tag-u256 = %x0a + type-tag-bool = %x00 + type-tag-address = %x04 + type-tag-signer = %x05 + type-tag-vector = %x06 type-tag + type-tag-struct = %x07 struct-tag + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMovePackage.check_lower(item) - + def new_address(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_bool(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_signer(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMovePackage.write(item, buf) - + def new_struct(cls, struct_tag: StructTag) -> TypeTag: + + _UniffiFfiConverterTypeStructTag.check_lower(struct_tag) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeStructTag.lower(struct_tag), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeMovePackage.read(buf) for i in range(count) - ] - - - -class _UniffiConverterSequenceTypeMultisigMember(_UniffiConverterRustBuffer): + def new_u128(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMultisigMember.check_lower(item) - + def new_u16(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMultisigMember.write(item, buf) - + def new_u256(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeMultisigMember.read(buf) for i in range(count) - ] - - - -class _UniffiConverterSequenceTypeMultisigMemberSignature(_UniffiConverterRustBuffer): + def new_u32(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMultisigMemberSignature.check_lower(item) - + def new_u64(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMultisigMemberSignature.write(item, buf) - + def new_u8(cls, ) -> TypeTag: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeMultisigMemberSignature.read(buf) for i in range(count) - ] + def new_vector(cls, type_tag: TypeTag) -> TypeTag: + + _UniffiFfiConverterTypeTypeTag.check_lower(type_tag) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTypeTag.lower(type_tag), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag, self._handle) -class _UniffiConverterSequenceTypeNameRegistration(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeNameRegistration.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_struct_tag(self, ) -> StructTag: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_struct_tag_opt(self, ) -> typing.Optional[StructTag]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_vector_type_tag(self, ) -> TypeTag: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_vector_type_tag_opt(self, ) -> typing.Optional[TypeTag]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_address(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_bool(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_signer(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_struct(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u128(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u16(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u256(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u32(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u64(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_u8(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_vector(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeNameRegistration.write(item, buf) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeNameRegistration.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeTypeTag: + @staticmethod + def lift(value: int) -> TypeTag: + return TypeTag._uniffi_make_instance(value) + @staticmethod + def check_lower(value: TypeTag): + if not isinstance(value, TypeTag): + raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) -class _UniffiConverterSequenceTypeObject(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeObject.check_lower(item) + @staticmethod + def lower(value: TypeTag) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeObject.write(item, buf) + def read(cls, buf: _UniffiRustBuffer) -> TypeTag: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeObject.read(buf) for i in range(count) - ] - + def write(cls, value: TypeTag, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) -class _UniffiConverterSequenceTypeObjectId(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeObjectId.check_lower(item) +class ObjectIdProtocol(typing.Protocol): + """ + An `ObjectId` is a 32-byte identifier used to uniquely identify an object on + the IOTA blockchain. - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeObjectId.write(item, buf) + ## Relationship to Address - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure, + cryptographically, that there won't be any overlap, e.g. there can't be a + valid `Object` whose `ObjectId` is equal to that of the `Address` of a user + account. - return [ - _UniffiConverterTypeObjectId.read(buf) for i in range(count) - ] + # BCS + An `ObjectId`'s BCS serialized form is defined by the following: + ```text + object-id = 32*OCTET + ``` +""" + + def derive_dynamic_child_id(self, key_type_tag: TypeTag,key_bytes: bytes) -> ObjectId: + """ + Derive an ObjectId for a Dynamic Child Object. -class _UniffiConverterSequenceTypePtbArgument(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypePtbArgument.check_lower(item) + hash(parent || len(key) || key || key_type_tag) +""" + raise NotImplementedError + def to_address(self, ) -> Address: + raise NotImplementedError + def to_bytes(self, ) -> bytes: + raise NotImplementedError + def to_hex(self, ) -> str: + raise NotImplementedError - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypePtbArgument.write(item, buf) +class ObjectId(ObjectIdProtocol): + """ + An `ObjectId` is a 32-byte identifier used to uniquely identify an object on + the IOTA blockchain. - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + ## Relationship to Address - return [ - _UniffiConverterTypePtbArgument.read(buf) for i in range(count) - ] + [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure, + cryptographically, that there won't be any overlap, e.g. there can't be a + valid `Object` whose `ObjectId` is equal to that of the `Address` of a user + account. + # BCS + An `ObjectId`'s BCS serialized form is defined by the following: -class _UniffiConverterSequenceTypeSystemPackage(_UniffiConverterRustBuffer): + ```text + object-id = 32*OCTET + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeSystemPackage.check_lower(item) - + def derive_id(cls, digest: Digest,count: int) -> ObjectId: + """ + Create an ObjectId from a transaction digest and the number of objects + that have been created during a transactions. +""" + + _UniffiFfiConverterTypeDigest.check_lower(digest) + + _UniffiFfiConverterUInt64.check_lower(count) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeDigest.lower(digest), + _UniffiFfiConverterUInt64.lower(count), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeSystemPackage.write(item, buf) - + def from_bytes(cls, bytes: bytes) -> ObjectId: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeSystemPackage.read(buf) for i in range(count) - ] + def from_hex(cls, hex: str) -> ObjectId: + + _UniffiFfiConverterString.check_lower(hex) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(hex), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid, self._handle) -class _UniffiConverterSequenceTypeTransactionEffects(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeTransactionEffects.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def derive_dynamic_child_id(self, key_type_tag: TypeTag,key_bytes: bytes) -> ObjectId: + """ + Derive an ObjectId for a Dynamic Child Object. - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeTransactionEffects.write(item, buf) + hash(parent || len(key) || key || key_type_tag) +""" + + _UniffiFfiConverterTypeTypeTag.check_lower(key_type_tag) + + _UniffiFfiConverterBytes.check_lower(key_bytes) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeTypeTag.lower(key_type_tag), + _UniffiFfiConverterBytes.lower(key_bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_address(self, ) -> Address: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_hex(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + + # The Rust `Hash::hash` implementation. + def __hash__(self) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - return [ - _UniffiConverterTypeTransactionEffects.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeObjectId: + @staticmethod + def lift(value: int) -> ObjectId: + return ObjectId._uniffi_make_instance(value) + + @staticmethod + def check_lower(value: ObjectId): + if not isinstance(value, ObjectId): + raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ObjectId) -> ctypes.c_uint64: + return value._uniffi_clone_handle() -class _UniffiConverterSequenceTypeTypeTag(_UniffiConverterRustBuffer): @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeTypeTag.check_lower(item) + def read(cls, buf: _UniffiRustBuffer) -> ObjectId: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeTypeTag.write(item, buf) + def write(cls, value: ObjectId, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeTypeTag.read(buf) for i in range(count) - ] +class DigestProtocol(typing.Protocol): + """ + A 32-byte Blake2b256 hash output. + # BCS + A `Digest`'s BCS serialized form is defined by the following: -class _UniffiConverterSequenceTypeUserSignature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeUserSignature.check_lower(item) + ```text + digest = %x20 32OCTET + ``` - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeUserSignature.write(item, buf) + Due to historical reasons, even though a `Digest` has a fixed-length of 32, + IOTA's binary representation of a `Digest` is prefixed with its length + meaning its serialized binary form (in bcs) is 33 bytes long vs a more + compact 32 bytes. +""" + + def to_base58(self, ) -> str: + raise NotImplementedError + def to_bytes(self, ) -> bytes: + raise NotImplementedError - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") +class Digest(DigestProtocol): + """ + A 32-byte Blake2b256 hash output. - return [ - _UniffiConverterTypeUserSignature.read(buf) for i in range(count) - ] + # BCS + A `Digest`'s BCS serialized form is defined by the following: + ```text + digest = %x20 32OCTET + ``` -class _UniffiConverterSequenceTypeValidatorExecutionTimeObservation(_UniffiConverterRustBuffer): + Due to historical reasons, even though a `Digest` has a fixed-length of 32, + IOTA's binary representation of a `Digest` is prefixed with its length + meaning its serialized binary form (in bcs) is 33 bytes long vs a more + compact 32 bytes. +""" + + _handle: ctypes.c_uint64 @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeValidatorExecutionTimeObservation.check_lower(item) - + def from_base58(cls, base58: str) -> Digest: + + _UniffiFfiConverterString.check_lower(base58) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(base58), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeValidatorExecutionTimeObservation.write(item, buf) - + def from_bytes(cls, bytes: bytes) -> Digest: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeValidatorExecutionTimeObservation.read(buf) for i in range(count) - ] + def generate(cls, ) -> Digest: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest, self._handle) -class _UniffiConverterSequenceTypeVersionAssignment(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeVersionAssignment.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def to_base58(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeVersionAssignment.write(item, buf) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeVersionAssignment.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeDigest: + @staticmethod + def lift(value: int) -> Digest: + return Digest._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Digest): + if not isinstance(value, Digest): + raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) -class _UniffiConverterSequenceTypeActiveJwk(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeActiveJwk.check_lower(item) + @staticmethod + def lower(value: Digest) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeActiveJwk.write(item, buf) + def read(cls, buf: _UniffiRustBuffer) -> Digest: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + def write(cls, value: Digest, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return [ - _UniffiConverterTypeActiveJwk.read(buf) for i in range(count) - ] +@dataclass +class CoinInfo: + def __init__(self, *, amount:int, id:ObjectId, transfer_tx_digest:Digest): + self.amount = amount + self.id = id + self.transfer_tx_digest = transfer_tx_digest + + + + + def __str__(self): + return "CoinInfo(amount={}, id={}, transfer_tx_digest={})".format(self.amount, self.id, self.transfer_tx_digest) + def __eq__(self, other): + if self.amount != other.amount: + return False + if self.id != other.id: + return False + if self.transfer_tx_digest != other.transfer_tx_digest: + return False + return True + +class _UniffiFfiConverterTypeCoinInfo(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return CoinInfo( + amount=_UniffiFfiConverterUInt64.read(buf), + id=_UniffiFfiConverterTypeObjectId.read(buf), + transfer_tx_digest=_UniffiFfiConverterTypeDigest.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.amount) + _UniffiFfiConverterTypeObjectId.check_lower(value.id) + _UniffiFfiConverterTypeDigest.check_lower(value.transfer_tx_digest) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.amount, buf) + _UniffiFfiConverterTypeObjectId.write(value.id, buf) + _UniffiFfiConverterTypeDigest.write(value.transfer_tx_digest, buf) -class _UniffiConverterSequenceTypeChangedObject(_UniffiConverterRustBuffer): +class _UniffiFfiConverterSequenceTypeCoinInfo(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeChangedObject.check_lower(item) + _UniffiFfiConverterTypeCoinInfo.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeChangedObject.write(item, buf) + _UniffiFfiConverterTypeCoinInfo.write(item, buf) @classmethod def read(cls, buf): @@ -21061,623 +10752,1142 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeChangedObject.read(buf) for i in range(count) + _UniffiFfiConverterTypeCoinInfo.read(buf) for i in range(count) ] +@dataclass +class FaucetReceipt: + def __init__(self, *, sent:typing.List[CoinInfo]): + self.sent = sent + + + + + def __str__(self): + return "FaucetReceipt(sent={})".format(self.sent) + def __eq__(self, other): + if self.sent != other.sent: + return False + return True + +class _UniffiFfiConverterTypeFaucetReceipt(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return FaucetReceipt( + sent=_UniffiFfiConverterSequenceTypeCoinInfo.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterSequenceTypeCoinInfo.check_lower(value.sent) + @staticmethod + def write(value, buf): + _UniffiFfiConverterSequenceTypeCoinInfo.write(value.sent, buf) -class _UniffiConverterSequenceTypeCoinInfo(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalTypeFaucetReceipt(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeCoinInfo.check_lower(item) + if value is not None: + _UniffiFfiConverterTypeFaucetReceipt.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeCoinInfo.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeFaucetReceipt.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeFaucetReceipt.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return [ - _UniffiConverterTypeCoinInfo.read(buf) for i in range(count) - ] +@dataclass +class BatchSendStatus: + def __init__(self, *, status:BatchSendStatusType, transferred_gas_objects:typing.Optional[FaucetReceipt]): + self.status = status + self.transferred_gas_objects = transferred_gas_objects + + + + def __str__(self): + return "BatchSendStatus(status={}, transferred_gas_objects={})".format(self.status, self.transferred_gas_objects) + def __eq__(self, other): + if self.status != other.status: + return False + if self.transferred_gas_objects != other.transferred_gas_objects: + return False + return True + +class _UniffiFfiConverterTypeBatchSendStatus(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return BatchSendStatus( + status=_UniffiFfiConverterTypeBatchSendStatusType.read(buf), + transferred_gas_objects=_UniffiFfiConverterOptionalTypeFaucetReceipt.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeBatchSendStatusType.check_lower(value.status) + _UniffiFfiConverterOptionalTypeFaucetReceipt.check_lower(value.transferred_gas_objects) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeBatchSendStatusType.write(value.status, buf) + _UniffiFfiConverterOptionalTypeFaucetReceipt.write(value.transferred_gas_objects, buf) -class _UniffiConverterSequenceTypeDryRunEffect(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalTypeAddress(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeDryRunEffect.check_lower(item) + if value is not None: + _UniffiFfiConverterTypeAddress.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeDryRunEffect.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeAddress.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeAddress.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return [ - _UniffiConverterTypeDryRunEffect.read(buf) for i in range(count) - ] +class _UniffiFfiConverterOptionalTypeObjectId(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeObjectId.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeObjectId.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeObjectId.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterSequenceTypeDryRunMutation(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalUInt64(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeDryRunMutation.check_lower(item) + if value is not None: + _UniffiFfiConverterUInt64.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeDryRunMutation.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterUInt64.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterUInt64.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return [ - _UniffiConverterTypeDryRunMutation.read(buf) for i in range(count) - ] +class OwnerProtocol(typing.Protocol): + """ + Enum of different types of ownership for an object. + # BCS -class _UniffiConverterSequenceTypeDryRunReturn(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeDryRunReturn.check_lower(item) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeDryRunReturn.write(item, buf) + ```text + owner = owner-address / owner-object / owner-shared / owner-immutable - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + owner-address = %x00 address + owner-object = %x01 object-id + owner-shared = %x02 u64 + owner-immutable = %x03 + ``` +""" + + def as_address(self, ) -> Address: + raise NotImplementedError + def as_address_opt(self, ) -> typing.Optional[Address]: + raise NotImplementedError + def as_object(self, ) -> ObjectId: + raise NotImplementedError + def as_object_opt(self, ) -> typing.Optional[ObjectId]: + raise NotImplementedError + def as_shared(self, ) -> int: + raise NotImplementedError + def as_shared_opt(self, ) -> typing.Optional[int]: + raise NotImplementedError + def is_address(self, ) -> bool: + raise NotImplementedError + def is_immutable(self, ) -> bool: + raise NotImplementedError + def is_object(self, ) -> bool: + raise NotImplementedError + def is_shared(self, ) -> bool: + raise NotImplementedError - return [ - _UniffiConverterTypeDryRunReturn.read(buf) for i in range(count) - ] +class Owner(OwnerProtocol): + """ + Enum of different types of ownership for an object. + # BCS + The BCS serialized form for this type is defined by the following ABNF: -class _UniffiConverterSequenceTypeDynamicFieldOutput(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeDynamicFieldOutput.check_lower(item) + ```text + owner = owner-address / owner-object / owner-shared / owner-immutable + owner-address = %x00 address + owner-object = %x01 object-id + owner-shared = %x02 u64 + owner-immutable = %x03 + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeDynamicFieldOutput.write(item, buf) - + def new_address(cls, address: Address) -> Owner: + + _UniffiFfiConverterTypeAddress.check_lower(address) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAddress.lower(address), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeDynamicFieldOutput.read(buf) for i in range(count) - ] + def new_immutable(cls, ) -> Owner: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_object(cls, id: ObjectId) -> Owner: + + _UniffiFfiConverterTypeObjectId.check_lower(id) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_shared(cls, version: int) -> Owner: + + _UniffiFfiConverterUInt64.check_lower(version) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner, self._handle) -class _UniffiConverterSequenceTypeEpoch(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeEpoch.check_lower(item) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_address(self, ) -> Address: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_address_opt(self, ) -> typing.Optional[Address]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_object(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_object_opt(self, ) -> typing.Optional[ObjectId]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_shared(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_shared_opt(self, ) -> typing.Optional[int]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_address(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_immutable(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_object(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_shared(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeEpoch.write(item, buf) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeEpoch.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeOwner: + @staticmethod + def lift(value: int) -> Owner: + return Owner._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Owner): + if not isinstance(value, Owner): + raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) -class _UniffiConverterSequenceTypeEvent(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeEvent.check_lower(item) + @staticmethod + def lower(value: Owner) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeEvent.write(item, buf) + def read(cls, buf: _UniffiRustBuffer) -> Owner: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + def write(cls, value: Owner, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return [ - _UniffiConverterTypeEvent.read(buf) for i in range(count) - ] -class _UniffiConverterSequenceTypeMoveEnum(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveEnum.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveEnum.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") +class ObjectIn: + """ + State of an object prior to execution - return [ - _UniffiConverterTypeMoveEnum.read(buf) for i in range(count) - ] + If an object exists (at root-level) in the store prior to this transaction, + it should be Data, otherwise it's Missing, e.g. wrapped objects should be + Missing. + # BCS + The BCS serialized form for this type is defined by the following ABNF: -class _UniffiConverterSequenceTypeMoveEnumVariant(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveEnumVariant.check_lower(item) + ```text + object-in = object-in-missing / object-in-data - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveEnumVariant.write(item, buf) + object-in-missing = %x00 + object-in-data = %x01 u64 digest owner + ``` +""" + def __init__(self): + raise RuntimeError("ObjectIn cannot be instantiated directly") - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + # Each enum variant is a nested class of the enum itself. + @dataclass + class MISSING: + + def __init__(self, ): + pass - return [ - _UniffiConverterTypeMoveEnumVariant.read(buf) for i in range(count) - ] + + + + + def __str__(self): + return "ObjectIn.MISSING()".format() + def __eq__(self, other): + if not other.is_MISSING(): + return False + return True + + @dataclass + class DATA: + """ + The old version, digest and owner. +""" + + def __init__(self, version:int, digest:Digest, owner:Owner): + self.version = version + + + self.digest = digest + + + self.owner = owner + + + pass + + + + + + def __str__(self): + return "ObjectIn.DATA(version={}, digest={}, owner={})".format(self.version, self.digest, self.owner) + def __eq__(self, other): + if not other.is_DATA(): + return False + if self.version != other.version: + return False + if self.digest != other.digest: + return False + if self.owner != other.owner: + return False + return True + + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_MISSING(self) -> bool: + return isinstance(self, ObjectIn.MISSING) + def is_missing(self) -> bool: + return isinstance(self, ObjectIn.MISSING) + def is_DATA(self) -> bool: + return isinstance(self, ObjectIn.DATA) + def is_data(self) -> bool: + return isinstance(self, ObjectIn.DATA) + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +ObjectIn.MISSING = type("ObjectIn.MISSING", (ObjectIn.MISSING, ObjectIn,), {}) # type: ignore +ObjectIn.DATA = type("ObjectIn.DATA", (ObjectIn.DATA, ObjectIn,), {}) # type: ignore -class _UniffiConverterSequenceTypeMoveField(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveField.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveField.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeMoveField.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeObjectIn(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return ObjectIn.MISSING( + ) + if variant == 2: + return ObjectIn.DATA( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterTypeDigest.read(buf), + _UniffiFfiConverterTypeOwner.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") + @staticmethod + def check_lower(value): + if value.is_MISSING(): + return + if value.is_DATA(): + _UniffiFfiConverterUInt64.check_lower(value.version) + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + _UniffiFfiConverterTypeOwner.check_lower(value.owner) + return + raise ValueError(value) + @staticmethod + def write(value, buf): + if value.is_MISSING(): + buf.write_i32(1) + if value.is_DATA(): + buf.write_i32(2) + _UniffiFfiConverterUInt64.write(value.version, buf) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) + _UniffiFfiConverterTypeOwner.write(value.owner, buf) -class _UniffiConverterSequenceTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveFunctionTypeParameter.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveFunctionTypeParameter.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeMoveFunctionTypeParameter.read(buf) for i in range(count) - ] -class _UniffiConverterSequenceTypeMoveModuleQuery(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveModuleQuery.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveModuleQuery.write(item, buf) +class ObjectOut: + """ + State of an object after execution - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + # BCS - return [ - _UniffiConverterTypeMoveModuleQuery.read(buf) for i in range(count) - ] + The BCS serialized form for this type is defined by the following ABNF: + ```text + object-out = object-out-missing + =/ object-out-object-write + =/ object-out-package-write -class _UniffiConverterSequenceTypeMoveStructQuery(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveStructQuery.check_lower(item) + object-out-missing = %x00 + object-out-object-write = %x01 digest owner + object-out-package-write = %x02 version digest + ``` +""" + def __init__(self): + raise RuntimeError("ObjectOut cannot be instantiated directly") - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveStructQuery.write(item, buf) + # Each enum variant is a nested class of the enum itself. + @dataclass + class MISSING: + """ + Same definition as in ObjectIn. +""" + + def __init__(self, ): + pass - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + + + + + def __str__(self): + return "ObjectOut.MISSING()".format() + def __eq__(self, other): + if not other.is_MISSING(): + return False + return True - return [ - _UniffiConverterTypeMoveStructQuery.read(buf) for i in range(count) - ] + @dataclass + class OBJECT_WRITE: + """ + Any written object, including all of mutated, created, unwrapped today. +""" + + def __init__(self, digest:Digest, owner:Owner): + self.digest = digest + + + self.owner = owner + + + pass + + + + + def __str__(self): + return "ObjectOut.OBJECT_WRITE(digest={}, owner={})".format(self.digest, self.owner) + def __eq__(self, other): + if not other.is_OBJECT_WRITE(): + return False + if self.digest != other.digest: + return False + if self.owner != other.owner: + return False + return True + @dataclass + class PACKAGE_WRITE: + """ + Packages writes need to be tracked separately with version because + we don't use lamport version for package publish and upgrades. +""" + + def __init__(self, version:int, digest:Digest): + self.version = version + + + self.digest = digest + + + pass -class _UniffiConverterSequenceTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveStructTypeParameter.check_lower(item) + + + + + def __str__(self): + return "ObjectOut.PACKAGE_WRITE(version={}, digest={})".format(self.version, self.digest) + def __eq__(self, other): + if not other.is_PACKAGE_WRITE(): + return False + if self.version != other.version: + return False + if self.digest != other.digest: + return False + return True - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveStructTypeParameter.write(item, buf) + - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_MISSING(self) -> bool: + return isinstance(self, ObjectOut.MISSING) + def is_missing(self) -> bool: + return isinstance(self, ObjectOut.MISSING) + def is_OBJECT_WRITE(self) -> bool: + return isinstance(self, ObjectOut.OBJECT_WRITE) + def is_object_write(self) -> bool: + return isinstance(self, ObjectOut.OBJECT_WRITE) + def is_PACKAGE_WRITE(self) -> bool: + return isinstance(self, ObjectOut.PACKAGE_WRITE) + def is_package_write(self) -> bool: + return isinstance(self, ObjectOut.PACKAGE_WRITE) + - return [ - _UniffiConverterTypeMoveStructTypeParameter.read(buf) for i in range(count) - ] +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +ObjectOut.MISSING = type("ObjectOut.MISSING", (ObjectOut.MISSING, ObjectOut,), {}) # type: ignore +ObjectOut.OBJECT_WRITE = type("ObjectOut.OBJECT_WRITE", (ObjectOut.OBJECT_WRITE, ObjectOut,), {}) # type: ignore +ObjectOut.PACKAGE_WRITE = type("ObjectOut.PACKAGE_WRITE", (ObjectOut.PACKAGE_WRITE, ObjectOut,), {}) # type: ignore -class _UniffiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeObjectRef.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeObjectRef.write(item, buf) +class _UniffiFfiConverterTypeObjectOut(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return ObjectOut.MISSING( + ) + if variant == 2: + return ObjectOut.OBJECT_WRITE( + _UniffiFfiConverterTypeDigest.read(buf), + _UniffiFfiConverterTypeOwner.read(buf), + ) + if variant == 3: + return ObjectOut.PACKAGE_WRITE( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterTypeDigest.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + @staticmethod + def check_lower(value): + if value.is_MISSING(): + return + if value.is_OBJECT_WRITE(): + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + _UniffiFfiConverterTypeOwner.check_lower(value.owner) + return + if value.is_PACKAGE_WRITE(): + _UniffiFfiConverterUInt64.check_lower(value.version) + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + return + raise ValueError(value) - return [ - _UniffiConverterTypeObjectRef.read(buf) for i in range(count) - ] + @staticmethod + def write(value, buf): + if value.is_MISSING(): + buf.write_i32(1) + if value.is_OBJECT_WRITE(): + buf.write_i32(2) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) + _UniffiFfiConverterTypeOwner.write(value.owner, buf) + if value.is_PACKAGE_WRITE(): + buf.write_i32(3) + _UniffiFfiConverterUInt64.write(value.version, buf) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) -class _UniffiConverterSequenceTypeObjectReference(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeObjectReference.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeObjectReference.write(item, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeObjectReference.read(buf) for i in range(count) - ] +class IdOperation(enum.Enum): + """ + Defines what happened to an ObjectId during execution -class _UniffiConverterSequenceTypeOpenMoveType(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeOpenMoveType.check_lower(item) + # BCS - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeOpenMoveType.write(item, buf) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + ```text + id-operation = id-operation-none + =/ id-operation-created + =/ id-operation-deleted - return [ - _UniffiConverterTypeOpenMoveType.read(buf) for i in range(count) - ] + id-operation-none = %x00 + id-operation-created = %x01 + id-operation-deleted = %x02 + ``` +""" + + NONE = 0 + + CREATED = 1 + + DELETED = 2 + +class _UniffiFfiConverterTypeIdOperation(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return IdOperation.NONE + if variant == 2: + return IdOperation.CREATED + if variant == 3: + return IdOperation.DELETED + raise InternalError("Raw enum value doesn't match any cases") -class _UniffiConverterSequenceTypeProtocolConfigAttr(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeProtocolConfigAttr.check_lower(item) + @staticmethod + def check_lower(value): + if value == IdOperation.NONE: + return + if value == IdOperation.CREATED: + return + if value == IdOperation.DELETED: + return + raise ValueError(value) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeProtocolConfigAttr.write(item, buf) + @staticmethod + def write(value, buf): + if value == IdOperation.NONE: + buf.write_i32(1) + if value == IdOperation.CREATED: + buf.write_i32(2) + if value == IdOperation.DELETED: + buf.write_i32(3) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - return [ - _UniffiConverterTypeProtocolConfigAttr.read(buf) for i in range(count) - ] +@dataclass +class ChangedObject: + """ + Input/output state of an object that was changed during execution + # BCS -class _UniffiConverterSequenceTypeProtocolConfigFeatureFlag(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeProtocolConfigFeatureFlag.check_lower(item) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeProtocolConfigFeatureFlag.write(item, buf) + ```text + changed-object = object-id object-in object-out id-operation + ``` +""" + def __init__(self, *, object_id:ObjectId, input_state:ObjectIn, output_state:ObjectOut, id_operation:IdOperation): + self.object_id = object_id + self.input_state = input_state + self.output_state = output_state + self.id_operation = id_operation + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeChangedObject.lower(self), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changedobject_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + + def __eq__(self, other): + if self.object_id != other.object_id: + return False + if self.input_state != other.input_state: + return False + if self.output_state != other.output_state: + return False + if self.id_operation != other.id_operation: + return False + return True - return [ - _UniffiConverterTypeProtocolConfigFeatureFlag.read(buf) for i in range(count) - ] +class _UniffiFfiConverterTypeChangedObject(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ChangedObject( + object_id=_UniffiFfiConverterTypeObjectId.read(buf), + input_state=_UniffiFfiConverterTypeObjectIn.read(buf), + output_state=_UniffiFfiConverterTypeObjectOut.read(buf), + id_operation=_UniffiFfiConverterTypeIdOperation.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.object_id) + _UniffiFfiConverterTypeObjectIn.check_lower(value.input_state) + _UniffiFfiConverterTypeObjectOut.check_lower(value.output_state) + _UniffiFfiConverterTypeIdOperation.check_lower(value.id_operation) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.object_id, buf) + _UniffiFfiConverterTypeObjectIn.write(value.input_state, buf) + _UniffiFfiConverterTypeObjectOut.write(value.output_state, buf) + _UniffiFfiConverterTypeIdOperation.write(value.id_operation, buf) -class _UniffiConverterSequenceTypeSignedTransaction(_UniffiConverterRustBuffer): +class _UniffiFfiConverterOptionalString(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterTypeSignedTransaction.check_lower(item) + if value is not None: + _UniffiFfiConverterString.check_lower(value) @classmethod def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeSignedTransaction.write(item, buf) + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterString.write(value, buf) @classmethod def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeSignedTransaction.read(buf) for i in range(count) - ] - + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterString.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class PageInfo: + """ + Information about pagination in a connection. +""" + def __init__(self, *, has_previous_page:bool, has_next_page:bool, start_cursor:typing.Optional[str] = _DEFAULT, end_cursor:typing.Optional[str] = _DEFAULT): + self.has_previous_page = has_previous_page + self.has_next_page = has_next_page + if start_cursor is _DEFAULT: + self.start_cursor = None + else: + self.start_cursor = start_cursor + if end_cursor is _DEFAULT: + self.end_cursor = None + else: + self.end_cursor = end_cursor + + -class _UniffiConverterSequenceTypeTransactionDataEffects(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeTransactionDataEffects.check_lower(item) + + def __str__(self): + return "PageInfo(has_previous_page={}, has_next_page={}, start_cursor={}, end_cursor={})".format(self.has_previous_page, self.has_next_page, self.start_cursor, self.end_cursor) + def __eq__(self, other): + if self.has_previous_page != other.has_previous_page: + return False + if self.has_next_page != other.has_next_page: + return False + if self.start_cursor != other.start_cursor: + return False + if self.end_cursor != other.end_cursor: + return False + return True - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeTransactionDataEffects.write(item, buf) +class _UniffiFfiConverterTypePageInfo(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return PageInfo( + has_previous_page=_UniffiFfiConverterBoolean.read(buf), + has_next_page=_UniffiFfiConverterBoolean.read(buf), + start_cursor=_UniffiFfiConverterOptionalString.read(buf), + end_cursor=_UniffiFfiConverterOptionalString.read(buf), + ) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + @staticmethod + def check_lower(value): + _UniffiFfiConverterBoolean.check_lower(value.has_previous_page) + _UniffiFfiConverterBoolean.check_lower(value.has_next_page) + _UniffiFfiConverterOptionalString.check_lower(value.start_cursor) + _UniffiFfiConverterOptionalString.check_lower(value.end_cursor) - return [ - _UniffiConverterTypeTransactionDataEffects.read(buf) for i in range(count) - ] + @staticmethod + def write(value, buf): + _UniffiFfiConverterBoolean.write(value.has_previous_page, buf) + _UniffiFfiConverterBoolean.write(value.has_next_page, buf) + _UniffiFfiConverterOptionalString.write(value.start_cursor, buf) + _UniffiFfiConverterOptionalString.write(value.end_cursor, buf) +class CheckpointCommitmentProtocol(typing.Protocol): + """ + A commitment made by a checkpoint. -class _UniffiConverterSequenceTypeTypeOrigin(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeTypeOrigin.check_lower(item) + # BCS - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeTypeOrigin.write(item, buf) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + ```text + ; CheckpointCommitment is an enum and each variant is prefixed with its index + checkpoint-commitment = ecmh-live-object-set + ecmh-live-object-set = %x00 digest + ``` +""" + + def as_ecmh_live_object_set_digest(self, ) -> Digest: + raise NotImplementedError + def is_ecmh_live_object_set(self, ) -> bool: + raise NotImplementedError - return [ - _UniffiConverterTypeTypeOrigin.read(buf) for i in range(count) - ] +class CheckpointCommitment(CheckpointCommitmentProtocol): + """ + A commitment made by a checkpoint. + # BCS + The BCS serialized form for this type is defined by the following ABNF: -class _UniffiConverterSequenceTypeUnchangedSharedObject(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeUnchangedSharedObject.check_lower(item) + ```text + ; CheckpointCommitment is an enum and each variant is prefixed with its index + checkpoint-commitment = ecmh-live-object-set + ecmh-live-object-set = %x00 digest + ``` +""" + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeUnchangedSharedObject.write(item, buf) + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment, self._handle) + + # Used by alternative constructors or any methods which return this type. @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_ecmh_live_object_set_digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_ecmh_live_object_set(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - return [ - _UniffiConverterTypeUnchangedSharedObject.read(buf) for i in range(count) - ] -class _UniffiConverterSequenceTypeValidator(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeValidator.check_lower(item) - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeValidator.write(item, buf) +class _UniffiFfiConverterTypeCheckpointCommitment: + @staticmethod + def lift(value: int) -> CheckpointCommitment: + return CheckpointCommitment._uniffi_make_instance(value) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + @staticmethod + def check_lower(value: CheckpointCommitment): + if not isinstance(value, CheckpointCommitment): + raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) - return [ - _UniffiConverterTypeValidator.read(buf) for i in range(count) - ] + @staticmethod + def lower(value: CheckpointCommitment) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> CheckpointCommitment: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: CheckpointCommitment, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) -class _UniffiConverterSequenceTypeValidatorCommitteeMember(_UniffiConverterRustBuffer): +class _UniffiFfiConverterSequenceTypeCheckpointCommitment(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeValidatorCommitteeMember.check_lower(item) + _UniffiFfiConverterTypeCheckpointCommitment.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeValidatorCommitteeMember.write(item, buf) + _UniffiFfiConverterTypeCheckpointCommitment.write(item, buf) @classmethod def read(cls, buf): @@ -21686,19001 +11896,29951 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeValidatorCommitteeMember.read(buf) for i in range(count) + _UniffiFfiConverterTypeCheckpointCommitment.read(buf) for i in range(count) ] +class Bls12381PublicKeyProtocol(typing.Protocol): + """ + A bls12381 min-sig public key. -class _UniffiConverterSequenceTypeFeature(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeFeature.check_lower(item) + # BCS - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeFeature.write(item, buf) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") + ```text + bls-public-key = %x60 96OCTECT + ``` - return [ - _UniffiConverterTypeFeature.read(buf) for i in range(count) - ] + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +""" + + def to_bytes(self, ) -> bytes: + raise NotImplementedError +class Bls12381PublicKey(Bls12381PublicKeyProtocol): + """ + A bls12381 min-sig public key. + # BCS -class _UniffiConverterSequenceTypeMoveAbility(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, value): - for item in value: - _UniffiConverterTypeMoveAbility.check_lower(item) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value, buf): - items = len(value) - buf.write_i32(items) - for item in value: - _UniffiConverterTypeMoveAbility.write(item, buf) + ```text + bls-public-key = %x60 96OCTECT + ``` + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +""" + + _handle: ctypes.c_uint64 @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative sequence length") - - return [ - _UniffiConverterTypeMoveAbility.read(buf) for i in range(count) - ] + def from_bytes(cls, bytes: bytes) -> Bls12381PublicKey: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Bls12381PublicKey: + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Bls12381PublicKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey, self._handle) -class _UniffiConverterMapStringSequenceString(_UniffiConverterRustBuffer): + # Used by alternative constructors or any methods which return this type. @classmethod - def check_lower(cls, items): - for (key, value) in items.items(): - _UniffiConverterString.check_lower(key) - _UniffiConverterSequenceString.check_lower(value) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def write(cls, items, buf): - buf.write_i32(len(items)) - for (key, value) in items.items(): - _UniffiConverterString.write(key, buf) - _UniffiConverterSequenceString.write(value, buf) - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative map size") - # It would be nice to use a dict comprehension, - # but in Python 3.7 and before the evaluation order is not according to spec, - # so we we're reading the value before the key. - # This loop makes the order explicit: first reading the key, then the value. - d = {} - for i in range(count): - key = _UniffiConverterString.read(buf) - val = _UniffiConverterSequenceString.read(buf) - d[key] = val - return d +class _UniffiFfiConverterTypeBls12381PublicKey: + @staticmethod + def lift(value: int) -> Bls12381PublicKey: + return Bls12381PublicKey._uniffi_make_instance(value) -class _UniffiConverterMapTypeIdentifierBytes(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, items): - for (key, value) in items.items(): - _UniffiConverterTypeIdentifier.check_lower(key) - _UniffiConverterBytes.check_lower(value) + @staticmethod + def check_lower(value: Bls12381PublicKey): + if not isinstance(value, Bls12381PublicKey): + raise TypeError("Expected Bls12381PublicKey instance, {} found".format(type(value).__name__)) - @classmethod - def write(cls, items, buf): - buf.write_i32(len(items)) - for (key, value) in items.items(): - _UniffiConverterTypeIdentifier.write(key, buf) - _UniffiConverterBytes.write(value, buf) + @staticmethod + def lower(value: Bls12381PublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative map size") + def read(cls, buf: _UniffiRustBuffer) -> Bls12381PublicKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - # It would be nice to use a dict comprehension, - # but in Python 3.7 and before the evaluation order is not according to spec, - # so we we're reading the value before the key. - # This loop makes the order explicit: first reading the key, then the value. - d = {} - for i in range(count): - key = _UniffiConverterTypeIdentifier.read(buf) - val = _UniffiConverterBytes.read(buf) - d[key] = val - return d + @classmethod + def write(cls, value: Bls12381PublicKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +@dataclass +class ValidatorCommitteeMember: + """ + A member of a Validator Committee + # BCS -class _UniffiConverterMapTypeObjectIdTypeUpgradeInfo(_UniffiConverterRustBuffer): - @classmethod - def check_lower(cls, items): - for (key, value) in items.items(): - _UniffiConverterTypeObjectId.check_lower(key) - _UniffiConverterTypeUpgradeInfo.check_lower(value) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, items, buf): - buf.write_i32(len(items)) - for (key, value) in items.items(): - _UniffiConverterTypeObjectId.write(key, buf) - _UniffiConverterTypeUpgradeInfo.write(value, buf) + ```text + validator-committee-member = bls-public-key + u64 ; stake + ``` +""" + def __init__(self, *, public_key:Bls12381PublicKey, stake:int): + self.public_key = public_key + self.stake = stake + + - @classmethod - def read(cls, buf): - count = buf.read_i32() - if count < 0: - raise InternalError("Unexpected negative map size") + + def __str__(self): + return "ValidatorCommitteeMember(public_key={}, stake={})".format(self.public_key, self.stake) + def __eq__(self, other): + if self.public_key != other.public_key: + return False + if self.stake != other.stake: + return False + return True - # It would be nice to use a dict comprehension, - # but in Python 3.7 and before the evaluation order is not according to spec, - # so we we're reading the value before the key. - # This loop makes the order explicit: first reading the key, then the value. - d = {} - for i in range(count): - key = _UniffiConverterTypeObjectId.read(buf) - val = _UniffiConverterTypeUpgradeInfo.read(buf) - d[key] = val - return d +class _UniffiFfiConverterTypeValidatorCommitteeMember(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorCommitteeMember( + public_key=_UniffiFfiConverterTypeBls12381PublicKey.read(buf), + stake=_UniffiFfiConverterUInt64.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeBls12381PublicKey.check_lower(value.public_key) + _UniffiFfiConverterUInt64.check_lower(value.stake) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeBls12381PublicKey.write(value.public_key, buf) + _UniffiFfiConverterUInt64.write(value.stake, buf) -class _UniffiConverterMapTypeJwkIdTypeJwk(_UniffiConverterRustBuffer): +class _UniffiFfiConverterSequenceTypeValidatorCommitteeMember(_UniffiConverterRustBuffer): @classmethod - def check_lower(cls, items): - for (key, value) in items.items(): - _UniffiConverterTypeJwkId.check_lower(key) - _UniffiConverterTypeJwk.check_lower(value) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeValidatorCommitteeMember.check_lower(item) @classmethod - def write(cls, items, buf): - buf.write_i32(len(items)) - for (key, value) in items.items(): - _UniffiConverterTypeJwkId.write(key, buf) - _UniffiConverterTypeJwk.write(value, buf) + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeValidatorCommitteeMember.write(item, buf) @classmethod def read(cls, buf): count = buf.read_i32() if count < 0: - raise InternalError("Unexpected negative map size") + raise InternalError("Unexpected negative sequence length") - # It would be nice to use a dict comprehension, - # but in Python 3.7 and before the evaluation order is not according to spec, - # so we we're reading the value before the key. - # This loop makes the order explicit: first reading the key, then the value. - d = {} - for i in range(count): - key = _UniffiConverterTypeJwkId.read(buf) - val = _UniffiConverterTypeJwk.read(buf) - d[key] = val - return d + return [ + _UniffiFfiConverterTypeValidatorCommitteeMember.read(buf) for i in range(count) + ] + +class _UniffiFfiConverterInt64(_UniffiConverterPrimitiveInt): + CLASS_NAME = "i64" + VALUE_MIN = -2**63 + VALUE_MAX = 2**63 + @staticmethod + def read(buf): + return buf.read_i64() -class _UniffiConverterTypeBase64: @staticmethod def write(value, buf): - _UniffiConverterString.write(value, buf) + buf.write_i64(value) - @staticmethod - def read(buf): - return _UniffiConverterString.read(buf) +@dataclass +class EndOfEpochData: + def __init__(self, *, next_epoch_committee:typing.List[ValidatorCommitteeMember], next_epoch_protocol_version:int, epoch_commitments:typing.List[CheckpointCommitment], epoch_supply_change:int): + self.next_epoch_committee = next_epoch_committee + self.next_epoch_protocol_version = next_epoch_protocol_version + self.epoch_commitments = epoch_commitments + self.epoch_supply_change = epoch_supply_change + + + + + def __str__(self): + return "EndOfEpochData(next_epoch_committee={}, next_epoch_protocol_version={}, epoch_commitments={}, epoch_supply_change={})".format(self.next_epoch_committee, self.next_epoch_protocol_version, self.epoch_commitments, self.epoch_supply_change) + def __eq__(self, other): + if self.next_epoch_committee != other.next_epoch_committee: + return False + if self.next_epoch_protocol_version != other.next_epoch_protocol_version: + return False + if self.epoch_commitments != other.epoch_commitments: + return False + if self.epoch_supply_change != other.epoch_supply_change: + return False + return True +class _UniffiFfiConverterTypeEndOfEpochData(_UniffiConverterRustBuffer): @staticmethod - def lift(value): - return _UniffiConverterString.lift(value) + def read(buf): + return EndOfEpochData( + next_epoch_committee=_UniffiFfiConverterSequenceTypeValidatorCommitteeMember.read(buf), + next_epoch_protocol_version=_UniffiFfiConverterUInt64.read(buf), + epoch_commitments=_UniffiFfiConverterSequenceTypeCheckpointCommitment.read(buf), + epoch_supply_change=_UniffiFfiConverterInt64.read(buf), + ) @staticmethod def check_lower(value): - return _UniffiConverterString.check_lower(value) + _UniffiFfiConverterSequenceTypeValidatorCommitteeMember.check_lower(value.next_epoch_committee) + _UniffiFfiConverterUInt64.check_lower(value.next_epoch_protocol_version) + _UniffiFfiConverterSequenceTypeCheckpointCommitment.check_lower(value.epoch_commitments) + _UniffiFfiConverterInt64.check_lower(value.epoch_supply_change) @staticmethod - def lower(value): - return _UniffiConverterString.lower(value) + def write(value, buf): + _UniffiFfiConverterSequenceTypeValidatorCommitteeMember.write(value.next_epoch_committee, buf) + _UniffiFfiConverterUInt64.write(value.next_epoch_protocol_version, buf) + _UniffiFfiConverterSequenceTypeCheckpointCommitment.write(value.epoch_commitments, buf) + _UniffiFfiConverterInt64.write(value.epoch_supply_change, buf) +class _UniffiFfiConverterOptionalTypeEndOfEpochData(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeEndOfEpochData.check_lower(value) -class _UniffiConverterTypeBigInt: - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value, buf) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - @staticmethod - def read(buf): - return _UniffiConverterString.read(buf) + buf.write_u8(1) + _UniffiFfiConverterTypeEndOfEpochData.write(value, buf) - @staticmethod - def lift(value): - return _UniffiConverterString.lift(value) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeEndOfEpochData.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @staticmethod - def check_lower(value): - return _UniffiConverterString.check_lower(value) +@dataclass +class GasCostSummary: + """ + Summary of gas charges. - @staticmethod - def lower(value): - return _UniffiConverterString.lower(value) + Storage is charged independently of computation. + There are 3 parts to the storage charges: + `storage_cost`: it is the charge of storage at the time the transaction is + executed. The cost of storage is the number of bytes of the + objects being mutated multiplied by a variable storage cost + per byte `storage_rebate`: this is the amount a user gets back when + manipulating an object. The `storage_rebate` is the + `storage_cost` for an object minus fees. `non_refundable_storage_fee`: not + all the value of the object storage cost is + given back to user and there is a small fraction that + is kept by the system. This value tracks that charge. + + When looking at a gas cost summary the amount charged to the user is + `computation_cost + storage_cost - storage_rebate` + and that is the amount that is deducted from the gas coins. + `non_refundable_storage_fee` is collected from the objects being + mutated/deleted and it is tracked by the system in storage funds. + Objects deleted, including the older versions of objects mutated, have the + storage field on the objects added up to a pool of "potential rebate". This + rebate then is reduced by the "nonrefundable rate" such that: + `potential_rebate(storage cost of deleted/mutated objects) = + storage_rebate + non_refundable_storage_fee` -class _UniffiConverterTypeValue: - @staticmethod - def write(value, buf): - _UniffiConverterString.write(value, buf) + # BCS - @staticmethod - def read(buf): - return _UniffiConverterString.read(buf) + The BCS serialized form for this type is defined by the following ABNF: + + ```text + gas-cost-summary = u64 ; computation-cost + u64 ; storage-cost + u64 ; storage-rebate + u64 ; non-refundable-storage-fee + ``` +""" + def __init__(self, *, computation_cost:int, computation_cost_burned:int, storage_cost:int, storage_rebate:int, non_refundable_storage_fee:int): + self.computation_cost = computation_cost + self.computation_cost_burned = computation_cost_burned + self.storage_cost = storage_cost + self.storage_rebate = storage_rebate + self.non_refundable_storage_fee = non_refundable_storage_fee + + + + + def __str__(self): + return "GasCostSummary(computation_cost={}, computation_cost_burned={}, storage_cost={}, storage_rebate={}, non_refundable_storage_fee={})".format(self.computation_cost, self.computation_cost_burned, self.storage_cost, self.storage_rebate, self.non_refundable_storage_fee) + def __eq__(self, other): + if self.computation_cost != other.computation_cost: + return False + if self.computation_cost_burned != other.computation_cost_burned: + return False + if self.storage_cost != other.storage_cost: + return False + if self.storage_rebate != other.storage_rebate: + return False + if self.non_refundable_storage_fee != other.non_refundable_storage_fee: + return False + return True +class _UniffiFfiConverterTypeGasCostSummary(_UniffiConverterRustBuffer): @staticmethod - def lift(value): - return _UniffiConverterString.lift(value) + def read(buf): + return GasCostSummary( + computation_cost=_UniffiFfiConverterUInt64.read(buf), + computation_cost_burned=_UniffiFfiConverterUInt64.read(buf), + storage_cost=_UniffiFfiConverterUInt64.read(buf), + storage_rebate=_UniffiFfiConverterUInt64.read(buf), + non_refundable_storage_fee=_UniffiFfiConverterUInt64.read(buf), + ) @staticmethod def check_lower(value): - return _UniffiConverterString.check_lower(value) + _UniffiFfiConverterUInt64.check_lower(value.computation_cost) + _UniffiFfiConverterUInt64.check_lower(value.computation_cost_burned) + _UniffiFfiConverterUInt64.check_lower(value.storage_cost) + _UniffiFfiConverterUInt64.check_lower(value.storage_rebate) + _UniffiFfiConverterUInt64.check_lower(value.non_refundable_storage_fee) @staticmethod - def lower(value): - return _UniffiConverterString.lower(value) + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.computation_cost, buf) + _UniffiFfiConverterUInt64.write(value.computation_cost_burned, buf) + _UniffiFfiConverterUInt64.write(value.storage_cost, buf) + _UniffiFfiConverterUInt64.write(value.storage_rebate, buf) + _UniffiFfiConverterUInt64.write(value.non_refundable_storage_fee, buf) -# objects. -class AddressProtocol(typing.Protocol): +class _UniffiFfiConverterOptionalTypeDigest(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeDigest.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeDigest.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeDigest.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class CheckpointSummaryProtocol(typing.Protocol): """ - Unique identifier for an Account on the IOTA blockchain. + A header for a Checkpoint on the IOTA blockchain. - An `Address` is a 32-byte pseudonymous identifier used to uniquely identify - an account and asset-ownership on the IOTA blockchain. Often, human-readable - addresses are encoded in hexadecimal with a `0x` prefix. For example, this - is a valid IOTA address: - `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. + On the IOTA network, checkpoints define the history of the blockchain. They + are quite similar to the concept of blocks used by other blockchains like + Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after + transaction execution has already happened to provide a certified history of + the chain, instead of being formed before execution. - ``` - use iota_types::Address; + Checkpoints commit to a variety of state including but not limited to: + - The hash of the previous checkpoint. + - The set of transaction digests, their corresponding effects digests, as + well as the set of user signatures which authorized its execution. + - The object's produced by a transaction. + - The set of live objects that make up the current state of the chain. + - On epoch transitions, the next validator committee. - let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; - let address = Address::from_hex(hex).unwrap(); - println!("Address: {}", address); - assert_eq!(hex, address.to_string()); - ``` + `CheckpointSummary`s themselves don't directly include all of the above + information but they are the top-level type by which all the above are + committed to transitively via cryptographic hashes included in the summary. + `CheckpointSummary`s are signed and certified by a quorum of the validator + committee in a given epoch in order to allow verification of the chain's + state. - # Deriving an Address + # BCS - Addresses are cryptographically derived from a number of user account - authenticators, the simplest of which is an - [`Ed25519PublicKey`](iota_types::Ed25519PublicKey). + The BCS serialized form for this type is defined by the following ABNF: - Deriving an address consists of the Blake2b256 hash of the sequence of bytes - of its corresponding authenticator, prefixed with a domain-separator (except - ed25519, for compatibility reasons). For each other authenticator, this - domain-separator is the single byte-value of its - [`SignatureScheme`](iota_types::SignatureScheme) flag. E.g. `hash(signature - schema flag || authenticator bytes)`. + ```text + checkpoint-summary = u64 ; epoch + u64 ; sequence_number + u64 ; network_total_transactions + digest ; content_digest + (option digest) ; previous_digest + gas-cost-summary ; epoch_rolling_gas_cost_summary + u64 ; timestamp_ms + (vector checkpoint-commitment) ; checkpoint_commitments + (option end-of-epoch-data) ; end_of_epoch_data + bytes ; version_specific_data + ``` +""" + + def checkpoint_commitments(self, ) -> typing.List[CheckpointCommitment]: + """ + Commitments to checkpoint-specific state. +""" + raise NotImplementedError + def content_digest(self, ) -> Digest: + """ + The hash of the `CheckpointContents` for this checkpoint. +""" + raise NotImplementedError + def digest(self, ) -> Digest: + raise NotImplementedError + def end_of_epoch_data(self, ) -> typing.Optional[EndOfEpochData]: + """ + Extra data only present in the final checkpoint of an epoch. +""" + raise NotImplementedError + def epoch(self, ) -> int: + """ + Epoch that this checkpoint belongs to. +""" + raise NotImplementedError + def epoch_rolling_gas_cost_summary(self, ) -> GasCostSummary: + """ + The running total gas costs of all transactions included in the current + epoch so far until this checkpoint. +""" + raise NotImplementedError + def network_total_transactions(self, ) -> int: + """ + Total number of transactions committed since genesis, including those in + this checkpoint. +""" + raise NotImplementedError + def previous_digest(self, ) -> typing.Optional[Digest]: + """ + The hash of the previous `CheckpointSummary`. - Each authenticator has a method for deriving its `Address` as well as - documentation for the specifics of how the derivation is done. See - [`Ed25519PublicKey::derive_address`] for an example. + This will be only be `None` for the first, or genesis checkpoint. +""" + raise NotImplementedError + def sequence_number(self, ) -> int: + """ + The height of this checkpoint. +""" + raise NotImplementedError + def signing_message(self, ) -> bytes: + raise NotImplementedError + def timestamp_ms(self, ) -> int: + """ + Timestamp of the checkpoint - number of milliseconds from the Unix epoch + Checkpoint timestamps are monotonic, but not strongly monotonic - + subsequent checkpoints can have same timestamp if they originate + from the same underlining consensus commit +""" + raise NotImplementedError + def version_specific_data(self, ) -> bytes: + """ + CheckpointSummary is not an evolvable structure - it must be readable by + any version of the code. Therefore, in order to allow extensions to + be added to CheckpointSummary, we allow opaque data to be added to + checkpoints which can be deserialized based on the current + protocol version. +""" + raise NotImplementedError - [`Ed25519PublicKey::derive_address`]: iota_types::Ed25519PublicKey::derive_address +class CheckpointSummary(CheckpointSummaryProtocol): + """ + A header for a Checkpoint on the IOTA blockchain. - ## Relationship to ObjectIds + On the IOTA network, checkpoints define the history of the blockchain. They + are quite similar to the concept of blocks used by other blockchains like + Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after + transaction execution has already happened to provide a certified history of + the chain, instead of being formed before execution. - [`ObjectId`]s and [`Address`]es share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure that, - cryptographically, there won't be any overlap, e.g. there can't be a - valid `Object` who's `ObjectId` is equal to that of the `Address` of a user - account. + Checkpoints commit to a variety of state including but not limited to: + - The hash of the previous checkpoint. + - The set of transaction digests, their corresponding effects digests, as + well as the set of user signatures which authorized its execution. + - The object's produced by a transaction. + - The set of live objects that make up the current state of the chain. + - On epoch transitions, the next validator committee. - [`ObjectId`]: iota_types::ObjectId + `CheckpointSummary`s themselves don't directly include all of the above + information but they are the top-level type by which all the above are + committed to transitively via cryptographic hashes included in the summary. + `CheckpointSummary`s are signed and certified by a quorum of the validator + committee in a given epoch in order to allow verification of the chain's + state. # BCS - An `Address`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - address = 32OCTET - ``` - """ - - def to_bytes(self, ): - raise NotImplementedError - def to_hex(self, ): - raise NotImplementedError -# Address is a Rust-only trait - it's a wrapper around a Rust implementation. -class Address(): - """ - Unique identifier for an Account on the IOTA blockchain. - - An `Address` is a 32-byte pseudonymous identifier used to uniquely identify - an account and asset-ownership on the IOTA blockchain. Often, human-readable - addresses are encoded in hexadecimal with a `0x` prefix. For example, this - is a valid IOTA address: - `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. - - ``` - use iota_types::Address; - - let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; - let address = Address::from_hex(hex).unwrap(); - println!("Address: {}", address); - assert_eq!(hex, address.to_string()); + checkpoint-summary = u64 ; epoch + u64 ; sequence_number + u64 ; network_total_transactions + digest ; content_digest + (option digest) ; previous_digest + gas-cost-summary ; epoch_rolling_gas_cost_summary + u64 ; timestamp_ms + (vector checkpoint-commitment) ; checkpoint_commitments + (option end-of-epoch-data) ; end_of_epoch_data + bytes ; version_specific_data ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,sequence_number: int,network_total_transactions: int,content_digest: Digest,previous_digest: typing.Optional[Digest],epoch_rolling_gas_cost_summary: GasCostSummary,timestamp_ms: int,checkpoint_commitments: typing.List[CheckpointCommitment],end_of_epoch_data: typing.Optional[EndOfEpochData],version_specific_data: bytes): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterUInt64.check_lower(sequence_number) + + _UniffiFfiConverterUInt64.check_lower(network_total_transactions) + + _UniffiFfiConverterTypeDigest.check_lower(content_digest) + + _UniffiFfiConverterOptionalTypeDigest.check_lower(previous_digest) + + _UniffiFfiConverterTypeGasCostSummary.check_lower(epoch_rolling_gas_cost_summary) + + _UniffiFfiConverterUInt64.check_lower(timestamp_ms) + + _UniffiFfiConverterSequenceTypeCheckpointCommitment.check_lower(checkpoint_commitments) + + _UniffiFfiConverterOptionalTypeEndOfEpochData.check_lower(end_of_epoch_data) + + _UniffiFfiConverterBytes.check_lower(version_specific_data) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterUInt64.lower(sequence_number), + _UniffiFfiConverterUInt64.lower(network_total_transactions), + _UniffiFfiConverterTypeDigest.lower(content_digest), + _UniffiFfiConverterOptionalTypeDigest.lower(previous_digest), + _UniffiFfiConverterTypeGasCostSummary.lower(epoch_rolling_gas_cost_summary), + _UniffiFfiConverterUInt64.lower(timestamp_ms), + _UniffiFfiConverterSequenceTypeCheckpointCommitment.lower(checkpoint_commitments), + _UniffiFfiConverterOptionalTypeEndOfEpochData.lower(end_of_epoch_data), + _UniffiFfiConverterBytes.lower(version_specific_data), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCheckpointSummary.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result - # Deriving an Address - - Addresses are cryptographically derived from a number of user account - authenticators, the simplest of which is an - [`Ed25519PublicKey`](iota_types::Ed25519PublicKey). - - Deriving an address consists of the Blake2b256 hash of the sequence of bytes - of its corresponding authenticator, prefixed with a domain-separator (except - ed25519, for compatibility reasons). For each other authenticator, this - domain-separator is the single byte-value of its - [`SignatureScheme`](iota_types::SignatureScheme) flag. E.g. `hash(signature - schema flag || authenticator bytes)`. + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary, handle) - Each authenticator has a method for deriving its `Address` as well as - documentation for the specifics of how the derivation is done. See - [`Ed25519PublicKey::derive_address`] for an example. + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary, self._handle) - [`Ed25519PublicKey::derive_address`]: iota_types::Ed25519PublicKey::derive_address + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def checkpoint_commitments(self, ) -> typing.List[CheckpointCommitment]: + """ + Commitments to checkpoint-specific state. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeCheckpointCommitment.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def content_digest(self, ) -> Digest: + """ + The hash of the `CheckpointContents` for this checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def end_of_epoch_data(self, ) -> typing.Optional[EndOfEpochData]: + """ + Extra data only present in the final checkpoint of an epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEndOfEpochData.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch(self, ) -> int: + """ + Epoch that this checkpoint belongs to. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch_rolling_gas_cost_summary(self, ) -> GasCostSummary: + """ + The running total gas costs of all transactions included in the current + epoch so far until this checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGasCostSummary.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def network_total_transactions(self, ) -> int: + """ + Total number of transactions committed since genesis, including those in + this checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def previous_digest(self, ) -> typing.Optional[Digest]: + """ + The hash of the previous `CheckpointSummary`. - ## Relationship to ObjectIds + This will be only be `None` for the first, or genesis checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def sequence_number(self, ) -> int: + """ + The height of this checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signing_message(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def timestamp_ms(self, ) -> int: + """ + Timestamp of the checkpoint - number of milliseconds from the Unix epoch + Checkpoint timestamps are monotonic, but not strongly monotonic - + subsequent checkpoints can have same timestamp if they originate + from the same underlining consensus commit +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version_specific_data(self, ) -> bytes: + """ + CheckpointSummary is not an evolvable structure - it must be readable by + any version of the code. Therefore, in order to allow extensions to + be added to CheckpointSummary, we allow opaque data to be added to + checkpoints which can be deserialized based on the current + protocol version. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - [`ObjectId`]s and [`Address`]es share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure that, - cryptographically, there won't be any overlap, e.g. there can't be a - valid `Object` who's `ObjectId` is equal to that of the `Address` of a user - account. - [`ObjectId`]: iota_types::ObjectId - # BCS - An `Address`'s BCS serialized form is defined by the following: - ```text - address = 32OCTET - ``` - """ +class _UniffiFfiConverterTypeCheckpointSummary: + @staticmethod + def lift(value: int) -> CheckpointSummary: + return CheckpointSummary._uniffi_make_instance(value) - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + @staticmethod + def check_lower(value: CheckpointSummary): + if not isinstance(value, CheckpointSummary): + raise TypeError("Expected CheckpointSummary instance, {} found".format(type(value).__name__)) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_address, pointer) + @staticmethod + def lower(value: CheckpointSummary) -> ctypes.c_uint64: + return value._uniffi_clone_handle() - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_address, self._pointer) + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> CheckpointSummary: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def write(cls, value: CheckpointSummary, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) + +class _UniffiFfiConverterSequenceTypeCheckpointSummary(_UniffiConverterRustBuffer): @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeCheckpointSummary.check_lower(item) @classmethod - def from_hex(cls, hex: "str"): - _UniffiConverterString.check_lower(hex) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex, - _UniffiConverterString.lower(hex)) - return cls._make_instance_(pointer) + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeCheckpointSummary.write(item, buf) @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_generate,) - return cls._make_instance_(pointer) + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeCheckpointSummary.read(buf) for i in range(count) + ] + +@dataclass +class CheckpointSummaryPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[CheckpointSummary]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "CheckpointSummaryPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_bytes,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeCheckpointSummaryPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return CheckpointSummaryPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeCheckpointSummary.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeCheckpointSummary.check_lower(value.data) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeCheckpointSummary.write(value.data, buf) +class _UniffiFfiConverterInt32(_UniffiConverterPrimitiveInt): + CLASS_NAME = "i32" + VALUE_MIN = -2**31 + VALUE_MAX = 2**31 + @staticmethod + def read(buf): + return buf.read_i32() + @staticmethod + def write(value, buf): + buf.write_i32(value) - def to_hex(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_address_to_hex,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterOptionalInt32(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterInt32.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterInt32.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterInt32.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterTypeBigInt: + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value, buf) -class _UniffiConverterTypeAddress: + @staticmethod + def read(buf): + return _UniffiFfiConverterString.read(buf) @staticmethod - def lift(value: int): - return Address._make_instance_(value) + def lift(value): + return _UniffiFfiConverterString.lift(value) @staticmethod - def check_lower(value: Address): - if not isinstance(value, Address): - raise TypeError("Expected Address instance, {} found".format(type(value).__name__)) + def check_lower(value): + return _UniffiFfiConverterString.check_lower(value) @staticmethod - def lower(value: AddressProtocol): - if not isinstance(value, Address): - raise TypeError("Expected Address instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value): + return _UniffiFfiConverterString.lower(value) - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) +BigInt = str + +class _UniffiFfiConverterOptionalTypeBigInt(_UniffiConverterRustBuffer): @classmethod - def write(cls, value: AddressProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ArgumentProtocol(typing.Protocol): - """ - An argument to a programmable transaction command + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeBigInt.check_lower(value) - # BCS + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - The BCS serialized form for this type is defined by the following ABNF: + buf.write_u8(1) + _UniffiFfiConverterTypeBigInt.write(value, buf) - ```text - argument = argument-gas - =/ argument-input - =/ argument-result - =/ argument-nested-result + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeBigInt.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - argument-gas = %x00 - argument-input = %x01 u16 - argument-result = %x02 u16 - argument-nested-result = %x03 u16 u16 - ``` +@dataclass +class CoinMetadata: """ + The coin metadata associated with the given coin type. +""" + def __init__(self, *, address:ObjectId, decimals:typing.Optional[int] = _DEFAULT, description:typing.Optional[str] = _DEFAULT, icon_url:typing.Optional[str] = _DEFAULT, name:typing.Optional[str] = _DEFAULT, symbol:typing.Optional[str] = _DEFAULT, supply:typing.Optional[BigInt] = _DEFAULT, version:int): + self.address = address + if decimals is _DEFAULT: + self.decimals = None + else: + self.decimals = decimals + if description is _DEFAULT: + self.description = None + else: + self.description = description + if icon_url is _DEFAULT: + self.icon_url = None + else: + self.icon_url = icon_url + if name is _DEFAULT: + self.name = None + else: + self.name = name + if symbol is _DEFAULT: + self.symbol = None + else: + self.symbol = symbol + if supply is _DEFAULT: + self.supply = None + else: + self.supply = supply + self.version = version + + - def get_nested_result(self, ix: "int"): - """ - Get the nested result for this result at the given index. Returns None - if this is not a Result. - """ + + def __str__(self): + return "CoinMetadata(address={}, decimals={}, description={}, icon_url={}, name={}, symbol={}, supply={}, version={})".format(self.address, self.decimals, self.description, self.icon_url, self.name, self.symbol, self.supply, self.version) + def __eq__(self, other): + if self.address != other.address: + return False + if self.decimals != other.decimals: + return False + if self.description != other.description: + return False + if self.icon_url != other.icon_url: + return False + if self.name != other.name: + return False + if self.symbol != other.symbol: + return False + if self.supply != other.supply: + return False + if self.version != other.version: + return False + return True - raise NotImplementedError -# Argument is a Rust-only trait - it's a wrapper around a Rust implementation. -class Argument(): - """ - An argument to a programmable transaction command +class _UniffiFfiConverterTypeCoinMetadata(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return CoinMetadata( + address=_UniffiFfiConverterTypeObjectId.read(buf), + decimals=_UniffiFfiConverterOptionalInt32.read(buf), + description=_UniffiFfiConverterOptionalString.read(buf), + icon_url=_UniffiFfiConverterOptionalString.read(buf), + name=_UniffiFfiConverterOptionalString.read(buf), + symbol=_UniffiFfiConverterOptionalString.read(buf), + supply=_UniffiFfiConverterOptionalTypeBigInt.read(buf), + version=_UniffiFfiConverterUInt64.read(buf), + ) - # BCS + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.address) + _UniffiFfiConverterOptionalInt32.check_lower(value.decimals) + _UniffiFfiConverterOptionalString.check_lower(value.description) + _UniffiFfiConverterOptionalString.check_lower(value.icon_url) + _UniffiFfiConverterOptionalString.check_lower(value.name) + _UniffiFfiConverterOptionalString.check_lower(value.symbol) + _UniffiFfiConverterOptionalTypeBigInt.check_lower(value.supply) + _UniffiFfiConverterUInt64.check_lower(value.version) - The BCS serialized form for this type is defined by the following ABNF: + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.address, buf) + _UniffiFfiConverterOptionalInt32.write(value.decimals, buf) + _UniffiFfiConverterOptionalString.write(value.description, buf) + _UniffiFfiConverterOptionalString.write(value.icon_url, buf) + _UniffiFfiConverterOptionalString.write(value.name, buf) + _UniffiFfiConverterOptionalString.write(value.symbol, buf) + _UniffiFfiConverterOptionalTypeBigInt.write(value.supply, buf) + _UniffiFfiConverterUInt64.write(value.version, buf) - ```text - argument = argument-gas - =/ argument-input - =/ argument-result - =/ argument-nested-result - argument-gas = %x00 - argument-input = %x01 u16 - argument-result = %x02 u16 - argument-nested-result = %x03 u16 u16 - ``` - """ +class CoinProtocol(typing.Protocol): + + def balance(self, ) -> int: + raise NotImplementedError + def coin_type(self, ) -> TypeTag: + raise NotImplementedError + def id(self, ) -> ObjectId: + raise NotImplementedError - _pointer: ctypes.c_void_p +class Coin(CoinProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def try_from_object(cls, object: Object) -> Coin: + + _UniffiFfiConverterTypeObject.check_lower(object) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObject.lower(object), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCoin.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_gas(cls, ): - """ - The gas coin. The gas coin can only be used by-ref, except for with - `TransferObjects`, which can use it by-value. - """ + def balance(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def coin_type(self, ) -> TypeTag: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def id(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas,) - return cls._make_instance_(pointer) - @classmethod - def new_input(cls, input: "int"): - """ - One of the input objects or primitive values (from - `ProgrammableTransaction` inputs) - """ - _UniffiConverterUInt16.check_lower(input) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input, - _UniffiConverterUInt16.lower(input)) - return cls._make_instance_(pointer) - @classmethod - def new_nested_result(cls, command_index: "int",subresult_index: "int"): - """ - Like a `Result` but it accesses a nested result. Currently, the only - usage of this is to access a value from a Move call with multiple - return values. - """ - _UniffiConverterUInt16.check_lower(command_index) - - _UniffiConverterUInt16.check_lower(subresult_index) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result, - _UniffiConverterUInt16.lower(command_index), - _UniffiConverterUInt16.lower(subresult_index)) - return cls._make_instance_(pointer) +class _UniffiFfiConverterTypeCoin: + @staticmethod + def lift(value: int) -> Coin: + return Coin._uniffi_make_instance(value) - @classmethod - def new_result(cls, result: "int"): - """ - The result of another command (from `ProgrammableTransaction` commands) - """ + @staticmethod + def check_lower(value: Coin): + if not isinstance(value, Coin): + raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) - _UniffiConverterUInt16.check_lower(result) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result, - _UniffiConverterUInt16.lower(result)) - return cls._make_instance_(pointer) + @staticmethod + def lower(value: Coin) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Coin: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Coin, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterSequenceTypeCoin(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeCoin.check_lower(item) - def get_nested_result(self, ix: "int") -> "typing.Optional[Argument]": - """ - Get the nested result for this result at the given index. Returns None - if this is not a Result. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeCoin.write(item, buf) - _UniffiConverterUInt16.check_lower(ix) - - return _UniffiConverterOptionalTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result,self._uniffi_clone_pointer(), - _UniffiConverterUInt16.lower(ix)) - ) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeCoin.read(buf) for i in range(count) + ] +@dataclass +class CoinPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[Coin]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "CoinPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True +class _UniffiFfiConverterTypeCoinPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return CoinPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeCoin.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeCoin.check_lower(value.data) -class _UniffiConverterTypeArgument: + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeCoin.write(value.data, buf) - @staticmethod - def lift(value: int): - return Argument._make_instance_(value) +class _UniffiFfiConverterUInt32(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u32" + VALUE_MIN = 0 + VALUE_MAX = 2**32 @staticmethod - def check_lower(value: Argument): - if not isinstance(value, Argument): - raise TypeError("Expected Argument instance, {} found".format(type(value).__name__)) + def read(buf): + return buf.read_u32() @staticmethod - def lower(value: ArgumentProtocol): - if not isinstance(value, Argument): - raise TypeError("Expected Argument instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + buf.write_u32(value) +class _UniffiFfiConverterOptionalUInt32(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterUInt32.check_lower(value) @classmethod - def write(cls, value: ArgumentProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Bls12381PrivateKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def scheme(self, ): - raise NotImplementedError - def sign_checkpoint_summary(self, summary: "CheckpointSummary"): - raise NotImplementedError - def try_sign(self, message: "bytes"): - raise NotImplementedError - def verifying_key(self, ): - raise NotImplementedError -# Bls12381PrivateKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Bls12381PrivateKey(): - _pointer: ctypes.c_void_p - def __init__(self, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new, - _UniffiConverterBytes.lower(bytes)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey, pointer) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey, self._pointer) + buf.write_u8(1) + _UniffiFfiConverterUInt32.write(value, buf) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate,) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "Bls12381PublicKey": - return _UniffiConverterTypeBls12381PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key,self._uniffi_clone_pointer(),) - ) - - - + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterUInt32.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme,self._uniffi_clone_pointer(),) - ) +class TransactionArgument: + """ + A transaction argument used in programmable transactions. +""" + def __init__(self): + raise RuntimeError("TransactionArgument cannot be instantiated directly") - def sign_checkpoint_summary(self, summary: "CheckpointSummary") -> "ValidatorSignature": - _UniffiConverterTypeCheckpointSummary.check_lower(summary) + # Each enum variant is a nested class of the enum itself. + @dataclass + class GAS_COIN: + """ + Reference to the gas coin. +""" - return _UniffiConverterTypeValidatorSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary,self._uniffi_clone_pointer(), - _UniffiConverterTypeCheckpointSummary.lower(summary)) - ) - - - + def __init__(self, ): + pass + + + + + def __str__(self): + return "TransactionArgument.GAS_COIN()".format() + def __eq__(self, other): + if not other.is_GAS_COIN(): + return False + return True - def try_sign(self, message: "bytes") -> "Bls12381Signature": - _UniffiConverterBytes.check_lower(message) + @dataclass + class INPUT: + """ + An input to the programmable transaction block. +""" - return _UniffiConverterTypeBls12381Signature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) - ) - - + def __init__(self, ix:int): + self.ix = ix + + """ + Index of the programmable transaction block input (0-indexed). +""" + + pass + + + + + def __str__(self): + return "TransactionArgument.INPUT(ix={})".format(self.ix) + def __eq__(self, other): + if not other.is_INPUT(): + return False + if self.ix != other.ix: + return False + return True + @dataclass + class RESULT: + """ + The result of another transaction command. +""" + + def __init__(self, cmd:int, ix:typing.Optional[int]): + self.cmd = cmd + + """ + The index of the previous command (0-indexed) that returned this + result. +""" + + self.ix = ix + + """ + If the previous command returns multiple values, this is the index + of the individual result among the multiple results from + that command (also 0-indexed). +""" + + pass - def verifying_key(self, ) -> "Bls12381VerifyingKey": - return _UniffiConverterTypeBls12381VerifyingKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key,self._uniffi_clone_pointer(),) - ) + + + + + def __str__(self): + return "TransactionArgument.RESULT(cmd={}, ix={})".format(self.cmd, self.ix) + def __eq__(self, other): + if not other.is_RESULT(): + return False + if self.cmd != other.cmd: + return False + if self.ix != other.ix: + return False + return True + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_GAS_COIN(self) -> bool: + return isinstance(self, TransactionArgument.GAS_COIN) + def is_gas_coin(self) -> bool: + return isinstance(self, TransactionArgument.GAS_COIN) + def is_INPUT(self) -> bool: + return isinstance(self, TransactionArgument.INPUT) + def is_input(self) -> bool: + return isinstance(self, TransactionArgument.INPUT) + def is_RESULT(self) -> bool: + return isinstance(self, TransactionArgument.RESULT) + def is_result(self) -> bool: + return isinstance(self, TransactionArgument.RESULT) + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +TransactionArgument.GAS_COIN = type("TransactionArgument.GAS_COIN", (TransactionArgument.GAS_COIN, TransactionArgument,), {}) # type: ignore +TransactionArgument.INPUT = type("TransactionArgument.INPUT", (TransactionArgument.INPUT, TransactionArgument,), {}) # type: ignore +TransactionArgument.RESULT = type("TransactionArgument.RESULT", (TransactionArgument.RESULT, TransactionArgument,), {}) # type: ignore -class _UniffiConverterTypeBls12381PrivateKey: +class _UniffiFfiConverterTypeTransactionArgument(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Bls12381PrivateKey._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return TransactionArgument.GAS_COIN( + ) + if variant == 2: + return TransactionArgument.INPUT( + _UniffiFfiConverterUInt32.read(buf), + ) + if variant == 3: + return TransactionArgument.RESULT( + _UniffiFfiConverterUInt32.read(buf), + _UniffiFfiConverterOptionalUInt32.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: Bls12381PrivateKey): - if not isinstance(value, Bls12381PrivateKey): - raise TypeError("Expected Bls12381PrivateKey instance, {} found".format(type(value).__name__)) + def check_lower(value): + if value.is_GAS_COIN(): + return + if value.is_INPUT(): + _UniffiFfiConverterUInt32.check_lower(value.ix) + return + if value.is_RESULT(): + _UniffiFfiConverterUInt32.check_lower(value.cmd) + _UniffiFfiConverterOptionalUInt32.check_lower(value.ix) + return + raise ValueError(value) @staticmethod - def lower(value: Bls12381PrivateKeyProtocol): - if not isinstance(value, Bls12381PrivateKey): - raise TypeError("Expected Bls12381PrivateKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: Bls12381PrivateKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Bls12381PublicKeyProtocol(typing.Protocol): - """ - A bls12381 min-sig public key. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - bls-public-key = %x60 96OCTECT - ``` - - Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a - fixed-length of 96, IOTA's binary representation of a min-sig - `Bls12381PublicKey` is prefixed with its length meaning its serialized - binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. - """ - - def to_bytes(self, ): - raise NotImplementedError -# Bls12381PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Bls12381PublicKey(): - """ - A bls12381 min-sig public key. - - # BCS + def write(value, buf): + if value.is_GAS_COIN(): + buf.write_i32(1) + if value.is_INPUT(): + buf.write_i32(2) + _UniffiFfiConverterUInt32.write(value.ix, buf) + if value.is_RESULT(): + buf.write_i32(3) + _UniffiFfiConverterUInt32.write(value.cmd, buf) + _UniffiFfiConverterOptionalUInt32.write(value.ix, buf) - The BCS serialized form for this type is defined by the following ABNF: - ```text - bls-public-key = %x60 96OCTECT - ``` - Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a - fixed-length of 96, IOTA's binary representation of a min-sig - `Bls12381PublicKey` is prefixed with its length meaning its serialized - binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +@dataclass +class DryRunMutation: """ - - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381publickey, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381publickey, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) + A mutation to an argument that was mutably borrowed by a command. +""" + def __init__(self, *, input:TransactionArgument, type_tag:TypeTag, bcs:bytes): + self.input = input + self.type_tag = type_tag + self.bcs = bcs + - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_generate,) - return cls._make_instance_(pointer) + + def __str__(self): + return "DryRunMutation(input={}, type_tag={}, bcs={})".format(self.input, self.type_tag, self.bcs) + def __eq__(self, other): + if self.input != other.input: + return False + if self.type_tag != other.type_tag: + return False + if self.bcs != other.bcs: + return False + return True +class _UniffiFfiConverterTypeDryRunMutation(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DryRunMutation( + input=_UniffiFfiConverterTypeTransactionArgument.read(buf), + type_tag=_UniffiFfiConverterTypeTypeTag.read(buf), + bcs=_UniffiFfiConverterBytes.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeTransactionArgument.check_lower(value.input) + _UniffiFfiConverterTypeTypeTag.check_lower(value.type_tag) + _UniffiFfiConverterBytes.check_lower(value.bcs) - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes,self._uniffi_clone_pointer(),) - ) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeTransactionArgument.write(value.input, buf) + _UniffiFfiConverterTypeTypeTag.write(value.type_tag, buf) + _UniffiFfiConverterBytes.write(value.bcs, buf) +class _UniffiFfiConverterSequenceTypeDryRunMutation(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeDryRunMutation.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeDryRunMutation.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeDryRunMutation.read(buf) for i in range(count) + ] +@dataclass +class DryRunReturn: + """ + A return value from a command in the dry run. +""" + def __init__(self, *, type_tag:TypeTag, bcs:bytes): + self.type_tag = type_tag + self.bcs = bcs + + -class _UniffiConverterTypeBls12381PublicKey: + + def __str__(self): + return "DryRunReturn(type_tag={}, bcs={})".format(self.type_tag, self.bcs) + def __eq__(self, other): + if self.type_tag != other.type_tag: + return False + if self.bcs != other.bcs: + return False + return True +class _UniffiFfiConverterTypeDryRunReturn(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Bls12381PublicKey._make_instance_(value) + def read(buf): + return DryRunReturn( + type_tag=_UniffiFfiConverterTypeTypeTag.read(buf), + bcs=_UniffiFfiConverterBytes.read(buf), + ) @staticmethod - def check_lower(value: Bls12381PublicKey): - if not isinstance(value, Bls12381PublicKey): - raise TypeError("Expected Bls12381PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterTypeTypeTag.check_lower(value.type_tag) + _UniffiFfiConverterBytes.check_lower(value.bcs) @staticmethod - def lower(value: Bls12381PublicKeyProtocol): - if not isinstance(value, Bls12381PublicKey): - raise TypeError("Expected Bls12381PublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterTypeTypeTag.write(value.type_tag, buf) + _UniffiFfiConverterBytes.write(value.bcs, buf) +class _UniffiFfiConverterSequenceTypeDryRunReturn(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeDryRunReturn.check_lower(item) @classmethod - def write(cls, value: Bls12381PublicKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Bls12381SignatureProtocol(typing.Protocol): - """ - A bls12381 min-sig public key. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - bls-public-key = %x60 96OCTECT - ``` - - Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a - fixed-length of 96, IOTA's binary representation of a min-sig - `Bls12381PublicKey` is prefixed with its length meaning its serialized - binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. - """ - - def to_bytes(self, ): - raise NotImplementedError -# Bls12381Signature is a Rust-only trait - it's a wrapper around a Rust implementation. -class Bls12381Signature(): - """ - A bls12381 min-sig public key. - - # BCS + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeDryRunReturn.write(item, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ```text - bls-public-key = %x60 96OCTECT - ``` + return [ + _UniffiFfiConverterTypeDryRunReturn.read(buf) for i in range(count) + ] - Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a - fixed-length of 96, IOTA's binary representation of a min-sig - `Bls12381PublicKey` is prefixed with its length meaning its serialized - binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +@dataclass +class DryRunEffect: """ + Effects of a single command in the dry run, including mutated references + and return values. +""" + def __init__(self, *, mutated_references:typing.List[DryRunMutation], return_values:typing.List[DryRunReturn]): + self.mutated_references = mutated_references + self.return_values = return_values + + - _pointer: ctypes.c_void_p - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __str__(self): + return "DryRunEffect(mutated_references={}, return_values={})".format(self.mutated_references, self.return_values) + def __eq__(self, other): + if self.mutated_references != other.mutated_references: + return False + if self.return_values != other.return_values: + return False + return True - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature, pointer) +class _UniffiFfiConverterTypeDryRunEffect(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DryRunEffect( + mutated_references=_UniffiFfiConverterSequenceTypeDryRunMutation.read(buf), + return_values=_UniffiFfiConverterSequenceTypeDryRunReturn.read(buf), + ) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature, self._pointer) + @staticmethod + def check_lower(value): + _UniffiFfiConverterSequenceTypeDryRunMutation.check_lower(value.mutated_references) + _UniffiFfiConverterSequenceTypeDryRunReturn.check_lower(value.return_values) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + @staticmethod + def write(value, buf): + _UniffiFfiConverterSequenceTypeDryRunMutation.write(value.mutated_references, buf) + _UniffiFfiConverterSequenceTypeDryRunReturn.write(value.return_values, buf) +class _UniffiFfiConverterSequenceTypeDryRunEffect(_UniffiConverterRustBuffer): @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeDryRunEffect.check_lower(item) @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate,) - return cls._make_instance_(pointer) + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeDryRunEffect.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeDryRunEffect.read(buf) for i in range(count) + ] - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes,self._uniffi_clone_pointer(),) - ) +# SdkFfiError +# We want to define each variant as a nested class that's also a subclass, +# which is tricky in Python. To accomplish this we're going to create each +# class separately, then manually add the child classes to the base class's +# __dict__. All of this happens in dummy class to avoid polluting the module +# namespace. +class SdkFfiError(Exception): + pass +_UniffiTempSdkFfiError = SdkFfiError +class SdkFfiError: # type: ignore + + class Generic(_UniffiTempSdkFfiError): + def __repr__(self): + return "SdkFfiError.Generic({})".format(repr(str(self))) + _UniffiTempSdkFfiError.Generic = Generic # type: ignore +SdkFfiError = _UniffiTempSdkFfiError # type: ignore +del _UniffiTempSdkFfiError -class _UniffiConverterTypeBls12381Signature: +class _UniffiFfiConverterTypeSdkFfiError(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Bls12381Signature._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return SdkFfiError.Generic( + _UniffiFfiConverterString.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: Bls12381Signature): - if not isinstance(value, Bls12381Signature): - raise TypeError("Expected Bls12381Signature instance, {} found".format(type(value).__name__)) + def check_lower(value): + if isinstance(value, SdkFfiError.Generic): + return @staticmethod - def lower(value: Bls12381SignatureProtocol): - if not isinstance(value, Bls12381Signature): - raise TypeError("Expected Bls12381Signature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + if isinstance(value, SdkFfiError.Generic): + buf.write_i32(1) - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: Bls12381SignatureProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Bls12381VerifyingKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def verify(self, message: "bytes",signature: "Bls12381Signature"): - raise NotImplementedError -# Bls12381VerifyingKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Bls12381VerifyingKey(): - _pointer: ctypes.c_void_p - def __init__(self, public_key: "Bls12381PublicKey"): - _UniffiConverterTypeBls12381PublicKey.check_lower(public_key) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new, - _UniffiConverterTypeBls12381PublicKey.lower(public_key)) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey, self._pointer) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst +class TransactionExpiration: + """ + A TTL for a transaction + + # BCS - def public_key(self, ) -> "Bls12381PublicKey": - return _UniffiConverterTypeBls12381PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key,self._uniffi_clone_pointer(),) - ) + The BCS serialized form for this type is defined by the following ABNF: + + ```text + transaction-expiration = %x00 ; none + =/ %x01 u64 ; epoch + ``` +""" + def __init__(self): + raise RuntimeError("TransactionExpiration cannot be instantiated directly") + # Each enum variant is a nested class of the enum itself. + @dataclass + class NONE: + """ + The transaction has no expiration +""" + + def __init__(self, ): + pass + + + + + def __str__(self): + return "TransactionExpiration.NONE()".format() + def __eq__(self, other): + if not other.is_NONE(): + return False + return True + @dataclass + class EPOCH: + """ + Validators wont sign a transaction unless the expiration Epoch + is greater than or equal to the current epoch +""" + + def __init__(self, *values): + if len(values) != 1: + raise TypeError(f"Expected 1 arguments, found {len(values)}") + self._values = values + def __getitem__(self, index): + return self._values[index] - def verify(self, message: "bytes",signature: "Bls12381Signature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeBls12381Signature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeBls12381Signature.lower(signature)) + + + + + def __str__(self): + return f"TransactionExpiration.EPOCH{self._values!r}" + def __eq__(self, other): + if not other.is_EPOCH(): + return False + return self._values == other._values + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_NONE(self) -> bool: + return isinstance(self, TransactionExpiration.NONE) + def is_none(self) -> bool: + return isinstance(self, TransactionExpiration.NONE) + def is_EPOCH(self) -> bool: + return isinstance(self, TransactionExpiration.EPOCH) + def is_epoch(self) -> bool: + return isinstance(self, TransactionExpiration.EPOCH) + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +TransactionExpiration.NONE = type("TransactionExpiration.NONE", (TransactionExpiration.NONE, TransactionExpiration,), {}) # type: ignore +TransactionExpiration.EPOCH = type("TransactionExpiration.EPOCH", (TransactionExpiration.EPOCH, TransactionExpiration,), {}) # type: ignore -class _UniffiConverterTypeBls12381VerifyingKey: +class _UniffiFfiConverterTypeTransactionExpiration(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Bls12381VerifyingKey._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return TransactionExpiration.NONE( + ) + if variant == 2: + return TransactionExpiration.EPOCH( + _UniffiFfiConverterUInt64.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: Bls12381VerifyingKey): - if not isinstance(value, Bls12381VerifyingKey): - raise TypeError("Expected Bls12381VerifyingKey instance, {} found".format(type(value).__name__)) + def check_lower(value): + if value.is_NONE(): + return + if value.is_EPOCH(): + _UniffiFfiConverterUInt64.check_lower(value._values[0]) + return + raise ValueError(value) @staticmethod - def lower(value: Bls12381VerifyingKeyProtocol): - if not isinstance(value, Bls12381VerifyingKey): - raise TypeError("Expected Bls12381VerifyingKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: Bls12381VerifyingKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Bn254FieldElementProtocol(typing.Protocol): - """ - A point on the BN254 elliptic curve. - - This is a 32-byte, or 256-bit, value that is generally represented as - radix10 when a human-readable display format is needed, and is represented - as a 32-byte big-endian value while in memory. - - # BCS + def write(value, buf): + if value.is_NONE(): + buf.write_i32(1) + if value.is_EPOCH(): + buf.write_i32(2) + _UniffiFfiConverterUInt64.write(value._values[0], buf) - The BCS serialized form for this type is defined by the following ABNF: - ```text - bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value - ``` - """ - def padded(self, ): - raise NotImplementedError - def unpadded(self, ): - raise NotImplementedError -# Bn254FieldElement is a Rust-only trait - it's a wrapper around a Rust implementation. -class Bn254FieldElement(): +@dataclass +class ObjectReference: """ - A point on the BN254 elliptic curve. + Reference to an object - This is a 32-byte, or 256-bit, value that is generally represented as - radix10 when a human-readable display format is needed, and is represented - as a 32-byte big-endian value while in memory. + Contains sufficient information to uniquely identify a specific object. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value + object-ref = object-id u64 digest ``` - """ - - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) +""" + def __init__(self, *, object_id:ObjectId, version:int, digest:Digest): + self.object_id = object_id + self.version = version + self.digest = digest - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def from_str_radix_10(cls, s: "str"): - _UniffiConverterString.check_lower(s) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - + + def __str__(self): + return "ObjectReference(object_id={}, version={}, digest={})".format(self.object_id, self.version, self.digest) + def __eq__(self, other): + if self.object_id != other.object_id: + return False + if self.version != other.version: + return False + if self.digest != other.digest: + return False + return True - def padded(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeObjectReference(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ObjectReference( + object_id=_UniffiFfiConverterTypeObjectId.read(buf), + version=_UniffiFfiConverterUInt64.read(buf), + digest=_UniffiFfiConverterTypeDigest.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.object_id) + _UniffiFfiConverterUInt64.check_lower(value.version) + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.object_id, buf) + _UniffiFfiConverterUInt64.write(value.version, buf) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) +class _UniffiFfiConverterSequenceTypeObjectReference(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeObjectReference.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeObjectReference.write(item, buf) - def unpadded(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded,self._uniffi_clone_pointer(),) - ) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeObjectReference.read(buf) for i in range(count) + ] +@dataclass +class GasPayment: + """ + Payment information for executing a transaction + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + gas-payment = (vector object-ref) ; gas coin objects + address ; owner + u64 ; price + u64 ; budget + ``` +""" + def __init__(self, *, objects:typing.List[ObjectReference], owner:Address, price:int, budget:int): + self.objects = objects + self.owner = owner + self.price = price + self.budget = budget + + -class _UniffiConverterTypeBn254FieldElement: + + def __str__(self): + return "GasPayment(objects={}, owner={}, price={}, budget={})".format(self.objects, self.owner, self.price, self.budget) + def __eq__(self, other): + if self.objects != other.objects: + return False + if self.owner != other.owner: + return False + if self.price != other.price: + return False + if self.budget != other.budget: + return False + return True +class _UniffiFfiConverterTypeGasPayment(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Bn254FieldElement._make_instance_(value) + def read(buf): + return GasPayment( + objects=_UniffiFfiConverterSequenceTypeObjectReference.read(buf), + owner=_UniffiFfiConverterTypeAddress.read(buf), + price=_UniffiFfiConverterUInt64.read(buf), + budget=_UniffiFfiConverterUInt64.read(buf), + ) @staticmethod - def check_lower(value: Bn254FieldElement): - if not isinstance(value, Bn254FieldElement): - raise TypeError("Expected Bn254FieldElement instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterSequenceTypeObjectReference.check_lower(value.objects) + _UniffiFfiConverterTypeAddress.check_lower(value.owner) + _UniffiFfiConverterUInt64.check_lower(value.price) + _UniffiFfiConverterUInt64.check_lower(value.budget) @staticmethod - def lower(value: Bn254FieldElementProtocol): - if not isinstance(value, Bn254FieldElement): - raise TypeError("Expected Bn254FieldElement instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterSequenceTypeObjectReference.write(value.objects, buf) + _UniffiFfiConverterTypeAddress.write(value.owner, buf) + _UniffiFfiConverterUInt64.write(value.price, buf) + _UniffiFfiConverterUInt64.write(value.budget, buf) - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: Bn254FieldElementProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class CancelledTransactionProtocol(typing.Protocol): +class TransactionKindProtocol(typing.Protocol): """ - A transaction that was cancelled + Transaction type # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - cancelled-transaction = digest (vector version-assignment) + transaction-kind = %x00 ptb + =/ %x01 change-epoch + =/ %x02 genesis-transaction + =/ %x03 consensus-commit-prologue + =/ %x04 authenticator-state-update + =/ %x05 (vector end-of-epoch-transaction-kind) + =/ %x06 randomness-state-update + =/ %x07 consensus-commit-prologue-v2 + =/ %x08 consensus-commit-prologue-v3 ``` - """ +""" + + pass - def digest(self, ): - raise NotImplementedError - def version_assignments(self, ): - raise NotImplementedError -# CancelledTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class CancelledTransaction(): +class TransactionKind(TransactionKindProtocol): """ - A transaction that was cancelled + Transaction type # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - cancelled-transaction = digest (vector version-assignment) + transaction-kind = %x00 ptb + =/ %x01 change-epoch + =/ %x02 genesis-transaction + =/ %x03 consensus-commit-prologue + =/ %x04 authenticator-state-update + =/ %x05 (vector end-of-epoch-transaction-kind) + =/ %x06 randomness-state-update + =/ %x07 consensus-commit-prologue-v2 + =/ %x08 consensus-commit-prologue-v3 ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, digest: "Digest",version_assignments: "typing.List[VersionAssignment]"): - _UniffiConverterTypeDigest.check_lower(digest) +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_authenticator_state_update_v1(cls, tx: AuthenticatorStateUpdateV1) -> TransactionKind: + + _UniffiFfiConverterTypeAuthenticatorStateUpdateV1.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAuthenticatorStateUpdateV1.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_consensus_commit_prologue_v1(cls, tx: ConsensusCommitPrologueV1) -> TransactionKind: + + _UniffiFfiConverterTypeConsensusCommitPrologueV1.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeConsensusCommitPrologueV1.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_end_of_epoch(cls, tx: typing.List[EndOfEpochTransactionKind]) -> TransactionKind: - _UniffiConverterSequenceTypeVersionAssignment.check_lower(version_assignments) + _UniffiFfiConverterSequenceTypeEndOfEpochTransactionKind.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeEndOfEpochTransactionKind.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_genesis(cls, tx: GenesisTransaction) -> TransactionKind: + + _UniffiFfiConverterTypeGenesisTransaction.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeGenesisTransaction.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_programmable_transaction(cls, tx: ProgrammableTransaction) -> TransactionKind: + + _UniffiFfiConverterTypeProgrammableTransaction.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeProgrammableTransaction.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_randomness_state_update(cls, tx: RandomnessStateUpdate) -> TransactionKind: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new, - _UniffiConverterTypeDigest.lower(digest), - _UniffiConverterSequenceTypeVersionAssignment.lower(version_assignments)) + _UniffiFfiConverterTypeRandomnessStateUpdate.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeRandomnessStateUpdate.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest,self._uniffi_clone_pointer(),) - ) - - - - - - def version_assignments(self, ) -> "typing.List[VersionAssignment]": - return _UniffiConverterSequenceTypeVersionAssignment.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments,self._uniffi_clone_pointer(),) - ) - - - -class _UniffiConverterTypeCancelledTransaction: - +class _UniffiFfiConverterTypeTransactionKind: @staticmethod - def lift(value: int): - return CancelledTransaction._make_instance_(value) + def lift(value: int) -> TransactionKind: + return TransactionKind._uniffi_make_instance(value) @staticmethod - def check_lower(value: CancelledTransaction): - if not isinstance(value, CancelledTransaction): - raise TypeError("Expected CancelledTransaction instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionKind): + if not isinstance(value, TransactionKind): + raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CancelledTransactionProtocol): - if not isinstance(value, CancelledTransaction): - raise TypeError("Expected CancelledTransaction instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: TransactionKind) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> TransactionKind: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CancelledTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionKind, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ChangeEpochProtocol(typing.Protocol): + + +class TransactionProtocol(typing.Protocol): """ - System transaction used to change the epoch + A transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - change-epoch = u64 ; next epoch - u64 ; protocol version - u64 ; storage charge - u64 ; computation charge - u64 ; storage rebate - u64 ; non-refundable storage fee - u64 ; epoch start timestamp - (vector system-package) - ``` - """ - - def computation_charge(self, ): - """ - The total amount of gas charged for computation during the epoch. - """ + transaction = %x00 transaction-v1 + transaction-v1 = transaction-kind address gas-payment transaction-expiration + ``` +""" + + def bcs_serialize(self, ) -> bytes: raise NotImplementedError - def epoch(self, ): - """ - The next (to become) epoch ID. - """ - + def digest(self, ) -> Digest: raise NotImplementedError - def epoch_start_timestamp_ms(self, ): - """ - Unix timestamp when epoch started - """ - + def expiration(self, ) -> TransactionExpiration: raise NotImplementedError - def non_refundable_storage_fee(self, ): - """ - The non-refundable storage fee. - """ - + def gas_payment(self, ) -> GasPayment: raise NotImplementedError - def protocol_version(self, ): - """ - The protocol version in effect in the new epoch. - """ - + def kind(self, ) -> TransactionKind: raise NotImplementedError - def storage_charge(self, ): - """ - The total amount of gas charged for storage during the epoch. - """ - + def sender(self, ) -> Address: raise NotImplementedError - def storage_rebate(self, ): - """ - The amount of storage rebate refunded to the txn senders. - """ - + def signing_digest(self, ) -> bytes: raise NotImplementedError - def system_packages(self, ): - """ - System packages (specifically framework and move stdlib) that are - written before the new epoch starts. - """ - raise NotImplementedError -# ChangeEpoch is a Rust-only trait - it's a wrapper around a Rust implementation. -class ChangeEpoch(): +class Transaction(TransactionProtocol): """ - System transaction used to change the epoch + A transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - change-epoch = u64 ; next epoch - u64 ; protocol version - u64 ; storage charge - u64 ; computation charge - u64 ; storage rebate - u64 ; non-refundable storage fee - u64 ; epoch start timestamp - (vector system-package) - ``` - """ + transaction = %x00 transaction-v1 - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",protocol_version: "int",storage_charge: "int",computation_charge: "int",storage_rebate: "int",non_refundable_storage_fee: "int",epoch_start_timestamp_ms: "int",system_packages: "typing.List[SystemPackage]"): - _UniffiConverterUInt64.check_lower(epoch) - - _UniffiConverterUInt64.check_lower(protocol_version) - - _UniffiConverterUInt64.check_lower(storage_charge) - - _UniffiConverterUInt64.check_lower(computation_charge) - - _UniffiConverterUInt64.check_lower(storage_rebate) + transaction-v1 = transaction-kind address gas-payment transaction-expiration + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, kind: TransactionKind,sender: Address,gas_payment: GasPayment,expiration: TransactionExpiration): - _UniffiConverterUInt64.check_lower(non_refundable_storage_fee) + _UniffiFfiConverterTypeTransactionKind.check_lower(kind) - _UniffiConverterUInt64.check_lower(epoch_start_timestamp_ms) + _UniffiFfiConverterTypeAddress.check_lower(sender) - _UniffiConverterSequenceTypeSystemPackage.check_lower(system_packages) + _UniffiFfiConverterTypeGasPayment.check_lower(gas_payment) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterUInt64.lower(protocol_version), - _UniffiConverterUInt64.lower(storage_charge), - _UniffiConverterUInt64.lower(computation_charge), - _UniffiConverterUInt64.lower(storage_rebate), - _UniffiConverterUInt64.lower(non_refundable_storage_fee), - _UniffiConverterUInt64.lower(epoch_start_timestamp_ms), - _UniffiConverterSequenceTypeSystemPackage.lower(system_packages)) + _UniffiFfiConverterTypeTransactionExpiration.check_lower(expiration) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTransactionKind.lower(kind), + _UniffiFfiConverterTypeAddress.lower(sender), + _UniffiFfiConverterTypeGasPayment.lower(gas_payment), + _UniffiFfiConverterTypeTransactionExpiration.lower(expiration), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransaction.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def bcs_serialize(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def expiration(self, ) -> TransactionExpiration: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionExpiration.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def gas_payment(self, ) -> GasPayment: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGasPayment.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def kind(self, ) -> TransactionKind: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def sender(self, ) -> Address: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signing_digest(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeTransaction: + @staticmethod + def lift(value: int) -> Transaction: + return Transaction._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Transaction): + if not isinstance(value, Transaction): + raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) - def computation_charge(self, ) -> "int": - """ - The total amount of gas charged for computation during the epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge,self._uniffi_clone_pointer(),) - ) - - - - - - def epoch(self, ) -> "int": - """ - The next (to become) epoch ID. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch,self._uniffi_clone_pointer(),) - ) - - - - - - def epoch_start_timestamp_ms(self, ) -> "int": - """ - Unix timestamp when epoch started - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms,self._uniffi_clone_pointer(),) - ) - - - - - - def non_refundable_storage_fee(self, ) -> "int": - """ - The non-refundable storage fee. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee,self._uniffi_clone_pointer(),) - ) - - - - - - def protocol_version(self, ) -> "int": - """ - The protocol version in effect in the new epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version,self._uniffi_clone_pointer(),) - ) - - - - - - def storage_charge(self, ) -> "int": - """ - The total amount of gas charged for storage during the epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge,self._uniffi_clone_pointer(),) - ) - + @staticmethod + def lower(value: Transaction) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Transaction: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Transaction, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterUInt16(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u16" + VALUE_MIN = 0 + VALUE_MAX = 2**16 - def storage_rebate(self, ) -> "int": - """ - The amount of storage rebate refunded to the txn senders. - """ + @staticmethod + def read(buf): + return buf.read_u16() - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate,self._uniffi_clone_pointer(),) - ) + @staticmethod + def write(value, buf): + buf.write_u16(value) - def system_packages(self, ) -> "typing.List[SystemPackage]": - """ - System packages (specifically framework and move stdlib) that are - written before the new epoch starts. - """ - return _UniffiConverterSequenceTypeSystemPackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages,self._uniffi_clone_pointer(),) - ) +class SignatureScheme(enum.Enum): + """ + Flag use to disambiguate the signature schemes supported by IOTA. + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + signature-scheme = ed25519-flag / secp256k1-flag / secp256r1-flag / + multisig-flag / bls-flag / zklogin-flag / passkey-flag + ed25519-flag = %x00 + secp256k1-flag = %x01 + secp256r1-flag = %x02 + multisig-flag = %x03 + bls-flag = %x04 + zklogin-flag = %x05 + passkey-flag = %x06 + ``` +""" + + ED25519 = 0 + + SECP256K1 = 1 + + SECP256R1 = 2 + + MULTISIG = 3 + + BLS12381 = 4 + + ZK_LOGIN = 5 + + PASSKEY = 6 + +class _UniffiFfiConverterTypeSignatureScheme(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return SignatureScheme.ED25519 + if variant == 2: + return SignatureScheme.SECP256K1 + if variant == 3: + return SignatureScheme.SECP256R1 + if variant == 4: + return SignatureScheme.MULTISIG + if variant == 5: + return SignatureScheme.BLS12381 + if variant == 6: + return SignatureScheme.ZK_LOGIN + if variant == 7: + return SignatureScheme.PASSKEY + raise InternalError("Raw enum value doesn't match any cases") -class _UniffiConverterTypeChangeEpoch: + @staticmethod + def check_lower(value): + if value == SignatureScheme.ED25519: + return + if value == SignatureScheme.SECP256K1: + return + if value == SignatureScheme.SECP256R1: + return + if value == SignatureScheme.MULTISIG: + return + if value == SignatureScheme.BLS12381: + return + if value == SignatureScheme.ZK_LOGIN: + return + if value == SignatureScheme.PASSKEY: + return + raise ValueError(value) @staticmethod - def lift(value: int): - return ChangeEpoch._make_instance_(value) + def write(value, buf): + if value == SignatureScheme.ED25519: + buf.write_i32(1) + if value == SignatureScheme.SECP256K1: + buf.write_i32(2) + if value == SignatureScheme.SECP256R1: + buf.write_i32(3) + if value == SignatureScheme.MULTISIG: + buf.write_i32(4) + if value == SignatureScheme.BLS12381: + buf.write_i32(5) + if value == SignatureScheme.ZK_LOGIN: + buf.write_i32(6) + if value == SignatureScheme.PASSKEY: + buf.write_i32(7) - @staticmethod - def check_lower(value: ChangeEpoch): - if not isinstance(value, ChangeEpoch): - raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: ChangeEpochProtocol): - if not isinstance(value, ChangeEpoch): - raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: ChangeEpochProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ChangeEpochV2Protocol(typing.Protocol): +class Ed25519PublicKeyProtocol(typing.Protocol): """ - System transaction used to change the epoch + An ed25519 public key. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - change-epoch = u64 ; next epoch - u64 ; protocol version - u64 ; storage charge - u64 ; computation charge - u64 ; computation charge burned - u64 ; storage rebate - u64 ; non-refundable storage fee - u64 ; epoch start timestamp - (vector system-package) + ed25519-public-key = 32OCTECT ``` - """ - - def computation_charge(self, ): - """ - The total amount of gas charged for computation during the epoch. - """ - - raise NotImplementedError - def computation_charge_burned(self, ): - """ - The total amount of gas burned for computation during the epoch. - """ - - raise NotImplementedError - def epoch(self, ): - """ - The next (to become) epoch ID. - """ - - raise NotImplementedError - def epoch_start_timestamp_ms(self, ): - """ - Unix timestamp when epoch started - """ - - raise NotImplementedError - def non_refundable_storage_fee(self, ): - """ - The non-refundable storage fee. +""" + + def derive_address(self, ) -> Address: """ + Derive an `Address` from this Public Key - raise NotImplementedError - def protocol_version(self, ): - """ - The protocol version in effect in the new epoch. - """ + An `Address` can be derived from an `Ed25519PublicKey` by hashing the + bytes of the public key with no prefix flag. + `hash(32-byte ed25519 public key)` +""" raise NotImplementedError - def storage_charge(self, ): - """ - The total amount of gas charged for storage during the epoch. + def scheme(self, ) -> SignatureScheme: """ - + Return the flag for this signature scheme +""" raise NotImplementedError - def storage_rebate(self, ): - """ - The amount of storage rebate refunded to the txn senders. - """ - + def to_bytes(self, ) -> bytes: raise NotImplementedError - def system_packages(self, ): - """ - System packages (specifically framework and move stdlib) that are - written before the new epoch starts. - """ - raise NotImplementedError -# ChangeEpochV2 is a Rust-only trait - it's a wrapper around a Rust implementation. -class ChangeEpochV2(): +class Ed25519PublicKey(Ed25519PublicKeyProtocol): """ - System transaction used to change the epoch + An ed25519 public key. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - change-epoch = u64 ; next epoch - u64 ; protocol version - u64 ; storage charge - u64 ; computation charge - u64 ; computation charge burned - u64 ; storage rebate - u64 ; non-refundable storage fee - u64 ; epoch start timestamp - (vector system-package) + ed25519-public-key = 32OCTECT ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",protocol_version: "int",storage_charge: "int",computation_charge: "int",computation_charge_burned: "int",storage_rebate: "int",non_refundable_storage_fee: "int",epoch_start_timestamp_ms: "int",system_packages: "typing.List[SystemPackage]"): - _UniffiConverterUInt64.check_lower(epoch) - - _UniffiConverterUInt64.check_lower(protocol_version) - - _UniffiConverterUInt64.check_lower(storage_charge) - - _UniffiConverterUInt64.check_lower(computation_charge) - - _UniffiConverterUInt64.check_lower(computation_charge_burned) - - _UniffiConverterUInt64.check_lower(storage_rebate) - - _UniffiConverterUInt64.check_lower(non_refundable_storage_fee) - - _UniffiConverterUInt64.check_lower(epoch_start_timestamp_ms) +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Ed25519PublicKey: - _UniffiConverterSequenceTypeSystemPackage.check_lower(system_packages) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Ed25519PublicKey: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterUInt64.lower(protocol_version), - _UniffiConverterUInt64.lower(storage_charge), - _UniffiConverterUInt64.lower(computation_charge), - _UniffiConverterUInt64.lower(computation_charge_burned), - _UniffiConverterUInt64.lower(storage_rebate), - _UniffiConverterUInt64.lower(non_refundable_storage_fee), - _UniffiConverterUInt64.lower(epoch_start_timestamp_ms), - _UniffiConverterSequenceTypeSystemPackage.lower(system_packages)) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Ed25519PublicKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def computation_charge(self, ) -> "int": - """ - The total amount of gas charged for computation during the epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge,self._uniffi_clone_pointer(),) - ) - - - - - - def computation_charge_burned(self, ) -> "int": - """ - The total amount of gas burned for computation during the epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned,self._uniffi_clone_pointer(),) - ) - - - - - - def epoch(self, ) -> "int": + def derive_address(self, ) -> Address: """ - The next (to become) epoch ID. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch,self._uniffi_clone_pointer(),) - ) - - - - + Derive an `Address` from this Public Key - def epoch_start_timestamp_ms(self, ) -> "int": - """ - Unix timestamp when epoch started - """ + An `Address` can be derived from an `Ed25519PublicKey` by hashing the + bytes of the public key with no prefix flag. - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms,self._uniffi_clone_pointer(),) + `hash(32-byte ed25519 public key)` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def non_refundable_storage_fee(self, ) -> "int": - """ - The non-refundable storage fee. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address, + *_uniffi_lowered_args, ) - - - - - - def protocol_version(self, ) -> "int": - """ - The protocol version in effect in the new epoch. + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version,self._uniffi_clone_pointer(),) + Return the flag for this signature scheme +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def storage_charge(self, ) -> "int": - """ - The total amount of gas charged for storage during the epoch. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme, + *_uniffi_lowered_args, ) - - - - - - def storage_rebate(self, ) -> "int": - """ - The amount of storage rebate refunded to the txn senders. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def system_packages(self, ) -> "typing.List[SystemPackage]": - """ - System packages (specifically framework and move stdlib) that are - written before the new epoch starts. - """ - - return _UniffiConverterSequenceTypeSystemPackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeChangeEpochV2: - +class _UniffiFfiConverterTypeEd25519PublicKey: @staticmethod - def lift(value: int): - return ChangeEpochV2._make_instance_(value) + def lift(value: int) -> Ed25519PublicKey: + return Ed25519PublicKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: ChangeEpochV2): - if not isinstance(value, ChangeEpochV2): - raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) + def check_lower(value: Ed25519PublicKey): + if not isinstance(value, Ed25519PublicKey): + raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ChangeEpochV2Protocol): - if not isinstance(value, ChangeEpochV2): - raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Ed25519PublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Ed25519PublicKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ChangeEpochV2Protocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519PublicKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointCommitmentProtocol(typing.Protocol): + +class _UniffiFfiConverterOptionalTypeEd25519PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeEd25519PublicKey.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeEd25519PublicKey.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeEd25519PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class Secp256k1PublicKeyProtocol(typing.Protocol): """ - A commitment made by a checkpoint. + A secp256k1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ; CheckpointCommitment is an enum and each variant is prefixed with its index - checkpoint-commitment = ecmh-live-object-set - ecmh-live-object-set = %x00 digest + secp256k1-signature = 64OCTECT ``` - """ +""" + + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this Public Key + + An `Address` can be derived from a `Secp256k1PublicKey` by hashing the + bytes of the public key prefixed with the Secp256k1 + `SignatureScheme` flag (`0x01`). - def as_ecmh_live_object_set_digest(self, ): + `hash( 0x01 || 33-byte secp256k1 public key)` +""" + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" raise NotImplementedError - def is_ecmh_live_object_set(self, ): + def to_bytes(self, ) -> bytes: raise NotImplementedError -# CheckpointCommitment is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointCommitment(): + +class Secp256k1PublicKey(Secp256k1PublicKeyProtocol): """ - A commitment made by a checkpoint. + A secp256k1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ; CheckpointCommitment is an enum and each variant is prefixed with its index - checkpoint-commitment = ecmh-live-object-set - ecmh-live-object-set = %x00 digest + secp256k1-signature = 64OCTECT ``` - """ - - _pointer: ctypes.c_void_p +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Secp256k1PublicKey: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Secp256k1PublicKey: + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Secp256k1PublicKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this Public Key + An `Address` can be derived from a `Secp256k1PublicKey` by hashing the + bytes of the public key prefixed with the Secp256k1 + `SignatureScheme` flag (`0x01`). - def as_ecmh_live_object_set_digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest,self._uniffi_clone_pointer(),) + `hash( 0x01 || 33-byte secp256k1 public key)` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_ecmh_live_object_set(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeCheckpointCommitment: - +class _UniffiFfiConverterTypeSecp256k1PublicKey: @staticmethod - def lift(value: int): - return CheckpointCommitment._make_instance_(value) + def lift(value: int) -> Secp256k1PublicKey: + return Secp256k1PublicKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: CheckpointCommitment): - if not isinstance(value, CheckpointCommitment): - raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1PublicKey): + if not isinstance(value, Secp256k1PublicKey): + raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointCommitmentProtocol): - if not isinstance(value, CheckpointCommitment): - raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256k1PublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256k1PublicKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointCommitmentProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1PublicKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointContentsProtocol(typing.Protocol): - """ - The committed to contents of a checkpoint. - `CheckpointContents` contains a list of digests of Transactions, their - effects, and the user signatures that authorized their execution included in - a checkpoint. +class _UniffiFfiConverterOptionalTypeSecp256k1PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSecp256k1PublicKey.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeSecp256k1PublicKey.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSecp256k1PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class Secp256r1PublicKeyProtocol(typing.Protocol): + """ + A secp256r1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0 - - checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests - (vector (vector bcs-user-signature)) ; set of user signatures for each - ; transaction. MUST be the same - ; length as the vector of digests + secp256r1-signature = 64OCTECT ``` - """ +""" + + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this Public Key + + An `Address` can be derived from a `Secp256r1PublicKey` by hashing the + bytes of the public key prefixed with the Secp256r1 + `SignatureScheme` flag (`0x02`). - def digest(self, ): + `hash( 0x02 || 33-byte secp256r1 public key)` +""" + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" raise NotImplementedError - def transaction_info(self, ): + def to_bytes(self, ) -> bytes: raise NotImplementedError -# CheckpointContents is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointContents(): - """ - The committed to contents of a checkpoint. - `CheckpointContents` contains a list of digests of Transactions, their - effects, and the user signatures that authorized their execution included in - a checkpoint. +class Secp256r1PublicKey(Secp256r1PublicKeyProtocol): + """ + A secp256r1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0 - - checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests - (vector (vector bcs-user-signature)) ; set of user signatures for each - ; transaction. MUST be the same - ; length as the vector of digests + secp256r1-signature = 64OCTECT ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, transaction_info: "typing.List[CheckpointTransactionInfo]"): - _UniffiConverterSequenceTypeCheckpointTransactionInfo.check_lower(transaction_info) +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Secp256r1PublicKey: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Secp256r1PublicKey: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new, - _UniffiConverterSequenceTypeCheckpointTransactionInfo.lower(transaction_info)) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Secp256r1PublicKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this Public Key + An `Address` can be derived from a `Secp256r1PublicKey` by hashing the + bytes of the public key prefixed with the Secp256r1 + `SignatureScheme` flag (`0x02`). - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest,self._uniffi_clone_pointer(),) + `hash( 0x02 || 33-byte secp256r1 public key)` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def transaction_info(self, ) -> "typing.List[CheckpointTransactionInfo]": - return _UniffiConverterSequenceTypeCheckpointTransactionInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeCheckpointContents: - +class _UniffiFfiConverterTypeSecp256r1PublicKey: @staticmethod - def lift(value: int): - return CheckpointContents._make_instance_(value) + def lift(value: int) -> Secp256r1PublicKey: + return Secp256r1PublicKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: CheckpointContents): - if not isinstance(value, CheckpointContents): - raise TypeError("Expected CheckpointContents instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256r1PublicKey): + if not isinstance(value, Secp256r1PublicKey): + raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointContentsProtocol): - if not isinstance(value, CheckpointContents): - raise TypeError("Expected CheckpointContents instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256r1PublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256r1PublicKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointContentsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1PublicKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointSummaryProtocol(typing.Protocol): - """ - A header for a Checkpoint on the IOTA blockchain. - On the IOTA network, checkpoints define the history of the blockchain. They - are quite similar to the concept of blocks used by other blockchains like - Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after - transaction execution has already happened to provide a certified history of - the chain, instead of being formed before execution. +class _UniffiFfiConverterOptionalTypeSecp256r1PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSecp256r1PublicKey.check_lower(value) - Checkpoints commit to a variety of state including but not limited to: - - The hash of the previous checkpoint. - - The set of transaction digests, their corresponding effects digests, as - well as the set of user signatures which authorized its execution. - - The object's produced by a transaction. - - The set of live objects that make up the current state of the chain. - - On epoch transitions, the next validator committee. + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - `CheckpointSummary`s themselves don't directly include all of the above - information but they are the top-level type by which all the above are - committed to transitively via cryptographic hashes included in the summary. - `CheckpointSummary`s are signed and certified by a quorum of the validator - committee in a given epoch in order to allow verification of the chain's - state. + buf.write_u8(1) + _UniffiFfiConverterTypeSecp256r1PublicKey.write(value, buf) - # BCS + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSecp256r1PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - The BCS serialized form for this type is defined by the following ABNF: - ```text - checkpoint-summary = u64 ; epoch - u64 ; sequence_number - u64 ; network_total_transactions - digest ; content_digest - (option digest) ; previous_digest - gas-cost-summary ; epoch_rolling_gas_cost_summary - u64 ; timestamp_ms - (vector checkpoint-commitment) ; checkpoint_commitments - (option end-of-epoch-data) ; end_of_epoch_data - bytes ; version_specific_data - ``` +class Bn254FieldElementProtocol(typing.Protocol): """ + A point on the BN254 elliptic curve. - def checkpoint_commitments(self, ): - """ - Commitments to checkpoint-specific state. - """ - - raise NotImplementedError - def content_digest(self, ): - """ - The hash of the `CheckpointContents` for this checkpoint. - """ - - raise NotImplementedError - def digest(self, ): - raise NotImplementedError - def end_of_epoch_data(self, ): - """ - Extra data only present in the final checkpoint of an epoch. - """ - - raise NotImplementedError - def epoch(self, ): - """ - Epoch that this checkpoint belongs to. - """ - - raise NotImplementedError - def epoch_rolling_gas_cost_summary(self, ): - """ - The running total gas costs of all transactions included in the current - epoch so far until this checkpoint. - """ - - raise NotImplementedError - def network_total_transactions(self, ): - """ - Total number of transactions committed since genesis, including those in - this checkpoint. - """ - - raise NotImplementedError - def previous_digest(self, ): - """ - The hash of the previous `CheckpointSummary`. + This is a 32-byte, or 256-bit, value that is generally represented as + radix10 when a human-readable display format is needed, and is represented + as a 32-byte big-endian value while in memory. - This will be only be `None` for the first, or genesis checkpoint. - """ + # BCS - raise NotImplementedError - def sequence_number(self, ): - """ - The height of this checkpoint. - """ + The BCS serialized form for this type is defined by the following ABNF: + ```text + bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value + ``` +""" + + def padded(self, ) -> bytes: raise NotImplementedError - def signing_message(self, ): - raise NotImplementedError - def timestamp_ms(self, ): - """ - Timestamp of the checkpoint - number of milliseconds from the Unix epoch - Checkpoint timestamps are monotonic, but not strongly monotonic - - subsequent checkpoints can have same timestamp if they originate - from the same underlining consensus commit - """ - + def unpadded(self, ) -> bytes: raise NotImplementedError - def version_specific_data(self, ): - """ - CheckpointSummary is not an evolvable structure - it must be readable by - any version of the code. Therefore, in order to allow extensions to - be added to CheckpointSummary, we allow opaque data to be added to - checkpoints which can be deserialized based on the current - protocol version. - """ - raise NotImplementedError -# CheckpointSummary is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointSummary(): +class Bn254FieldElement(Bn254FieldElementProtocol): """ - A header for a Checkpoint on the IOTA blockchain. - - On the IOTA network, checkpoints define the history of the blockchain. They - are quite similar to the concept of blocks used by other blockchains like - Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after - transaction execution has already happened to provide a certified history of - the chain, instead of being formed before execution. - - Checkpoints commit to a variety of state including but not limited to: - - The hash of the previous checkpoint. - - The set of transaction digests, their corresponding effects digests, as - well as the set of user signatures which authorized its execution. - - The object's produced by a transaction. - - The set of live objects that make up the current state of the chain. - - On epoch transitions, the next validator committee. + A point on the BN254 elliptic curve. - `CheckpointSummary`s themselves don't directly include all of the above - information but they are the top-level type by which all the above are - committed to transitively via cryptographic hashes included in the summary. - `CheckpointSummary`s are signed and certified by a quorum of the validator - committee in a given epoch in order to allow verification of the chain's - state. + This is a 32-byte, or 256-bit, value that is generally represented as + radix10 when a human-readable display format is needed, and is represented + as a 32-byte big-endian value while in memory. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - checkpoint-summary = u64 ; epoch - u64 ; sequence_number - u64 ; network_total_transactions - digest ; content_digest - (option digest) ; previous_digest - gas-cost-summary ; epoch_rolling_gas_cost_summary - u64 ; timestamp_ms - (vector checkpoint-commitment) ; checkpoint_commitments - (option end-of-epoch-data) ; end_of_epoch_data - bytes ; version_specific_data + bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",sequence_number: "int",network_total_transactions: "int",content_digest: "Digest",previous_digest: "typing.Optional[Digest]",epoch_rolling_gas_cost_summary: "GasCostSummary",timestamp_ms: "int",checkpoint_commitments: "typing.List[CheckpointCommitment]",end_of_epoch_data: "typing.Optional[EndOfEpochData]",version_specific_data: "bytes"): - _UniffiConverterUInt64.check_lower(epoch) - - _UniffiConverterUInt64.check_lower(sequence_number) - - _UniffiConverterUInt64.check_lower(network_total_transactions) - - _UniffiConverterTypeDigest.check_lower(content_digest) - - _UniffiConverterOptionalTypeDigest.check_lower(previous_digest) - - _UniffiConverterTypeGasCostSummary.check_lower(epoch_rolling_gas_cost_summary) - - _UniffiConverterUInt64.check_lower(timestamp_ms) - - _UniffiConverterSequenceTypeCheckpointCommitment.check_lower(checkpoint_commitments) +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Bn254FieldElement: - _UniffiConverterOptionalTypeEndOfEpochData.check_lower(end_of_epoch_data) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBn254FieldElement.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Bn254FieldElement: - _UniffiConverterBytes.check_lower(version_specific_data) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBn254FieldElement.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str_radix_10(cls, s: str) -> Bn254FieldElement: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointsummary_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterUInt64.lower(sequence_number), - _UniffiConverterUInt64.lower(network_total_transactions), - _UniffiConverterTypeDigest.lower(content_digest), - _UniffiConverterOptionalTypeDigest.lower(previous_digest), - _UniffiConverterTypeGasCostSummary.lower(epoch_rolling_gas_cost_summary), - _UniffiConverterUInt64.lower(timestamp_ms), - _UniffiConverterSequenceTypeCheckpointCommitment.lower(checkpoint_commitments), - _UniffiConverterOptionalTypeEndOfEpochData.lower(end_of_epoch_data), - _UniffiConverterBytes.lower(version_specific_data)) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBn254FieldElement.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummary, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummary, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def checkpoint_commitments(self, ) -> "typing.List[CheckpointCommitment]": - """ - Commitments to checkpoint-specific state. - """ - - return _UniffiConverterSequenceTypeCheckpointCommitment.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_checkpoint_commitments,self._uniffi_clone_pointer(),) + def padded(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def content_digest(self, ) -> "Digest": - """ - The hash of the `CheckpointContents` for this checkpoint. - """ - - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_content_digest,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded, + *_uniffi_lowered_args, ) - - - - - - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_digest,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def unpadded(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def end_of_epoch_data(self, ) -> "typing.Optional[EndOfEpochData]": - """ - Extra data only present in the final checkpoint of an epoch. - """ - - return _UniffiConverterOptionalTypeEndOfEpochData.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_end_of_epoch_data,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeBn254FieldElement: + @staticmethod + def lift(value: int) -> Bn254FieldElement: + return Bn254FieldElement._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Bn254FieldElement): + if not isinstance(value, Bn254FieldElement): + raise TypeError("Expected Bn254FieldElement instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: Bn254FieldElement) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Bn254FieldElement: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Bn254FieldElement, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def epoch(self, ) -> "int": - """ - Epoch that this checkpoint belongs to. - """ +class _UniffiFfiConverterSequenceTypeAddress(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeAddress.check_lower(item) - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeAddress.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeAddress.read(buf) for i in range(count) + ] +class ZkLoginPublicIdentifierProtocol(typing.Protocol): + """ + Public Key equivalent for Zklogin authenticators - def epoch_rolling_gas_cost_summary(self, ) -> "GasCostSummary": - """ - The running total gas costs of all transactions included in the current - epoch so far until this checkpoint. - """ + A `ZkLoginPublicIdentifier` is the equivalent of a public key for other + account authenticators, and contains the information required to derive the + onchain account [`Address`] for a Zklogin authenticator. - return _UniffiConverterTypeGasCostSummary.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_epoch_rolling_gas_cost_summary,self._uniffi_clone_pointer(),) - ) + ## Note + Due to a historical bug that was introduced in the IOTA Typescript SDK when + the zklogin authenticator was first introduced, there are now possibly two + "valid" addresses for each zklogin authenticator depending on the + bit-pattern of the `address_seed` value. + The original bug incorrectly derived a zklogin's address by stripping any + leading zero-bytes that could have been present in the 32-byte length + `address_seed` value prior to hashing, leading to a different derived + address. This incorrectly derived address was presented to users of various + wallets, leading them to sending funds to these addresses that they couldn't + access. Instead of letting these users lose any assets that were sent to + these addresses, the IOTA network decided to change the protocol to allow + for a zklogin authenticator who's `address_seed` value had leading + zero-bytes be authorized to sign for both the addresses derived from both + the unpadded and padded `address_seed` value. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def network_total_transactions(self, ) -> "int": - """ - Total number of transactions committed since genesis, including those in - this checkpoint. - """ + ```text + zklogin-public-identifier-bcs = bytes ; where the contents are defined by + ; - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_network_total_transactions,self._uniffi_clone_pointer(),) - ) + zklogin-public-identifier = zklogin-public-identifier-iss + address-seed + zklogin-public-identifier-unpadded = zklogin-public-identifier-iss + address-seed-unpadded + ; The iss, or issuer, is a utf8 string that is less than 255 bytes long + ; and is serialized with the iss's length in bytes as a u8 followed by + ; the bytes of the iss + zklogin-public-identifier-iss = u8 *255(OCTET) + ; A Bn254FieldElement serialized as a 32-byte big-endian value + address-seed = 32(OCTET) + ; A Bn254FieldElement serialized as a 32-byte big-endian value + ; with any leading zero bytes stripped + address-seed-unpadded = %x00 / %x01-ff *31(OCTET) + ``` - def previous_digest(self, ) -> "typing.Optional[Digest]": + [`Address`]: crate::Address +""" + + def address_seed(self, ) -> Bn254FieldElement: + raise NotImplementedError + def derive_address(self, ) -> typing.List[Address]: """ - The hash of the previous `CheckpointSummary`. + Provides an iterator over the addresses that correspond to this zklogin + authenticator. - This will be only be `None` for the first, or genesis checkpoint. + In the majority of instances this will only yield a single address, + except for the instances where the `address_seed` value has a + leading zero-byte, in such cases the returned iterator will yield + two addresses. +""" + raise NotImplementedError + def derive_address_padded(self, ) -> Address: """ + Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the + byte length of the `iss` followed by the `iss` bytes themselves and + the full 32 byte `address_seed` value, all prefixed with the zklogin + `SignatureScheme` flag (`0x05`). - return _UniffiConverterOptionalTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_previous_digest,self._uniffi_clone_pointer(),) - ) - - + `hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )` +""" + raise NotImplementedError + def derive_address_unpadded(self, ) -> Address: + """ + Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the + byte length of the `iss` followed by the `iss` bytes themselves and + the `address_seed` bytes with any leading zero-bytes stripped, all + prefixed with the zklogin `SignatureScheme` flag (`0x05`). + `hash( 0x05 || iss_bytes_len || iss_bytes || + unpadded_32_byte_address_seed )` +""" + raise NotImplementedError + def iss(self, ) -> str: + raise NotImplementedError +class ZkLoginPublicIdentifier(ZkLoginPublicIdentifierProtocol): + """ + Public Key equivalent for Zklogin authenticators - def sequence_number(self, ) -> "int": - """ - The height of this checkpoint. - """ + A `ZkLoginPublicIdentifier` is the equivalent of a public key for other + account authenticators, and contains the information required to derive the + onchain account [`Address`] for a Zklogin authenticator. - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_sequence_number,self._uniffi_clone_pointer(),) - ) + ## Note + Due to a historical bug that was introduced in the IOTA Typescript SDK when + the zklogin authenticator was first introduced, there are now possibly two + "valid" addresses for each zklogin authenticator depending on the + bit-pattern of the `address_seed` value. + The original bug incorrectly derived a zklogin's address by stripping any + leading zero-bytes that could have been present in the 32-byte length + `address_seed` value prior to hashing, leading to a different derived + address. This incorrectly derived address was presented to users of various + wallets, leading them to sending funds to these addresses that they couldn't + access. Instead of letting these users lose any assets that were sent to + these addresses, the IOTA network decided to change the protocol to allow + for a zklogin authenticator who's `address_seed` value had leading + zero-bytes be authorized to sign for both the addresses derived from both + the unpadded and padded `address_seed` value. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def signing_message(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_signing_message,self._uniffi_clone_pointer(),) - ) + ```text + zklogin-public-identifier-bcs = bytes ; where the contents are defined by + ; + zklogin-public-identifier = zklogin-public-identifier-iss + address-seed + zklogin-public-identifier-unpadded = zklogin-public-identifier-iss + address-seed-unpadded + ; The iss, or issuer, is a utf8 string that is less than 255 bytes long + ; and is serialized with the iss's length in bytes as a u8 followed by + ; the bytes of the iss + zklogin-public-identifier-iss = u8 *255(OCTET) + ; A Bn254FieldElement serialized as a 32-byte big-endian value + address-seed = 32(OCTET) - def timestamp_ms(self, ) -> "int": - """ - Timestamp of the checkpoint - number of milliseconds from the Unix epoch - Checkpoint timestamps are monotonic, but not strongly monotonic - - subsequent checkpoints can have same timestamp if they originate - from the same underlining consensus commit - """ + ; A Bn254FieldElement serialized as a 32-byte big-endian value + ; with any leading zero bytes stripped + address-seed-unpadded = %x00 / %x01-ff *31(OCTET) + ``` - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_timestamp_ms,self._uniffi_clone_pointer(),) + [`Address`]: crate::Address +""" + + _handle: ctypes.c_uint64 + def __init__(self, iss: str,address_seed: Bn254FieldElement): + + _UniffiFfiConverterString.check_lower(iss) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(address_seed) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(iss), + _UniffiFfiConverterTypeBn254FieldElement.lower(address_seed), ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginPublicIdentifier.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier, self._handle) - - - def version_specific_data(self, ) -> "bytes": - """ - CheckpointSummary is not an evolvable structure - it must be readable by - any version of the code. Therefore, in order to allow extensions to - be added to CheckpointSummary, we allow opaque data to be added to - checkpoints which can be deserialized based on the current - protocol version. + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def address_seed(self, ) -> Bn254FieldElement: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBn254FieldElement.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def derive_address(self, ) -> typing.List[Address]: """ + Provides an iterator over the addresses that correspond to this zklogin + authenticator. - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummary_version_specific_data,self._uniffi_clone_pointer(),) + In the majority of instances this will only yield a single address, + except for the instances where the `address_seed` value has a + leading zero-byte, in such cases the returned iterator will yield + two addresses. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def derive_address_padded(self, ) -> Address: + """ + Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the + byte length of the `iss` followed by the `iss` bytes themselves and + the full 32 byte `address_seed` value, all prefixed with the zklogin + `SignatureScheme` flag (`0x05`). + `hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def derive_address_unpadded(self, ) -> Address: + """ + Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the + byte length of the `iss` followed by the `iss` bytes themselves and + the `address_seed` bytes with any leading zero-bytes stripped, all + prefixed with the zklogin `SignatureScheme` flag (`0x05`). + `hash( 0x05 || iss_bytes_len || iss_bytes || + unpadded_32_byte_address_seed )` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def iss(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeCheckpointSummary: +class _UniffiFfiConverterTypeZkLoginPublicIdentifier: @staticmethod - def lift(value: int): - return CheckpointSummary._make_instance_(value) + def lift(value: int) -> ZkLoginPublicIdentifier: + return ZkLoginPublicIdentifier._uniffi_make_instance(value) @staticmethod - def check_lower(value: CheckpointSummary): - if not isinstance(value, CheckpointSummary): - raise TypeError("Expected CheckpointSummary instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginPublicIdentifier): + if not isinstance(value, ZkLoginPublicIdentifier): + raise TypeError("Expected ZkLoginPublicIdentifier instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointSummaryProtocol): - if not isinstance(value, CheckpointSummary): - raise TypeError("Expected CheckpointSummary instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ZkLoginPublicIdentifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ZkLoginPublicIdentifier: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointSummaryProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginPublicIdentifier, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointTransactionInfoProtocol(typing.Protocol): - """ - Transaction information committed to in a checkpoint - """ - - def effects(self, ): - raise NotImplementedError - def signatures(self, ): - raise NotImplementedError - def transaction(self, ): - raise NotImplementedError -# CheckpointTransactionInfo is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointTransactionInfo(): - """ - Transaction information committed to in a checkpoint - """ - _pointer: ctypes.c_void_p - def __init__(self, transaction: "Digest",effects: "Digest",signatures: "typing.List[UserSignature]"): - _UniffiConverterTypeDigest.check_lower(transaction) - - _UniffiConverterTypeDigest.check_lower(effects) - - _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new, - _UniffiConverterTypeDigest.lower(transaction), - _UniffiConverterTypeDigest.lower(effects), - _UniffiConverterSequenceTypeUserSignature.lower(signatures)) +class _UniffiFfiConverterOptionalTypeZkLoginPublicIdentifier(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeZkLoginPublicIdentifier.check_lower(value) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo, pointer) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo, self._pointer) + buf.write_u8(1) + _UniffiFfiConverterTypeZkLoginPublicIdentifier.write(value, buf) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeZkLoginPublicIdentifier.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def effects(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects,self._uniffi_clone_pointer(),) - ) +class MultisigMemberPublicKeyProtocol(typing.Protocol): + """ + Enum of valid public keys for multisig committee members + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + multisig-member-public-key = ed25519-multisig-member-public-key / + secp256k1-multisig-member-public-key / + secp256r1-multisig-member-public-key / + zklogin-multisig-member-public-key - def signatures(self, ) -> "typing.List[UserSignature]": - return _UniffiConverterSequenceTypeUserSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures,self._uniffi_clone_pointer(),) - ) + ed25519-multisig-member-public-key = %x00 ed25519-public-key + secp256k1-multisig-member-public-key = %x01 secp256k1-public-key + secp256r1-multisig-member-public-key = %x02 secp256r1-public-key + zklogin-multisig-member-public-key = %x03 zklogin-public-identifier + ``` + There is also a legacy encoding for this type defined as: + ```text + legacy-multisig-member-public-key = string ; which is valid base64 encoded + ; and the decoded bytes are defined + ; by legacy-public-key + legacy-public-key = (ed25519-flag ed25519-public-key) / + (secp256k1-flag secp256k1-public-key) / + (secp256r1-flag secp256r1-public-key) + ``` +""" + + def as_ed25519(self, ) -> Ed25519PublicKey: + raise NotImplementedError + def as_ed25519_opt(self, ) -> typing.Optional[Ed25519PublicKey]: + raise NotImplementedError + def as_secp256k1(self, ) -> Secp256k1PublicKey: + raise NotImplementedError + def as_secp256k1_opt(self, ) -> typing.Optional[Secp256k1PublicKey]: + raise NotImplementedError + def as_secp256r1(self, ) -> Secp256r1PublicKey: + raise NotImplementedError + def as_secp256r1_opt(self, ) -> typing.Optional[Secp256r1PublicKey]: + raise NotImplementedError + def as_zklogin(self, ) -> ZkLoginPublicIdentifier: + raise NotImplementedError + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginPublicIdentifier]: + raise NotImplementedError + def is_ed25519(self, ) -> bool: + raise NotImplementedError + def is_secp256k1(self, ) -> bool: + raise NotImplementedError + def is_secp256r1(self, ) -> bool: + raise NotImplementedError + def is_zklogin(self, ) -> bool: + raise NotImplementedError +class MultisigMemberPublicKey(MultisigMemberPublicKeyProtocol): + """ + Enum of valid public keys for multisig committee members + # BCS - def transaction(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction,self._uniffi_clone_pointer(),) - ) + The BCS serialized form for this type is defined by the following ABNF: + ```text + multisig-member-public-key = ed25519-multisig-member-public-key / + secp256k1-multisig-member-public-key / + secp256r1-multisig-member-public-key / + zklogin-multisig-member-public-key + ed25519-multisig-member-public-key = %x00 ed25519-public-key + secp256k1-multisig-member-public-key = %x01 secp256k1-public-key + secp256r1-multisig-member-public-key = %x02 secp256r1-public-key + zklogin-multisig-member-public-key = %x03 zklogin-public-identifier + ``` + There is also a legacy encoding for this type defined as: + ```text + legacy-multisig-member-public-key = string ; which is valid base64 encoded + ; and the decoded bytes are defined + ; by legacy-public-key + legacy-public-key = (ed25519-flag ed25519-public-key) / + (secp256k1-flag secp256k1-public-key) / + (secp256r1-flag secp256r1-public-key) + ``` +""" + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey, handle) -class _UniffiConverterTypeCheckpointTransactionInfo: + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey, self._handle) - @staticmethod - def lift(value: int): - return CheckpointTransactionInfo._make_instance_(value) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_ed25519(self, ) -> Ed25519PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_ed25519_opt(self, ) -> typing.Optional[Ed25519PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256k1(self, ) -> Secp256k1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256k1_opt(self, ) -> typing.Optional[Secp256k1PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256r1(self, ) -> Secp256r1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256r1_opt(self, ) -> typing.Optional[Secp256r1PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin(self, ) -> ZkLoginPublicIdentifier: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginPublicIdentifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginPublicIdentifier]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeZkLoginPublicIdentifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_ed25519(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256k1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256r1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_zklogin(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeMultisigMemberPublicKey: + @staticmethod + def lift(value: int) -> MultisigMemberPublicKey: + return MultisigMemberPublicKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: CheckpointTransactionInfo): - if not isinstance(value, CheckpointTransactionInfo): - raise TypeError("Expected CheckpointTransactionInfo instance, {} found".format(type(value).__name__)) + def check_lower(value: MultisigMemberPublicKey): + if not isinstance(value, MultisigMemberPublicKey): + raise TypeError("Expected MultisigMemberPublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointTransactionInfoProtocol): - if not isinstance(value, CheckpointTransactionInfo): - raise TypeError("Expected CheckpointTransactionInfo instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MultisigMemberPublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MultisigMemberPublicKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointTransactionInfoProtocol, buf: _UniffiRustBuffer): + def write(cls, value: MultisigMemberPublicKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CircomG1Protocol(typing.Protocol): + +class _UniffiFfiConverterUInt8(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u8" + VALUE_MIN = 0 + VALUE_MAX = 2**8 + + @staticmethod + def read(buf): + return buf.read_u8() + + @staticmethod + def write(value, buf): + buf.write_u8(value) + + +class MultisigMemberProtocol(typing.Protocol): """ - A G1 point + A member in a multisig committee - This represents the canonical decimal representation of the projective - coordinates in Fq. + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-member = multisig-member-public-key + u8 ; weight + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-member = legacy-multisig-member-public-key + u8 ; weight + ``` +""" + + def public_key(self, ) -> MultisigMemberPublicKey: + """ + This member's public key. +""" + raise NotImplementedError + def weight(self, ) -> int: + """ + Weight of this member's signature. +""" + raise NotImplementedError + +class MultisigMember(MultisigMemberProtocol): + """ + A member in a multisig committee # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - circom-g1 = %x03 3(bn254-field-element) + multisig-member = multisig-member-public-key + u8 ; weight ``` - """ - - pass -# CircomG1 is a Rust-only trait - it's a wrapper around a Rust implementation. -class CircomG1(): - """ - A G1 point - This represents the canonical decimal representation of the projective - coordinates in Fq. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: + There is also a legacy encoding for this type defined as: ```text - circom-g1 = %x03 3(bn254-field-element) + legacy-multisig-member = legacy-multisig-member-public-key + u8 ; weight ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, el_0: "Bn254FieldElement",el_1: "Bn254FieldElement",el_2: "Bn254FieldElement"): - _UniffiConverterTypeBn254FieldElement.check_lower(el_0) - - _UniffiConverterTypeBn254FieldElement.check_lower(el_1) +""" + + _handle: ctypes.c_uint64 + def __init__(self, public_key: MultisigMemberPublicKey,weight: int): + """ + Construct a new member from a `MultisigMemberPublicKey` and a `weight`. +""" - _UniffiConverterTypeBn254FieldElement.check_lower(el_2) + _UniffiFfiConverterTypeMultisigMemberPublicKey.check_lower(public_key) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new, - _UniffiConverterTypeBn254FieldElement.lower(el_0), - _UniffiConverterTypeBn254FieldElement.lower(el_1), - _UniffiConverterTypeBn254FieldElement.lower(el_2)) + _UniffiFfiConverterUInt8.check_lower(weight) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMultisigMemberPublicKey.lower(public_key), + _UniffiFfiConverterUInt8.lower(weight), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigMember.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def public_key(self, ) -> MultisigMemberPublicKey: + """ + This member's public key. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigMemberPublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def weight(self, ) -> int: + """ + Weight of this member's signature. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt8.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeCircomG1: + +class _UniffiFfiConverterTypeMultisigMember: @staticmethod - def lift(value: int): - return CircomG1._make_instance_(value) + def lift(value: int) -> MultisigMember: + return MultisigMember._uniffi_make_instance(value) @staticmethod - def check_lower(value: CircomG1): - if not isinstance(value, CircomG1): - raise TypeError("Expected CircomG1 instance, {} found".format(type(value).__name__)) + def check_lower(value: MultisigMember): + if not isinstance(value, MultisigMember): + raise TypeError("Expected MultisigMember instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CircomG1Protocol): - if not isinstance(value, CircomG1): - raise TypeError("Expected CircomG1 instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MultisigMember) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MultisigMember: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CircomG1Protocol, buf: _UniffiRustBuffer): + def write(cls, value: MultisigMember, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CircomG2Protocol(typing.Protocol): + +class _UniffiFfiConverterSequenceTypeMultisigMember(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMultisigMember.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMultisigMember.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeMultisigMember.read(buf) for i in range(count) + ] + + +class MultisigCommitteeProtocol(typing.Protocol): """ - A G2 point + A multisig committee - This represents the canonical decimal representation of the coefficients of - the projective coordinates in Fq2. + A `MultisigCommittee` is a set of members who collectively control a single + `Address` on the IOTA blockchain. The number of required signatures to + authorize the execution of a transaction is determined by + `(signature_0_weight + signature_1_weight ..) >= threshold`. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - circom-g2 = %x03 3(%x02 2(bn254-field-element)) + multisig-committee = (vector multisig-member) + u16 ; threshold ``` - """ - pass -# CircomG2 is a Rust-only trait - it's a wrapper around a Rust implementation. -class CircomG2(): + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-committee = (vector legacy-multisig-member) + u16 ; threshold + ``` +""" + + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this MultisigCommittee. + + A MultiSig address + is defined as the 32-byte Blake2b hash of serializing the + `SignatureScheme` flag (0x03), the threshold (in little endian), and + the concatenation of all n flag, public keys and its weight. + + `hash(0x03 || threshold || flag_1 || pk_1 || weight_1 + || ... || flag_n || pk_n || weight_n)`. + + When flag_i is ZkLogin, the pk_i for the [`ZkLoginPublicIdentifier`] + refers to the same input used when deriving the address using the + [`ZkLoginPublicIdentifier::derive_address_padded`] method (using the + full 32-byte `address_seed` value). + + [`ZkLoginPublicIdentifier`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier + [`ZkLoginPublicIdentifier::derive_address_padded`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier::derive_address_padded +""" + raise NotImplementedError + def is_valid(self, ) -> bool: + """ + Checks if the Committee is valid. + + A valid committee is one that: + - Has a nonzero threshold + - Has at least one member + - Has at most ten members + - No member has weight 0 + - the sum of the weights of all members must be larger than the + threshold + - contains no duplicate members +""" + raise NotImplementedError + def members(self, ) -> typing.List[MultisigMember]: + """ + The members of the committee +""" + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + raise NotImplementedError + def threshold(self, ) -> int: + """ + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. +""" + raise NotImplementedError + +class MultisigCommittee(MultisigCommitteeProtocol): """ - A G2 point + A multisig committee - This represents the canonical decimal representation of the coefficients of - the projective coordinates in Fq2. + A `MultisigCommittee` is a set of members who collectively control a single + `Address` on the IOTA blockchain. The number of required signatures to + authorize the execution of a transaction is determined by + `(signature_0_weight + signature_1_weight ..) >= threshold`. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - circom-g2 = %x03 3(%x02 2(bn254-field-element)) + multisig-committee = (vector multisig-member) + u16 ; threshold ``` - """ - _pointer: ctypes.c_void_p - def __init__(self, el_0_0: "Bn254FieldElement",el_0_1: "Bn254FieldElement",el_1_0: "Bn254FieldElement",el_1_1: "Bn254FieldElement",el_2_0: "Bn254FieldElement",el_2_1: "Bn254FieldElement"): - _UniffiConverterTypeBn254FieldElement.check_lower(el_0_0) - - _UniffiConverterTypeBn254FieldElement.check_lower(el_0_1) - - _UniffiConverterTypeBn254FieldElement.check_lower(el_1_0) - - _UniffiConverterTypeBn254FieldElement.check_lower(el_1_1) - - _UniffiConverterTypeBn254FieldElement.check_lower(el_2_0) + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-committee = (vector legacy-multisig-member) + u16 ; threshold + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, members: typing.List[MultisigMember],threshold: int): + """ + Construct a new committee from a list of `MultisigMember`s and a + `threshold`. + + Note that the order of the members is significant towards deriving the + `Address` governed by this committee. +""" - _UniffiConverterTypeBn254FieldElement.check_lower(el_2_1) + _UniffiFfiConverterSequenceTypeMultisigMember.check_lower(members) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new, - _UniffiConverterTypeBn254FieldElement.lower(el_0_0), - _UniffiConverterTypeBn254FieldElement.lower(el_0_1), - _UniffiConverterTypeBn254FieldElement.lower(el_1_0), - _UniffiConverterTypeBn254FieldElement.lower(el_1_1), - _UniffiConverterTypeBn254FieldElement.lower(el_2_0), - _UniffiConverterTypeBn254FieldElement.lower(el_2_1)) + _UniffiFfiConverterUInt16.check_lower(threshold) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeMultisigMember.lower(members), + _UniffiFfiConverterUInt16.lower(threshold), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigCommittee.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def derive_address(self, ) -> Address: + """ + Derive an `Address` from this MultisigCommittee. + + A MultiSig address + is defined as the 32-byte Blake2b hash of serializing the + `SignatureScheme` flag (0x03), the threshold (in little endian), and + the concatenation of all n flag, public keys and its weight. + + `hash(0x03 || threshold || flag_1 || pk_1 || weight_1 + || ... || flag_n || pk_n || weight_n)`. + + When flag_i is ZkLogin, the pk_i for the [`ZkLoginPublicIdentifier`] + refers to the same input used when deriving the address using the + [`ZkLoginPublicIdentifier::derive_address_padded`] method (using the + full 32-byte `address_seed` value). + + [`ZkLoginPublicIdentifier`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier + [`ZkLoginPublicIdentifier::derive_address_padded`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier::derive_address_padded +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_valid(self, ) -> bool: + """ + Checks if the Committee is valid. + + A valid committee is one that: + - Has a nonzero threshold + - Has at least one member + - Has at most ten members + - No member has weight 0 + - the sum of the weights of all members must be larger than the + threshold + - contains no duplicate members +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def members(self, ) -> typing.List[MultisigMember]: + """ + The members of the committee +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeMultisigMember.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def threshold(self, ) -> int: + """ + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt16.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeCircomG2: + +class _UniffiFfiConverterTypeMultisigCommittee: @staticmethod - def lift(value: int): - return CircomG2._make_instance_(value) + def lift(value: int) -> MultisigCommittee: + return MultisigCommittee._uniffi_make_instance(value) @staticmethod - def check_lower(value: CircomG2): - if not isinstance(value, CircomG2): - raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) + def check_lower(value: MultisigCommittee): + if not isinstance(value, MultisigCommittee): + raise TypeError("Expected MultisigCommittee instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CircomG2Protocol): - if not isinstance(value, CircomG2): - raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MultisigCommittee) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MultisigCommittee: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CircomG2Protocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class CoinProtocol(typing.Protocol): - def balance(self, ): - raise NotImplementedError - def coin_type(self, ): - raise NotImplementedError - def id(self, ): - raise NotImplementedError -# Coin is a Rust-only trait - it's a wrapper around a Rust implementation. -class Coin(): - _pointer: ctypes.c_void_p + def write(cls, value: MultisigCommittee, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) + + +class Ed25519SignatureProtocol(typing.Protocol): + """ + An ed25519 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + ed25519-signature = 64OCTECT + ``` +""" + + def to_bytes(self, ) -> bytes: + raise NotImplementedError + +class Ed25519Signature(Ed25519SignatureProtocol): + """ + An ed25519 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + ed25519-signature = 64OCTECT + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Ed25519Signature: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Ed25519Signature: + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Ed25519Signature: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def try_from_object(cls, object: "Object"): - _UniffiConverterTypeObject.check_lower(object) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object, - _UniffiConverterTypeObject.lower(object)) - return cls._make_instance_(pointer) - - - - def balance(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance,self._uniffi_clone_pointer(),) - ) - - - - - - def coin_type(self, ) -> "TypeTag": - return _UniffiConverterTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type,self._uniffi_clone_pointer(),) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeCoin: - +class _UniffiFfiConverterTypeEd25519Signature: @staticmethod - def lift(value: int): - return Coin._make_instance_(value) + def lift(value: int) -> Ed25519Signature: + return Ed25519Signature._uniffi_make_instance(value) @staticmethod - def check_lower(value: Coin): - if not isinstance(value, Coin): - raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) + def check_lower(value: Ed25519Signature): + if not isinstance(value, Ed25519Signature): + raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CoinProtocol): - if not isinstance(value, Coin): - raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Ed25519Signature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Ed25519Signature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CoinProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519Signature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CommandProtocol(typing.Protocol): + +class _UniffiFfiConverterOptionalTypeEd25519Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeEd25519Signature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeEd25519Signature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeEd25519Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class Secp256k1SignatureProtocol(typing.Protocol): """ - A single command in a programmable transaction. + A secp256k1 public key. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - command = command-move-call - =/ command-transfer-objects - =/ command-split-coins - =/ command-merge-coins - =/ command-publish - =/ command-make-move-vector - =/ command-upgrade - - command-move-call = %x00 move-call - command-transfer-objects = %x01 transfer-objects - command-split-coins = %x02 split-coins - command-merge-coins = %x03 merge-coins - command-publish = %x04 publish - command-make-move-vector = %x05 make-move-vector - command-upgrade = %x06 upgrade + secp256k1-public-key = 33OCTECT ``` - """ +""" + + def to_bytes(self, ) -> bytes: + raise NotImplementedError - pass -# Command is a Rust-only trait - it's a wrapper around a Rust implementation. -class Command(): +class Secp256k1Signature(Secp256k1SignatureProtocol): """ - A single command in a programmable transaction. + A secp256k1 public key. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - command = command-move-call - =/ command-transfer-objects - =/ command-split-coins - =/ command-merge-coins - =/ command-publish - =/ command-make-move-vector - =/ command-upgrade - - command-move-call = %x00 move-call - command-transfer-objects = %x01 transfer-objects - command-split-coins = %x02 split-coins - command-merge-coins = %x03 merge-coins - command-publish = %x04 publish - command-make-move-vector = %x05 make-move-vector - command-upgrade = %x06 upgrade + secp256k1-public-key = 33OCTECT ``` - """ - - _pointer: ctypes.c_void_p +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Secp256k1Signature: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Secp256k1Signature: + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Secp256k1Signature: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_make_move_vector(cls, make_move_vector: "MakeMoveVector"): - """ - Given n-values of the same type, it constructs a vector. For non objects - or an empty vector, the type tag must be specified. - """ - - _UniffiConverterTypeMakeMoveVector.check_lower(make_move_vector) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector, - _UniffiConverterTypeMakeMoveVector.lower(make_move_vector)) - return cls._make_instance_(pointer) - - @classmethod - def new_merge_coins(cls, merge_coins: "MergeCoins"): - """ - It merges n-coins into the first coin - """ - - _UniffiConverterTypeMergeCoins.check_lower(merge_coins) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins, - _UniffiConverterTypeMergeCoins.lower(merge_coins)) - return cls._make_instance_(pointer) - - @classmethod - def new_move_call(cls, move_call: "MoveCall"): - """ - A call to either an entry or a public Move function - """ - - _UniffiConverterTypeMoveCall.check_lower(move_call) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call, - _UniffiConverterTypeMoveCall.lower(move_call)) - return cls._make_instance_(pointer) - - @classmethod - def new_publish(cls, publish: "Publish"): - """ - Publishes a Move package. It takes the package bytes and a list of the - package's transitive dependencies to link against on-chain. - """ - - _UniffiConverterTypePublish.check_lower(publish) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish, - _UniffiConverterTypePublish.lower(publish)) - return cls._make_instance_(pointer) - - @classmethod - def new_split_coins(cls, split_coins: "SplitCoins"): - """ - It splits off some amounts into a new coins with those amounts - """ - - _UniffiConverterTypeSplitCoins.check_lower(split_coins) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins, - _UniffiConverterTypeSplitCoins.lower(split_coins)) - return cls._make_instance_(pointer) - - @classmethod - def new_transfer_objects(cls, transfer_objects: "TransferObjects"): - """ - It sends n-objects to the specified address. These objects must have - store (public transfer) and either the previous owner must be an - address or the object must be newly created. - """ - - _UniffiConverterTypeTransferObjects.check_lower(transfer_objects) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects, - _UniffiConverterTypeTransferObjects.lower(transfer_objects)) - return cls._make_instance_(pointer) - - @classmethod - def new_upgrade(cls, upgrade: "Upgrade"): - """ - Upgrades a Move package - Takes (in order): - 1. A vector of serialized modules for the package. - 2. A vector of object ids for the transitive dependencies of the new - package. - 3. The object ID of the package being upgraded. - 4. An argument holding the `UpgradeTicket` that must have been produced - from an earlier command in the same programmable transaction. - """ - - _UniffiConverterTypeUpgrade.check_lower(upgrade) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade, - _UniffiConverterTypeUpgrade.lower(upgrade)) - return cls._make_instance_(pointer) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeCommand: +class _UniffiFfiConverterTypeSecp256k1Signature: @staticmethod - def lift(value: int): - return Command._make_instance_(value) + def lift(value: int) -> Secp256k1Signature: + return Secp256k1Signature._uniffi_make_instance(value) @staticmethod - def check_lower(value: Command): - if not isinstance(value, Command): - raise TypeError("Expected Command instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1Signature): + if not isinstance(value, Secp256k1Signature): + raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CommandProtocol): - if not isinstance(value, Command): - raise TypeError("Expected Command instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256k1Signature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256k1Signature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: CommandProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1Signature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ConsensusCommitPrologueV1Protocol(typing.Protocol): - """ - V1 of the consensus commit prologue system transaction - # BCS - - The BCS serialized form for this type is defined by the following ABNF: +class _UniffiFfiConverterOptionalTypeSecp256k1Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSecp256k1Signature.check_lower(value) - ```text - consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest - consensus-determined-version-assignments - ``` - """ + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def commit_timestamp_ms(self, ): - """ - Unix timestamp from consensus - """ + buf.write_u8(1) + _UniffiFfiConverterTypeSecp256k1Signature.write(value, buf) - raise NotImplementedError - def consensus_commit_digest(self, ): - """ - Digest of consensus output - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSecp256k1Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - raise NotImplementedError - def consensus_determined_version_assignments(self, ): - """ - Stores consensus handler determined shared object version assignments. - """ - raise NotImplementedError - def epoch(self, ): - """ - Epoch of the commit prologue transaction - """ +class Secp256r1SignatureProtocol(typing.Protocol): + """ + A secp256r1 public key. - raise NotImplementedError - def round(self, ): - """ - Consensus round of the commit - """ + # BCS - raise NotImplementedError - def sub_dag_index(self, ): - """ - The sub DAG index of the consensus commit. This field will be populated - if there are multiple consensus commits per round. - """ + The BCS serialized form for this type is defined by the following ABNF: + ```text + secp256r1-public-key = 33OCTECT + ``` +""" + + def to_bytes(self, ) -> bytes: raise NotImplementedError -# ConsensusCommitPrologueV1 is a Rust-only trait - it's a wrapper around a Rust implementation. -class ConsensusCommitPrologueV1(): + +class Secp256r1Signature(Secp256r1SignatureProtocol): """ - V1 of the consensus commit prologue system transaction + A secp256r1 public key. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest - consensus-determined-version-assignments + secp256r1-public-key = 33OCTECT ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",round: "int",sub_dag_index: "typing.Optional[int]",commit_timestamp_ms: "int",consensus_commit_digest: "Digest",consensus_determined_version_assignments: "ConsensusDeterminedVersionAssignments"): - _UniffiConverterUInt64.check_lower(epoch) - - _UniffiConverterUInt64.check_lower(round) - - _UniffiConverterOptionalUInt64.check_lower(sub_dag_index) - - _UniffiConverterUInt64.check_lower(commit_timestamp_ms) - - _UniffiConverterTypeDigest.check_lower(consensus_commit_digest) +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Secp256r1Signature: - _UniffiConverterTypeConsensusDeterminedVersionAssignments.check_lower(consensus_determined_version_assignments) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Secp256r1Signature: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterUInt64.lower(round), - _UniffiConverterOptionalUInt64.lower(sub_dag_index), - _UniffiConverterUInt64.lower(commit_timestamp_ms), - _UniffiConverterTypeDigest.lower(consensus_commit_digest), - _UniffiConverterTypeConsensusDeterminedVersionAssignments.lower(consensus_determined_version_assignments)) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Secp256r1Signature: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def commit_timestamp_ms(self, ) -> "int": - """ - Unix timestamp from consensus - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms,self._uniffi_clone_pointer(),) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def consensus_commit_digest(self, ) -> "Digest": - """ - Digest of consensus output - """ +class _UniffiFfiConverterTypeSecp256r1Signature: + @staticmethod + def lift(value: int) -> Secp256r1Signature: + return Secp256r1Signature._uniffi_make_instance(value) - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest,self._uniffi_clone_pointer(),) - ) + @staticmethod + def check_lower(value: Secp256r1Signature): + if not isinstance(value, Secp256r1Signature): + raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: Secp256r1Signature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Secp256r1Signature: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Secp256r1Signature, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterOptionalTypeSecp256r1Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSecp256r1Signature.check_lower(value) - def consensus_determined_version_assignments(self, ) -> "ConsensusDeterminedVersionAssignments": - """ - Stores consensus handler determined shared object version assignments. - """ + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - return _UniffiConverterTypeConsensusDeterminedVersionAssignments.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments,self._uniffi_clone_pointer(),) - ) + buf.write_u8(1) + _UniffiFfiConverterTypeSecp256r1Signature.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSecp256r1Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class ZkLoginClaim: + """ + A claim of the iss in a zklogin proof + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def epoch(self, ) -> "int": - """ - Epoch of the commit prologue transaction - """ + ```text + zklogin-claim = string u8 + ``` +""" + def __init__(self, *, value:str, index_mod_4:int): + self.value = value + self.index_mod_4 = index_mod_4 + + + + + def __str__(self): + return "ZkLoginClaim(value={}, index_mod_4={})".format(self.value, self.index_mod_4) + def __eq__(self, other): + if self.value != other.value: + return False + if self.index_mod_4 != other.index_mod_4: + return False + return True - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeZkLoginClaim(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ZkLoginClaim( + value=_UniffiFfiConverterString.read(buf), + index_mod_4=_UniffiFfiConverterUInt8.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.value) + _UniffiFfiConverterUInt8.check_lower(value.index_mod_4) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.value, buf) + _UniffiFfiConverterUInt8.write(value.index_mod_4, buf) +class CircomG1Protocol(typing.Protocol): + """ + A G1 point - def round(self, ) -> "int": - """ - Consensus round of the commit - """ + This represents the canonical decimal representation of the projective + coordinates in Fq. - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round,self._uniffi_clone_pointer(),) - ) + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + circom-g1 = %x03 3(bn254-field-element) + ``` +""" + + pass +class CircomG1(CircomG1Protocol): + """ + A G1 point + This represents the canonical decimal representation of the projective + coordinates in Fq. - def sub_dag_index(self, ) -> "typing.Optional[int]": - """ - The sub DAG index of the consensus commit. This field will be populated - if there are multiple consensus commits per round. - """ + # BCS - return _UniffiConverterOptionalUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index,self._uniffi_clone_pointer(),) + The BCS serialized form for this type is defined by the following ABNF: + + ```text + circom-g1 = %x03 3(bn254-field-element) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, el_0: Bn254FieldElement,el_1: Bn254FieldElement,el_2: Bn254FieldElement): + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_0) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_1) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_2) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeBn254FieldElement.lower(el_0), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_1), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_2), ) + _uniffi_lift_return = _UniffiFfiConverterTypeCircomG1.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst -class _UniffiConverterTypeConsensusCommitPrologueV1: +class _UniffiFfiConverterTypeCircomG1: @staticmethod - def lift(value: int): - return ConsensusCommitPrologueV1._make_instance_(value) + def lift(value: int) -> CircomG1: + return CircomG1._uniffi_make_instance(value) @staticmethod - def check_lower(value: ConsensusCommitPrologueV1): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) + def check_lower(value: CircomG1): + if not isinstance(value, CircomG1): + raise TypeError("Expected CircomG1 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ConsensusCommitPrologueV1Protocol): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: CircomG1) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> CircomG1: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ConsensusCommitPrologueV1Protocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG1, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ConsensusDeterminedVersionAssignmentsProtocol(typing.Protocol): - def as_cancelled_transactions(self, ): - raise NotImplementedError - def is_cancelled_transactions(self, ): - raise NotImplementedError -# ConsensusDeterminedVersionAssignments is a Rust-only trait - it's a wrapper around a Rust implementation. -class ConsensusDeterminedVersionAssignments(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments, self._pointer) +class CircomG2Protocol(typing.Protocol): + """ + A G2 point - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def new_cancelled_transactions(cls, cancelled_transactions: "typing.List[CancelledTransaction]"): - _UniffiConverterSequenceTypeCancelledTransaction.check_lower(cancelled_transactions) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions, - _UniffiConverterSequenceTypeCancelledTransaction.lower(cancelled_transactions)) - return cls._make_instance_(pointer) + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def as_cancelled_transactions(self, ) -> "typing.List[CancelledTransaction]": - return _UniffiConverterSequenceTypeCancelledTransaction.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions,self._uniffi_clone_pointer(),) - ) + ```text + circom-g2 = %x03 3(%x02 2(bn254-field-element)) + ``` +""" + + pass +class CircomG2(CircomG2Protocol): + """ + A G2 point + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def is_cancelled_transactions(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions,self._uniffi_clone_pointer(),) + ```text + circom-g2 = %x03 3(%x02 2(bn254-field-element)) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, el_0_0: Bn254FieldElement,el_0_1: Bn254FieldElement,el_1_0: Bn254FieldElement,el_1_1: Bn254FieldElement,el_2_0: Bn254FieldElement,el_2_1: Bn254FieldElement): + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_0_0) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_0_1) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_1_0) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_1_1) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_2_0) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(el_2_1) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeBn254FieldElement.lower(el_0_0), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_0_1), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_1_0), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_1_1), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_2_0), + _UniffiFfiConverterTypeBn254FieldElement.lower(el_2_1), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCircomG2.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new, + *_uniffi_lowered_args, ) + self._handle = _uniffi_ffi_result + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst -class _UniffiConverterTypeConsensusDeterminedVersionAssignments: +class _UniffiFfiConverterTypeCircomG2: @staticmethod - def lift(value: int): - return ConsensusDeterminedVersionAssignments._make_instance_(value) + def lift(value: int) -> CircomG2: + return CircomG2._uniffi_make_instance(value) @staticmethod - def check_lower(value: ConsensusDeterminedVersionAssignments): - if not isinstance(value, ConsensusDeterminedVersionAssignments): - raise TypeError("Expected ConsensusDeterminedVersionAssignments instance, {} found".format(type(value).__name__)) + def check_lower(value: CircomG2): + if not isinstance(value, CircomG2): + raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ConsensusDeterminedVersionAssignmentsProtocol): - if not isinstance(value, ConsensusDeterminedVersionAssignments): - raise TypeError("Expected ConsensusDeterminedVersionAssignments instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: CircomG2) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> CircomG2: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ConsensusDeterminedVersionAssignmentsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG2, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DigestProtocol(typing.Protocol): + + +class ZkLoginProofProtocol(typing.Protocol): """ - A 32-byte Blake2b256 hash output. + A zklogin groth16 proof # BCS - A `Digest`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - digest = %x20 32OCTET + zklogin-proof = circom-g1 circom-g2 circom-g1 ``` - - Due to historical reasons, even though a `Digest` has a fixed-length of 32, - IOTA's binary representation of a `Digest` is prefixed with its length - meaning its serialized binary form (in bcs) is 33 bytes long vs a more - compact 32 bytes. - """ - - def to_base58(self, ): +""" + + def a(self, ) -> CircomG1: + raise NotImplementedError + def b(self, ) -> CircomG2: raise NotImplementedError - def to_bytes(self, ): + def c(self, ) -> CircomG1: raise NotImplementedError -# Digest is a Rust-only trait - it's a wrapper around a Rust implementation. -class Digest(): + +class ZkLoginProof(ZkLoginProofProtocol): """ - A 32-byte Blake2b256 hash output. + A zklogin groth16 proof # BCS - A `Digest`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - digest = %x20 32OCTET + zklogin-proof = circom-g1 circom-g2 circom-g1 ``` - - Due to historical reasons, even though a `Digest` has a fixed-length of 32, - IOTA's binary representation of a `Digest` is prefixed with its length - meaning its serialized binary form (in bcs) is 33 bytes long vs a more - compact 32 bytes. - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, a: CircomG1,b: CircomG2,c: CircomG1): + + _UniffiFfiConverterTypeCircomG1.check_lower(a) + + _UniffiFfiConverterTypeCircomG2.check_lower(b) + + _UniffiFfiConverterTypeCircomG1.check_lower(c) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeCircomG1.lower(a), + _UniffiFfiConverterTypeCircomG2.lower(b), + _UniffiFfiConverterTypeCircomG1.lower(c), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginProof.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_base58(cls, base58: "str"): - _UniffiConverterString.check_lower(base58) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58, - _UniffiConverterString.lower(base58)) - return cls._make_instance_(pointer) - - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate,) - return cls._make_instance_(pointer) - - - - def to_base58(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58,self._uniffi_clone_pointer(),) + def a(self, ) -> CircomG1: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeCircomG1.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def b(self, ) -> CircomG2: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCircomG2.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def c(self, ) -> CircomG1: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCircomG1.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeDigest: - +class _UniffiFfiConverterTypeZkLoginProof: @staticmethod - def lift(value: int): - return Digest._make_instance_(value) + def lift(value: int) -> ZkLoginProof: + return ZkLoginProof._uniffi_make_instance(value) @staticmethod - def check_lower(value: Digest): - if not isinstance(value, Digest): - raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginProof): + if not isinstance(value, ZkLoginProof): + raise TypeError("Expected ZkLoginProof instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: DigestProtocol): - if not isinstance(value, Digest): - raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ZkLoginProof) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ZkLoginProof: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: DigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginProof, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Ed25519PrivateKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def scheme(self, ): - raise NotImplementedError - def to_bech32(self, ): - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ - raise NotImplementedError - def to_bytes(self, ): - """ - Serialize this private key to bytes. - """ - raise NotImplementedError - def to_der(self, ): - """ - Serialize this private key as DER-encoded PKCS#8 - """ +class ZkLoginInputsProtocol(typing.Protocol): + """ + A zklogin groth16 proof and the required inputs to perform proof + verification. - raise NotImplementedError - def to_pem(self, ): - """ - Serialize this private key as PEM-encoded PKCS#8 - """ + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + ```text + zklogin-inputs = zklogin-proof + zklogin-claim + string ; base64url-unpadded encoded JwtHeader + bn254-field-element ; address_seed + ``` +""" + + def address_seed(self, ) -> Bn254FieldElement: + raise NotImplementedError + def header_base64(self, ) -> str: raise NotImplementedError - def try_sign(self, message: "bytes"): + def iss(self, ) -> str: raise NotImplementedError - def try_sign_simple(self, message: "bytes"): + def iss_base64_details(self, ) -> ZkLoginClaim: raise NotImplementedError - def try_sign_user(self, message: "bytes"): + def jwk_id(self, ) -> JwkId: raise NotImplementedError - def verifying_key(self, ): + def proof_points(self, ) -> ZkLoginProof: raise NotImplementedError -# Ed25519PrivateKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519PrivateKey(): - _pointer: ctypes.c_void_p - def __init__(self, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) + def public_identifier(self, ) -> ZkLoginPublicIdentifier: + raise NotImplementedError + +class ZkLoginInputs(ZkLoginInputsProtocol): + """ + A zklogin groth16 proof and the required inputs to perform proof + verification. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-inputs = zklogin-proof + zklogin-claim + string ; base64url-unpadded encoded JwtHeader + bn254-field-element ; address_seed + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, proof_points: ZkLoginProof,iss_base64_details: ZkLoginClaim,header_base64: str,address_seed: Bn254FieldElement): + + _UniffiFfiConverterTypeZkLoginProof.check_lower(proof_points) + + _UniffiFfiConverterTypeZkLoginClaim.check_lower(iss_base64_details) - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new, - _UniffiConverterBytes.lower(bytes)) + _UniffiFfiConverterString.check_lower(header_base64) + + _UniffiFfiConverterTypeBn254FieldElement.check_lower(address_seed) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeZkLoginProof.lower(proof_points), + _UniffiFfiConverterTypeZkLoginClaim.lower(iss_base64_details), + _UniffiFfiConverterString.lower(header_base64), + _UniffiFfiConverterTypeBn254FieldElement.lower(address_seed), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginInputs.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bech32(cls, value: "str"): - """ - Decode a private key from `flag || privkey` in Bech32 starting with - "iotaprivkey". - """ + def address_seed(self, ) -> Bn254FieldElement: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBn254FieldElement.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def header_base64(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def iss(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def iss_base64_details(self, ) -> ZkLoginClaim: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginClaim.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def jwk_id(self, ) -> JwkId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeJwkId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def proof_points(self, ) -> ZkLoginProof: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginProof.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def public_identifier(self, ) -> ZkLoginPublicIdentifier: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginPublicIdentifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeZkLoginInputs: + @staticmethod + def lift(value: int) -> ZkLoginInputs: + return ZkLoginInputs._uniffi_make_instance(value) - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def from_der(cls, bytes: "bytes"): - """ - Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary - format). - """ + @staticmethod + def check_lower(value: ZkLoginInputs): + if not isinstance(value, ZkLoginInputs): + raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + @staticmethod + def lower(value: ZkLoginInputs) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize PKCS#8-encoded private key from PEM. - """ - - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) + def read(cls, buf: _UniffiRustBuffer) -> ZkLoginInputs: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate,) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "Ed25519PublicKey": - return _UniffiConverterTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key,self._uniffi_clone_pointer(),) - ) - - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme,self._uniffi_clone_pointer(),) - ) - - - - - - def to_bech32(self, ) -> "str": - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ + def write(cls, value: ZkLoginInputs, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32,self._uniffi_clone_pointer(),) - ) +class SimpleSignatureProtocol(typing.Protocol): + """ + A basic signature + This enumeration defines the set of simple or basic signature schemes + supported by IOTA. Most signature schemes supported by IOTA end up + comprising of a at least one simple signature scheme. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def to_bytes(self, ) -> "bytes": - """ - Serialize this private key to bytes. - """ + ```text + simple-signature-bcs = bytes ; where the contents of the bytes are defined by + simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / + (secp256k1-flag secp256k1-signature secp256k1-public-key) / + (secp256r1-flag secp256r1-signature secp256r1-public-key) + ``` - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes,self._uniffi_clone_pointer(),) - ) + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + def ed25519_pub_key(self, ) -> Ed25519PublicKey: + raise NotImplementedError + def ed25519_pub_key_opt(self, ) -> typing.Optional[Ed25519PublicKey]: + raise NotImplementedError + def ed25519_sig(self, ) -> Ed25519Signature: + raise NotImplementedError + def ed25519_sig_opt(self, ) -> typing.Optional[Ed25519Signature]: + raise NotImplementedError + def is_ed25519(self, ) -> bool: + raise NotImplementedError + def is_secp256k1(self, ) -> bool: + raise NotImplementedError + def is_secp256r1(self, ) -> bool: + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + raise NotImplementedError + def secp256k1_pub_key(self, ) -> Secp256k1PublicKey: + raise NotImplementedError + def secp256k1_pub_key_opt(self, ) -> typing.Optional[Secp256k1PublicKey]: + raise NotImplementedError + def secp256k1_sig(self, ) -> Secp256k1Signature: + raise NotImplementedError + def secp256k1_sig_opt(self, ) -> typing.Optional[Secp256k1Signature]: + raise NotImplementedError + def secp256r1_pub_key(self, ) -> Secp256r1PublicKey: + raise NotImplementedError + def secp256r1_pub_key_opt(self, ) -> typing.Optional[Secp256r1PublicKey]: + raise NotImplementedError + def secp256r1_sig(self, ) -> Secp256r1Signature: + raise NotImplementedError + def secp256r1_sig_opt(self, ) -> typing.Optional[Secp256r1Signature]: + raise NotImplementedError + def to_bytes(self, ) -> bytes: + raise NotImplementedError +class SimpleSignature(SimpleSignatureProtocol): + """ + A basic signature + This enumeration defines the set of simple or basic signature schemes + supported by IOTA. Most signature schemes supported by IOTA end up + comprising of a at least one simple signature scheme. + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def to_der(self, ) -> "bytes": - """ - Serialize this private key as DER-encoded PKCS#8 - """ + ```text + simple-signature-bcs = bytes ; where the contents of the bytes are defined by + simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / + (secp256k1-flag secp256k1-signature secp256k1-public-key) / + (secp256r1-flag secp256r1-signature secp256r1-public-key) + ``` - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der,self._uniffi_clone_pointer(),) + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_ed25519(cls, signature: Ed25519Signature,public_key: Ed25519PublicKey) -> SimpleSignature: + + _UniffiFfiConverterTypeEd25519Signature.check_lower(signature) + + _UniffiFfiConverterTypeEd25519PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeEd25519Signature.lower(signature), + _UniffiFfiConverterTypeEd25519PublicKey.lower(public_key), ) - - - - - - def to_pem(self, ) -> "str": - """ - Serialize this private key as PEM-encoded PKCS#8 - """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519, + *_uniffi_lowered_args, ) - - - - - - def try_sign(self, message: "bytes") -> "Ed25519Signature": - _UniffiConverterBytes.check_lower(message) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_secp256k1(cls, signature: Secp256k1Signature,public_key: Secp256k1PublicKey) -> SimpleSignature: - return _UniffiConverterTypeEd25519Signature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) - ) - - - - - - def try_sign_simple(self, message: "bytes") -> "SimpleSignature": - _UniffiConverterBytes.check_lower(message) + _UniffiFfiConverterTypeSecp256k1Signature.check_lower(signature) - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + _UniffiFfiConverterTypeSecp256k1PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256k1Signature.lower(signature), + _UniffiFfiConverterTypeSecp256k1PublicKey.lower(public_key), ) - - - - - - def try_sign_user(self, message: "bytes") -> "UserSignature": - _UniffiConverterBytes.check_lower(message) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_secp256r1(cls, signature: Secp256r1Signature,public_key: Secp256r1PublicKey) -> SimpleSignature: - return _UniffiConverterTypeUserSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + _UniffiFfiConverterTypeSecp256r1Signature.check_lower(signature) + + _UniffiFfiConverterTypeSecp256r1PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256r1Signature.lower(signature), + _UniffiFfiConverterTypeSecp256r1PublicKey.lower(public_key), ) - - - - - - def verifying_key(self, ) -> "Ed25519VerifyingKey": - return _UniffiConverterTypeEd25519VerifyingKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1, + *_uniffi_lowered_args, ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature, self._handle) - - - -class _UniffiConverterTypeEd25519PrivateKey: - - @staticmethod - def lift(value: int): - return Ed25519PrivateKey._make_instance_(value) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def ed25519_pub_key(self, ) -> Ed25519PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def ed25519_pub_key_opt(self, ) -> typing.Optional[Ed25519PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def ed25519_sig(self, ) -> Ed25519Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def ed25519_sig_opt(self, ) -> typing.Optional[Ed25519Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEd25519Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_ed25519(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256k1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256r1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256k1_pub_key(self, ) -> Secp256k1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256k1_pub_key_opt(self, ) -> typing.Optional[Secp256k1PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256k1_sig(self, ) -> Secp256k1Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256k1_sig_opt(self, ) -> typing.Optional[Secp256k1Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256k1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256r1_pub_key(self, ) -> Secp256r1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256r1_pub_key_opt(self, ) -> typing.Optional[Secp256r1PublicKey]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256r1_sig(self, ) -> Secp256r1Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def secp256r1_sig_opt(self, ) -> typing.Optional[Secp256r1Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256r1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeSimpleSignature: + @staticmethod + def lift(value: int) -> SimpleSignature: + return SimpleSignature._uniffi_make_instance(value) @staticmethod - def check_lower(value: Ed25519PrivateKey): - if not isinstance(value, Ed25519PrivateKey): - raise TypeError("Expected Ed25519PrivateKey instance, {} found".format(type(value).__name__)) + def check_lower(value: SimpleSignature): + if not isinstance(value, SimpleSignature): + raise TypeError("Expected SimpleSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Ed25519PrivateKeyProtocol): - if not isinstance(value, Ed25519PrivateKey): - raise TypeError("Expected Ed25519PrivateKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: SimpleSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> SimpleSignature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519PrivateKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SimpleSignature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Ed25519PublicKeyProtocol(typing.Protocol): + + +class ZkLoginAuthenticatorProtocol(typing.Protocol): """ - An ed25519 public key. + A zklogin authenticator # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ed25519-public-key = 32OCTECT + zklogin-bcs = bytes ; contents are defined by + zklogin = zklogin-flag + zklogin-inputs + u64 ; max epoch + simple-signature ``` - """ - - def derive_address(self, ): - """ - Derive an `Address` from this Public Key - - An `Address` can be derived from an `Ed25519PublicKey` by hashing the - bytes of the public key with no prefix flag. - - `hash(32-byte ed25519 public key)` - """ + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + def inputs(self, ) -> ZkLoginInputs: raise NotImplementedError - def scheme(self, ): - """ - Return the flag for this signature scheme - """ - + def max_epoch(self, ) -> int: raise NotImplementedError - def to_bytes(self, ): + def signature(self, ) -> SimpleSignature: raise NotImplementedError -# Ed25519PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519PublicKey(): + +class ZkLoginAuthenticator(ZkLoginAuthenticatorProtocol): """ - An ed25519 public key. + A zklogin authenticator # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ed25519-public-key = 32OCTECT + zklogin-bcs = bytes ; contents are defined by + zklogin = zklogin-flag + zklogin-inputs + u64 ; max epoch + simple-signature ``` - """ - _pointer: ctypes.c_void_p + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, inputs: ZkLoginInputs,max_epoch: int,signature: SimpleSignature): + + _UniffiFfiConverterTypeZkLoginInputs.check_lower(inputs) + + _UniffiFfiConverterUInt64.check_lower(max_epoch) + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeZkLoginInputs.lower(inputs), + _UniffiFfiConverterUInt64.lower(max_epoch), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + def inputs(self, ) -> ZkLoginInputs: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginInputs.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def max_epoch(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signature(self, ) -> SimpleSignature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate,) - return cls._make_instance_(pointer) - def derive_address(self, ) -> "Address": - """ - Derive an `Address` from this Public Key +class _UniffiFfiConverterTypeZkLoginAuthenticator: + @staticmethod + def lift(value: int) -> ZkLoginAuthenticator: + return ZkLoginAuthenticator._uniffi_make_instance(value) - An `Address` can be derived from an `Ed25519PublicKey` by hashing the - bytes of the public key with no prefix flag. + @staticmethod + def check_lower(value: ZkLoginAuthenticator): + if not isinstance(value, ZkLoginAuthenticator): + raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) - `hash(32-byte ed25519 public key)` - """ + @staticmethod + def lower(value: ZkLoginAuthenticator) -> ctypes.c_uint64: + return value._uniffi_clone_handle() - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_derive_address,self._uniffi_clone_pointer(),) - ) + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ZkLoginAuthenticator: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: ZkLoginAuthenticator, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterOptionalTypeZkLoginAuthenticator(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeZkLoginAuthenticator.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeZkLoginAuthenticator.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeZkLoginAuthenticator.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def scheme(self, ) -> "SignatureScheme": - """ - Return the flag for this signature scheme - """ - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_scheme,self._uniffi_clone_pointer(),) - ) +class MultisigMemberSignatureProtocol(typing.Protocol): + """ + A signature from a member of a multisig committee. + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + multisig-member-signature = ed25519-multisig-member-signature / + secp256k1-multisig-member-signature / + secp256r1-multisig-member-signature / + zklogin-multisig-member-signature + ed25519-multisig-member-signature = %x00 ed25519-signature + secp256k1-multisig-member-signature = %x01 secp256k1-signature + secp256r1-multisig-member-signature = %x02 secp256r1-signature + zklogin-multisig-member-signature = %x03 zklogin-authenticator + ``` +""" + + def as_ed25519(self, ) -> Ed25519Signature: + raise NotImplementedError + def as_ed25519_opt(self, ) -> typing.Optional[Ed25519Signature]: + raise NotImplementedError + def as_secp256k1(self, ) -> Secp256k1Signature: + raise NotImplementedError + def as_secp256k1_opt(self, ) -> typing.Optional[Secp256k1Signature]: + raise NotImplementedError + def as_secp256r1(self, ) -> Secp256r1Signature: + raise NotImplementedError + def as_secp256r1_opt(self, ) -> typing.Optional[Secp256r1Signature]: + raise NotImplementedError + def as_zklogin(self, ) -> ZkLoginAuthenticator: + raise NotImplementedError + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginAuthenticator]: + raise NotImplementedError + def is_ed25519(self, ) -> bool: + raise NotImplementedError + def is_secp256k1(self, ) -> bool: + raise NotImplementedError + def is_secp256r1(self, ) -> bool: + raise NotImplementedError + def is_zklogin(self, ) -> bool: + raise NotImplementedError - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes,self._uniffi_clone_pointer(),) - ) +class MultisigMemberSignature(MultisigMemberSignatureProtocol): + """ + A signature from a member of a multisig committee. + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + multisig-member-signature = ed25519-multisig-member-signature / + secp256k1-multisig-member-signature / + secp256r1-multisig-member-signature / + zklogin-multisig-member-signature + ed25519-multisig-member-signature = %x00 ed25519-signature + secp256k1-multisig-member-signature = %x01 secp256k1-signature + secp256r1-multisig-member-signature = %x02 secp256r1-signature + zklogin-multisig-member-signature = %x03 zklogin-authenticator + ``` +""" + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature, handle) -class _UniffiConverterTypeEd25519PublicKey: + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature, self._handle) - @staticmethod - def lift(value: int): - return Ed25519PublicKey._make_instance_(value) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_ed25519(self, ) -> Ed25519Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_ed25519_opt(self, ) -> typing.Optional[Ed25519Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEd25519Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256k1(self, ) -> Secp256k1Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256k1_opt(self, ) -> typing.Optional[Secp256k1Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256k1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256r1(self, ) -> Secp256r1Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_secp256r1_opt(self, ) -> typing.Optional[Secp256r1Signature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSecp256r1Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin(self, ) -> ZkLoginAuthenticator: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginAuthenticator]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeZkLoginAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_ed25519(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256k1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_secp256r1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_zklogin(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeMultisigMemberSignature: + @staticmethod + def lift(value: int) -> MultisigMemberSignature: + return MultisigMemberSignature._uniffi_make_instance(value) @staticmethod - def check_lower(value: Ed25519PublicKey): - if not isinstance(value, Ed25519PublicKey): - raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: MultisigMemberSignature): + if not isinstance(value, MultisigMemberSignature): + raise TypeError("Expected MultisigMemberSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Ed25519PublicKeyProtocol): - if not isinstance(value, Ed25519PublicKey): - raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MultisigMemberSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MultisigMemberSignature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: MultisigMemberSignature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Ed25519SignatureProtocol(typing.Protocol): + +class _UniffiFfiConverterSequenceTypeMultisigMemberSignature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMultisigMemberSignature.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMultisigMemberSignature.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeMultisigMemberSignature.read(buf) for i in range(count) + ] + + +class MultisigAggregatedSignatureProtocol(typing.Protocol): """ - An ed25519 signature. + Aggregated signature from members of a multisig committee. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ed25519-signature = 64OCTECT + multisig-aggregated-signature = (vector multisig-member-signature) + u16 ; bitmap + multisig-committee + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-aggregated-signature = (vector multisig-member-signature) + roaring-bitmap ; bitmap + legacy-multisig-committee + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps ``` - """ - def to_bytes(self, ): + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. +""" + + def bitmap(self, ) -> int: + """ + The bitmap that indicates which committee members provided their + signature. +""" + raise NotImplementedError + def committee(self, ) -> MultisigCommittee: + raise NotImplementedError + def signatures(self, ) -> typing.List[MultisigMemberSignature]: + """ + The list of signatures from committee members +""" raise NotImplementedError -# Ed25519Signature is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519Signature(): + +class MultisigAggregatedSignature(MultisigAggregatedSignatureProtocol): """ - An ed25519 signature. + Aggregated signature from members of a multisig committee. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ed25519-signature = 64OCTECT + multisig-aggregated-signature = (vector multisig-member-signature) + u16 ; bitmap + multisig-committee + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-aggregated-signature = (vector multisig-member-signature) + roaring-bitmap ; bitmap + legacy-multisig-committee + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps ``` - """ - _pointer: ctypes.c_void_p + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, committee: MultisigCommittee,signatures: typing.List[MultisigMemberSignature],bitmap: int): + """ + Construct a new aggregated multisig signature. + + Since the list of signatures doesn't contain sufficient information to + identify which committee member provided the signature, it is up to + the caller to ensure that the provided signature list is in the same + order as it's corresponding member in the provided committee + and that it's position in the provided bitmap is set. +""" + + _UniffiFfiConverterTypeMultisigCommittee.check_lower(committee) + + _UniffiFfiConverterSequenceTypeMultisigMemberSignature.check_lower(signatures) + + _UniffiFfiConverterUInt16.check_lower(bitmap) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMultisigCommittee.lower(committee), + _UniffiFfiConverterSequenceTypeMultisigMemberSignature.lower(signatures), + _UniffiFfiConverterUInt16.lower(bitmap), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregatedSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate,) - return cls._make_instance_(pointer) - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes,self._uniffi_clone_pointer(),) + def bitmap(self, ) -> int: + """ + The bitmap that indicates which committee members provided their + signature. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt16.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def committee(self, ) -> MultisigCommittee: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigCommittee.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signatures(self, ) -> typing.List[MultisigMemberSignature]: + """ + The list of signatures from committee members +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeMultisigMemberSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeEd25519Signature: - +class _UniffiFfiConverterTypeMultisigAggregatedSignature: @staticmethod - def lift(value: int): - return Ed25519Signature._make_instance_(value) + def lift(value: int) -> MultisigAggregatedSignature: + return MultisigAggregatedSignature._uniffi_make_instance(value) @staticmethod - def check_lower(value: Ed25519Signature): - if not isinstance(value, Ed25519Signature): - raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) + def check_lower(value: MultisigAggregatedSignature): + if not isinstance(value, MultisigAggregatedSignature): + raise TypeError("Expected MultisigAggregatedSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Ed25519SignatureProtocol): - if not isinstance(value, Ed25519Signature): - raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MultisigAggregatedSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MultisigAggregatedSignature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519SignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: MultisigAggregatedSignature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Ed25519VerifierProtocol(typing.Protocol): - pass -# Ed25519Verifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519Verifier(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier, self._pointer) +class _UniffiFfiConverterOptionalTypeMultisigAggregatedSignature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMultisigAggregatedSignature.check_lower(value) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeMultisigAggregatedSignature.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMultisigAggregatedSignature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterTypeEd25519Verifier: - @staticmethod - def lift(value: int): - return Ed25519Verifier._make_instance_(value) +class PasskeyPublicKeyProtocol(typing.Protocol): + """ + Public key of a `PasskeyAuthenticator`. - @staticmethod - def check_lower(value: Ed25519Verifier): - if not isinstance(value, Ed25519Verifier): - raise TypeError("Expected Ed25519Verifier instance, {} found".format(type(value).__name__)) + This is used to derive the onchain `Address` for a `PasskeyAuthenticator`. - @staticmethod - def lower(value: Ed25519VerifierProtocol): - if not isinstance(value, Ed25519Verifier): - raise TypeError("Expected Ed25519Verifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + # BCS - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value: Ed25519VerifierProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Ed25519VerifyingKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def to_der(self, ): - """ - Serialize this public key as DER-encoded data + ```text + passkey-public-key = passkey-flag secp256r1-public-key + ``` +""" + + def derive_address(self, ) -> Address: """ + Derive an `Address` from this Passkey Public Key - raise NotImplementedError - def to_pem(self, ): - """ - Serialize this public key into PEM format - """ + An `Address` can be derived from a `PasskeyPublicKey` by hashing the + bytes of the `Secp256r1PublicKey` that corresponds to this passkey + prefixed with the Passkey `SignatureScheme` flag (`0x06`). + `hash( 0x06 || 33-byte secp256r1 public key)` +""" raise NotImplementedError - def verify(self, message: "bytes",signature: "Ed25519Signature"): - raise NotImplementedError - def verify_simple(self, message: "bytes",signature: "SimpleSignature"): - raise NotImplementedError - def verify_user(self, message: "bytes",signature: "UserSignature"): + def inner(self, ) -> Secp256r1PublicKey: raise NotImplementedError -# Ed25519VerifyingKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519VerifyingKey(): - _pointer: ctypes.c_void_p - def __init__(self, public_key: "Ed25519PublicKey"): - _UniffiConverterTypeEd25519PublicKey.check_lower(public_key) + +class PasskeyPublicKey(PasskeyPublicKeyProtocol): + """ + Public key of a `PasskeyAuthenticator`. + + This is used to derive the onchain `Address` for a `PasskeyAuthenticator`. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + passkey-public-key = passkey-flag secp256r1-public-key + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, public_key: Secp256r1PublicKey): - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new, - _UniffiConverterTypeEd25519PublicKey.lower(public_key)) + _UniffiFfiConverterTypeSecp256r1PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256r1PublicKey.lower(public_key), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePasskeyPublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_der(cls, bytes: "bytes"): - """ - Deserialize public key from ASN.1 DER-encoded data (binary format). - """ - - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize public key from PEM. + def derive_address(self, ) -> Address: """ + Derive an `Address` from this Passkey Public Key - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - + An `Address` can be derived from a `PasskeyPublicKey` by hashing the + bytes of the `Secp256r1PublicKey` that corresponds to this passkey + prefixed with the Passkey `SignatureScheme` flag (`0x06`). - def public_key(self, ) -> "Ed25519PublicKey": - return _UniffiConverterTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key,self._uniffi_clone_pointer(),) + `hash( 0x06 || 33-byte secp256r1 public key)` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def to_der(self, ) -> "bytes": - """ - Serialize this public key as DER-encoded data - """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeAddress.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address, + *_uniffi_lowered_args, ) - - - - - - def to_pem(self, ) -> "str": - """ - Serialize this public key into PEM format - """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def inner(self, ) -> Secp256r1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def verify(self, message: "bytes",signature: "Ed25519Signature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeEd25519Signature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeEd25519Signature.lower(signature)) - - - - - - - def verify_simple(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSimpleSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) - - - - - - - def verify_user(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeUserSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) - - - - - - - -class _UniffiConverterTypeEd25519VerifyingKey: - +class _UniffiFfiConverterTypePasskeyPublicKey: @staticmethod - def lift(value: int): - return Ed25519VerifyingKey._make_instance_(value) + def lift(value: int) -> PasskeyPublicKey: + return PasskeyPublicKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: Ed25519VerifyingKey): - if not isinstance(value, Ed25519VerifyingKey): - raise TypeError("Expected Ed25519VerifyingKey instance, {} found".format(type(value).__name__)) + def check_lower(value: PasskeyPublicKey): + if not isinstance(value, PasskeyPublicKey): + raise TypeError("Expected PasskeyPublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Ed25519VerifyingKeyProtocol): - if not isinstance(value, Ed25519VerifyingKey): - raise TypeError("Expected Ed25519VerifyingKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: PasskeyPublicKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> PasskeyPublicKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519VerifyingKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PasskeyPublicKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EndOfEpochTransactionKindProtocol(typing.Protocol): + + +class PasskeyAuthenticatorProtocol(typing.Protocol): """ - Operation run at the end of an epoch + A passkey authenticator. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - end-of-epoch-transaction-kind = eoe-change-epoch - =/ eoe-authenticator-state-create - =/ eoe-authenticator-state-expire - =/ eoe-randomness-state-create - =/ eoe-deny-list-state-create - =/ eoe-bridge-state-create - =/ eoe-bridge-committee-init - =/ eoe-store-execution-time-observations + passkey-bcs = bytes ; where the contents of the bytes are + ; defined by + passkey = passkey-flag + bytes ; passkey authenticator data + client-data-json ; valid json + simple-signature ; required to be a secp256r1 signature + + client-data-json = string ; valid json + ``` + + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for + the required json-schema for the `client-data-json` rule. In addition, IOTA + currently requires that the `CollectedClientData.type` field is required to + be `webauthn.get`. + + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + def authenticator_data(self, ) -> bytes: + """ + Opaque authenticator data for this passkey signature. + + See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for + more information on this field. +""" + raise NotImplementedError + def challenge(self, ) -> bytes: + """ + The parsed challenge message for this passkey signature. + + This is parsed by decoding the base64url data from the + `client_data_json.challenge` field. +""" + raise NotImplementedError + def client_data_json(self, ) -> str: + """ + Structured, unparsed, JSON for this passkey signature. - eoe-change-epoch = %x00 change-epoch - eoe-authenticator-state-create = %x01 - eoe-authenticator-state-expire = %x02 authenticator-state-expire - eoe-randomness-state-create = %x03 - eoe-deny-list-state-create = %x04 - eoe-bridge-state-create = %x05 digest - eoe-bridge-committee-init = %x06 u64 - eoe-store-execution-time-observations = %x07 stored-execution-time-observations - ``` - """ + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) + for more information on this field. +""" + raise NotImplementedError + def public_key(self, ) -> PasskeyPublicKey: + """ + The passkey public key +""" + raise NotImplementedError + def signature(self, ) -> SimpleSignature: + """ + The passkey signature. +""" + raise NotImplementedError - pass -# EndOfEpochTransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class EndOfEpochTransactionKind(): +class PasskeyAuthenticator(PasskeyAuthenticatorProtocol): """ - Operation run at the end of an epoch + A passkey authenticator. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - end-of-epoch-transaction-kind = eoe-change-epoch - =/ eoe-authenticator-state-create - =/ eoe-authenticator-state-expire - =/ eoe-randomness-state-create - =/ eoe-deny-list-state-create - =/ eoe-bridge-state-create - =/ eoe-bridge-committee-init - =/ eoe-store-execution-time-observations + passkey-bcs = bytes ; where the contents of the bytes are + ; defined by + passkey = passkey-flag + bytes ; passkey authenticator data + client-data-json ; valid json + simple-signature ; required to be a secp256r1 signature - eoe-change-epoch = %x00 change-epoch - eoe-authenticator-state-create = %x01 - eoe-authenticator-state-expire = %x02 authenticator-state-expire - eoe-randomness-state-create = %x03 - eoe-deny-list-state-create = %x04 - eoe-bridge-state-create = %x05 digest - eoe-bridge-committee-init = %x06 u64 - eoe-store-execution-time-observations = %x07 stored-execution-time-observations + client-data-json = string ; valid json ``` - """ - _pointer: ctypes.c_void_p + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for + the required json-schema for the `client-data-json` rule. In addition, IOTA + currently requires that the `CollectedClientData.type` field is required to + be `webauthn.get`. + + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + _handle: ctypes.c_uint64 def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_authenticator_state_create(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create,) - return cls._make_instance_(pointer) + def authenticator_data(self, ) -> bytes: + """ + Opaque authenticator data for this passkey signature. - @classmethod - def new_authenticator_state_expire(cls, tx: "AuthenticatorStateExpire"): - _UniffiConverterTypeAuthenticatorStateExpire.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire, - _UniffiConverterTypeAuthenticatorStateExpire.lower(tx)) - return cls._make_instance_(pointer) + See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for + more information on this field. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def challenge(self, ) -> bytes: + """ + The parsed challenge message for this passkey signature. - @classmethod - def new_change_epoch(cls, tx: "ChangeEpoch"): - _UniffiConverterTypeChangeEpoch.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch, - _UniffiConverterTypeChangeEpoch.lower(tx)) - return cls._make_instance_(pointer) + This is parsed by decoding the base64url data from the + `client_data_json.challenge` field. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def client_data_json(self, ) -> str: + """ + Structured, unparsed, JSON for this passkey signature. - @classmethod - def new_change_epoch_v2(cls, tx: "ChangeEpochV2"): - _UniffiConverterTypeChangeEpochV2.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2, - _UniffiConverterTypeChangeEpochV2.lower(tx)) - return cls._make_instance_(pointer) + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) + for more information on this field. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def public_key(self, ) -> PasskeyPublicKey: + """ + The passkey public key +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePasskeyPublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signature(self, ) -> SimpleSignature: + """ + The passkey signature. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeEndOfEpochTransactionKind: +class _UniffiFfiConverterTypePasskeyAuthenticator: @staticmethod - def lift(value: int): - return EndOfEpochTransactionKind._make_instance_(value) + def lift(value: int) -> PasskeyAuthenticator: + return PasskeyAuthenticator._uniffi_make_instance(value) @staticmethod - def check_lower(value: EndOfEpochTransactionKind): - if not isinstance(value, EndOfEpochTransactionKind): - raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) + def check_lower(value: PasskeyAuthenticator): + if not isinstance(value, PasskeyAuthenticator): + raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EndOfEpochTransactionKindProtocol): - if not isinstance(value, EndOfEpochTransactionKind): - raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: PasskeyAuthenticator) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> PasskeyAuthenticator: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: EndOfEpochTransactionKindProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PasskeyAuthenticator, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ExecutionTimeObservationProtocol(typing.Protocol): - def key(self, ): - raise NotImplementedError - def observations(self, ): - raise NotImplementedError -# ExecutionTimeObservation is a Rust-only trait - it's a wrapper around a Rust implementation. -class ExecutionTimeObservation(): - _pointer: ctypes.c_void_p - def __init__(self, key: "ExecutionTimeObservationKey",observations: "typing.List[ValidatorExecutionTimeObservation]"): - _UniffiConverterTypeExecutionTimeObservationKey.check_lower(key) - - _UniffiConverterSequenceTypeValidatorExecutionTimeObservation.check_lower(observations) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new, - _UniffiConverterTypeExecutionTimeObservationKey.lower(key), - _UniffiConverterSequenceTypeValidatorExecutionTimeObservation.lower(observations)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation, self._pointer) - # Used by alternative constructors or any methods which return this type. +class _UniffiFfiConverterOptionalTypePasskeyAuthenticator(_UniffiConverterRustBuffer): @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def key(self, ) -> "ExecutionTimeObservationKey": - return _UniffiConverterTypeExecutionTimeObservationKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key,self._uniffi_clone_pointer(),) - ) - - - - - - def observations(self, ) -> "typing.List[ValidatorExecutionTimeObservation]": - return _UniffiConverterSequenceTypeValidatorExecutionTimeObservation.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations,self._uniffi_clone_pointer(),) - ) - - - + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypePasskeyAuthenticator.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypePasskeyAuthenticator.write(value, buf) -class _UniffiConverterTypeExecutionTimeObservation: + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypePasskeyAuthenticator.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @staticmethod - def lift(value: int): - return ExecutionTimeObservation._make_instance_(value) +class _UniffiFfiConverterOptionalTypeSimpleSignature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSimpleSignature.check_lower(value) - @staticmethod - def check_lower(value: ExecutionTimeObservation): - if not isinstance(value, ExecutionTimeObservation): - raise TypeError("Expected ExecutionTimeObservation instance, {} found".format(type(value).__name__)) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - @staticmethod - def lower(value: ExecutionTimeObservationProtocol): - if not isinstance(value, ExecutionTimeObservation): - raise TypeError("Expected ExecutionTimeObservation instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + buf.write_u8(1) + _UniffiFfiConverterTypeSimpleSignature.write(value, buf) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSimpleSignature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @classmethod - def write(cls, value: ExecutionTimeObservationProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ExecutionTimeObservationKeyProtocol(typing.Protocol): + +class UserSignatureProtocol(typing.Protocol): """ - Key for an execution time observation + A signature from a user + + A `UserSignature` is most commonly used to authorize the execution and + inclusion of a transaction to the blockchain. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - execution-time-observation-key = %x00 move-entry-point - =/ %x01 ; transfer-objects - =/ %x02 ; split-coins - =/ %x03 ; merge-coins - =/ %x04 ; publish - =/ %x05 ; make-move-vec - =/ %x06 ; upgrade - - move-entry-point = object-id string string (vec type-tag) + user-signature-bcs = bytes ; where the contents of the bytes are defined by + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey ``` - """ - pass -# ExecutionTimeObservationKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class ExecutionTimeObservationKey(): + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + def as_multisig(self, ) -> MultisigAggregatedSignature: + raise NotImplementedError + def as_multisig_opt(self, ) -> typing.Optional[MultisigAggregatedSignature]: + raise NotImplementedError + def as_passkey(self, ) -> PasskeyAuthenticator: + raise NotImplementedError + def as_passkey_opt(self, ) -> typing.Optional[PasskeyAuthenticator]: + raise NotImplementedError + def as_simple(self, ) -> SimpleSignature: + raise NotImplementedError + def as_simple_opt(self, ) -> typing.Optional[SimpleSignature]: + raise NotImplementedError + def as_zklogin(self, ) -> ZkLoginAuthenticator: + raise NotImplementedError + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginAuthenticator]: + raise NotImplementedError + def is_multisig(self, ) -> bool: + raise NotImplementedError + def is_passkey(self, ) -> bool: + raise NotImplementedError + def is_simple(self, ) -> bool: + raise NotImplementedError + def is_zklogin(self, ) -> bool: + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + raise NotImplementedError + def to_base64(self, ) -> str: + raise NotImplementedError + def to_bytes(self, ) -> bytes: + raise NotImplementedError + +class UserSignature(UserSignatureProtocol): """ - Key for an execution time observation + A signature from a user + + A `UserSignature` is most commonly used to authorize the execution and + inclusion of a transaction to the blockchain. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - execution-time-observation-key = %x00 move-entry-point - =/ %x01 ; transfer-objects - =/ %x02 ; split-coins - =/ %x03 ; merge-coins - =/ %x04 ; publish - =/ %x05 ; make-move-vec - =/ %x06 ; upgrade - - move-entry-point = object-id string string (vec type-tag) + user-signature-bcs = bytes ; where the contents of the bytes are defined by + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey ``` - """ - _pointer: ctypes.c_void_p + Note: Due to historical reasons, signatures are serialized slightly + different from the majority of the types in IOTA. In particular if a + signature is ever embedded in another structure it generally is serialized + as `bytes` meaning it has a length prefix that defines the length of + the completely serialized signature. +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_base64(cls, base64: str) -> UserSignature: + + _UniffiFfiConverterString.check_lower(base64) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(base64), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_bytes(cls, bytes: bytes) -> UserSignature: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_multisig(cls, signature: MultisigAggregatedSignature) -> UserSignature: + + _UniffiFfiConverterTypeMultisigAggregatedSignature.check_lower(signature) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMultisigAggregatedSignature.lower(signature), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_passkey(cls, authenticator: PasskeyAuthenticator) -> UserSignature: + + _UniffiFfiConverterTypePasskeyAuthenticator.check_lower(authenticator) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypePasskeyAuthenticator.lower(authenticator), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_simple(cls, signature: SimpleSignature) -> UserSignature: + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_zklogin(cls, authenticator: ZkLoginAuthenticator) -> UserSignature: + + _UniffiFfiConverterTypeZkLoginAuthenticator.check_lower(authenticator) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeZkLoginAuthenticator.lower(authenticator), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_make_move_vec(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec,) - return cls._make_instance_(pointer) + def as_multisig(self, ) -> MultisigAggregatedSignature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregatedSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_multisig_opt(self, ) -> typing.Optional[MultisigAggregatedSignature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMultisigAggregatedSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_passkey(self, ) -> PasskeyAuthenticator: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePasskeyAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_passkey_opt(self, ) -> typing.Optional[PasskeyAuthenticator]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypePasskeyAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_simple(self, ) -> SimpleSignature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_simple_opt(self, ) -> typing.Optional[SimpleSignature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSimpleSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin(self, ) -> ZkLoginAuthenticator: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkLoginAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_zklogin_opt(self, ) -> typing.Optional[ZkLoginAuthenticator]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeZkLoginAuthenticator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_multisig(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_passkey(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_simple(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_zklogin(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + """ + Return the flag for this signature scheme +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_base64(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - @classmethod - def new_merge_coins(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins,) - return cls._make_instance_(pointer) - @classmethod - def new_move_entry_point(cls, package: "ObjectId",module: "str",function: "str",type_arguments: "typing.List[TypeTag]"): - _UniffiConverterTypeObjectId.check_lower(package) - - _UniffiConverterString.check_lower(module) - - _UniffiConverterString.check_lower(function) - - _UniffiConverterSequenceTypeTypeTag.check_lower(type_arguments) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point, - _UniffiConverterTypeObjectId.lower(package), - _UniffiConverterString.lower(module), - _UniffiConverterString.lower(function), - _UniffiConverterSequenceTypeTypeTag.lower(type_arguments)) - return cls._make_instance_(pointer) + + + +class _UniffiFfiConverterTypeUserSignature: + @staticmethod + def lift(value: int) -> UserSignature: + return UserSignature._uniffi_make_instance(value) + + @staticmethod + def check_lower(value: UserSignature): + if not isinstance(value, UserSignature): + raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: UserSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def new_publish(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish,) - return cls._make_instance_(pointer) + def read(cls, buf: _UniffiRustBuffer) -> UserSignature: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def new_split_coins(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins,) - return cls._make_instance_(pointer) + def write(cls, value: UserSignature, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterSequenceTypeUserSignature(_UniffiConverterRustBuffer): @classmethod - def new_transfer_objects(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects,) - return cls._make_instance_(pointer) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeUserSignature.check_lower(item) @classmethod - def new_upgrade(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade,) - return cls._make_instance_(pointer) + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeUserSignature.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeUserSignature.read(buf) for i in range(count) + ] +@dataclass +class SignedTransaction: + def __init__(self, *, transaction:Transaction, signatures:typing.List[UserSignature]): + self.transaction = transaction + self.signatures = signatures + + -class _UniffiConverterTypeExecutionTimeObservationKey: + + def __str__(self): + return "SignedTransaction(transaction={}, signatures={})".format(self.transaction, self.signatures) + def __eq__(self, other): + if self.transaction != other.transaction: + return False + if self.signatures != other.signatures: + return False + return True +class _UniffiFfiConverterTypeSignedTransaction(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return ExecutionTimeObservationKey._make_instance_(value) + def read(buf): + return SignedTransaction( + transaction=_UniffiFfiConverterTypeTransaction.read(buf), + signatures=_UniffiFfiConverterSequenceTypeUserSignature.read(buf), + ) @staticmethod - def check_lower(value: ExecutionTimeObservationKey): - if not isinstance(value, ExecutionTimeObservationKey): - raise TypeError("Expected ExecutionTimeObservationKey instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterTypeTransaction.check_lower(value.transaction) + _UniffiFfiConverterSequenceTypeUserSignature.check_lower(value.signatures) @staticmethod - def lower(value: ExecutionTimeObservationKeyProtocol): - if not isinstance(value, ExecutionTimeObservationKey): - raise TypeError("Expected ExecutionTimeObservationKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterTypeTransaction.write(value.transaction, buf) + _UniffiFfiConverterSequenceTypeUserSignature.write(value.signatures, buf) +class _UniffiFfiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeSignedTransaction.check_lower(value) @classmethod - def write(cls, value: ExecutionTimeObservationKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ExecutionTimeObservationsProtocol(typing.Protocol): + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeSignedTransaction.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeSignedTransaction.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + +@dataclass +class MoveLocation: """ - Set of Execution Time Observations from the committee. + Location in move bytecode where an error occurred # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - stored-execution-time-observations = %x00 v1-stored-execution-time-observations - - v1-stored-execution-time-observations = (vec - execution-time-observation-key - (vec execution-time-observation) - ) + move-location = object-id identifier u16 u16 (option identifier) ``` - """ +""" + def __init__(self, *, package:ObjectId, module:str, function:int, instruction:int, function_name:typing.Optional[str] = _DEFAULT): + self.package = package + self.module = module + self.function = function + self.instruction = instruction + if function_name is _DEFAULT: + self.function_name = None + else: + self.function_name = function_name + + - pass -# ExecutionTimeObservations is a Rust-only trait - it's a wrapper around a Rust implementation. -class ExecutionTimeObservations(): + + def __str__(self): + return "MoveLocation(package={}, module={}, function={}, instruction={}, function_name={})".format(self.package, self.module, self.function, self.instruction, self.function_name) + def __eq__(self, other): + if self.package != other.package: + return False + if self.module != other.module: + return False + if self.function != other.function: + return False + if self.instruction != other.instruction: + return False + if self.function_name != other.function_name: + return False + return True + +class _UniffiFfiConverterTypeMoveLocation(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveLocation( + package=_UniffiFfiConverterTypeObjectId.read(buf), + module=_UniffiFfiConverterString.read(buf), + function=_UniffiFfiConverterUInt16.read(buf), + instruction=_UniffiFfiConverterUInt16.read(buf), + function_name=_UniffiFfiConverterOptionalString.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.package) + _UniffiFfiConverterString.check_lower(value.module) + _UniffiFfiConverterUInt16.check_lower(value.function) + _UniffiFfiConverterUInt16.check_lower(value.instruction) + _UniffiFfiConverterOptionalString.check_lower(value.function_name) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.package, buf) + _UniffiFfiConverterString.write(value.module, buf) + _UniffiFfiConverterUInt16.write(value.function, buf) + _UniffiFfiConverterUInt16.write(value.instruction, buf) + _UniffiFfiConverterOptionalString.write(value.function_name, buf) + +class _UniffiFfiConverterOptionalTypeMoveLocation(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveLocation.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeMoveLocation.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveLocation.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + + + + +class CommandArgumentError: """ - Set of Execution Time Observations from the committee. + An error with an argument to a command # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - stored-execution-time-observations = %x00 v1-stored-execution-time-observations + command-argument-error = type-mismatch + =/ invalid-bcs-bytes + =/ invalid-usage-of-pure-argument + =/ invalid-argument-to-private-entry-function + =/ index-out-of-bounds + =/ secondary-index-out-of-bound + =/ invalid-result-arity + =/ invalid-gas-coin-usage + =/ invalid-value-usage + =/ invalid-object-by-value + =/ invalid-object-by-mut-ref + =/ shared-object-operation-not-allowed - v1-stored-execution-time-observations = (vec - execution-time-observation-key - (vec execution-time-observation) - ) + type-mismatch = %x00 + invalid-bcs-bytes = %x01 + invalid-usage-of-pure-argument = %x02 + invalid-argument-to-private-entry-function = %x03 + index-out-of-bounds = %x04 u16 + secondary-index-out-of-bound = %x05 u16 u16 + invalid-result-arity = %x06 u16 + invalid-gas-coin-usage = %x07 + invalid-value-usage = %x08 + invalid-object-by-value = %x09 + invalid-object-by-mut-ref = %x0a + shared-object-operation-not-allowed = %x0b ``` - """ - - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") +""" + def __init__(self): + raise RuntimeError("CommandArgumentError cannot be instantiated directly") - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations, pointer) + # Each enum variant is a nested class of the enum itself. + @dataclass + class TYPE_MISMATCH: + """ + The type of the value does not match the expected type +""" + + def __init__(self, ): + pass - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations, self._pointer) + + + + + def __str__(self): + return "CommandArgumentError.TYPE_MISMATCH()".format() + def __eq__(self, other): + if not other.is_TYPE_MISMATCH(): + return False + return True - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def new_v1(cls, execution_time_observations: "typing.List[ExecutionTimeObservation]"): - _UniffiConverterSequenceTypeExecutionTimeObservation.check_lower(execution_time_observations) + @dataclass + class INVALID_BCS_BYTES: + """ + The argument cannot be deserialized into a value of the specified type +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1, - _UniffiConverterSequenceTypeExecutionTimeObservation.lower(execution_time_observations)) - return cls._make_instance_(pointer) - + def __init__(self, ): + pass + + + + + def __str__(self): + return "CommandArgumentError.INVALID_BCS_BYTES()".format() + def __eq__(self, other): + if not other.is_INVALID_BCS_BYTES(): + return False + return True + @dataclass + class INVALID_USAGE_OF_PURE_ARGUMENT: + """ + The argument cannot be instantiated from raw bytes +""" + + def __init__(self, ): + pass -class _UniffiConverterTypeExecutionTimeObservations: + + + + + def __str__(self): + return "CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT()".format() + def __eq__(self, other): + if not other.is_INVALID_USAGE_OF_PURE_ARGUMENT(): + return False + return True - @staticmethod - def lift(value: int): - return ExecutionTimeObservations._make_instance_(value) + @dataclass + class INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION: + """ + Invalid argument to private entry function. + Private entry functions cannot take arguments from other Move functions. +""" + + def __init__(self, ): + pass - @staticmethod - def check_lower(value: ExecutionTimeObservations): - if not isinstance(value, ExecutionTimeObservations): - raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + + + + + def __str__(self): + return "CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION()".format() + def __eq__(self, other): + if not other.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): + return False + return True - @staticmethod - def lower(value: ExecutionTimeObservationsProtocol): - if not isinstance(value, ExecutionTimeObservations): - raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + @dataclass + class INDEX_OUT_OF_BOUNDS: + """ + Out of bounds access to input or results +""" + + def __init__(self, index:int): + self.index = index + + + pass - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + + + + + def __str__(self): + return "CommandArgumentError.INDEX_OUT_OF_BOUNDS(index={})".format(self.index) + def __eq__(self, other): + if not other.is_INDEX_OUT_OF_BOUNDS(): + return False + if self.index != other.index: + return False + return True - @classmethod - def write(cls, value: ExecutionTimeObservationsProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class FaucetClientProtocol(typing.Protocol): - def request(self, address: "Address"): - """ - Request gas from the faucet. Note that this will return the UUID of the - request and not wait until the token is received. Use - `request_and_wait` to wait for the token. + @dataclass + class SECONDARY_INDEX_OUT_OF_BOUNDS: """ + Out of bounds access to subresult +""" + + def __init__(self, result:int, subresult:int): + self.result = result + + + self.subresult = subresult + + + pass - raise NotImplementedError - def request_and_wait(self, address: "Address"): - """ - Request gas from the faucet and wait until the request is completed and - token is transferred. Returns `FaucetReceipt` if the request is - successful, which contains the list of tokens transferred, and the - transaction digest. + + + + + def __str__(self): + return "CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS(result={}, subresult={})".format(self.result, self.subresult) + def __eq__(self, other): + if not other.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): + return False + if self.result != other.result: + return False + if self.subresult != other.subresult: + return False + return True - Note that the faucet is heavily rate-limited, so calling repeatedly the - faucet would likely result in a 429 code or 502 code. + @dataclass + class INVALID_RESULT_ARITY: """ + Invalid usage of result. + Expected a single result but found either no return value or multiple. +""" + + def __init__(self, result:int): + self.result = result + + + pass - raise NotImplementedError - def request_status(self, id: "str"): - """ - Check the faucet request status. + + + + + def __str__(self): + return "CommandArgumentError.INVALID_RESULT_ARITY(result={})".format(self.result) + def __eq__(self, other): + if not other.is_INVALID_RESULT_ARITY(): + return False + if self.result != other.result: + return False + return True - Possible statuses are defined in: [`BatchSendStatusType`] + @dataclass + class INVALID_GAS_COIN_USAGE: """ + Invalid usage of Gas coin. + The Gas coin can only be used by-value with a TransferObjects command. +""" + + def __init__(self, ): + pass - raise NotImplementedError -# FaucetClient is a Rust-only trait - it's a wrapper around a Rust implementation. -class FaucetClient(): - _pointer: ctypes.c_void_p - def __init__(self, faucet_url: "str"): - """ - Construct a new `FaucetClient` with the given faucet service URL. This - [`FaucetClient`] expects that the service provides two endpoints: - /v1/gas and /v1/status. As such, do not provide the request - endpoint, just the top level service endpoint. + + + + + def __str__(self): + return "CommandArgumentError.INVALID_GAS_COIN_USAGE()".format() + def __eq__(self, other): + if not other.is_INVALID_GAS_COIN_USAGE(): + return False + return True - - /v1/gas is used to request gas - - /v1/status/taks-uuid is used to check the status of the request + @dataclass + class INVALID_VALUE_USAGE: """ - - _UniffiConverterString.check_lower(faucet_url) + Invalid usage of move value. +""" - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new, - _UniffiConverterString.lower(faucet_url)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient, pointer) + def __init__(self, ): + pass - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient, self._pointer) + + + + + def __str__(self): + return "CommandArgumentError.INVALID_VALUE_USAGE()".format() + def __eq__(self, other): + if not other.is_INVALID_VALUE_USAGE(): + return False + return True - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def new_devnet(cls, ): - """ - Create a new Faucet client connected to the `devnet` faucet. + @dataclass + class INVALID_OBJECT_BY_VALUE: """ + Immutable objects cannot be passed by-value. +""" + + def __init__(self, ): + pass - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet,) - return cls._make_instance_(pointer) + + + + + def __str__(self): + return "CommandArgumentError.INVALID_OBJECT_BY_VALUE()".format() + def __eq__(self, other): + if not other.is_INVALID_OBJECT_BY_VALUE(): + return False + return True - @classmethod - def new_localnet(cls, ): - """ - Create a new Faucet client connected to a `localnet` faucet. + @dataclass + class INVALID_OBJECT_BY_MUT_REF: """ + Immutable objects cannot be passed by mutable reference, &mut. +""" + + def __init__(self, ): + pass - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet,) - return cls._make_instance_(pointer) + + + + + def __str__(self): + return "CommandArgumentError.INVALID_OBJECT_BY_MUT_REF()".format() + def __eq__(self, other): + if not other.is_INVALID_OBJECT_BY_MUT_REF(): + return False + return True - @classmethod - def new_testnet(cls, ): - """ - Create a new Faucet client connected to the `testnet` faucet. + @dataclass + class SHARED_OBJECT_OPERATION_NOT_ALLOWED: """ + Shared object operations such a wrapping, freezing, or converting to + owned are not allowed. +""" + + def __init__(self, ): + pass - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet,) - return cls._make_instance_(pointer) + + + + + def __str__(self): + return "CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED()".format() + def __eq__(self, other): + if not other.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + return False + return True + - async def request(self, address: "Address") -> "typing.Optional[str]": - """ - Request gas from the faucet. Note that this will return the UUID of the - request and not wait until the token is received. Use - `request_and_wait` to wait for the token. - """ + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_TYPE_MISMATCH(self) -> bool: + return isinstance(self, CommandArgumentError.TYPE_MISMATCH) + def is_type_mismatch(self) -> bool: + return isinstance(self, CommandArgumentError.TYPE_MISMATCH) + def is_INVALID_BCS_BYTES(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_BCS_BYTES) + def is_invalid_bcs_bytes(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_BCS_BYTES) + def is_INVALID_USAGE_OF_PURE_ARGUMENT(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT) + def is_invalid_usage_of_pure_argument(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT) + def is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION) + def is_invalid_argument_to_private_entry_function(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION) + def is_INDEX_OUT_OF_BOUNDS(self) -> bool: + return isinstance(self, CommandArgumentError.INDEX_OUT_OF_BOUNDS) + def is_index_out_of_bounds(self) -> bool: + return isinstance(self, CommandArgumentError.INDEX_OUT_OF_BOUNDS) + def is_SECONDARY_INDEX_OUT_OF_BOUNDS(self) -> bool: + return isinstance(self, CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS) + def is_secondary_index_out_of_bounds(self) -> bool: + return isinstance(self, CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS) + def is_INVALID_RESULT_ARITY(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_RESULT_ARITY) + def is_invalid_result_arity(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_RESULT_ARITY) + def is_INVALID_GAS_COIN_USAGE(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_GAS_COIN_USAGE) + def is_invalid_gas_coin_usage(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_GAS_COIN_USAGE) + def is_INVALID_VALUE_USAGE(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_VALUE_USAGE) + def is_invalid_value_usage(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_VALUE_USAGE) + def is_INVALID_OBJECT_BY_VALUE(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_VALUE) + def is_invalid_object_by_value(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_VALUE) + def is_INVALID_OBJECT_BY_MUT_REF(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_MUT_REF) + def is_invalid_object_by_mut_ref(self) -> bool: + return isinstance(self, CommandArgumentError.INVALID_OBJECT_BY_MUT_REF) + def is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(self) -> bool: + return isinstance(self, CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) + def is_shared_object_operation_not_allowed(self) -> bool: + return isinstance(self, CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) + - _UniffiConverterTypeAddress.check_lower(address) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalString.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +CommandArgumentError.TYPE_MISMATCH = type("CommandArgumentError.TYPE_MISMATCH", (CommandArgumentError.TYPE_MISMATCH, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_BCS_BYTES = type("CommandArgumentError.INVALID_BCS_BYTES", (CommandArgumentError.INVALID_BCS_BYTES, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT = type("CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT", (CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION = type("CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION", (CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INDEX_OUT_OF_BOUNDS = type("CommandArgumentError.INDEX_OUT_OF_BOUNDS", (CommandArgumentError.INDEX_OUT_OF_BOUNDS, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS = type("CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS", (CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_RESULT_ARITY = type("CommandArgumentError.INVALID_RESULT_ARITY", (CommandArgumentError.INVALID_RESULT_ARITY, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_GAS_COIN_USAGE = type("CommandArgumentError.INVALID_GAS_COIN_USAGE", (CommandArgumentError.INVALID_GAS_COIN_USAGE, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_VALUE_USAGE = type("CommandArgumentError.INVALID_VALUE_USAGE", (CommandArgumentError.INVALID_VALUE_USAGE, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_OBJECT_BY_VALUE = type("CommandArgumentError.INVALID_OBJECT_BY_VALUE", (CommandArgumentError.INVALID_OBJECT_BY_VALUE, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.INVALID_OBJECT_BY_MUT_REF = type("CommandArgumentError.INVALID_OBJECT_BY_MUT_REF", (CommandArgumentError.INVALID_OBJECT_BY_MUT_REF, CommandArgumentError,), {}) # type: ignore +CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED = type("CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED", (CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED, CommandArgumentError,), {}) # type: ignore - ) - async def request_and_wait(self, address: "Address") -> "typing.Optional[FaucetReceipt]": - """ - Request gas from the faucet and wait until the request is completed and - token is transferred. Returns `FaucetReceipt` if the request is - successful, which contains the list of tokens transferred, and the - transaction digest. +class _UniffiFfiConverterTypeCommandArgumentError(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return CommandArgumentError.TYPE_MISMATCH( + ) + if variant == 2: + return CommandArgumentError.INVALID_BCS_BYTES( + ) + if variant == 3: + return CommandArgumentError.INVALID_USAGE_OF_PURE_ARGUMENT( + ) + if variant == 4: + return CommandArgumentError.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION( + ) + if variant == 5: + return CommandArgumentError.INDEX_OUT_OF_BOUNDS( + _UniffiFfiConverterUInt16.read(buf), + ) + if variant == 6: + return CommandArgumentError.SECONDARY_INDEX_OUT_OF_BOUNDS( + _UniffiFfiConverterUInt16.read(buf), + _UniffiFfiConverterUInt16.read(buf), + ) + if variant == 7: + return CommandArgumentError.INVALID_RESULT_ARITY( + _UniffiFfiConverterUInt16.read(buf), + ) + if variant == 8: + return CommandArgumentError.INVALID_GAS_COIN_USAGE( + ) + if variant == 9: + return CommandArgumentError.INVALID_VALUE_USAGE( + ) + if variant == 10: + return CommandArgumentError.INVALID_OBJECT_BY_VALUE( + ) + if variant == 11: + return CommandArgumentError.INVALID_OBJECT_BY_MUT_REF( + ) + if variant == 12: + return CommandArgumentError.SHARED_OBJECT_OPERATION_NOT_ALLOWED( + ) + raise InternalError("Raw enum value doesn't match any cases") - Note that the faucet is heavily rate-limited, so calling repeatedly the - faucet would likely result in a 429 code or 502 code. - """ + @staticmethod + def check_lower(value): + if value.is_TYPE_MISMATCH(): + return + if value.is_INVALID_BCS_BYTES(): + return + if value.is_INVALID_USAGE_OF_PURE_ARGUMENT(): + return + if value.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): + return + if value.is_INDEX_OUT_OF_BOUNDS(): + _UniffiFfiConverterUInt16.check_lower(value.index) + return + if value.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): + _UniffiFfiConverterUInt16.check_lower(value.result) + _UniffiFfiConverterUInt16.check_lower(value.subresult) + return + if value.is_INVALID_RESULT_ARITY(): + _UniffiFfiConverterUInt16.check_lower(value.result) + return + if value.is_INVALID_GAS_COIN_USAGE(): + return + if value.is_INVALID_VALUE_USAGE(): + return + if value.is_INVALID_OBJECT_BY_VALUE(): + return + if value.is_INVALID_OBJECT_BY_MUT_REF(): + return + if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + return + raise ValueError(value) - _UniffiConverterTypeAddress.check_lower(address) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeFaucetReceipt.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def write(value, buf): + if value.is_TYPE_MISMATCH(): + buf.write_i32(1) + if value.is_INVALID_BCS_BYTES(): + buf.write_i32(2) + if value.is_INVALID_USAGE_OF_PURE_ARGUMENT(): + buf.write_i32(3) + if value.is_INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION(): + buf.write_i32(4) + if value.is_INDEX_OUT_OF_BOUNDS(): + buf.write_i32(5) + _UniffiFfiConverterUInt16.write(value.index, buf) + if value.is_SECONDARY_INDEX_OUT_OF_BOUNDS(): + buf.write_i32(6) + _UniffiFfiConverterUInt16.write(value.result, buf) + _UniffiFfiConverterUInt16.write(value.subresult, buf) + if value.is_INVALID_RESULT_ARITY(): + buf.write_i32(7) + _UniffiFfiConverterUInt16.write(value.result, buf) + if value.is_INVALID_GAS_COIN_USAGE(): + buf.write_i32(8) + if value.is_INVALID_VALUE_USAGE(): + buf.write_i32(9) + if value.is_INVALID_OBJECT_BY_VALUE(): + buf.write_i32(10) + if value.is_INVALID_OBJECT_BY_MUT_REF(): + buf.write_i32(11) + if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + buf.write_i32(12) - ) - async def request_status(self, id: "str") -> "typing.Optional[BatchSendStatus]": - """ - Check the faucet request status. - Possible statuses are defined in: [`BatchSendStatusType`] - """ - _UniffiConverterString.check_lower(id) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(id) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeBatchSendStatus.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +class TypeArgumentError(enum.Enum): + """ + An error with a type argument + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + type-argument-error = type-not-found / constraint-not-satisfied + type-not-found = %x00 + constraint-not-satisfied = %x01 + ``` +""" + + TYPE_NOT_FOUND = 0 + """ + A type was not found in the module specified +""" + + CONSTRAINT_NOT_SATISFIED = 1 + """ + A type provided did not match the specified constraint +""" + -class _UniffiConverterTypeFaucetClient: +class _UniffiFfiConverterTypeTypeArgumentError(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return FaucetClient._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return TypeArgumentError.TYPE_NOT_FOUND + if variant == 2: + return TypeArgumentError.CONSTRAINT_NOT_SATISFIED + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: FaucetClient): - if not isinstance(value, FaucetClient): - raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) + def check_lower(value): + if value == TypeArgumentError.TYPE_NOT_FOUND: + return + if value == TypeArgumentError.CONSTRAINT_NOT_SATISFIED: + return + raise ValueError(value) @staticmethod - def lower(value: FaucetClientProtocol): - if not isinstance(value, FaucetClient): - raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + if value == TypeArgumentError.TYPE_NOT_FOUND: + buf.write_i32(1) + if value == TypeArgumentError.CONSTRAINT_NOT_SATISFIED: + buf.write_i32(2) - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: FaucetClientProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class GenesisObjectProtocol(typing.Protocol): - """ - An object part of the initial chain state - `GenesisObject`'s are included as a part of genesis, the initial - checkpoint/transaction, that initializes the state of the blockchain. - # BCS - The BCS serialized form for this type is defined by the following ABNF: - ```text - genesis-object = object-data owner - ``` - """ - def data(self, ): - raise NotImplementedError - def object_id(self, ): - raise NotImplementedError - def object_type(self, ): - raise NotImplementedError - def owner(self, ): - raise NotImplementedError - def version(self, ): - raise NotImplementedError -# GenesisObject is a Rust-only trait - it's a wrapper around a Rust implementation. -class GenesisObject(): - """ - An object part of the initial chain state - `GenesisObject`'s are included as a part of genesis, the initial - checkpoint/transaction, that initializes the state of the blockchain. +class PackageUpgradeError: + """ + An error with a upgrading a package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - genesis-object = object-data owner + package-upgrade-error = unable-to-fetch-package / + not-a-package / + incompatible-upgrade / + digest-does-not-match / + unknown-upgrade-policy / + package-id-does-not-match + + unable-to-fetch-package = %x00 object-id + not-a-package = %x01 object-id + incompatible-upgrade = %x02 + digest-does-not-match = %x03 digest + unknown-upgrade-policy = %x04 u8 + package-id-does-not-match = %x05 object-id object-id ``` - """ +""" + def __init__(self): + raise RuntimeError("PackageUpgradeError cannot be instantiated directly") - _pointer: ctypes.c_void_p - def __init__(self, data: "ObjectData",owner: "Owner"): - _UniffiConverterTypeObjectData.check_lower(data) - - _UniffiConverterTypeOwner.check_lower(owner) + # Each enum variant is a nested class of the enum itself. + @dataclass + class UNABLE_TO_FETCH_PACKAGE: + """ + Unable to fetch package +""" - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new, - _UniffiConverterTypeObjectData.lower(data), - _UniffiConverterTypeOwner.lower(owner)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - + def __init__(self, package_id:ObjectId): + self.package_id = package_id + + + pass - def data(self, ) -> "ObjectData": - return _UniffiConverterTypeObjectData.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data,self._uniffi_clone_pointer(),) - ) + + + + + def __str__(self): + return "PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE(package_id={})".format(self.package_id) + def __eq__(self, other): + if not other.is_UNABLE_TO_FETCH_PACKAGE(): + return False + if self.package_id != other.package_id: + return False + return True + @dataclass + class NOT_A_PACKAGE: + """ + Object is not a package +""" + + def __init__(self, object_id:ObjectId): + self.object_id = object_id + + + pass + + + + + def __str__(self): + return "PackageUpgradeError.NOT_A_PACKAGE(object_id={})".format(self.object_id) + def __eq__(self, other): + if not other.is_NOT_A_PACKAGE(): + return False + if self.object_id != other.object_id: + return False + return True + @dataclass + class INCOMPATIBLE_UPGRADE: + """ + Package upgrade is incompatible with previous version +""" + + def __init__(self, ): + pass + + + + + def __str__(self): + return "PackageUpgradeError.INCOMPATIBLE_UPGRADE()".format() + def __eq__(self, other): + if not other.is_INCOMPATIBLE_UPGRADE(): + return False + return True - def object_id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id,self._uniffi_clone_pointer(),) - ) + @dataclass + class DIGEST_DOES_NOT_MATCH: + """ + Digest in upgrade ticket and computed digest differ +""" + + def __init__(self, digest:Digest): + self.digest = digest + + + pass + + + + + def __str__(self): + return "PackageUpgradeError.DIGEST_DOES_NOT_MATCH(digest={})".format(self.digest) + def __eq__(self, other): + if not other.is_DIGEST_DOES_NOT_MATCH(): + return False + if self.digest != other.digest: + return False + return True + @dataclass + class UNKNOWN_UPGRADE_POLICY: + """ + Upgrade policy is not valid +""" + + def __init__(self, policy:int): + self.policy = policy + + + pass + + + + + def __str__(self): + return "PackageUpgradeError.UNKNOWN_UPGRADE_POLICY(policy={})".format(self.policy) + def __eq__(self, other): + if not other.is_UNKNOWN_UPGRADE_POLICY(): + return False + if self.policy != other.policy: + return False + return True + @dataclass + class PACKAGE_ID_DOES_NOT_MATCH: + """ + PackageId does not matach PackageId in upgrade ticket +""" + + def __init__(self, package_id:ObjectId, ticket_id:ObjectId): + self.package_id = package_id + + + self.ticket_id = ticket_id + + + pass - def object_type(self, ) -> "ObjectType": - return _UniffiConverterTypeObjectType.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type,self._uniffi_clone_pointer(),) - ) + + + + + def __str__(self): + return "PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH(package_id={}, ticket_id={})".format(self.package_id, self.ticket_id) + def __eq__(self, other): + if not other.is_PACKAGE_ID_DOES_NOT_MATCH(): + return False + if self.package_id != other.package_id: + return False + if self.ticket_id != other.ticket_id: + return False + return True + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_UNABLE_TO_FETCH_PACKAGE(self) -> bool: + return isinstance(self, PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE) + def is_unable_to_fetch_package(self) -> bool: + return isinstance(self, PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE) + def is_NOT_A_PACKAGE(self) -> bool: + return isinstance(self, PackageUpgradeError.NOT_A_PACKAGE) + def is_not_a_package(self) -> bool: + return isinstance(self, PackageUpgradeError.NOT_A_PACKAGE) + def is_INCOMPATIBLE_UPGRADE(self) -> bool: + return isinstance(self, PackageUpgradeError.INCOMPATIBLE_UPGRADE) + def is_incompatible_upgrade(self) -> bool: + return isinstance(self, PackageUpgradeError.INCOMPATIBLE_UPGRADE) + def is_DIGEST_DOES_NOT_MATCH(self) -> bool: + return isinstance(self, PackageUpgradeError.DIGEST_DOES_NOT_MATCH) + def is_digest_does_not_match(self) -> bool: + return isinstance(self, PackageUpgradeError.DIGEST_DOES_NOT_MATCH) + def is_UNKNOWN_UPGRADE_POLICY(self) -> bool: + return isinstance(self, PackageUpgradeError.UNKNOWN_UPGRADE_POLICY) + def is_unknown_upgrade_policy(self) -> bool: + return isinstance(self, PackageUpgradeError.UNKNOWN_UPGRADE_POLICY) + def is_PACKAGE_ID_DOES_NOT_MATCH(self) -> bool: + return isinstance(self, PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH) + def is_package_id_does_not_match(self) -> bool: + return isinstance(self, PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH) + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE = type("PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE", (PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE, PackageUpgradeError,), {}) # type: ignore +PackageUpgradeError.NOT_A_PACKAGE = type("PackageUpgradeError.NOT_A_PACKAGE", (PackageUpgradeError.NOT_A_PACKAGE, PackageUpgradeError,), {}) # type: ignore +PackageUpgradeError.INCOMPATIBLE_UPGRADE = type("PackageUpgradeError.INCOMPATIBLE_UPGRADE", (PackageUpgradeError.INCOMPATIBLE_UPGRADE, PackageUpgradeError,), {}) # type: ignore +PackageUpgradeError.DIGEST_DOES_NOT_MATCH = type("PackageUpgradeError.DIGEST_DOES_NOT_MATCH", (PackageUpgradeError.DIGEST_DOES_NOT_MATCH, PackageUpgradeError,), {}) # type: ignore +PackageUpgradeError.UNKNOWN_UPGRADE_POLICY = type("PackageUpgradeError.UNKNOWN_UPGRADE_POLICY", (PackageUpgradeError.UNKNOWN_UPGRADE_POLICY, PackageUpgradeError,), {}) # type: ignore +PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH = type("PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH", (PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH, PackageUpgradeError,), {}) # type: ignore - def owner(self, ) -> "Owner": - return _UniffiConverterTypeOwner.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypePackageUpgradeError(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return PackageUpgradeError.UNABLE_TO_FETCH_PACKAGE( + _UniffiFfiConverterTypeObjectId.read(buf), + ) + if variant == 2: + return PackageUpgradeError.NOT_A_PACKAGE( + _UniffiFfiConverterTypeObjectId.read(buf), + ) + if variant == 3: + return PackageUpgradeError.INCOMPATIBLE_UPGRADE( + ) + if variant == 4: + return PackageUpgradeError.DIGEST_DOES_NOT_MATCH( + _UniffiFfiConverterTypeDigest.read(buf), + ) + if variant == 5: + return PackageUpgradeError.UNKNOWN_UPGRADE_POLICY( + _UniffiFfiConverterUInt8.read(buf), + ) + if variant == 6: + return PackageUpgradeError.PACKAGE_ID_DOES_NOT_MATCH( + _UniffiFfiConverterTypeObjectId.read(buf), + _UniffiFfiConverterTypeObjectId.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") + @staticmethod + def check_lower(value): + if value.is_UNABLE_TO_FETCH_PACKAGE(): + _UniffiFfiConverterTypeObjectId.check_lower(value.package_id) + return + if value.is_NOT_A_PACKAGE(): + _UniffiFfiConverterTypeObjectId.check_lower(value.object_id) + return + if value.is_INCOMPATIBLE_UPGRADE(): + return + if value.is_DIGEST_DOES_NOT_MATCH(): + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + return + if value.is_UNKNOWN_UPGRADE_POLICY(): + _UniffiFfiConverterUInt8.check_lower(value.policy) + return + if value.is_PACKAGE_ID_DOES_NOT_MATCH(): + _UniffiFfiConverterTypeObjectId.check_lower(value.package_id) + _UniffiFfiConverterTypeObjectId.check_lower(value.ticket_id) + return + raise ValueError(value) + @staticmethod + def write(value, buf): + if value.is_UNABLE_TO_FETCH_PACKAGE(): + buf.write_i32(1) + _UniffiFfiConverterTypeObjectId.write(value.package_id, buf) + if value.is_NOT_A_PACKAGE(): + buf.write_i32(2) + _UniffiFfiConverterTypeObjectId.write(value.object_id, buf) + if value.is_INCOMPATIBLE_UPGRADE(): + buf.write_i32(3) + if value.is_DIGEST_DOES_NOT_MATCH(): + buf.write_i32(4) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) + if value.is_UNKNOWN_UPGRADE_POLICY(): + buf.write_i32(5) + _UniffiFfiConverterUInt8.write(value.policy, buf) + if value.is_PACKAGE_ID_DOES_NOT_MATCH(): + buf.write_i32(6) + _UniffiFfiConverterTypeObjectId.write(value.package_id, buf) + _UniffiFfiConverterTypeObjectId.write(value.ticket_id, buf) - def version(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterSequenceTypeObjectId(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeObjectId.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeObjectId.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeObjectId.read(buf) for i in range(count) + ] -class _UniffiConverterTypeGenesisObject: - @staticmethod - def lift(value: int): - return GenesisObject._make_instance_(value) - @staticmethod - def check_lower(value: GenesisObject): - if not isinstance(value, GenesisObject): - raise TypeError("Expected GenesisObject instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: GenesisObjectProtocol): - if not isinstance(value, GenesisObject): - raise TypeError("Expected GenesisObject instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: GenesisObjectProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class GenesisTransactionProtocol(typing.Protocol): +class ExecutionError: """ - The genesis transaction + An error that can occur during the execution of a transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - genesis-transaction = (vector genesis-object) - ``` - """ - def events(self, ): - raise NotImplementedError - def objects(self, ): - raise NotImplementedError -# GenesisTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class GenesisTransaction(): - """ - The genesis transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: + execution-error = insufficient-gas + =/ invalid-gas-object + =/ invariant-violation + =/ feature-not-yet-supported + =/ object-too-big + =/ package-too-big + =/ circular-object-ownership + =/ insufficient-coin-balance + =/ coin-balance-overflow + =/ publish-error-non-zero-address + =/ iota-move-verification-error + =/ move-primitive-runtime-error + =/ move-abort + =/ vm-verification-or-deserialization-error + =/ vm-invariant-violation + =/ function-not-found + =/ arity-mismatch + =/ type-arity-mismatch + =/ non-entry-function-invoked + =/ command-argument-error + =/ type-argument-error + =/ unused-value-without-drop + =/ invalid-public-function-return-type + =/ invalid-transfer-object + =/ effects-too-large + =/ publish-upgrade-missing-dependency + =/ publish-upgrade-dependency-downgrade + =/ package-upgrade-error + =/ written-objects-too-large + =/ certificate-denied + =/ iota-move-verification-timeout + =/ shared-object-operation-not-allowed + =/ input-object-deleted + =/ execution-cancelled-due-to-shared-object-congestion + =/ address-denied-for-coin + =/ coin-type-global-pause + =/ execution-cancelled-due-to-randomness-unavailable - ```text - genesis-transaction = (vector genesis-object) + insufficient-gas = %x00 + invalid-gas-object = %x01 + invariant-violation = %x02 + feature-not-yet-supported = %x03 + object-too-big = %x04 u64 u64 + package-too-big = %x05 u64 u64 + circular-object-ownership = %x06 object-id + insufficient-coin-balance = %x07 + coin-balance-overflow = %x08 + publish-error-non-zero-address = %x09 + iota-move-verification-error = %x0a + move-primitive-runtime-error = %x0b (option move-location) + move-abort = %x0c move-location u64 + vm-verification-or-deserialization-error = %x0d + vm-invariant-violation = %x0e + function-not-found = %x0f + arity-mismatch = %x10 + type-arity-mismatch = %x11 + non-entry-function-invoked = %x12 + command-argument-error = %x13 u16 command-argument-error + type-argument-error = %x14 u16 type-argument-error + unused-value-without-drop = %x15 u16 u16 + invalid-public-function-return-type = %x16 u16 + invalid-transfer-object = %x17 + effects-too-large = %x18 u64 u64 + publish-upgrade-missing-dependency = %x19 + publish-upgrade-dependency-downgrade = %x1a + package-upgrade-error = %x1b package-upgrade-error + written-objects-too-large = %x1c u64 u64 + certificate-denied = %x1d + iota-move-verification-timeout = %x1e + shared-object-operation-not-allowed = %x1f + input-object-deleted = %x20 + execution-cancelled-due-to-shared-object-congestion = %x21 (vector object-id) + address-denied-for-coin = %x22 address string + coin-type-global-pause = %x23 string + execution-cancelled-due-to-randomness-unavailable = %x24 ``` - """ +""" + def __init__(self): + raise RuntimeError("ExecutionError cannot be instantiated directly") - _pointer: ctypes.c_void_p - def __init__(self, objects: "typing.List[GenesisObject]",events: "typing.List[Event]"): - _UniffiConverterSequenceTypeGenesisObject.check_lower(objects) - - _UniffiConverterSequenceTypeEvent.check_lower(events) + # Each enum variant is a nested class of the enum itself. + @dataclass + class INSUFFICIENT_GAS: + """ + Insufficient Gas +""" - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new, - _UniffiConverterSequenceTypeGenesisObject.lower(objects), - _UniffiConverterSequenceTypeEvent.lower(events)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def events(self, ) -> "typing.List[Event]": - return _UniffiConverterSequenceTypeEvent.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events,self._uniffi_clone_pointer(),) - ) - - - + def __init__(self, ): + pass + + + + + def __str__(self): + return "ExecutionError.INSUFFICIENT_GAS()".format() + def __eq__(self, other): + if not other.is_INSUFFICIENT_GAS(): + return False + return True - def objects(self, ) -> "typing.List[GenesisObject]": - return _UniffiConverterSequenceTypeGenesisObject.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects,self._uniffi_clone_pointer(),) - ) + @dataclass + class INVALID_GAS_OBJECT: + """ + Invalid Gas Object. +""" + + def __init__(self, ): + pass + + + + + def __str__(self): + return "ExecutionError.INVALID_GAS_OBJECT()".format() + def __eq__(self, other): + if not other.is_INVALID_GAS_OBJECT(): + return False + return True + @dataclass + class INVARIANT_VIOLATION: + """ + Invariant Violation +""" + + def __init__(self, ): + pass + + + + + def __str__(self): + return "ExecutionError.INVARIANT_VIOLATION()".format() + def __eq__(self, other): + if not other.is_INVARIANT_VIOLATION(): + return False + return True + @dataclass + class FEATURE_NOT_YET_SUPPORTED: + """ + Attempted to used feature that is not supported yet +""" + + def __init__(self, ): + pass + + + + + def __str__(self): + return "ExecutionError.FEATURE_NOT_YET_SUPPORTED()".format() + def __eq__(self, other): + if not other.is_FEATURE_NOT_YET_SUPPORTED(): + return False + return True -class _UniffiConverterTypeGenesisTransaction: + @dataclass + class OBJECT_TOO_BIG: + """ + Move object is larger than the maximum allowed size +""" + + def __init__(self, object_size:int, max_object_size:int): + self.object_size = object_size + + + self.max_object_size = max_object_size + + + pass - @staticmethod - def lift(value: int): - return GenesisTransaction._make_instance_(value) + + + + + def __str__(self): + return "ExecutionError.OBJECT_TOO_BIG(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) + def __eq__(self, other): + if not other.is_OBJECT_TOO_BIG(): + return False + if self.object_size != other.object_size: + return False + if self.max_object_size != other.max_object_size: + return False + return True - @staticmethod - def check_lower(value: GenesisTransaction): - if not isinstance(value, GenesisTransaction): - raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) + @dataclass + class PACKAGE_TOO_BIG: + """ + Package is larger than the maximum allowed size +""" + + def __init__(self, object_size:int, max_object_size:int): + self.object_size = object_size + + + self.max_object_size = max_object_size + + + pass - @staticmethod - def lower(value: GenesisTransactionProtocol): - if not isinstance(value, GenesisTransaction): - raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + + + + + def __str__(self): + return "ExecutionError.PACKAGE_TOO_BIG(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) + def __eq__(self, other): + if not other.is_PACKAGE_TOO_BIG(): + return False + if self.object_size != other.object_size: + return False + if self.max_object_size != other.max_object_size: + return False + return True - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + @dataclass + class CIRCULAR_OBJECT_OWNERSHIP: + """ + Circular Object Ownership +""" + + def __init__(self, object:ObjectId): + self.object = object + + + pass - @classmethod - def write(cls, value: GenesisTransactionProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class GraphQlClientProtocol(typing.Protocol): - """ - The GraphQL client for interacting with the IOTA blockchain. - """ + + + + + def __str__(self): + return "ExecutionError.CIRCULAR_OBJECT_OWNERSHIP(object={})".format(self.object) + def __eq__(self, other): + if not other.is_CIRCULAR_OBJECT_OWNERSHIP(): + return False + if self.object != other.object: + return False + return True - def active_validators(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get the list of active validators for the provided epoch, including - related metadata. If no epoch is provided, it will return the active - validators for the current epoch. + @dataclass + class INSUFFICIENT_COIN_BALANCE: """ + Insufficient coin balance for requested operation +""" + + def __init__(self, ): + pass - raise NotImplementedError - def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): - """ - Get the balance of all the coins owned by address for the provided coin - type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` - if not provided. - """ + + + + + def __str__(self): + return "ExecutionError.INSUFFICIENT_COIN_BALANCE()".format() + def __eq__(self, other): + if not other.is_INSUFFICIENT_COIN_BALANCE(): + return False + return True - raise NotImplementedError - def chain_id(self, ): - """ - Get the chain identifier. + @dataclass + class COIN_BALANCE_OVERFLOW: """ + Coin balance overflowed an u64 +""" + + def __init__(self, ): + pass - raise NotImplementedError - def checkpoint(self, digest: "typing.Union[object, typing.Optional[Digest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the [`CheckpointSummary`] for a given checkpoint digest or - checkpoint id. If none is provided, it will use the last known - checkpoint id. - """ + + + + + def __str__(self): + return "ExecutionError.COIN_BALANCE_OVERFLOW()".format() + def __eq__(self, other): + if not other.is_COIN_BALANCE_OVERFLOW(): + return False + return True - raise NotImplementedError - def checkpoints(self, pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get a page of [`CheckpointSummary`] for the provided parameters. + @dataclass + class PUBLISH_ERROR_NON_ZERO_ADDRESS: """ + Publish Error, Non-zero Address. + The modules in the package must have their self-addresses set to zero. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def coin_metadata(self, coin_type: "str"): - """ - Get the coin metadata for the coin type. - """ + + + + + def __str__(self): + return "ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS()".format() + def __eq__(self, other): + if not other.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): + return False + return True - raise NotImplementedError - def coins(self, owner: "Address",pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): + @dataclass + class IOTA_MOVE_VERIFICATION: """ - Get the list of coins for the specified address. + IOTA Move Bytecode Verification Error. +""" + + def __init__(self, ): + pass - If `coin_type` is not provided, it will default to `0x2::coin::Coin`, - which will return all coins. For IOTA coin, pass in the coin type: - `0x2::coin::Coin<0x2::iota::IOTA>`. - """ + + + + + def __str__(self): + return "ExecutionError.IOTA_MOVE_VERIFICATION()".format() + def __eq__(self, other): + if not other.is_IOTA_MOVE_VERIFICATION(): + return False + return True - raise NotImplementedError - def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): + @dataclass + class MOVE_PRIMITIVE_RUNTIME: """ - Dry run a [`Transaction`] and return the transaction effects and dry run - error (if any). + Error from a non-abort instruction. + Possible causes: + Arithmetic error, stack overflow, max value depth, etc." +""" + + def __init__(self, location:typing.Optional[MoveLocation]): + self.location = location + + + pass - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. - """ + + + + + def __str__(self): + return "ExecutionError.MOVE_PRIMITIVE_RUNTIME(location={})".format(self.location) + def __eq__(self, other): + if not other.is_MOVE_PRIMITIVE_RUNTIME(): + return False + if self.location != other.location: + return False + return True - raise NotImplementedError - def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): + @dataclass + class MOVE_ABORT: """ - Dry run a [`TransactionKind`] and return the transaction effects and dry - run error (if any). + Move runtime abort +""" + + def __init__(self, location:MoveLocation, code:int): + self.location = location + + + self.code = code + + + pass - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. + + + + + def __str__(self): + return "ExecutionError.MOVE_ABORT(location={}, code={})".format(self.location, self.code) + def __eq__(self, other): + if not other.is_MOVE_ABORT(): + return False + if self.location != other.location: + return False + if self.code != other.code: + return False + return True - `tx_meta` is the transaction metadata. + @dataclass + class VM_VERIFICATION_OR_DESERIALIZATION: """ + Bytecode verification error. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): + + + + + def __str__(self): + return "ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION()".format() + def __eq__(self, other): + if not other.is_VM_VERIFICATION_OR_DESERIALIZATION(): + return False + return True + + @dataclass + class VM_INVARIANT_VIOLATION: """ - Access a dynamic field on an object using its name. Names are arbitrary - Move values whose type have copy, drop, and store, and are specified - using their type, and their BCS contents, Base64 encoded. + MoveVm invariant violation +""" + + def __init__(self, ): + pass - The `name` argument is a json serialized type. + + + + + def __str__(self): + return "ExecutionError.VM_INVARIANT_VIOLATION()".format() + def __eq__(self, other): + if not other.is_VM_INVARIANT_VIOLATION(): + return False + return True - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + @dataclass + class FUNCTION_NOT_FOUND: + """ + Function not found +""" + + def __init__(self, ): + pass - # Example - ```rust,ignore + + + + + def __str__(self): + return "ExecutionError.FUNCTION_NOT_FOUND()".format() + def __eq__(self, other): + if not other.is_FUNCTION_NOT_FOUND(): + return False + return True + + @dataclass + class ARITY_MISMATCH: + """ + Arity mismatch for Move function. + The number of arguments does not match the number of parameters +""" + + def __init__(self, ): + pass - let client = iota_graphql_client::Client::new_devnet(); - let address = Address::from_str("0x5").unwrap(); - let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); + + + + + def __str__(self): + return "ExecutionError.ARITY_MISMATCH()".format() + def __eq__(self, other): + if not other.is_ARITY_MISMATCH(): + return False + return True - # alternatively, pass in the bcs bytes - let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); - let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); - ``` + @dataclass + class TYPE_ARITY_MISMATCH: """ + Type arity mismatch for Move function. + Mismatch between the number of actual versus expected type arguments. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def dynamic_fields(self, address: "Address",pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get a page of dynamic fields for the provided address. Note that this - will also fetch dynamic fields on wrapped objects. + + + + + def __str__(self): + return "ExecutionError.TYPE_ARITY_MISMATCH()".format() + def __eq__(self, other): + if not other.is_TYPE_ARITY_MISMATCH(): + return False + return True - This returns [`Page`] of [`DynamicFieldOutput`]s. + @dataclass + class NON_ENTRY_FUNCTION_INVOKED: """ + Non Entry Function Invoked. Move Call must start with an entry function. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): + + + + + def __str__(self): + return "ExecutionError.NON_ENTRY_FUNCTION_INVOKED()".format() + def __eq__(self, other): + if not other.is_NON_ENTRY_FUNCTION_INVOKED(): + return False + return True + + @dataclass + class COMMAND_ARGUMENT: """ - Access a dynamic object field on an object using its name. Names are - arbitrary Move values whose type have copy, drop, and store, and are - specified using their type, and their BCS contents, Base64 encoded. + Invalid command argument +""" + + def __init__(self, argument:int, kind:CommandArgumentError): + self.argument = argument + + + self.kind = kind + + + pass - The `name` argument is a json serialized type. + + + + + def __str__(self): + return "ExecutionError.COMMAND_ARGUMENT(argument={}, kind={})".format(self.argument, self.kind) + def __eq__(self, other): + if not other.is_COMMAND_ARGUMENT(): + return False + if self.argument != other.argument: + return False + if self.kind != other.kind: + return False + return True - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + @dataclass + class TYPE_ARGUMENT: """ + Type argument error +""" + + def __init__(self, type_argument:int, kind:TypeArgumentError): + self.type_argument = type_argument + + """ + Index of the problematic type argument +""" + + self.kind = kind + + + pass - raise NotImplementedError - def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the epoch information for the provided epoch. If no epoch is - provided, it will return the last known epoch. - """ + + + + + def __str__(self): + return "ExecutionError.TYPE_ARGUMENT(type_argument={}, kind={})".format(self.type_argument, self.kind) + def __eq__(self, other): + if not other.is_TYPE_ARGUMENT(): + return False + if self.type_argument != other.type_argument: + return False + if self.kind != other.kind: + return False + return True - raise NotImplementedError - def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the number of checkpoints in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). + @dataclass + class UNUSED_VALUE_WITHOUT_DROP: """ + Unused result without the drop ability. +""" + + def __init__(self, result:int, subresult:int): + self.result = result + + + self.subresult = subresult + + + pass - raise NotImplementedError - def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the number of transaction blocks in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ + + + + + def __str__(self): + return "ExecutionError.UNUSED_VALUE_WITHOUT_DROP(result={}, subresult={})".format(self.result, self.subresult) + def __eq__(self, other): + if not other.is_UNUSED_VALUE_WITHOUT_DROP(): + return False + if self.result != other.result: + return False + if self.subresult != other.subresult: + return False + return True - raise NotImplementedError - def events(self, filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Return a page of tuple (event, transaction digest) based on the - (optional) event filter. + @dataclass + class INVALID_PUBLIC_FUNCTION_RETURN_TYPE: """ + Invalid public Move function signature. + Unsupported return type for return value +""" + + def __init__(self, index:int): + self.index = index + + + pass - raise NotImplementedError - def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction"): - """ - Execute a transaction. - """ + + + + + def __str__(self): + return "ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE(index={})".format(self.index) + def __eq__(self, other): + if not other.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): + return False + if self.index != other.index: + return False + return True - raise NotImplementedError - def iota_names_default_name(self, address: "Address",format: "typing.Optional[NameFormat]"): - """ - Get the default name pointing to this address, if one exists. + @dataclass + class INVALID_TRANSFER_OBJECT: """ + Invalid Transfer Object, object does not have public transfer. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def iota_names_lookup(self, name: "str"): - """ - Return the resolved address for the given name. - """ + + + + + def __str__(self): + return "ExecutionError.INVALID_TRANSFER_OBJECT()".format() + def __eq__(self, other): + if not other.is_INVALID_TRANSFER_OBJECT(): + return False + return True - raise NotImplementedError - def iota_names_registrations(self, address: "Address",pagination_filter: "PaginationFilter"): - """ - Find all registration NFTs for the given address. + @dataclass + class EFFECTS_TOO_LARGE: """ + Effects from the transaction are too large +""" + + def __init__(self, current_size:int, max_size:int): + self.current_size = current_size + + + self.max_size = max_size + + + pass - raise NotImplementedError - def latest_checkpoint_sequence_number(self, ): - """ - Return the sequence number of the latest checkpoint that has been - executed. - """ + + + + + def __str__(self): + return "ExecutionError.EFFECTS_TOO_LARGE(current_size={}, max_size={})".format(self.current_size, self.max_size) + def __eq__(self, other): + if not other.is_EFFECTS_TOO_LARGE(): + return False + if self.current_size != other.current_size: + return False + if self.max_size != other.max_size: + return False + return True - raise NotImplementedError - def max_page_size(self, ): - """ - Lazily fetch the max page size + @dataclass + class PUBLISH_UPGRADE_MISSING_DEPENDENCY: """ + Publish or Upgrade is missing dependency +""" + + def __init__(self, ): + pass + + + + + + def __str__(self): + return "ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY()".format() + def __eq__(self, other): + if not other.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): + return False + return True - raise NotImplementedError - def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + @dataclass + class PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE: """ - Return the contents' JSON of an object that is a Move object. + Publish or Upgrade dependency downgrade. - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + Indirect (transitive) dependency of published or upgraded package has + been assigned an on-chain version that is less than the version + required by one of the package's transitive dependencies. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the BCS of an object that is a Move object. + + + + + def __str__(self): + return "ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE()".format() + def __eq__(self, other): + if not other.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): + return False + return True - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. + @dataclass + class PACKAGE_UPGRADE: """ + Invalid package upgrade +""" + + def __init__(self, kind:PackageUpgradeError): + self.kind = kind + + + pass - raise NotImplementedError - def normalized_move_function(self, package: "Address",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the normalized Move function data for the provided package, - module, and function. - """ + + + + + def __str__(self): + return "ExecutionError.PACKAGE_UPGRADE(kind={})".format(self.kind) + def __eq__(self, other): + if not other.is_PACKAGE_UPGRADE(): + return False + if self.kind != other.kind: + return False + return True - raise NotImplementedError - def normalized_move_module(self, package: "Address",module: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter_enums: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_friends: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_functions: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_structs: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Return the normalized Move module data for the provided module. + @dataclass + class WRITTEN_OBJECTS_TOO_LARGE: """ + Indicates the transaction tried to write objects too large to storage +""" + + def __init__(self, object_size:int, max_object_size:int): + self.object_size = object_size + + + self.max_object_size = max_object_size + + + pass - raise NotImplementedError - def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return an object based on the provided [`Address`]. + + + + + def __str__(self): + return "ExecutionError.WRITTEN_OBJECTS_TOO_LARGE(object_size={}, max_object_size={})".format(self.object_size, self.max_object_size) + def __eq__(self, other): + if not other.is_WRITTEN_OBJECTS_TOO_LARGE(): + return False + if self.object_size != other.object_size: + return False + if self.max_object_size != other.max_object_size: + return False + return True - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. + @dataclass + class CERTIFICATE_DENIED: """ + Certificate is on the deny list +""" + + def __init__(self, ): + pass - raise NotImplementedError - def object_bcs(self, object_id: "ObjectId"): - """ - Return the object's bcs content [`Vec`] based on the provided - [`Address`]. - """ + + + + + def __str__(self): + return "ExecutionError.CERTIFICATE_DENIED()".format() + def __eq__(self, other): + if not other.is_CERTIFICATE_DENIED(): + return False + return True - raise NotImplementedError - def objects(self, filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): + @dataclass + class IOTA_MOVE_VERIFICATION_TIMEOUT: """ - Return a page of objects based on the provided parameters. - - Use this function together with the [`ObjectFilter::owner`] to get the - objects owned by an address. - - # Example - - ```rust,ignore - let filter = ObjectFilter { - type_tag: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; + IOTA Move Bytecode verification timed out. +""" + + def __init__(self, ): + pass - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` - """ + + + + + def __str__(self): + return "ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT()".format() + def __eq__(self, other): + if not other.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): + return False + return True - raise NotImplementedError - def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + @dataclass + class SHARED_OBJECT_OPERATION_NOT_ALLOWED: """ - The package corresponding to the given address (at the optionally given - version). When no version is given, the package is loaded directly - from the address given. Otherwise, the address is translated before - loading to point to the package whose original ID matches - the package at address, but whose version is version. For non-system - packages, this might result in a different address than address - because different versions of a package, introduced by upgrades, - exist at distinct addresses. + The requested shared object operation is not allowed +""" + + def __init__(self, ): + pass - Note that this interpretation of version is different from a historical - object read (the interpretation of version for the object query). - """ + + + + + def __str__(self): + return "ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED()".format() + def __eq__(self, other): + if not other.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + return False + return True - raise NotImplementedError - def package_latest(self, address: "Address"): - """ - Fetch the latest version of the package at address. - This corresponds to the package with the highest version that shares its - original ID with the package at address. + @dataclass + class INPUT_OBJECT_DELETED: """ + Requested shared object has been deleted +""" + + def __init__(self, ): + pass - raise NotImplementedError - def package_versions(self, address: "Address",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Fetch all versions of package at address (packages that share this - package's original ID), optionally bounding the versions exclusively - from below with afterVersion, or from above with beforeVersion. - """ + + + + + def __str__(self): + return "ExecutionError.INPUT_OBJECT_DELETED()".format() + def __eq__(self, other): + if not other.is_INPUT_OBJECT_DELETED(): + return False + return True - raise NotImplementedError - def packages(self, after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): + @dataclass + class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION: """ - The Move packages that exist in the network, optionally filtered to be - strictly before beforeCheckpoint and/or strictly after - afterCheckpoint. + Certificate is cancelled due to congestion on shared objects +""" + + def __init__(self, congested_objects:typing.List[ObjectId]): + self.congested_objects = congested_objects + + + pass - This query returns all versions of a given user package that appear - between the specified checkpoints, but only records the latest - versions of system packages. - """ + + + + + def __str__(self): + return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(congested_objects={})".format(self.congested_objects) + def __eq__(self, other): + if not other.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): + return False + if self.congested_objects != other.congested_objects: + return False + return True - raise NotImplementedError - def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the protocol configuration. + @dataclass + class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2: """ + Certificate is cancelled due to congestion on shared objects; + suggested gas price can be used to give this certificate more priority. +""" + + def __init__(self, congested_objects:typing.List[ObjectId], suggested_gas_price:int): + self.congested_objects = congested_objects + + + self.suggested_gas_price = suggested_gas_price + + + pass - raise NotImplementedError - def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the reference gas price for the provided epoch or the last known one - if no epoch is provided. + + + + + def __str__(self): + return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(congested_objects={}, suggested_gas_price={})".format(self.congested_objects, self.suggested_gas_price) + def __eq__(self, other): + if not other.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): + return False + if self.congested_objects != other.congested_objects: + return False + if self.suggested_gas_price != other.suggested_gas_price: + return False + return True - This will return `Ok(None)` if the epoch requested is not available in - the GraphQL service (e.g., due to pruning). + @dataclass + class ADDRESS_DENIED_FOR_COIN: """ + Address is denied for this coin type +""" + + def __init__(self, address:Address, coin_type:str): + self.address = address + + + self.coin_type = coin_type + + + pass - raise NotImplementedError - def run_query(self, query: "Query"): - """ - Run a query. - """ + + + + + def __str__(self): + return "ExecutionError.ADDRESS_DENIED_FOR_COIN(address={}, coin_type={})".format(self.address, self.coin_type) + def __eq__(self, other): + if not other.is_ADDRESS_DENIED_FOR_COIN(): + return False + if self.address != other.address: + return False + if self.coin_type != other.coin_type: + return False + return True - raise NotImplementedError - def service_config(self, ): - """ - Get the GraphQL service configuration, including complexity limits, read - and mutation limits, supported versions, and others. + @dataclass + class COIN_TYPE_GLOBAL_PAUSE: """ + Coin type is globally paused for use +""" + + def __init__(self, coin_type:str): + self.coin_type = coin_type + + + pass - raise NotImplementedError - def set_rpc_server(self, server: "str"): - """ - Set the server address for the GraphQL GraphQL client. It should be a - valid URL with a host and optionally a port number. - """ + + + + + def __str__(self): + return "ExecutionError.COIN_TYPE_GLOBAL_PAUSE(coin_type={})".format(self.coin_type) + def __eq__(self, other): + if not other.is_COIN_TYPE_GLOBAL_PAUSE(): + return False + if self.coin_type != other.coin_type: + return False + return True - raise NotImplementedError - def total_supply(self, coin_type: "str"): - """ - Get total supply for the coin type. + @dataclass + class EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE: """ + Certificate is cancelled because randomness could not be generated this + epoch +""" + + def __init__(self, ): + pass - raise NotImplementedError - def total_transaction_blocks(self, ): - """ - The total number of transaction blocks in the network by the end of the - last known checkpoint. - """ + + + + + def __str__(self): + return "ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE()".format() + def __eq__(self, other): + if not other.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): + return False + return True - raise NotImplementedError - def total_transaction_blocks_by_digest(self, digest: "Digest"): - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint digest. + @dataclass + class INVALID_LINKAGE: """ + A valid linkage was unable to be determined for the transaction or one + of its commands. +""" + + def __init__(self, ): + pass - raise NotImplementedError - def total_transaction_blocks_by_seq_num(self, seq_num: "int"): - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint sequence number. - """ + + + + + def __str__(self): + return "ExecutionError.INVALID_LINKAGE()".format() + def __eq__(self, other): + if not other.is_INVALID_LINKAGE(): + return False + return True - raise NotImplementedError - def transaction(self, digest: "Digest"): - """ - Get a transaction by its digest. - """ + - raise NotImplementedError - def transaction_data_effects(self, digest: "Digest"): - """ - Get a transaction's data and effects by its digest. - """ + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_INSUFFICIENT_GAS(self) -> bool: + return isinstance(self, ExecutionError.INSUFFICIENT_GAS) + def is_insufficient_gas(self) -> bool: + return isinstance(self, ExecutionError.INSUFFICIENT_GAS) + def is_INVALID_GAS_OBJECT(self) -> bool: + return isinstance(self, ExecutionError.INVALID_GAS_OBJECT) + def is_invalid_gas_object(self) -> bool: + return isinstance(self, ExecutionError.INVALID_GAS_OBJECT) + def is_INVARIANT_VIOLATION(self) -> bool: + return isinstance(self, ExecutionError.INVARIANT_VIOLATION) + def is_invariant_violation(self) -> bool: + return isinstance(self, ExecutionError.INVARIANT_VIOLATION) + def is_FEATURE_NOT_YET_SUPPORTED(self) -> bool: + return isinstance(self, ExecutionError.FEATURE_NOT_YET_SUPPORTED) + def is_feature_not_yet_supported(self) -> bool: + return isinstance(self, ExecutionError.FEATURE_NOT_YET_SUPPORTED) + def is_OBJECT_TOO_BIG(self) -> bool: + return isinstance(self, ExecutionError.OBJECT_TOO_BIG) + def is_object_too_big(self) -> bool: + return isinstance(self, ExecutionError.OBJECT_TOO_BIG) + def is_PACKAGE_TOO_BIG(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_TOO_BIG) + def is_package_too_big(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_TOO_BIG) + def is_CIRCULAR_OBJECT_OWNERSHIP(self) -> bool: + return isinstance(self, ExecutionError.CIRCULAR_OBJECT_OWNERSHIP) + def is_circular_object_ownership(self) -> bool: + return isinstance(self, ExecutionError.CIRCULAR_OBJECT_OWNERSHIP) + def is_INSUFFICIENT_COIN_BALANCE(self) -> bool: + return isinstance(self, ExecutionError.INSUFFICIENT_COIN_BALANCE) + def is_insufficient_coin_balance(self) -> bool: + return isinstance(self, ExecutionError.INSUFFICIENT_COIN_BALANCE) + def is_COIN_BALANCE_OVERFLOW(self) -> bool: + return isinstance(self, ExecutionError.COIN_BALANCE_OVERFLOW) + def is_coin_balance_overflow(self) -> bool: + return isinstance(self, ExecutionError.COIN_BALANCE_OVERFLOW) + def is_PUBLISH_ERROR_NON_ZERO_ADDRESS(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) + def is_publish_error_non_zero_address(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) + def is_IOTA_MOVE_VERIFICATION(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) + def is_iota_move_verification(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) + def is_MOVE_PRIMITIVE_RUNTIME(self) -> bool: + return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) + def is_move_primitive_runtime(self) -> bool: + return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) + def is_MOVE_ABORT(self) -> bool: + return isinstance(self, ExecutionError.MOVE_ABORT) + def is_move_abort(self) -> bool: + return isinstance(self, ExecutionError.MOVE_ABORT) + def is_VM_VERIFICATION_OR_DESERIALIZATION(self) -> bool: + return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) + def is_vm_verification_or_deserialization(self) -> bool: + return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) + def is_VM_INVARIANT_VIOLATION(self) -> bool: + return isinstance(self, ExecutionError.VM_INVARIANT_VIOLATION) + def is_vm_invariant_violation(self) -> bool: + return isinstance(self, ExecutionError.VM_INVARIANT_VIOLATION) + def is_FUNCTION_NOT_FOUND(self) -> bool: + return isinstance(self, ExecutionError.FUNCTION_NOT_FOUND) + def is_function_not_found(self) -> bool: + return isinstance(self, ExecutionError.FUNCTION_NOT_FOUND) + def is_ARITY_MISMATCH(self) -> bool: + return isinstance(self, ExecutionError.ARITY_MISMATCH) + def is_arity_mismatch(self) -> bool: + return isinstance(self, ExecutionError.ARITY_MISMATCH) + def is_TYPE_ARITY_MISMATCH(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARITY_MISMATCH) + def is_type_arity_mismatch(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARITY_MISMATCH) + def is_NON_ENTRY_FUNCTION_INVOKED(self) -> bool: + return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) + def is_non_entry_function_invoked(self) -> bool: + return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) + def is_COMMAND_ARGUMENT(self) -> bool: + return isinstance(self, ExecutionError.COMMAND_ARGUMENT) + def is_command_argument(self) -> bool: + return isinstance(self, ExecutionError.COMMAND_ARGUMENT) + def is_TYPE_ARGUMENT(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARGUMENT) + def is_type_argument(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARGUMENT) + def is_UNUSED_VALUE_WITHOUT_DROP(self) -> bool: + return isinstance(self, ExecutionError.UNUSED_VALUE_WITHOUT_DROP) + def is_unused_value_without_drop(self) -> bool: + return isinstance(self, ExecutionError.UNUSED_VALUE_WITHOUT_DROP) + def is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(self) -> bool: + return isinstance(self, ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE) + def is_invalid_public_function_return_type(self) -> bool: + return isinstance(self, ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE) + def is_INVALID_TRANSFER_OBJECT(self) -> bool: + return isinstance(self, ExecutionError.INVALID_TRANSFER_OBJECT) + def is_invalid_transfer_object(self) -> bool: + return isinstance(self, ExecutionError.INVALID_TRANSFER_OBJECT) + def is_EFFECTS_TOO_LARGE(self) -> bool: + return isinstance(self, ExecutionError.EFFECTS_TOO_LARGE) + def is_effects_too_large(self) -> bool: + return isinstance(self, ExecutionError.EFFECTS_TOO_LARGE) + def is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY) + def is_publish_upgrade_missing_dependency(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY) + def is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) + def is_publish_upgrade_dependency_downgrade(self) -> bool: + return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) + def is_PACKAGE_UPGRADE(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_UPGRADE) + def is_package_upgrade(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_UPGRADE) + def is_WRITTEN_OBJECTS_TOO_LARGE(self) -> bool: + return isinstance(self, ExecutionError.WRITTEN_OBJECTS_TOO_LARGE) + def is_written_objects_too_large(self) -> bool: + return isinstance(self, ExecutionError.WRITTEN_OBJECTS_TOO_LARGE) + def is_CERTIFICATE_DENIED(self) -> bool: + return isinstance(self, ExecutionError.CERTIFICATE_DENIED) + def is_certificate_denied(self) -> bool: + return isinstance(self, ExecutionError.CERTIFICATE_DENIED) + def is_IOTA_MOVE_VERIFICATION_TIMEOUT(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT) + def is_iota_move_verification_timeout(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT) + def is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(self) -> bool: + return isinstance(self, ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) + def is_shared_object_operation_not_allowed(self) -> bool: + return isinstance(self, ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED) + def is_INPUT_OBJECT_DELETED(self) -> bool: + return isinstance(self, ExecutionError.INPUT_OBJECT_DELETED) + def is_input_object_deleted(self) -> bool: + return isinstance(self, ExecutionError.INPUT_OBJECT_DELETED) + def is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION) + def is_execution_cancelled_due_to_shared_object_congestion(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION) + def is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2) + def is_execution_cancelled_due_to_shared_object_congestion_v2(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2) + def is_ADDRESS_DENIED_FOR_COIN(self) -> bool: + return isinstance(self, ExecutionError.ADDRESS_DENIED_FOR_COIN) + def is_address_denied_for_coin(self) -> bool: + return isinstance(self, ExecutionError.ADDRESS_DENIED_FOR_COIN) + def is_COIN_TYPE_GLOBAL_PAUSE(self) -> bool: + return isinstance(self, ExecutionError.COIN_TYPE_GLOBAL_PAUSE) + def is_coin_type_global_pause(self) -> bool: + return isinstance(self, ExecutionError.COIN_TYPE_GLOBAL_PAUSE) + def is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE) + def is_execution_cancelled_due_to_randomness_unavailable(self) -> bool: + return isinstance(self, ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE) + def is_INVALID_LINKAGE(self) -> bool: + return isinstance(self, ExecutionError.INVALID_LINKAGE) + def is_invalid_linkage(self) -> bool: + return isinstance(self, ExecutionError.INVALID_LINKAGE) + - raise NotImplementedError - def transaction_effects(self, digest: "Digest"): - """ - Get a transaction's effects by its digest. - """ +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +ExecutionError.INSUFFICIENT_GAS = type("ExecutionError.INSUFFICIENT_GAS", (ExecutionError.INSUFFICIENT_GAS, ExecutionError,), {}) # type: ignore +ExecutionError.INVALID_GAS_OBJECT = type("ExecutionError.INVALID_GAS_OBJECT", (ExecutionError.INVALID_GAS_OBJECT, ExecutionError,), {}) # type: ignore +ExecutionError.INVARIANT_VIOLATION = type("ExecutionError.INVARIANT_VIOLATION", (ExecutionError.INVARIANT_VIOLATION, ExecutionError,), {}) # type: ignore +ExecutionError.FEATURE_NOT_YET_SUPPORTED = type("ExecutionError.FEATURE_NOT_YET_SUPPORTED", (ExecutionError.FEATURE_NOT_YET_SUPPORTED, ExecutionError,), {}) # type: ignore +ExecutionError.OBJECT_TOO_BIG = type("ExecutionError.OBJECT_TOO_BIG", (ExecutionError.OBJECT_TOO_BIG, ExecutionError,), {}) # type: ignore +ExecutionError.PACKAGE_TOO_BIG = type("ExecutionError.PACKAGE_TOO_BIG", (ExecutionError.PACKAGE_TOO_BIG, ExecutionError,), {}) # type: ignore +ExecutionError.CIRCULAR_OBJECT_OWNERSHIP = type("ExecutionError.CIRCULAR_OBJECT_OWNERSHIP", (ExecutionError.CIRCULAR_OBJECT_OWNERSHIP, ExecutionError,), {}) # type: ignore +ExecutionError.INSUFFICIENT_COIN_BALANCE = type("ExecutionError.INSUFFICIENT_COIN_BALANCE", (ExecutionError.INSUFFICIENT_COIN_BALANCE, ExecutionError,), {}) # type: ignore +ExecutionError.COIN_BALANCE_OVERFLOW = type("ExecutionError.COIN_BALANCE_OVERFLOW", (ExecutionError.COIN_BALANCE_OVERFLOW, ExecutionError,), {}) # type: ignore +ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS = type("ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS", (ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS, ExecutionError,), {}) # type: ignore +ExecutionError.IOTA_MOVE_VERIFICATION = type("ExecutionError.IOTA_MOVE_VERIFICATION", (ExecutionError.IOTA_MOVE_VERIFICATION, ExecutionError,), {}) # type: ignore +ExecutionError.MOVE_PRIMITIVE_RUNTIME = type("ExecutionError.MOVE_PRIMITIVE_RUNTIME", (ExecutionError.MOVE_PRIMITIVE_RUNTIME, ExecutionError,), {}) # type: ignore +ExecutionError.MOVE_ABORT = type("ExecutionError.MOVE_ABORT", (ExecutionError.MOVE_ABORT, ExecutionError,), {}) # type: ignore +ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION = type("ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION", (ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION, ExecutionError,), {}) # type: ignore +ExecutionError.VM_INVARIANT_VIOLATION = type("ExecutionError.VM_INVARIANT_VIOLATION", (ExecutionError.VM_INVARIANT_VIOLATION, ExecutionError,), {}) # type: ignore +ExecutionError.FUNCTION_NOT_FOUND = type("ExecutionError.FUNCTION_NOT_FOUND", (ExecutionError.FUNCTION_NOT_FOUND, ExecutionError,), {}) # type: ignore +ExecutionError.ARITY_MISMATCH = type("ExecutionError.ARITY_MISMATCH", (ExecutionError.ARITY_MISMATCH, ExecutionError,), {}) # type: ignore +ExecutionError.TYPE_ARITY_MISMATCH = type("ExecutionError.TYPE_ARITY_MISMATCH", (ExecutionError.TYPE_ARITY_MISMATCH, ExecutionError,), {}) # type: ignore +ExecutionError.NON_ENTRY_FUNCTION_INVOKED = type("ExecutionError.NON_ENTRY_FUNCTION_INVOKED", (ExecutionError.NON_ENTRY_FUNCTION_INVOKED, ExecutionError,), {}) # type: ignore +ExecutionError.COMMAND_ARGUMENT = type("ExecutionError.COMMAND_ARGUMENT", (ExecutionError.COMMAND_ARGUMENT, ExecutionError,), {}) # type: ignore +ExecutionError.TYPE_ARGUMENT = type("ExecutionError.TYPE_ARGUMENT", (ExecutionError.TYPE_ARGUMENT, ExecutionError,), {}) # type: ignore +ExecutionError.UNUSED_VALUE_WITHOUT_DROP = type("ExecutionError.UNUSED_VALUE_WITHOUT_DROP", (ExecutionError.UNUSED_VALUE_WITHOUT_DROP, ExecutionError,), {}) # type: ignore +ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE = type("ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE", (ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE, ExecutionError,), {}) # type: ignore +ExecutionError.INVALID_TRANSFER_OBJECT = type("ExecutionError.INVALID_TRANSFER_OBJECT", (ExecutionError.INVALID_TRANSFER_OBJECT, ExecutionError,), {}) # type: ignore +ExecutionError.EFFECTS_TOO_LARGE = type("ExecutionError.EFFECTS_TOO_LARGE", (ExecutionError.EFFECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore +ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY = type("ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY", (ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY, ExecutionError,), {}) # type: ignore +ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE = type("ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE", (ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE, ExecutionError,), {}) # type: ignore +ExecutionError.PACKAGE_UPGRADE = type("ExecutionError.PACKAGE_UPGRADE", (ExecutionError.PACKAGE_UPGRADE, ExecutionError,), {}) # type: ignore +ExecutionError.WRITTEN_OBJECTS_TOO_LARGE = type("ExecutionError.WRITTEN_OBJECTS_TOO_LARGE", (ExecutionError.WRITTEN_OBJECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore +ExecutionError.CERTIFICATE_DENIED = type("ExecutionError.CERTIFICATE_DENIED", (ExecutionError.CERTIFICATE_DENIED, ExecutionError,), {}) # type: ignore +ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT = type("ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT", (ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT, ExecutionError,), {}) # type: ignore +ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED = type("ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED", (ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED, ExecutionError,), {}) # type: ignore +ExecutionError.INPUT_OBJECT_DELETED = type("ExecutionError.INPUT_OBJECT_DELETED", (ExecutionError.INPUT_OBJECT_DELETED, ExecutionError,), {}) # type: ignore +ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION, ExecutionError,), {}) # type: ignore +ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2 = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2, ExecutionError,), {}) # type: ignore +ExecutionError.ADDRESS_DENIED_FOR_COIN = type("ExecutionError.ADDRESS_DENIED_FOR_COIN", (ExecutionError.ADDRESS_DENIED_FOR_COIN, ExecutionError,), {}) # type: ignore +ExecutionError.COIN_TYPE_GLOBAL_PAUSE = type("ExecutionError.COIN_TYPE_GLOBAL_PAUSE", (ExecutionError.COIN_TYPE_GLOBAL_PAUSE, ExecutionError,), {}) # type: ignore +ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE = type("ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE", (ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE, ExecutionError,), {}) # type: ignore +ExecutionError.INVALID_LINKAGE = type("ExecutionError.INVALID_LINKAGE", (ExecutionError.INVALID_LINKAGE, ExecutionError,), {}) # type: ignore - raise NotImplementedError - def transactions(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get a page of transactions based on the provided filters. - """ - raise NotImplementedError - def transactions_data_effects(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get a page of transactions' data and effects based on the provided - filters. - """ - raise NotImplementedError - def transactions_effects(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT): - """ - Get a page of transactions' effects based on the provided filters. - """ - raise NotImplementedError -# GraphQlClient is a Rust-only trait - it's a wrapper around a Rust implementation. -class GraphQlClient(): - """ - The GraphQL client for interacting with the IOTA blockchain. - """ +class _UniffiFfiConverterTypeExecutionError(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return ExecutionError.INSUFFICIENT_GAS( + ) + if variant == 2: + return ExecutionError.INVALID_GAS_OBJECT( + ) + if variant == 3: + return ExecutionError.INVARIANT_VIOLATION( + ) + if variant == 4: + return ExecutionError.FEATURE_NOT_YET_SUPPORTED( + ) + if variant == 5: + return ExecutionError.OBJECT_TOO_BIG( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 6: + return ExecutionError.PACKAGE_TOO_BIG( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 7: + return ExecutionError.CIRCULAR_OBJECT_OWNERSHIP( + _UniffiFfiConverterTypeObjectId.read(buf), + ) + if variant == 8: + return ExecutionError.INSUFFICIENT_COIN_BALANCE( + ) + if variant == 9: + return ExecutionError.COIN_BALANCE_OVERFLOW( + ) + if variant == 10: + return ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS( + ) + if variant == 11: + return ExecutionError.IOTA_MOVE_VERIFICATION( + ) + if variant == 12: + return ExecutionError.MOVE_PRIMITIVE_RUNTIME( + _UniffiFfiConverterOptionalTypeMoveLocation.read(buf), + ) + if variant == 13: + return ExecutionError.MOVE_ABORT( + _UniffiFfiConverterTypeMoveLocation.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 14: + return ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION( + ) + if variant == 15: + return ExecutionError.VM_INVARIANT_VIOLATION( + ) + if variant == 16: + return ExecutionError.FUNCTION_NOT_FOUND( + ) + if variant == 17: + return ExecutionError.ARITY_MISMATCH( + ) + if variant == 18: + return ExecutionError.TYPE_ARITY_MISMATCH( + ) + if variant == 19: + return ExecutionError.NON_ENTRY_FUNCTION_INVOKED( + ) + if variant == 20: + return ExecutionError.COMMAND_ARGUMENT( + _UniffiFfiConverterUInt16.read(buf), + _UniffiFfiConverterTypeCommandArgumentError.read(buf), + ) + if variant == 21: + return ExecutionError.TYPE_ARGUMENT( + _UniffiFfiConverterUInt16.read(buf), + _UniffiFfiConverterTypeTypeArgumentError.read(buf), + ) + if variant == 22: + return ExecutionError.UNUSED_VALUE_WITHOUT_DROP( + _UniffiFfiConverterUInt16.read(buf), + _UniffiFfiConverterUInt16.read(buf), + ) + if variant == 23: + return ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE( + _UniffiFfiConverterUInt16.read(buf), + ) + if variant == 24: + return ExecutionError.INVALID_TRANSFER_OBJECT( + ) + if variant == 25: + return ExecutionError.EFFECTS_TOO_LARGE( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 26: + return ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY( + ) + if variant == 27: + return ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE( + ) + if variant == 28: + return ExecutionError.PACKAGE_UPGRADE( + _UniffiFfiConverterTypePackageUpgradeError.read(buf), + ) + if variant == 29: + return ExecutionError.WRITTEN_OBJECTS_TOO_LARGE( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 30: + return ExecutionError.CERTIFICATE_DENIED( + ) + if variant == 31: + return ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT( + ) + if variant == 32: + return ExecutionError.SHARED_OBJECT_OPERATION_NOT_ALLOWED( + ) + if variant == 33: + return ExecutionError.INPUT_OBJECT_DELETED( + ) + if variant == 34: + return ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION( + _UniffiFfiConverterSequenceTypeObjectId.read(buf), + ) + if variant == 35: + return ExecutionError.EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2( + _UniffiFfiConverterSequenceTypeObjectId.read(buf), + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 36: + return ExecutionError.ADDRESS_DENIED_FOR_COIN( + _UniffiFfiConverterTypeAddress.read(buf), + _UniffiFfiConverterString.read(buf), + ) + if variant == 37: + return ExecutionError.COIN_TYPE_GLOBAL_PAUSE( + _UniffiFfiConverterString.read(buf), + ) + if variant == 38: + return ExecutionError.EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE( + ) + if variant == 39: + return ExecutionError.INVALID_LINKAGE( + ) + raise InternalError("Raw enum value doesn't match any cases") - _pointer: ctypes.c_void_p - def __init__(self, server: "str"): - """ - Create a new GraphQL client with the provided server address. - """ + @staticmethod + def check_lower(value): + if value.is_INSUFFICIENT_GAS(): + return + if value.is_INVALID_GAS_OBJECT(): + return + if value.is_INVARIANT_VIOLATION(): + return + if value.is_FEATURE_NOT_YET_SUPPORTED(): + return + if value.is_OBJECT_TOO_BIG(): + _UniffiFfiConverterUInt64.check_lower(value.object_size) + _UniffiFfiConverterUInt64.check_lower(value.max_object_size) + return + if value.is_PACKAGE_TOO_BIG(): + _UniffiFfiConverterUInt64.check_lower(value.object_size) + _UniffiFfiConverterUInt64.check_lower(value.max_object_size) + return + if value.is_CIRCULAR_OBJECT_OWNERSHIP(): + _UniffiFfiConverterTypeObjectId.check_lower(value.object) + return + if value.is_INSUFFICIENT_COIN_BALANCE(): + return + if value.is_COIN_BALANCE_OVERFLOW(): + return + if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): + return + if value.is_IOTA_MOVE_VERIFICATION(): + return + if value.is_MOVE_PRIMITIVE_RUNTIME(): + _UniffiFfiConverterOptionalTypeMoveLocation.check_lower(value.location) + return + if value.is_MOVE_ABORT(): + _UniffiFfiConverterTypeMoveLocation.check_lower(value.location) + _UniffiFfiConverterUInt64.check_lower(value.code) + return + if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): + return + if value.is_VM_INVARIANT_VIOLATION(): + return + if value.is_FUNCTION_NOT_FOUND(): + return + if value.is_ARITY_MISMATCH(): + return + if value.is_TYPE_ARITY_MISMATCH(): + return + if value.is_NON_ENTRY_FUNCTION_INVOKED(): + return + if value.is_COMMAND_ARGUMENT(): + _UniffiFfiConverterUInt16.check_lower(value.argument) + _UniffiFfiConverterTypeCommandArgumentError.check_lower(value.kind) + return + if value.is_TYPE_ARGUMENT(): + _UniffiFfiConverterUInt16.check_lower(value.type_argument) + _UniffiFfiConverterTypeTypeArgumentError.check_lower(value.kind) + return + if value.is_UNUSED_VALUE_WITHOUT_DROP(): + _UniffiFfiConverterUInt16.check_lower(value.result) + _UniffiFfiConverterUInt16.check_lower(value.subresult) + return + if value.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): + _UniffiFfiConverterUInt16.check_lower(value.index) + return + if value.is_INVALID_TRANSFER_OBJECT(): + return + if value.is_EFFECTS_TOO_LARGE(): + _UniffiFfiConverterUInt64.check_lower(value.current_size) + _UniffiFfiConverterUInt64.check_lower(value.max_size) + return + if value.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): + return + if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): + return + if value.is_PACKAGE_UPGRADE(): + _UniffiFfiConverterTypePackageUpgradeError.check_lower(value.kind) + return + if value.is_WRITTEN_OBJECTS_TOO_LARGE(): + _UniffiFfiConverterUInt64.check_lower(value.object_size) + _UniffiFfiConverterUInt64.check_lower(value.max_object_size) + return + if value.is_CERTIFICATE_DENIED(): + return + if value.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): + return + if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + return + if value.is_INPUT_OBJECT_DELETED(): + return + if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): + _UniffiFfiConverterSequenceTypeObjectId.check_lower(value.congested_objects) + return + if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): + _UniffiFfiConverterSequenceTypeObjectId.check_lower(value.congested_objects) + _UniffiFfiConverterUInt64.check_lower(value.suggested_gas_price) + return + if value.is_ADDRESS_DENIED_FOR_COIN(): + _UniffiFfiConverterTypeAddress.check_lower(value.address) + _UniffiFfiConverterString.check_lower(value.coin_type) + return + if value.is_COIN_TYPE_GLOBAL_PAUSE(): + _UniffiFfiConverterString.check_lower(value.coin_type) + return + if value.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): + return + if value.is_INVALID_LINKAGE(): + return + raise ValueError(value) - _UniffiConverterString.check_lower(server) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new, - _UniffiConverterString.lower(server)) + @staticmethod + def write(value, buf): + if value.is_INSUFFICIENT_GAS(): + buf.write_i32(1) + if value.is_INVALID_GAS_OBJECT(): + buf.write_i32(2) + if value.is_INVARIANT_VIOLATION(): + buf.write_i32(3) + if value.is_FEATURE_NOT_YET_SUPPORTED(): + buf.write_i32(4) + if value.is_OBJECT_TOO_BIG(): + buf.write_i32(5) + _UniffiFfiConverterUInt64.write(value.object_size, buf) + _UniffiFfiConverterUInt64.write(value.max_object_size, buf) + if value.is_PACKAGE_TOO_BIG(): + buf.write_i32(6) + _UniffiFfiConverterUInt64.write(value.object_size, buf) + _UniffiFfiConverterUInt64.write(value.max_object_size, buf) + if value.is_CIRCULAR_OBJECT_OWNERSHIP(): + buf.write_i32(7) + _UniffiFfiConverterTypeObjectId.write(value.object, buf) + if value.is_INSUFFICIENT_COIN_BALANCE(): + buf.write_i32(8) + if value.is_COIN_BALANCE_OVERFLOW(): + buf.write_i32(9) + if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): + buf.write_i32(10) + if value.is_IOTA_MOVE_VERIFICATION(): + buf.write_i32(11) + if value.is_MOVE_PRIMITIVE_RUNTIME(): + buf.write_i32(12) + _UniffiFfiConverterOptionalTypeMoveLocation.write(value.location, buf) + if value.is_MOVE_ABORT(): + buf.write_i32(13) + _UniffiFfiConverterTypeMoveLocation.write(value.location, buf) + _UniffiFfiConverterUInt64.write(value.code, buf) + if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): + buf.write_i32(14) + if value.is_VM_INVARIANT_VIOLATION(): + buf.write_i32(15) + if value.is_FUNCTION_NOT_FOUND(): + buf.write_i32(16) + if value.is_ARITY_MISMATCH(): + buf.write_i32(17) + if value.is_TYPE_ARITY_MISMATCH(): + buf.write_i32(18) + if value.is_NON_ENTRY_FUNCTION_INVOKED(): + buf.write_i32(19) + if value.is_COMMAND_ARGUMENT(): + buf.write_i32(20) + _UniffiFfiConverterUInt16.write(value.argument, buf) + _UniffiFfiConverterTypeCommandArgumentError.write(value.kind, buf) + if value.is_TYPE_ARGUMENT(): + buf.write_i32(21) + _UniffiFfiConverterUInt16.write(value.type_argument, buf) + _UniffiFfiConverterTypeTypeArgumentError.write(value.kind, buf) + if value.is_UNUSED_VALUE_WITHOUT_DROP(): + buf.write_i32(22) + _UniffiFfiConverterUInt16.write(value.result, buf) + _UniffiFfiConverterUInt16.write(value.subresult, buf) + if value.is_INVALID_PUBLIC_FUNCTION_RETURN_TYPE(): + buf.write_i32(23) + _UniffiFfiConverterUInt16.write(value.index, buf) + if value.is_INVALID_TRANSFER_OBJECT(): + buf.write_i32(24) + if value.is_EFFECTS_TOO_LARGE(): + buf.write_i32(25) + _UniffiFfiConverterUInt64.write(value.current_size, buf) + _UniffiFfiConverterUInt64.write(value.max_size, buf) + if value.is_PUBLISH_UPGRADE_MISSING_DEPENDENCY(): + buf.write_i32(26) + if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): + buf.write_i32(27) + if value.is_PACKAGE_UPGRADE(): + buf.write_i32(28) + _UniffiFfiConverterTypePackageUpgradeError.write(value.kind, buf) + if value.is_WRITTEN_OBJECTS_TOO_LARGE(): + buf.write_i32(29) + _UniffiFfiConverterUInt64.write(value.object_size, buf) + _UniffiFfiConverterUInt64.write(value.max_object_size, buf) + if value.is_CERTIFICATE_DENIED(): + buf.write_i32(30) + if value.is_IOTA_MOVE_VERIFICATION_TIMEOUT(): + buf.write_i32(31) + if value.is_SHARED_OBJECT_OPERATION_NOT_ALLOWED(): + buf.write_i32(32) + if value.is_INPUT_OBJECT_DELETED(): + buf.write_i32(33) + if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION(): + buf.write_i32(34) + _UniffiFfiConverterSequenceTypeObjectId.write(value.congested_objects, buf) + if value.is_EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2(): + buf.write_i32(35) + _UniffiFfiConverterSequenceTypeObjectId.write(value.congested_objects, buf) + _UniffiFfiConverterUInt64.write(value.suggested_gas_price, buf) + if value.is_ADDRESS_DENIED_FOR_COIN(): + buf.write_i32(36) + _UniffiFfiConverterTypeAddress.write(value.address, buf) + _UniffiFfiConverterString.write(value.coin_type, buf) + if value.is_COIN_TYPE_GLOBAL_PAUSE(): + buf.write_i32(37) + _UniffiFfiConverterString.write(value.coin_type, buf) + if value.is_EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE(): + buf.write_i32(38) + if value.is_INVALID_LINKAGE(): + buf.write_i32(39) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient, self._pointer) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def new_devnet(cls, ): - """ - Create a new GraphQL client connected to the `devnet` GraphQL server: - {DEVNET_HOST}. - """ - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet,) - return cls._make_instance_(pointer) - @classmethod - def new_localnet(cls, ): - """ - Create a new GraphQL client connected to the `localhost` GraphQL server: - {DEFAULT_LOCAL_HOST}. - """ - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet,) - return cls._make_instance_(pointer) - @classmethod - def new_mainnet(cls, ): - """ - Create a new GraphQL client connected to the `mainnet` GraphQL server: - {MAINNET_HOST}. - """ - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet,) - return cls._make_instance_(pointer) +class ExecutionStatus: + """ + The status of an executed Transaction - @classmethod - def new_testnet(cls, ): - """ - Create a new GraphQL client connected to the `testnet` GraphQL server: - {TESTNET_HOST}. - """ + # BCS - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet,) - return cls._make_instance_(pointer) + The BCS serialized form for this type is defined by the following ABNF: + ```text + execution-status = success / failure + success = %x00 + failure = %x01 execution-error (option u64) + ```xx +""" + def __init__(self): + raise RuntimeError("ExecutionStatus cannot be instantiated directly") - async def active_validators(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "ValidatorPage": - """ - Get the list of active validators for the provided epoch, including - related metadata. If no epoch is provided, it will return the active - validators for the current epoch. + # Each enum variant is a nested class of the enum itself. + @dataclass + class SUCCESS: """ - - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + The Transaction successfully executed. +""" - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeValidatorPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - - - async def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Get the balance of all the coins owned by address for the provided coin - type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` - if not provided. - """ + def __init__(self, ): + pass - _UniffiConverterTypeAddress.check_lower(address) - - if coin_type is _DEFAULT: - coin_type = None - _UniffiConverterOptionalString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, + - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - - - async def chain_id(self, ) -> "str": - """ - Get the chain identifier. - """ - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterString.lift, - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - + + def __str__(self): + return "ExecutionStatus.SUCCESS()".format() + def __eq__(self, other): + if not other.is_SUCCESS(): + return False + return True - async def checkpoint(self, digest: "typing.Union[object, typing.Optional[Digest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[CheckpointSummary]": - """ - Get the [`CheckpointSummary`] for a given checkpoint digest or - checkpoint id. If none is provided, it will use the last known - checkpoint id. + @dataclass + class FAILURE: """ + The Transaction didn't execute successfully. - if digest is _DEFAULT: - digest = None - _UniffiConverterOptionalTypeDigest.check_lower(digest) - - if seq_num is _DEFAULT: - seq_num = None - _UniffiConverterOptionalUInt64.check_lower(seq_num) + Failed transactions are still committed to the blockchain but any + intended effects are rolled back to prior to this transaction + executing with the caveat that gas objects are still smashed and gas + usage is still charged. +""" - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeDigest.lower(digest), - _UniffiConverterOptionalUInt64.lower(seq_num) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeCheckpointSummary.lift, + def __init__(self, error:ExecutionError, command:typing.Optional[int]): + self.error = error - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - - - async def checkpoints(self, pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "CheckpointSummaryPage": - """ - Get a page of [`CheckpointSummary`] for the provided parameters. - """ - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeCheckpointSummaryPage.lift, + """ + The error encountered during execution. +""" + + self.command = command - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + """ + The command, if any, during which the error occurred. +""" + + pass + + + + + def __str__(self): + return "ExecutionStatus.FAILURE(error={}, command={})".format(self.error, self.command) + def __eq__(self, other): + if not other.is_FAILURE(): + return False + if self.error != other.error: + return False + if self.command != other.command: + return False + return True - async def coin_metadata(self, coin_type: "str") -> "typing.Optional[CoinMetadata]": - """ - Get the coin metadata for the coin type. - """ + - _UniffiConverterString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeCoinMetadata.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_SUCCESS(self) -> bool: + return isinstance(self, ExecutionStatus.SUCCESS) + def is_success(self) -> bool: + return isinstance(self, ExecutionStatus.SUCCESS) + def is_FAILURE(self) -> bool: + return isinstance(self, ExecutionStatus.FAILURE) + def is_failure(self) -> bool: + return isinstance(self, ExecutionStatus.FAILURE) + - ) +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +ExecutionStatus.SUCCESS = type("ExecutionStatus.SUCCESS", (ExecutionStatus.SUCCESS, ExecutionStatus,), {}) # type: ignore +ExecutionStatus.FAILURE = type("ExecutionStatus.FAILURE", (ExecutionStatus.FAILURE, ExecutionStatus,), {}) # type: ignore - async def coins(self, owner: "Address",pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "CoinPage": - """ - Get the list of coins for the specified address. - If `coin_type` is not provided, it will default to `0x2::coin::Coin`, - which will return all coins. For IOTA coin, pass in the coin type: - `0x2::coin::Coin<0x2::iota::IOTA>`. - """ +class _UniffiFfiConverterTypeExecutionStatus(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return ExecutionStatus.SUCCESS( + ) + if variant == 2: + return ExecutionStatus.FAILURE( + _UniffiFfiConverterTypeExecutionError.read(buf), + _UniffiFfiConverterOptionalUInt64.read(buf), + ) + raise InternalError("Raw enum value doesn't match any cases") - _UniffiConverterTypeAddress.check_lower(owner) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - - if coin_type is _DEFAULT: - coin_type = None - _UniffiConverterOptionalString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(owner), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeCoinPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value): + if value.is_SUCCESS(): + return + if value.is_FAILURE(): + _UniffiFfiConverterTypeExecutionError.check_lower(value.error) + _UniffiFfiConverterOptionalUInt64.check_lower(value.command) + return + raise ValueError(value) - ) + @staticmethod + def write(value, buf): + if value.is_SUCCESS(): + buf.write_i32(1) + if value.is_FAILURE(): + buf.write_i32(2) + _UniffiFfiConverterTypeExecutionError.write(value.error, buf) + _UniffiFfiConverterOptionalUInt64.write(value.command, buf) - async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": - """ - Dry run a [`Transaction`] and return the transaction effects and dry run - error (if any). +class _UniffiFfiConverterSequenceTypeDigest(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeDigest.check_lower(item) - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeDigest.write(item, buf) - _UniffiConverterTypeTransaction.check_lower(tx) - - if skip_checks is _DEFAULT: - skip_checks = None - _UniffiConverterOptionalBool.check_lower(skip_checks) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransaction.lower(tx), - _UniffiConverterOptionalBool.lower(skip_checks) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeDryRunResult.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ) + return [ + _UniffiFfiConverterTypeDigest.read(buf) for i in range(count) + ] +class _UniffiFfiConverterSequenceTypeChangedObject(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeChangedObject.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeChangedObject.write(item, buf) - async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": - """ - Dry run a [`TransactionKind`] and return the transaction effects and dry - run error (if any). + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. + return [ + _UniffiFfiConverterTypeChangedObject.read(buf) for i in range(count) + ] - `tx_meta` is the transaction metadata. - """ - _UniffiConverterTypeTransactionKind.check_lower(tx_kind) - - _UniffiConverterTypeTransactionMetadata.check_lower(tx_meta) - - if skip_checks is _DEFAULT: - skip_checks = None - _UniffiConverterOptionalBool.check_lower(skip_checks) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionKind.lower(tx_kind), - _UniffiConverterTypeTransactionMetadata.lower(tx_meta), - _UniffiConverterOptionalBool.lower(skip_checks) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeDryRunResult.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) - async def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": - """ - Access a dynamic field on an object using its name. Names are arbitrary - Move values whose type have copy, drop, and store, and are specified - using their type, and their BCS contents, Base64 encoded. +class UnchangedSharedKind: + """ + Type of unchanged shared object - The `name` argument is a json serialized type. + # BCS - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + The BCS serialized form for this type is defined by the following ABNF: - # Example - ```rust,ignore + ```text + unchanged-shared-object-kind = read-only-root + =/ mutate-deleted + =/ read-deleted + =/ cancelled + =/ per-epoch-config - let client = iota_graphql_client::Client::new_devnet(); - let address = Address::from_str("0x5").unwrap(); - let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); + read-only-root = %x00 u64 digest + mutate-deleted = %x01 u64 + read-deleted = %x02 u64 + cancelled = %x03 u64 + per-epoch-config = %x04 + ``` +""" + def __init__(self): + raise RuntimeError("UnchangedSharedKind cannot be instantiated directly") - # alternatively, pass in the bcs bytes - let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); - let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); - ``` + # Each enum variant is a nested class of the enum itself. + @dataclass + class READ_ONLY_ROOT: """ - - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type_tag) - - _UniffiConverterTypeValue.check_lower(name) + Read-only shared objects from the input. We don't really need + ObjectDigest for protocol correctness, but it will make it easier to + verify untrusted read. +""" - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypeTypeTag.lower(type_tag), - _UniffiConverterTypeValue.lower(name) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeDynamicFieldOutput.lift, + def __init__(self, version:int, digest:Digest): + self.version = version - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + + self.digest = digest + + + pass + + + + + def __str__(self): + return "UnchangedSharedKind.READ_ONLY_ROOT(version={}, digest={})".format(self.version, self.digest) + def __eq__(self, other): + if not other.is_READ_ONLY_ROOT(): + return False + if self.version != other.version: + return False + if self.digest != other.digest: + return False + return True - async def dynamic_fields(self, address: "Address",pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "DynamicFieldOutputPage": + @dataclass + class MUTATE_DELETED: """ - Get a page of dynamic fields for the provided address. Note that this - will also fetch dynamic fields on wrapped objects. + Deleted shared objects that appear mutably/owned in the input. +""" + + def __init__(self, version:int): + self.version = version + + + pass + + + + + + def __str__(self): + return "UnchangedSharedKind.MUTATE_DELETED(version={})".format(self.version) + def __eq__(self, other): + if not other.is_MUTATE_DELETED(): + return False + if self.version != other.version: + return False + return True - This returns [`Page`] of [`DynamicFieldOutput`]s. + @dataclass + class READ_DELETED: """ - - _UniffiConverterTypeAddress.check_lower(address) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + Deleted shared objects that appear as read-only in the input. +""" - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeDynamicFieldOutputPage.lift, + def __init__(self, version:int): + self.version = version - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + + pass + + + + + def __str__(self): + return "UnchangedSharedKind.READ_DELETED(version={})".format(self.version) + def __eq__(self, other): + if not other.is_READ_DELETED(): + return False + if self.version != other.version: + return False + return True - async def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": + @dataclass + class CANCELLED: """ - Access a dynamic object field on an object using its name. Names are - arbitrary Move values whose type have copy, drop, and store, and are - specified using their type, and their BCS contents, Base64 encoded. + Shared objects in cancelled transaction. The sequence number embed + cancellation reason. +""" + + def __init__(self, version:int): + self.version = version + + + pass - The `name` argument is a json serialized type. + + + + + def __str__(self): + return "UnchangedSharedKind.CANCELLED(version={})".format(self.version) + def __eq__(self, other): + if not other.is_CANCELLED(): + return False + if self.version != other.version: + return False + return True - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + @dataclass + class PER_EPOCH_CONFIG: """ - - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type_tag) - - _UniffiConverterTypeValue.check_lower(name) + Read of a per-epoch config object that should remain the same during an + epoch. +""" - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypeTypeTag.lower(type_tag), - _UniffiConverterTypeValue.lower(name) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeDynamicFieldOutput.lift, + def __init__(self, ): + pass + + + - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def __str__(self): + return "UnchangedSharedKind.PER_EPOCH_CONFIG()".format() + def __eq__(self, other): + if not other.is_PER_EPOCH_CONFIG(): + return False + return True - ) + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_READ_ONLY_ROOT(self) -> bool: + return isinstance(self, UnchangedSharedKind.READ_ONLY_ROOT) + def is_read_only_root(self) -> bool: + return isinstance(self, UnchangedSharedKind.READ_ONLY_ROOT) + def is_MUTATE_DELETED(self) -> bool: + return isinstance(self, UnchangedSharedKind.MUTATE_DELETED) + def is_mutate_deleted(self) -> bool: + return isinstance(self, UnchangedSharedKind.MUTATE_DELETED) + def is_READ_DELETED(self) -> bool: + return isinstance(self, UnchangedSharedKind.READ_DELETED) + def is_read_deleted(self) -> bool: + return isinstance(self, UnchangedSharedKind.READ_DELETED) + def is_CANCELLED(self) -> bool: + return isinstance(self, UnchangedSharedKind.CANCELLED) + def is_cancelled(self) -> bool: + return isinstance(self, UnchangedSharedKind.CANCELLED) + def is_PER_EPOCH_CONFIG(self) -> bool: + return isinstance(self, UnchangedSharedKind.PER_EPOCH_CONFIG) + def is_per_epoch_config(self) -> bool: + return isinstance(self, UnchangedSharedKind.PER_EPOCH_CONFIG) + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +UnchangedSharedKind.READ_ONLY_ROOT = type("UnchangedSharedKind.READ_ONLY_ROOT", (UnchangedSharedKind.READ_ONLY_ROOT, UnchangedSharedKind,), {}) # type: ignore +UnchangedSharedKind.MUTATE_DELETED = type("UnchangedSharedKind.MUTATE_DELETED", (UnchangedSharedKind.MUTATE_DELETED, UnchangedSharedKind,), {}) # type: ignore +UnchangedSharedKind.READ_DELETED = type("UnchangedSharedKind.READ_DELETED", (UnchangedSharedKind.READ_DELETED, UnchangedSharedKind,), {}) # type: ignore +UnchangedSharedKind.CANCELLED = type("UnchangedSharedKind.CANCELLED", (UnchangedSharedKind.CANCELLED, UnchangedSharedKind,), {}) # type: ignore +UnchangedSharedKind.PER_EPOCH_CONFIG = type("UnchangedSharedKind.PER_EPOCH_CONFIG", (UnchangedSharedKind.PER_EPOCH_CONFIG, UnchangedSharedKind,), {}) # type: ignore - async def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Epoch]": - """ - Return the epoch information for the provided epoch. If no epoch is - provided, it will return the last known epoch. - """ - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeEpoch.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +class _UniffiFfiConverterTypeUnchangedSharedKind(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return UnchangedSharedKind.READ_ONLY_ROOT( + _UniffiFfiConverterUInt64.read(buf), + _UniffiFfiConverterTypeDigest.read(buf), + ) + if variant == 2: + return UnchangedSharedKind.MUTATE_DELETED( + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 3: + return UnchangedSharedKind.READ_DELETED( + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 4: + return UnchangedSharedKind.CANCELLED( + _UniffiFfiConverterUInt64.read(buf), + ) + if variant == 5: + return UnchangedSharedKind.PER_EPOCH_CONFIG( + ) + raise InternalError("Raw enum value doesn't match any cases") + @staticmethod + def check_lower(value): + if value.is_READ_ONLY_ROOT(): + _UniffiFfiConverterUInt64.check_lower(value.version) + _UniffiFfiConverterTypeDigest.check_lower(value.digest) + return + if value.is_MUTATE_DELETED(): + _UniffiFfiConverterUInt64.check_lower(value.version) + return + if value.is_READ_DELETED(): + _UniffiFfiConverterUInt64.check_lower(value.version) + return + if value.is_CANCELLED(): + _UniffiFfiConverterUInt64.check_lower(value.version) + return + if value.is_PER_EPOCH_CONFIG(): + return + raise ValueError(value) - async def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Return the number of checkpoints in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ + @staticmethod + def write(value, buf): + if value.is_READ_ONLY_ROOT(): + buf.write_i32(1) + _UniffiFfiConverterUInt64.write(value.version, buf) + _UniffiFfiConverterTypeDigest.write(value.digest, buf) + if value.is_MUTATE_DELETED(): + buf.write_i32(2) + _UniffiFfiConverterUInt64.write(value.version, buf) + if value.is_READ_DELETED(): + buf.write_i32(3) + _UniffiFfiConverterUInt64.write(value.version, buf) + if value.is_CANCELLED(): + buf.write_i32(4) + _UniffiFfiConverterUInt64.write(value.version, buf) + if value.is_PER_EPOCH_CONFIG(): + buf.write_i32(5) - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +@dataclass +class UnchangedSharedObject: + """ + A shared object that wasn't changed during execution + # BCS - async def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Return the number of transaction blocks in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ + The BCS serialized form for this type is defined by the following ABNF: - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) + ```text + unchanged-shared-object = object-id unchanged-shared-object-kind + ``` +""" + def __init__(self, *, object_id:ObjectId, kind:UnchangedSharedKind): + self.object_id = object_id + self.kind = kind - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeUnchangedSharedObject.lower(self), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_unchangedsharedobject_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + def __eq__(self, other): + if self.object_id != other.object_id: + return False + if self.kind != other.kind: + return False + return True +class _UniffiFfiConverterTypeUnchangedSharedObject(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return UnchangedSharedObject( + object_id=_UniffiFfiConverterTypeObjectId.read(buf), + kind=_UniffiFfiConverterTypeUnchangedSharedKind.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.object_id) + _UniffiFfiConverterTypeUnchangedSharedKind.check_lower(value.kind) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.object_id, buf) + _UniffiFfiConverterTypeUnchangedSharedKind.write(value.kind, buf) +class _UniffiFfiConverterSequenceTypeUnchangedSharedObject(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeUnchangedSharedObject.check_lower(item) - async def events(self, filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "EventPage": - """ - Return a page of tuple (event, transaction digest) based on the - (optional) event filter. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeUnchangedSharedObject.write(item, buf) - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeEventFilter.check_lower(filter) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeEventFilter.lower(filter), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeEventPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ) + return [ + _UniffiFfiConverterTypeUnchangedSharedObject.read(buf) for i in range(count) + ] +@dataclass +class TransactionEffectsV1: + """ + Version 1 of TransactionEffects + # BCS - async def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction") -> "typing.Optional[TransactionEffects]": - """ - Execute a transaction. - """ + The BCS serialized form for this type is defined by the following ABNF: - _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) - - _UniffiConverterTypeTransaction.check_lower(tx) + ```text + effects-v1 = execution-status + u64 ; epoch + gas-cost-summary + digest ; transaction digest + (option u32) ; gas object index + (option digest) ; events digest + (vector digest) ; list of transaction dependencies + u64 ; lamport version + (vector changed-object) + (vector unchanged-shared-object) + (option digest) ; auxiliary data digest + ``` +""" + def __init__(self, *, status:ExecutionStatus, epoch:int, gas_used:GasCostSummary, transaction_digest:Digest, gas_object_index:typing.Optional[int] = _DEFAULT, events_digest:typing.Optional[Digest] = _DEFAULT, dependencies:typing.List[Digest], lamport_version:int, changed_objects:typing.List[ChangedObject], unchanged_shared_objects:typing.List[UnchangedSharedObject], auxiliary_data_digest:typing.Optional[Digest] = _DEFAULT): + self.status = status + self.epoch = epoch + self.gas_used = gas_used + self.transaction_digest = transaction_digest + if gas_object_index is _DEFAULT: + self.gas_object_index = None + else: + self.gas_object_index = gas_object_index + if events_digest is _DEFAULT: + self.events_digest = None + else: + self.events_digest = events_digest + self.dependencies = dependencies + self.lamport_version = lamport_version + self.changed_objects = changed_objects + self.unchanged_shared_objects = unchanged_shared_objects + if auxiliary_data_digest is _DEFAULT: + self.auxiliary_data_digest = None + else: + self.auxiliary_data_digest = auxiliary_data_digest - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx( - self._uniffi_clone_pointer(), - _UniffiConverterSequenceTypeUserSignature.lower(signatures), - _UniffiConverterTypeTransaction.lower(tx) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTransactionEffectsV1.lower(self), ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsv1_uniffi_trait_display, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + def __eq__(self, other): + if self.status != other.status: + return False + if self.epoch != other.epoch: + return False + if self.gas_used != other.gas_used: + return False + if self.transaction_digest != other.transaction_digest: + return False + if self.gas_object_index != other.gas_object_index: + return False + if self.events_digest != other.events_digest: + return False + if self.dependencies != other.dependencies: + return False + if self.lamport_version != other.lamport_version: + return False + if self.changed_objects != other.changed_objects: + return False + if self.unchanged_shared_objects != other.unchanged_shared_objects: + return False + if self.auxiliary_data_digest != other.auxiliary_data_digest: + return False + return True +class _UniffiFfiConverterTypeTransactionEffectsV1(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionEffectsV1( + status=_UniffiFfiConverterTypeExecutionStatus.read(buf), + epoch=_UniffiFfiConverterUInt64.read(buf), + gas_used=_UniffiFfiConverterTypeGasCostSummary.read(buf), + transaction_digest=_UniffiFfiConverterTypeDigest.read(buf), + gas_object_index=_UniffiFfiConverterOptionalUInt32.read(buf), + events_digest=_UniffiFfiConverterOptionalTypeDigest.read(buf), + dependencies=_UniffiFfiConverterSequenceTypeDigest.read(buf), + lamport_version=_UniffiFfiConverterUInt64.read(buf), + changed_objects=_UniffiFfiConverterSequenceTypeChangedObject.read(buf), + unchanged_shared_objects=_UniffiFfiConverterSequenceTypeUnchangedSharedObject.read(buf), + auxiliary_data_digest=_UniffiFfiConverterOptionalTypeDigest.read(buf), + ) - async def iota_names_default_name(self, address: "Address",format: "typing.Optional[NameFormat]") -> "typing.Optional[Name]": - """ - Get the default name pointing to this address, if one exists. - """ - - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterOptionalTypeNameFormat.check_lower(format) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalTypeNameFormat.lower(format) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeName.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeExecutionStatus.check_lower(value.status) + _UniffiFfiConverterUInt64.check_lower(value.epoch) + _UniffiFfiConverterTypeGasCostSummary.check_lower(value.gas_used) + _UniffiFfiConverterTypeDigest.check_lower(value.transaction_digest) + _UniffiFfiConverterOptionalUInt32.check_lower(value.gas_object_index) + _UniffiFfiConverterOptionalTypeDigest.check_lower(value.events_digest) + _UniffiFfiConverterSequenceTypeDigest.check_lower(value.dependencies) + _UniffiFfiConverterUInt64.check_lower(value.lamport_version) + _UniffiFfiConverterSequenceTypeChangedObject.check_lower(value.changed_objects) + _UniffiFfiConverterSequenceTypeUnchangedSharedObject.check_lower(value.unchanged_shared_objects) + _UniffiFfiConverterOptionalTypeDigest.check_lower(value.auxiliary_data_digest) - ) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeExecutionStatus.write(value.status, buf) + _UniffiFfiConverterUInt64.write(value.epoch, buf) + _UniffiFfiConverterTypeGasCostSummary.write(value.gas_used, buf) + _UniffiFfiConverterTypeDigest.write(value.transaction_digest, buf) + _UniffiFfiConverterOptionalUInt32.write(value.gas_object_index, buf) + _UniffiFfiConverterOptionalTypeDigest.write(value.events_digest, buf) + _UniffiFfiConverterSequenceTypeDigest.write(value.dependencies, buf) + _UniffiFfiConverterUInt64.write(value.lamport_version, buf) + _UniffiFfiConverterSequenceTypeChangedObject.write(value.changed_objects, buf) + _UniffiFfiConverterSequenceTypeUnchangedSharedObject.write(value.unchanged_shared_objects, buf) + _UniffiFfiConverterOptionalTypeDigest.write(value.auxiliary_data_digest, buf) +class TransactionEffectsProtocol(typing.Protocol): + """ + The output or effects of executing a transaction - async def iota_names_lookup(self, name: "str") -> "typing.Optional[Address]": - """ - Return the resolved address for the given name. - """ + # BCS - _UniffiConverterString.check_lower(name) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(name) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeAddress.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + The BCS serialized form for this type is defined by the following ABNF: - ) + ```text + transaction-effects = %x00 effects-v1 + =/ %x01 effects-v2 + ``` +""" + + def as_v1(self, ) -> TransactionEffectsV1: + raise NotImplementedError + def digest(self, ) -> Digest: + raise NotImplementedError + def is_v1(self, ) -> bool: + raise NotImplementedError +class TransactionEffects(TransactionEffectsProtocol): + """ + The output or effects of executing a transaction + # BCS - async def iota_names_registrations(self, address: "Address",pagination_filter: "PaginationFilter") -> "NameRegistrationPage": - """ - Find all registration NFTs for the given address. - """ + The BCS serialized form for this type is defined by the following ABNF: - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + ```text + transaction-effects = %x00 effects-v1 + =/ %x01 effects-v2 + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_v1(cls, effects: TransactionEffectsV1) -> TransactionEffects: - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeNameRegistrationPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + _UniffiFfiConverterTypeTransactionEffectsV1.check_lower(effects) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTransactionEffectsV1.lower(effects), ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionEffects.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects, self._handle) - async def latest_checkpoint_sequence_number(self, ) -> "typing.Optional[int]": - """ - Return the sequence number of the latest checkpoint that has been - executed. - """ - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def as_v1(self, ) -> TransactionEffectsV1: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionEffectsV1.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_v1(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - async def max_page_size(self, ) -> "int": - """ - Lazily fetch the max page size - """ - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32, - # lift function - _UniffiConverterInt32.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) +class _UniffiFfiConverterTypeTransactionEffects: + @staticmethod + def lift(value: int) -> TransactionEffects: + return TransactionEffects._uniffi_make_instance(value) - async def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Value]": - """ - Return the contents' JSON of an object that is a Move object. + @staticmethod + def check_lower(value: TransactionEffects): + if not isinstance(value, TransactionEffects): + raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + @staticmethod + def lower(value: TransactionEffects) -> ctypes.c_uint64: + return value._uniffi_clone_handle() - _UniffiConverterTypeObjectId.check_lower(object_id) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeValue.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> TransactionEffects: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - ) + @classmethod + def write(cls, value: TransactionEffects, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterOptionalTypeTransactionEffects(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeTransactionEffects.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - async def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[bytes]": - """ - Return the BCS of an object that is a Move object. + buf.write_u8(1) + _UniffiFfiConverterTypeTransactionEffects.write(value, buf) - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTransactionEffects.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _UniffiConverterTypeObjectId.check_lower(object_id) +@dataclass +class DryRunResult: + """ + The result of a simulation (dry run), which includes the effects of the + transaction, any errors that may have occurred, and intermediate results for + each command. +""" + def __init__(self, *, error:typing.Optional[str], results:typing.List[DryRunEffect], transaction:typing.Optional[SignedTransaction], effects:typing.Optional[TransactionEffects]): + self.error = error + self.results = results + self.transaction = transaction + self.effects = effects - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalBytes.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def __str__(self): + return "DryRunResult(error={}, results={}, transaction={}, effects={})".format(self.error, self.results, self.transaction, self.effects) + def __eq__(self, other): + if self.error != other.error: + return False + if self.results != other.results: + return False + if self.transaction != other.transaction: + return False + if self.effects != other.effects: + return False + return True + +class _UniffiFfiConverterTypeDryRunResult(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DryRunResult( + error=_UniffiFfiConverterOptionalString.read(buf), + results=_UniffiFfiConverterSequenceTypeDryRunEffect.read(buf), + transaction=_UniffiFfiConverterOptionalTypeSignedTransaction.read(buf), + effects=_UniffiFfiConverterOptionalTypeTransactionEffects.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalString.check_lower(value.error) + _UniffiFfiConverterSequenceTypeDryRunEffect.check_lower(value.results) + _UniffiFfiConverterOptionalTypeSignedTransaction.check_lower(value.transaction) + _UniffiFfiConverterOptionalTypeTransactionEffects.check_lower(value.effects) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalString.write(value.error, buf) + _UniffiFfiConverterSequenceTypeDryRunEffect.write(value.results, buf) + _UniffiFfiConverterOptionalTypeSignedTransaction.write(value.transaction, buf) + _UniffiFfiConverterOptionalTypeTransactionEffects.write(value.effects, buf) - async def normalized_move_function(self, package: "Address",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveFunction]": - """ - Return the normalized Move function data for the provided package, - module, and function. - """ - _UniffiConverterTypeAddress.check_lower(package) - - _UniffiConverterString.check_lower(module) - - _UniffiConverterString.check_lower(function) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(package), - _UniffiConverterString.lower(module), - _UniffiConverterString.lower(function), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMoveFunction.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, +class _UniffiFfiConverterTypeValue: + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value, buf) - ) + @staticmethod + def read(buf): + return _UniffiFfiConverterString.read(buf) + @staticmethod + def lift(value): + return _UniffiFfiConverterString.lift(value) + @staticmethod + def check_lower(value): + return _UniffiFfiConverterString.check_lower(value) - async def normalized_move_module(self, package: "Address",module: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter_enums: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_friends: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_functions: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,pagination_filter_structs: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "typing.Optional[MoveModule]": - """ - Return the normalized Move module data for the provided module. - """ + @staticmethod + def lower(value): + return _UniffiFfiConverterString.lower(value) - _UniffiConverterTypeAddress.check_lower(package) - - _UniffiConverterString.check_lower(module) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - if pagination_filter_enums is _DEFAULT: - pagination_filter_enums = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_enums) - - if pagination_filter_friends is _DEFAULT: - pagination_filter_friends = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_friends) - - if pagination_filter_functions is _DEFAULT: - pagination_filter_functions = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_functions) - - if pagination_filter_structs is _DEFAULT: - pagination_filter_structs = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_structs) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(package), - _UniffiConverterString.lower(module), - _UniffiConverterOptionalUInt64.lower(version), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter_enums), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter_friends), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter_functions), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter_structs) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMoveModule.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +Value = str +class _UniffiFfiConverterOptionalTypeValue(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeValue.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - async def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Object]": - """ - Return an object based on the provided [`Address`]. + buf.write_u8(1) + _UniffiFfiConverterTypeValue.write(value, buf) - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeValue.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _UniffiConverterTypeObjectId.check_lower(object_id) +@dataclass +class DynamicFieldName: + """ + The name part of a dynamic field, including its type, bcs, and json + representation. +""" + def __init__(self, *, type_tag:TypeTag, bcs:bytes, json:typing.Optional[Value] = _DEFAULT): + self.type_tag = type_tag + self.bcs = bcs + if json is _DEFAULT: + self.json = None + else: + self.json = json - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeObject.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) + + def __str__(self): + return "DynamicFieldName(type_tag={}, bcs={}, json={})".format(self.type_tag, self.bcs, self.json) + def __eq__(self, other): + if self.type_tag != other.type_tag: + return False + if self.bcs != other.bcs: + return False + if self.json != other.json: + return False + return True +class _UniffiFfiConverterTypeDynamicFieldName(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DynamicFieldName( + type_tag=_UniffiFfiConverterTypeTypeTag.read(buf), + bcs=_UniffiFfiConverterBytes.read(buf), + json=_UniffiFfiConverterOptionalTypeValue.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeTypeTag.check_lower(value.type_tag) + _UniffiFfiConverterBytes.check_lower(value.bcs) + _UniffiFfiConverterOptionalTypeValue.check_lower(value.json) - async def object_bcs(self, object_id: "ObjectId") -> "typing.Optional[bytes]": - """ - Return the object's bcs content [`Vec`] based on the provided - [`Address`]. - """ + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeTypeTag.write(value.type_tag, buf) + _UniffiFfiConverterBytes.write(value.bcs, buf) + _UniffiFfiConverterOptionalTypeValue.write(value.json, buf) - _UniffiConverterTypeObjectId.check_lower(object_id) +@dataclass +class DynamicFieldValue: + """ + The value part of a dynamic field. +""" + def __init__(self, *, type_tag:TypeTag, bcs:bytes): + self.type_tag = type_tag + self.bcs = bcs + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalBytes.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) + + def __str__(self): + return "DynamicFieldValue(type_tag={}, bcs={})".format(self.type_tag, self.bcs) + def __eq__(self, other): + if self.type_tag != other.type_tag: + return False + if self.bcs != other.bcs: + return False + return True +class _UniffiFfiConverterTypeDynamicFieldValue(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DynamicFieldValue( + type_tag=_UniffiFfiConverterTypeTypeTag.read(buf), + bcs=_UniffiFfiConverterBytes.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeTypeTag.check_lower(value.type_tag) + _UniffiFfiConverterBytes.check_lower(value.bcs) - async def objects(self, filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "ObjectPage": - """ - Return a page of objects based on the provided parameters. + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeTypeTag.write(value.type_tag, buf) + _UniffiFfiConverterBytes.write(value.bcs, buf) - Use this function together with the [`ObjectFilter::owner`] to get the - objects owned by an address. +class _UniffiFfiConverterOptionalTypeDynamicFieldValue(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeDynamicFieldValue.check_lower(value) - # Example + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - ```rust,ignore - let filter = ObjectFilter { - type_tag: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; + buf.write_u8(1) + _UniffiFfiConverterTypeDynamicFieldValue.write(value, buf) - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeDynamicFieldValue.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeObjectFilter.check_lower(filter) +@dataclass +class DynamicFieldOutput: + """ + The output of a dynamic field query, that includes the name, value, and + value's json representation. +""" + def __init__(self, *, name:DynamicFieldName, value:typing.Optional[DynamicFieldValue] = _DEFAULT, value_as_json:typing.Optional[Value] = _DEFAULT): + self.name = name + if value is _DEFAULT: + self.value = None + else: + self.value = value + if value_as_json is _DEFAULT: + self.value_as_json = None + else: + self.value_as_json = value_as_json - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeObjectFilter.lower(filter), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeObjectPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + + def __str__(self): + return "DynamicFieldOutput(name={}, value={}, value_as_json={})".format(self.name, self.value, self.value_as_json) + def __eq__(self, other): + if self.name != other.name: + return False + if self.value != other.value: + return False + if self.value_as_json != other.value_as_json: + return False + return True - async def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MovePackage]": - """ - The package corresponding to the given address (at the optionally given - version). When no version is given, the package is loaded directly - from the address given. Otherwise, the address is translated before - loading to point to the package whose original ID matches - the package at address, but whose version is version. For non-system - packages, this might result in a different address than address - because different versions of a package, introduced by upgrades, - exist at distinct addresses. +class _UniffiFfiConverterTypeDynamicFieldOutput(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DynamicFieldOutput( + name=_UniffiFfiConverterTypeDynamicFieldName.read(buf), + value=_UniffiFfiConverterOptionalTypeDynamicFieldValue.read(buf), + value_as_json=_UniffiFfiConverterOptionalTypeValue.read(buf), + ) - Note that this interpretation of version is different from a historical - object read (the interpretation of version for the object query). - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeDynamicFieldName.check_lower(value.name) + _UniffiFfiConverterOptionalTypeDynamicFieldValue.check_lower(value.value) + _UniffiFfiConverterOptionalTypeValue.check_lower(value.value_as_json) - _UniffiConverterTypeAddress.check_lower(address) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMovePackage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeDynamicFieldName.write(value.name, buf) + _UniffiFfiConverterOptionalTypeDynamicFieldValue.write(value.value, buf) + _UniffiFfiConverterOptionalTypeValue.write(value.value_as_json, buf) - ) +class _UniffiFfiConverterSequenceTypeDynamicFieldOutput(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeDynamicFieldOutput.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeDynamicFieldOutput.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - async def package_latest(self, address: "Address") -> "typing.Optional[MovePackage]": - """ - Fetch the latest version of the package at address. - This corresponds to the package with the highest version that shares its - original ID with the package at address. - """ + return [ + _UniffiFfiConverterTypeDynamicFieldOutput.read(buf) for i in range(count) + ] - _UniffiConverterTypeAddress.check_lower(address) +@dataclass +class DynamicFieldOutputPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[DynamicFieldOutput]): + self.page_info = page_info + self.data = data + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMovePackage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) + + def __str__(self): + return "DynamicFieldOutputPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True +class _UniffiFfiConverterTypeDynamicFieldOutputPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return DynamicFieldOutputPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeDynamicFieldOutput.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeDynamicFieldOutput.check_lower(value.data) - async def package_versions(self, address: "Address",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "MovePackagePage": - """ - Fetch all versions of package at address (packages that share this - package's original ID), optionally bounding the versions exclusively - from below with afterVersion, or from above with beforeVersion. - """ + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeDynamicFieldOutput.write(value.data, buf) - _UniffiConverterTypeAddress.check_lower(address) - - if after_version is _DEFAULT: - after_version = None - _UniffiConverterOptionalUInt64.check_lower(after_version) - - if before_version is _DEFAULT: - before_version = None - _UniffiConverterOptionalUInt64.check_lower(before_version) +@dataclass +class ProtocolConfigFeatureFlag: + """ + Feature flags are a form of boolean configuration that are usually used to + gate features while they are in development. Once a lag has been enabled, it + is rare for it to be disabled. +""" + def __init__(self, *, key:str, value:bool): + self.key = key + self.value = value - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalUInt64.lower(after_version), - _UniffiConverterOptionalUInt64.lower(before_version), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeMovePackagePage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def __str__(self): + return "ProtocolConfigFeatureFlag(key={}, value={})".format(self.key, self.value) + def __eq__(self, other): + if self.key != other.key: + return False + if self.value != other.value: + return False + return True + +class _UniffiFfiConverterTypeProtocolConfigFeatureFlag(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ProtocolConfigFeatureFlag( + key=_UniffiFfiConverterString.read(buf), + value=_UniffiFfiConverterBoolean.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.key) + _UniffiFfiConverterBoolean.check_lower(value.value) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.key, buf) + _UniffiFfiConverterBoolean.write(value.value, buf) - async def packages(self, after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "MovePackagePage": - """ - The Move packages that exist in the network, optionally filtered to be - strictly before beforeCheckpoint and/or strictly after - afterCheckpoint. +class _UniffiFfiConverterSequenceTypeProtocolConfigFeatureFlag(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeProtocolConfigFeatureFlag.check_lower(item) - This query returns all versions of a given user package that appear - between the specified checkpoints, but only records the latest - versions of system packages. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeProtocolConfigFeatureFlag.write(item, buf) - if after_checkpoint is _DEFAULT: - after_checkpoint = None - _UniffiConverterOptionalUInt64.check_lower(after_checkpoint) - - if before_checkpoint is _DEFAULT: - before_checkpoint = None - _UniffiConverterOptionalUInt64.check_lower(before_checkpoint) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(after_checkpoint), - _UniffiConverterOptionalUInt64.lower(before_checkpoint), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeMovePackagePage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ) + return [ + _UniffiFfiConverterTypeProtocolConfigFeatureFlag.read(buf) for i in range(count) + ] +@dataclass +class ProtocolConfigAttr: + """ + A key-value protocol configuration attribute. +""" + def __init__(self, *, key:str, value:typing.Optional[str]): + self.key = key + self.value = value + + + + def __str__(self): + return "ProtocolConfigAttr(key={}, value={})".format(self.key, self.value) + def __eq__(self, other): + if self.key != other.key: + return False + if self.value != other.value: + return False + return True - async def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[ProtocolConfigs]": - """ - Get the protocol configuration. - """ +class _UniffiFfiConverterTypeProtocolConfigAttr(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ProtocolConfigAttr( + key=_UniffiFfiConverterString.read(buf), + value=_UniffiFfiConverterOptionalString.read(buf), + ) - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeProtocolConfigs.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.key) + _UniffiFfiConverterOptionalString.check_lower(value.value) - ) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.key, buf) + _UniffiFfiConverterOptionalString.write(value.value, buf) +class _UniffiFfiConverterSequenceTypeProtocolConfigAttr(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeProtocolConfigAttr.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeProtocolConfigAttr.write(item, buf) - async def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Get the reference gas price for the provided epoch or the last known one - if no epoch is provided. + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - This will return `Ok(None)` if the epoch requested is not available in - the GraphQL service (e.g., due to pruning). - """ + return [ + _UniffiFfiConverterTypeProtocolConfigAttr.read(buf) for i in range(count) + ] - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) +@dataclass +class ProtocolConfigs: + """ + Information about the configuration of the protocol. + Constants that control how the chain operates. + These can only change during protocol upgrades which happen on epoch + boundaries. +""" + def __init__(self, *, protocol_version:int, feature_flags:typing.List[ProtocolConfigFeatureFlag], configs:typing.List[ProtocolConfigAttr]): + self.protocol_version = protocol_version + self.feature_flags = feature_flags + self.configs = configs - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + + + def __str__(self): + return "ProtocolConfigs(protocol_version={}, feature_flags={}, configs={})".format(self.protocol_version, self.feature_flags, self.configs) + def __eq__(self, other): + if self.protocol_version != other.protocol_version: + return False + if self.feature_flags != other.feature_flags: + return False + if self.configs != other.configs: + return False + return True +class _UniffiFfiConverterTypeProtocolConfigs(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ProtocolConfigs( + protocol_version=_UniffiFfiConverterUInt64.read(buf), + feature_flags=_UniffiFfiConverterSequenceTypeProtocolConfigFeatureFlag.read(buf), + configs=_UniffiFfiConverterSequenceTypeProtocolConfigAttr.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.protocol_version) + _UniffiFfiConverterSequenceTypeProtocolConfigFeatureFlag.check_lower(value.feature_flags) + _UniffiFfiConverterSequenceTypeProtocolConfigAttr.check_lower(value.configs) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.protocol_version, buf) + _UniffiFfiConverterSequenceTypeProtocolConfigFeatureFlag.write(value.feature_flags, buf) + _UniffiFfiConverterSequenceTypeProtocolConfigAttr.write(value.configs, buf) - async def run_query(self, query: "Query") -> "Value": - """ - Run a query. - """ +class _UniffiFfiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeProtocolConfigs.check_lower(value) - _UniffiConverterTypeQuery.check_lower(query) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query( - self._uniffi_clone_pointer(), - _UniffiConverterTypeQuery.lower(query) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeValue.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - ) + buf.write_u8(1) + _UniffiFfiConverterTypeProtocolConfigs.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeProtocolConfigs.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterSequenceInt32(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterInt32.check_lower(item) - async def service_config(self, ) -> "ServiceConfig": - """ - Get the GraphQL service configuration, including complexity limits, read - and mutation limits, supported versions, and others. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterInt32.write(item, buf) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeServiceConfig.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ) + return [ + _UniffiFfiConverterInt32.read(buf) for i in range(count) + ] +class _UniffiFfiConverterOptionalSequenceInt32(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceInt32.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - async def set_rpc_server(self, server: "str") -> None: + buf.write_u8(1) + _UniffiFfiConverterSequenceInt32.write(value, buf) - """ - Set the server address for the GraphQL GraphQL client. It should be a - valid URL with a host and optionally a port number. - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceInt32.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _UniffiConverterString.check_lower(server) +@dataclass +class ValidatorSet: + def __init__(self, *, inactive_pools_id:typing.Optional[ObjectId] = _DEFAULT, inactive_pools_size:typing.Optional[int] = _DEFAULT, pending_active_validators_id:typing.Optional[ObjectId] = _DEFAULT, pending_active_validators_size:typing.Optional[int] = _DEFAULT, pending_removals:typing.Optional[typing.List[int]] = _DEFAULT, staking_pool_mappings_id:typing.Optional[ObjectId] = _DEFAULT, staking_pool_mappings_size:typing.Optional[int] = _DEFAULT, total_stake:typing.Optional[str] = _DEFAULT, validator_candidates_size:typing.Optional[int] = _DEFAULT, validator_candidates_id:typing.Optional[ObjectId] = _DEFAULT): + if inactive_pools_id is _DEFAULT: + self.inactive_pools_id = None + else: + self.inactive_pools_id = inactive_pools_id + if inactive_pools_size is _DEFAULT: + self.inactive_pools_size = None + else: + self.inactive_pools_size = inactive_pools_size + if pending_active_validators_id is _DEFAULT: + self.pending_active_validators_id = None + else: + self.pending_active_validators_id = pending_active_validators_id + if pending_active_validators_size is _DEFAULT: + self.pending_active_validators_size = None + else: + self.pending_active_validators_size = pending_active_validators_size + if pending_removals is _DEFAULT: + self.pending_removals = None + else: + self.pending_removals = pending_removals + if staking_pool_mappings_id is _DEFAULT: + self.staking_pool_mappings_id = None + else: + self.staking_pool_mappings_id = staking_pool_mappings_id + if staking_pool_mappings_size is _DEFAULT: + self.staking_pool_mappings_size = None + else: + self.staking_pool_mappings_size = staking_pool_mappings_size + if total_stake is _DEFAULT: + self.total_stake = None + else: + self.total_stake = total_stake + if validator_candidates_size is _DEFAULT: + self.validator_candidates_size = None + else: + self.validator_candidates_size = validator_candidates_size + if validator_candidates_id is _DEFAULT: + self.validator_candidates_id = None + else: + self.validator_candidates_id = validator_candidates_id + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(server) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void, - # lift function - lambda val: None, - - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) + + def __str__(self): + return "ValidatorSet(inactive_pools_id={}, inactive_pools_size={}, pending_active_validators_id={}, pending_active_validators_size={}, pending_removals={}, staking_pool_mappings_id={}, staking_pool_mappings_size={}, total_stake={}, validator_candidates_size={}, validator_candidates_id={})".format(self.inactive_pools_id, self.inactive_pools_size, self.pending_active_validators_id, self.pending_active_validators_size, self.pending_removals, self.staking_pool_mappings_id, self.staking_pool_mappings_size, self.total_stake, self.validator_candidates_size, self.validator_candidates_id) + def __eq__(self, other): + if self.inactive_pools_id != other.inactive_pools_id: + return False + if self.inactive_pools_size != other.inactive_pools_size: + return False + if self.pending_active_validators_id != other.pending_active_validators_id: + return False + if self.pending_active_validators_size != other.pending_active_validators_size: + return False + if self.pending_removals != other.pending_removals: + return False + if self.staking_pool_mappings_id != other.staking_pool_mappings_id: + return False + if self.staking_pool_mappings_size != other.staking_pool_mappings_size: + return False + if self.total_stake != other.total_stake: + return False + if self.validator_candidates_size != other.validator_candidates_size: + return False + if self.validator_candidates_id != other.validator_candidates_id: + return False + return True +class _UniffiFfiConverterTypeValidatorSet(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorSet( + inactive_pools_id=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + inactive_pools_size=_UniffiFfiConverterOptionalInt32.read(buf), + pending_active_validators_id=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + pending_active_validators_size=_UniffiFfiConverterOptionalInt32.read(buf), + pending_removals=_UniffiFfiConverterOptionalSequenceInt32.read(buf), + staking_pool_mappings_id=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + staking_pool_mappings_size=_UniffiFfiConverterOptionalInt32.read(buf), + total_stake=_UniffiFfiConverterOptionalString.read(buf), + validator_candidates_size=_UniffiFfiConverterOptionalInt32.read(buf), + validator_candidates_id=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + ) - async def total_supply(self, coin_type: "str") -> "typing.Optional[int]": - """ - Get total supply for the coin type. - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.inactive_pools_id) + _UniffiFfiConverterOptionalInt32.check_lower(value.inactive_pools_size) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.pending_active_validators_id) + _UniffiFfiConverterOptionalInt32.check_lower(value.pending_active_validators_size) + _UniffiFfiConverterOptionalSequenceInt32.check_lower(value.pending_removals) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.staking_pool_mappings_id) + _UniffiFfiConverterOptionalInt32.check_lower(value.staking_pool_mappings_size) + _UniffiFfiConverterOptionalString.check_lower(value.total_stake) + _UniffiFfiConverterOptionalInt32.check_lower(value.validator_candidates_size) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.validator_candidates_id) - _UniffiConverterString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalTypeObjectId.write(value.inactive_pools_id, buf) + _UniffiFfiConverterOptionalInt32.write(value.inactive_pools_size, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.pending_active_validators_id, buf) + _UniffiFfiConverterOptionalInt32.write(value.pending_active_validators_size, buf) + _UniffiFfiConverterOptionalSequenceInt32.write(value.pending_removals, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.staking_pool_mappings_id, buf) + _UniffiFfiConverterOptionalInt32.write(value.staking_pool_mappings_size, buf) + _UniffiFfiConverterOptionalString.write(value.total_stake, buf) + _UniffiFfiConverterOptionalInt32.write(value.validator_candidates_size, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.validator_candidates_id, buf) + +class _UniffiFfiConverterOptionalTypeValidatorSet(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeValidatorSet.check_lower(value) - ) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeValidatorSet.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeValidatorSet.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - async def total_transaction_blocks(self, ) -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - last known checkpoint. - """ +@dataclass +class Epoch: + def __init__(self, *, epoch_id:int, fund_inflow:typing.Optional[str] = _DEFAULT, fund_outflow:typing.Optional[str] = _DEFAULT, fund_size:typing.Optional[str] = _DEFAULT, live_object_set_digest:typing.Optional[str] = _DEFAULT, net_inflow:typing.Optional[str] = _DEFAULT, protocol_configs:typing.Optional[ProtocolConfigs] = _DEFAULT, reference_gas_price:typing.Optional[str] = _DEFAULT, start_timestamp:int, end_timestamp:typing.Optional[int] = _DEFAULT, system_state_version:typing.Optional[int] = _DEFAULT, total_checkpoints:typing.Optional[int] = _DEFAULT, total_gas_fees:typing.Optional[str] = _DEFAULT, total_stake_rewards:typing.Optional[str] = _DEFAULT, total_transactions:typing.Optional[int] = _DEFAULT, validator_set:typing.Optional[ValidatorSet] = _DEFAULT): + self.epoch_id = epoch_id + if fund_inflow is _DEFAULT: + self.fund_inflow = None + else: + self.fund_inflow = fund_inflow + if fund_outflow is _DEFAULT: + self.fund_outflow = None + else: + self.fund_outflow = fund_outflow + if fund_size is _DEFAULT: + self.fund_size = None + else: + self.fund_size = fund_size + if live_object_set_digest is _DEFAULT: + self.live_object_set_digest = None + else: + self.live_object_set_digest = live_object_set_digest + if net_inflow is _DEFAULT: + self.net_inflow = None + else: + self.net_inflow = net_inflow + if protocol_configs is _DEFAULT: + self.protocol_configs = None + else: + self.protocol_configs = protocol_configs + if reference_gas_price is _DEFAULT: + self.reference_gas_price = None + else: + self.reference_gas_price = reference_gas_price + self.start_timestamp = start_timestamp + if end_timestamp is _DEFAULT: + self.end_timestamp = None + else: + self.end_timestamp = end_timestamp + if system_state_version is _DEFAULT: + self.system_state_version = None + else: + self.system_state_version = system_state_version + if total_checkpoints is _DEFAULT: + self.total_checkpoints = None + else: + self.total_checkpoints = total_checkpoints + if total_gas_fees is _DEFAULT: + self.total_gas_fees = None + else: + self.total_gas_fees = total_gas_fees + if total_stake_rewards is _DEFAULT: + self.total_stake_rewards = None + else: + self.total_stake_rewards = total_stake_rewards + if total_transactions is _DEFAULT: + self.total_transactions = None + else: + self.total_transactions = total_transactions + if validator_set is _DEFAULT: + self.validator_set = None + else: + self.validator_set = validator_set + + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def __str__(self): + return "Epoch(epoch_id={}, fund_inflow={}, fund_outflow={}, fund_size={}, live_object_set_digest={}, net_inflow={}, protocol_configs={}, reference_gas_price={}, start_timestamp={}, end_timestamp={}, system_state_version={}, total_checkpoints={}, total_gas_fees={}, total_stake_rewards={}, total_transactions={}, validator_set={})".format(self.epoch_id, self.fund_inflow, self.fund_outflow, self.fund_size, self.live_object_set_digest, self.net_inflow, self.protocol_configs, self.reference_gas_price, self.start_timestamp, self.end_timestamp, self.system_state_version, self.total_checkpoints, self.total_gas_fees, self.total_stake_rewards, self.total_transactions, self.validator_set) + def __eq__(self, other): + if self.epoch_id != other.epoch_id: + return False + if self.fund_inflow != other.fund_inflow: + return False + if self.fund_outflow != other.fund_outflow: + return False + if self.fund_size != other.fund_size: + return False + if self.live_object_set_digest != other.live_object_set_digest: + return False + if self.net_inflow != other.net_inflow: + return False + if self.protocol_configs != other.protocol_configs: + return False + if self.reference_gas_price != other.reference_gas_price: + return False + if self.start_timestamp != other.start_timestamp: + return False + if self.end_timestamp != other.end_timestamp: + return False + if self.system_state_version != other.system_state_version: + return False + if self.total_checkpoints != other.total_checkpoints: + return False + if self.total_gas_fees != other.total_gas_fees: + return False + if self.total_stake_rewards != other.total_stake_rewards: + return False + if self.total_transactions != other.total_transactions: + return False + if self.validator_set != other.validator_set: + return False + return True +class _UniffiFfiConverterTypeEpoch(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return Epoch( + epoch_id=_UniffiFfiConverterUInt64.read(buf), + fund_inflow=_UniffiFfiConverterOptionalString.read(buf), + fund_outflow=_UniffiFfiConverterOptionalString.read(buf), + fund_size=_UniffiFfiConverterOptionalString.read(buf), + live_object_set_digest=_UniffiFfiConverterOptionalString.read(buf), + net_inflow=_UniffiFfiConverterOptionalString.read(buf), + protocol_configs=_UniffiFfiConverterOptionalTypeProtocolConfigs.read(buf), + reference_gas_price=_UniffiFfiConverterOptionalString.read(buf), + start_timestamp=_UniffiFfiConverterUInt64.read(buf), + end_timestamp=_UniffiFfiConverterOptionalUInt64.read(buf), + system_state_version=_UniffiFfiConverterOptionalUInt64.read(buf), + total_checkpoints=_UniffiFfiConverterOptionalUInt64.read(buf), + total_gas_fees=_UniffiFfiConverterOptionalString.read(buf), + total_stake_rewards=_UniffiFfiConverterOptionalString.read(buf), + total_transactions=_UniffiFfiConverterOptionalUInt64.read(buf), + validator_set=_UniffiFfiConverterOptionalTypeValidatorSet.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.epoch_id) + _UniffiFfiConverterOptionalString.check_lower(value.fund_inflow) + _UniffiFfiConverterOptionalString.check_lower(value.fund_outflow) + _UniffiFfiConverterOptionalString.check_lower(value.fund_size) + _UniffiFfiConverterOptionalString.check_lower(value.live_object_set_digest) + _UniffiFfiConverterOptionalString.check_lower(value.net_inflow) + _UniffiFfiConverterOptionalTypeProtocolConfigs.check_lower(value.protocol_configs) + _UniffiFfiConverterOptionalString.check_lower(value.reference_gas_price) + _UniffiFfiConverterUInt64.check_lower(value.start_timestamp) + _UniffiFfiConverterOptionalUInt64.check_lower(value.end_timestamp) + _UniffiFfiConverterOptionalUInt64.check_lower(value.system_state_version) + _UniffiFfiConverterOptionalUInt64.check_lower(value.total_checkpoints) + _UniffiFfiConverterOptionalString.check_lower(value.total_gas_fees) + _UniffiFfiConverterOptionalString.check_lower(value.total_stake_rewards) + _UniffiFfiConverterOptionalUInt64.check_lower(value.total_transactions) + _UniffiFfiConverterOptionalTypeValidatorSet.check_lower(value.validator_set) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.epoch_id, buf) + _UniffiFfiConverterOptionalString.write(value.fund_inflow, buf) + _UniffiFfiConverterOptionalString.write(value.fund_outflow, buf) + _UniffiFfiConverterOptionalString.write(value.fund_size, buf) + _UniffiFfiConverterOptionalString.write(value.live_object_set_digest, buf) + _UniffiFfiConverterOptionalString.write(value.net_inflow, buf) + _UniffiFfiConverterOptionalTypeProtocolConfigs.write(value.protocol_configs, buf) + _UniffiFfiConverterOptionalString.write(value.reference_gas_price, buf) + _UniffiFfiConverterUInt64.write(value.start_timestamp, buf) + _UniffiFfiConverterOptionalUInt64.write(value.end_timestamp, buf) + _UniffiFfiConverterOptionalUInt64.write(value.system_state_version, buf) + _UniffiFfiConverterOptionalUInt64.write(value.total_checkpoints, buf) + _UniffiFfiConverterOptionalString.write(value.total_gas_fees, buf) + _UniffiFfiConverterOptionalString.write(value.total_stake_rewards, buf) + _UniffiFfiConverterOptionalUInt64.write(value.total_transactions, buf) + _UniffiFfiConverterOptionalTypeValidatorSet.write(value.validator_set, buf) + +class _UniffiFfiConverterSequenceTypeEpoch(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeEpoch.check_lower(item) - async def total_transaction_blocks_by_digest(self, digest: "Digest") -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint digest. - """ - - _UniffiConverterTypeDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( - self._uniffi_clone_pointer(), - _UniffiConverterTypeDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeEpoch.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - async def total_transaction_blocks_by_seq_num(self, seq_num: "int") -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint sequence number. - """ + return [ + _UniffiFfiConverterTypeEpoch.read(buf) for i in range(count) + ] - _UniffiConverterUInt64.check_lower(seq_num) +@dataclass +class EpochPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[Epoch]): + self.page_info = page_info + self.data = data + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( - self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(seq_num) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - + + def __str__(self): + return "EpochPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - async def transaction(self, digest: "Digest") -> "typing.Optional[SignedTransaction]": - """ - Get a transaction by its digest. - """ +class _UniffiFfiConverterTypeEpochPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return EpochPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeEpoch.read(buf), + ) - _UniffiConverterTypeDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( - self._uniffi_clone_pointer(), - _UniffiConverterTypeDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeSignedTransaction.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeEpoch.check_lower(value.data) - ) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeEpoch.write(value.data, buf) +@dataclass +class Event: + """ + An event + # BCS - async def transaction_data_effects(self, digest: "Digest") -> "typing.Optional[TransactionDataEffects]": - """ - Get a transaction's data and effects by its digest. - """ + The BCS serialized form for this type is defined by the following ABNF: - _UniffiConverterTypeDigest.check_lower(digest) + ```text + event = object-id identifier address struct-tag bytes + ``` +""" + def __init__(self, *, package_id:ObjectId, module:str, sender:Address, type:str, contents:bytes, timestamp:str, data:str, json:str): + self.package_id = package_id + self.module = module + self.sender = sender + self.type = type + self.contents = contents + self.timestamp = timestamp + self.data = data + self.json = json + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypeDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionDataEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) + + def __str__(self): + return "Event(package_id={}, module={}, sender={}, type={}, contents={}, timestamp={}, data={}, json={})".format(self.package_id, self.module, self.sender, self.type, self.contents, self.timestamp, self.data, self.json) + def __eq__(self, other): + if self.package_id != other.package_id: + return False + if self.module != other.module: + return False + if self.sender != other.sender: + return False + if self.type != other.type: + return False + if self.contents != other.contents: + return False + if self.timestamp != other.timestamp: + return False + if self.data != other.data: + return False + if self.json != other.json: + return False + return True +class _UniffiFfiConverterTypeEvent(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return Event( + package_id=_UniffiFfiConverterTypeObjectId.read(buf), + module=_UniffiFfiConverterString.read(buf), + sender=_UniffiFfiConverterTypeAddress.read(buf), + type=_UniffiFfiConverterString.read(buf), + contents=_UniffiFfiConverterBytes.read(buf), + timestamp=_UniffiFfiConverterString.read(buf), + data=_UniffiFfiConverterString.read(buf), + json=_UniffiFfiConverterString.read(buf), + ) - async def transaction_effects(self, digest: "Digest") -> "typing.Optional[TransactionEffects]": - """ - Get a transaction's effects by its digest. - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.package_id) + _UniffiFfiConverterString.check_lower(value.module) + _UniffiFfiConverterTypeAddress.check_lower(value.sender) + _UniffiFfiConverterString.check_lower(value.type) + _UniffiFfiConverterBytes.check_lower(value.contents) + _UniffiFfiConverterString.check_lower(value.timestamp) + _UniffiFfiConverterString.check_lower(value.data) + _UniffiFfiConverterString.check_lower(value.json) - _UniffiConverterTypeDigest.check_lower(digest) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.package_id, buf) + _UniffiFfiConverterString.write(value.module, buf) + _UniffiFfiConverterTypeAddress.write(value.sender, buf) + _UniffiFfiConverterString.write(value.type, buf) + _UniffiFfiConverterBytes.write(value.contents, buf) + _UniffiFfiConverterString.write(value.timestamp, buf) + _UniffiFfiConverterString.write(value.data, buf) + _UniffiFfiConverterString.write(value.json, buf) + +@dataclass +class EventFilter: + def __init__(self, *, emitting_module:typing.Optional[str] = _DEFAULT, event_type:typing.Optional[str] = _DEFAULT, sender:typing.Optional[Address] = _DEFAULT, transaction_digest:typing.Optional[str] = _DEFAULT): + if emitting_module is _DEFAULT: + self.emitting_module = None + else: + self.emitting_module = emitting_module + if event_type is _DEFAULT: + self.event_type = None + else: + self.event_type = event_type + if sender is _DEFAULT: + self.sender = None + else: + self.sender = sender + if transaction_digest is _DEFAULT: + self.transaction_digest = None + else: + self.transaction_digest = transaction_digest + - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypeDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) + + def __str__(self): + return "EventFilter(emitting_module={}, event_type={}, sender={}, transaction_digest={})".format(self.emitting_module, self.event_type, self.sender, self.transaction_digest) + def __eq__(self, other): + if self.emitting_module != other.emitting_module: + return False + if self.event_type != other.event_type: + return False + if self.sender != other.sender: + return False + if self.transaction_digest != other.transaction_digest: + return False + return True +class _UniffiFfiConverterTypeEventFilter(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return EventFilter( + emitting_module=_UniffiFfiConverterOptionalString.read(buf), + event_type=_UniffiFfiConverterOptionalString.read(buf), + sender=_UniffiFfiConverterOptionalTypeAddress.read(buf), + transaction_digest=_UniffiFfiConverterOptionalString.read(buf), + ) - async def transactions(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "SignedTransactionPage": - """ - Get a page of transactions based on the provided filters. - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalString.check_lower(value.emitting_module) + _UniffiFfiConverterOptionalString.check_lower(value.event_type) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.sender) + _UniffiFfiConverterOptionalString.check_lower(value.transaction_digest) - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) - - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeSignedTransactionPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalString.write(value.emitting_module, buf) + _UniffiFfiConverterOptionalString.write(value.event_type, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.sender, buf) + _UniffiFfiConverterOptionalString.write(value.transaction_digest, buf) - ) +class _UniffiFfiConverterSequenceTypeEvent(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeEvent.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeEvent.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - async def transactions_data_effects(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "TransactionDataEffectsPage": - """ - Get a page of transactions' data and effects based on the provided - filters. - """ + return [ + _UniffiFfiConverterTypeEvent.read(buf) for i in range(count) + ] - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) +@dataclass +class EventPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[Event]): + self.page_info = page_info + self.data = data - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeTransactionDataEffectsPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def __str__(self): + return "EventPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True + +class _UniffiFfiConverterTypeEventPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return EventPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeEvent.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeEvent.check_lower(value.data) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeEvent.write(value.data, buf) - async def transactions_effects(self, filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,pagination_filter: "typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT) -> "TransactionEffectsPage": - """ - Get a page of transactions' effects based on the provided filters. - """ - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) +@dataclass +class GqlAddress: + def __init__(self, *, address:Address): + self.address = address - if pagination_filter is _DEFAULT: - pagination_filter = None - _UniffiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter), - _UniffiConverterOptionalTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeTransactionEffectsPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - - + + def __str__(self): + return "GqlAddress(address={})".format(self.address) + def __eq__(self, other): + if self.address != other.address: + return False + return True -class _UniffiConverterTypeGraphQlClient: - +class _UniffiFfiConverterTypeGQLAddress(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return GraphQlClient._make_instance_(value) + def read(buf): + return GqlAddress( + address=_UniffiFfiConverterTypeAddress.read(buf), + ) @staticmethod - def check_lower(value: GraphQlClient): - if not isinstance(value, GraphQlClient): - raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterTypeAddress.check_lower(value.address) @staticmethod - def lower(value: GraphQlClientProtocol): - if not isinstance(value, GraphQlClient): - raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: GraphQlClientProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class IdentifierProtocol(typing.Protocol): - """ - A move identifier + def write(value, buf): + _UniffiFfiConverterTypeAddress.write(value.address, buf) - # BCS - The BCS serialized form for this type is defined by the following ABNF: - ```text - identifier = %x01-80 ; length of the identifier - (ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) / - (UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE)) - UNDERSCORE = %x95 - ``` - """ - def as_str(self, ): - raise NotImplementedError -# Identifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class Identifier(): - """ - A move identifier - # BCS +class MoveAbility(enum.Enum): + + COPY = 0 + + DROP = 1 + + KEY = 2 + + STORE = 3 + - The BCS serialized form for this type is defined by the following ABNF: - ```text - identifier = %x01-80 ; length of the identifier - (ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) / - (UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE)) +class _UniffiFfiConverterTypeMoveAbility(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return MoveAbility.COPY + if variant == 2: + return MoveAbility.DROP + if variant == 3: + return MoveAbility.KEY + if variant == 4: + return MoveAbility.STORE + raise InternalError("Raw enum value doesn't match any cases") - UNDERSCORE = %x95 - ``` - """ + @staticmethod + def check_lower(value): + if value == MoveAbility.COPY: + return + if value == MoveAbility.DROP: + return + if value == MoveAbility.KEY: + return + if value == MoveAbility.STORE: + return + raise ValueError(value) - _pointer: ctypes.c_void_p - def __init__(self, identifier: "str"): - _UniffiConverterString.check_lower(identifier) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new, - _UniffiConverterString.lower(identifier)) + @staticmethod + def write(value, buf): + if value == MoveAbility.COPY: + buf.write_i32(1) + if value == MoveAbility.DROP: + buf.write_i32(2) + if value == MoveAbility.KEY: + buf.write_i32(3) + if value == MoveAbility.STORE: + buf.write_i32(4) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier, self._pointer) - # Used by alternative constructors or any methods which return this type. +class _UniffiFfiConverterSequenceTypeMoveAbility(_UniffiConverterRustBuffer): @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def as_str(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str,self._uniffi_clone_pointer(),) - ) - - + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveAbility.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveAbility.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - def __hash__(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash,self._uniffi_clone_pointer(),) - ) + return [ + _UniffiFfiConverterTypeMoveAbility.read(buf) for i in range(count) + ] +class _UniffiFfiConverterOptionalSequenceTypeMoveAbility(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeMoveAbility.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeMoveAbility.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeMoveAbility.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class MoveStructTypeParameter: + def __init__(self, *, constraints:typing.List[MoveAbility], is_phantom:bool): + self.constraints = constraints + self.is_phantom = is_phantom + + -class _UniffiConverterTypeIdentifier: + + def __str__(self): + return "MoveStructTypeParameter(constraints={}, is_phantom={})".format(self.constraints, self.is_phantom) + def __eq__(self, other): + if self.constraints != other.constraints: + return False + if self.is_phantom != other.is_phantom: + return False + return True +class _UniffiFfiConverterTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Identifier._make_instance_(value) + def read(buf): + return MoveStructTypeParameter( + constraints=_UniffiFfiConverterSequenceTypeMoveAbility.read(buf), + is_phantom=_UniffiFfiConverterBoolean.read(buf), + ) @staticmethod - def check_lower(value: Identifier): - if not isinstance(value, Identifier): - raise TypeError("Expected Identifier instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterSequenceTypeMoveAbility.check_lower(value.constraints) + _UniffiFfiConverterBoolean.check_lower(value.is_phantom) @staticmethod - def lower(value: IdentifierProtocol): - if not isinstance(value, Identifier): - raise TypeError("Expected Identifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterSequenceTypeMoveAbility.write(value.constraints, buf) + _UniffiFfiConverterBoolean.write(value.is_phantom, buf) +class _UniffiFfiConverterSequenceTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveStructTypeParameter.check_lower(item) @classmethod - def write(cls, value: IdentifierProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class InputProtocol(typing.Protocol): - """ - An input to a user transaction - - # BCS + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveStructTypeParameter.write(item, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ```text - input = input-pure / input-immutable-or-owned / input-shared / input-receiving + return [ + _UniffiFfiConverterTypeMoveStructTypeParameter.read(buf) for i in range(count) + ] - input-pure = %x00 bytes - input-immutable-or-owned = %x01 object-ref - input-shared = %x02 object-id u64 bool - input-receiving = %x04 object-ref - ``` - """ +class _UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeMoveStructTypeParameter.check_lower(value) - pass -# Input is a Rust-only trait - it's a wrapper around a Rust implementation. -class Input(): - """ - An input to a user transaction + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - # BCS + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeMoveStructTypeParameter.write(value, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeMoveStructTypeParameter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - ```text - input = input-pure / input-immutable-or-owned / input-shared / input-receiving +@dataclass +class OpenMoveType: + def __init__(self, *, repr:str): + self.repr = repr + + - input-pure = %x00 bytes - input-immutable-or-owned = %x01 object-ref - input-shared = %x02 object-id u64 bool - input-receiving = %x04 object-ref - ``` - """ + + def __str__(self): + return "OpenMoveType(repr={})".format(self.repr) + def __eq__(self, other): + if self.repr != other.repr: + return False + return True - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") +class _UniffiFfiConverterTypeOpenMoveType(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return OpenMoveType( + repr=_UniffiFfiConverterString.read(buf), + ) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input, pointer) + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.repr) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input, self._pointer) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.repr, buf) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst +class _UniffiFfiConverterOptionalTypeOpenMoveType(_UniffiConverterRustBuffer): @classmethod - def new_immutable_or_owned(cls, object_ref: "ObjectReference"): - """ - A move object that is either immutable or address owned - """ - - _UniffiConverterTypeObjectReference.check_lower(object_ref) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned, - _UniffiConverterTypeObjectReference.lower(object_ref)) - return cls._make_instance_(pointer) + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeOpenMoveType.check_lower(value) @classmethod - def new_pure(cls, value: "bytes"): - """ - For normal operations this is required to be a move primitive type and - not contain structs or objects. - """ - - _UniffiConverterBytes.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure, - _UniffiConverterBytes.lower(value)) - return cls._make_instance_(pointer) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - @classmethod - def new_receiving(cls, object_ref: "ObjectReference"): - _UniffiConverterTypeObjectReference.check_lower(object_ref) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving, - _UniffiConverterTypeObjectReference.lower(object_ref)) - return cls._make_instance_(pointer) + buf.write_u8(1) + _UniffiFfiConverterTypeOpenMoveType.write(value, buf) @classmethod - def new_shared(cls, object_id: "ObjectId",initial_shared_version: "int",mutable: "bool"): - """ - A move object whose owner is "Shared" - """ + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeOpenMoveType.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _UniffiConverterTypeObjectId.check_lower(object_id) - - _UniffiConverterUInt64.check_lower(initial_shared_version) +@dataclass +class MoveField: + def __init__(self, *, name:str, type:typing.Optional[OpenMoveType] = _DEFAULT): + self.name = name + if type is _DEFAULT: + self.type = None + else: + self.type = type - _UniffiConverterBool.check_lower(mutable) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared, - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterUInt64.lower(initial_shared_version), - _UniffiConverterBool.lower(mutable)) - return cls._make_instance_(pointer) + + def __str__(self): + return "MoveField(name={}, type={})".format(self.name, self.type) + def __eq__(self, other): + if self.name != other.name: + return False + if self.type != other.type: + return False + return True - - -class _UniffiConverterTypeInput: - +class _UniffiFfiConverterTypeMoveField(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return Input._make_instance_(value) + def read(buf): + return MoveField( + name=_UniffiFfiConverterString.read(buf), + type=_UniffiFfiConverterOptionalTypeOpenMoveType.read(buf), + ) @staticmethod - def check_lower(value: Input): - if not isinstance(value, Input): - raise TypeError("Expected Input instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.name) + _UniffiFfiConverterOptionalTypeOpenMoveType.check_lower(value.type) @staticmethod - def lower(value: InputProtocol): - if not isinstance(value, Input): - raise TypeError("Expected Input instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterString.write(value.name, buf) + _UniffiFfiConverterOptionalTypeOpenMoveType.write(value.type, buf) +class _UniffiFfiConverterSequenceTypeMoveField(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveField.check_lower(item) @classmethod - def write(cls, value: InputProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MakeMoveVectorProtocol(typing.Protocol): - """ - Command to build a move vector out of a set of individual elements + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveField.write(item, buf) - # BCS + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - The BCS serialized form for this type is defined by the following ABNF: + return [ + _UniffiFfiConverterTypeMoveField.read(buf) for i in range(count) + ] - ```text - make-move-vector = (option type-tag) (vector argument) - ``` - """ +class _UniffiFfiConverterOptionalSequenceTypeMoveField(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeMoveField.check_lower(value) - def elements(self, ): - """ - The set individual elements to build the vector with - """ + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - raise NotImplementedError - def type_tag(self, ): - """ - Type of the individual elements + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeMoveField.write(value, buf) - This is required to be set when the type can't be inferred, for example - when the set of provided arguments are all pure input values. - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeMoveField.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - raise NotImplementedError -# MakeMoveVector is a Rust-only trait - it's a wrapper around a Rust implementation. -class MakeMoveVector(): - """ - Command to build a move vector out of a set of individual elements +@dataclass +class MoveEnumVariant: + def __init__(self, *, fields:typing.Optional[typing.List[MoveField]] = _DEFAULT, name:str): + if fields is _DEFAULT: + self.fields = None + else: + self.fields = fields + self.name = name + + - # BCS + + def __str__(self): + return "MoveEnumVariant(fields={}, name={})".format(self.fields, self.name) + def __eq__(self, other): + if self.fields != other.fields: + return False + if self.name != other.name: + return False + return True - The BCS serialized form for this type is defined by the following ABNF: +class _UniffiFfiConverterTypeMoveEnumVariant(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveEnumVariant( + fields=_UniffiFfiConverterOptionalSequenceTypeMoveField.read(buf), + name=_UniffiFfiConverterString.read(buf), + ) - ```text - make-move-vector = (option type-tag) (vector argument) - ``` - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalSequenceTypeMoveField.check_lower(value.fields) + _UniffiFfiConverterString.check_lower(value.name) - _pointer: ctypes.c_void_p - def __init__(self, type_tag: "typing.Optional[TypeTag]",elements: "typing.List[Argument]"): - _UniffiConverterOptionalTypeTypeTag.check_lower(type_tag) - - _UniffiConverterSequenceTypeArgument.check_lower(elements) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new, - _UniffiConverterOptionalTypeTypeTag.lower(type_tag), - _UniffiConverterSequenceTypeArgument.lower(elements)) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalSequenceTypeMoveField.write(value.fields, buf) + _UniffiFfiConverterString.write(value.name, buf) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector, pointer) +class _UniffiFfiConverterSequenceTypeMoveEnumVariant(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveEnumVariant.check_lower(item) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector, self._pointer) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveEnumVariant.write(item, buf) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeMoveEnumVariant.read(buf) for i in range(count) + ] - def elements(self, ) -> "typing.List[Argument]": - """ - The set individual elements to build the vector with - """ +class _UniffiFfiConverterOptionalSequenceTypeMoveEnumVariant(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeMoveEnumVariant.check_lower(value) - return _UniffiConverterSequenceTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeMoveEnumVariant.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeMoveEnumVariant.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class MoveEnum: + def __init__(self, *, abilities:typing.Optional[typing.List[MoveAbility]] = _DEFAULT, name:str, type_parameters:typing.Optional[typing.List[MoveStructTypeParameter]] = _DEFAULT, variants:typing.Optional[typing.List[MoveEnumVariant]] = _DEFAULT): + if abilities is _DEFAULT: + self.abilities = None + else: + self.abilities = abilities + self.name = name + if type_parameters is _DEFAULT: + self.type_parameters = None + else: + self.type_parameters = type_parameters + if variants is _DEFAULT: + self.variants = None + else: + self.variants = variants + + + + def __str__(self): + return "MoveEnum(abilities={}, name={}, type_parameters={}, variants={})".format(self.abilities, self.name, self.type_parameters, self.variants) + def __eq__(self, other): + if self.abilities != other.abilities: + return False + if self.name != other.name: + return False + if self.type_parameters != other.type_parameters: + return False + if self.variants != other.variants: + return False + return True - def type_tag(self, ) -> "typing.Optional[TypeTag]": - """ - Type of the individual elements +class _UniffiFfiConverterTypeMoveEnum(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveEnum( + abilities=_UniffiFfiConverterOptionalSequenceTypeMoveAbility.read(buf), + name=_UniffiFfiConverterString.read(buf), + type_parameters=_UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.read(buf), + variants=_UniffiFfiConverterOptionalSequenceTypeMoveEnumVariant.read(buf), + ) - This is required to be set when the type can't be inferred, for example - when the set of provided arguments are all pure input values. - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalSequenceTypeMoveAbility.check_lower(value.abilities) + _UniffiFfiConverterString.check_lower(value.name) + _UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.check_lower(value.type_parameters) + _UniffiFfiConverterOptionalSequenceTypeMoveEnumVariant.check_lower(value.variants) - return _UniffiConverterOptionalTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag,self._uniffi_clone_pointer(),) - ) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalSequenceTypeMoveAbility.write(value.abilities, buf) + _UniffiFfiConverterString.write(value.name, buf) + _UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.write(value.type_parameters, buf) + _UniffiFfiConverterOptionalSequenceTypeMoveEnumVariant.write(value.variants, buf) +class _UniffiFfiConverterSequenceTypeMoveEnum(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveEnum.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveEnum.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeMoveEnum.read(buf) for i in range(count) + ] +@dataclass +class MoveEnumConnection: + def __init__(self, *, nodes:typing.List[MoveEnum], page_info:PageInfo): + self.nodes = nodes + self.page_info = page_info + + -class _UniffiConverterTypeMakeMoveVector: + + def __str__(self): + return "MoveEnumConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) + def __eq__(self, other): + if self.nodes != other.nodes: + return False + if self.page_info != other.page_info: + return False + return True +class _UniffiFfiConverterTypeMoveEnumConnection(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MakeMoveVector._make_instance_(value) + def read(buf): + return MoveEnumConnection( + nodes=_UniffiFfiConverterSequenceTypeMoveEnum.read(buf), + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + ) @staticmethod - def check_lower(value: MakeMoveVector): - if not isinstance(value, MakeMoveVector): - raise TypeError("Expected MakeMoveVector instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterSequenceTypeMoveEnum.check_lower(value.nodes) + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) @staticmethod - def lower(value: MakeMoveVectorProtocol): - if not isinstance(value, MakeMoveVector): - raise TypeError("Expected MakeMoveVector instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterSequenceTypeMoveEnum.write(value.nodes, buf) + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) +class _UniffiFfiConverterSequenceTypeOpenMoveType(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeOpenMoveType.check_lower(item) @classmethod - def write(cls, value: MakeMoveVectorProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MergeCoinsProtocol(typing.Protocol): - """ - Command to merge multiple coins of the same type into a single coin - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - merge-coins = argument (vector argument) - ``` - """ - - def coin(self, ): - """ - Coin to merge coins into - """ + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeOpenMoveType.write(item, buf) - raise NotImplementedError - def coins_to_merge(self, ): - """ - Set of coins to merge into `coin` + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - All listed coins must be of the same type and be the same type as `coin` - """ + return [ + _UniffiFfiConverterTypeOpenMoveType.read(buf) for i in range(count) + ] - raise NotImplementedError -# MergeCoins is a Rust-only trait - it's a wrapper around a Rust implementation. -class MergeCoins(): - """ - Command to merge multiple coins of the same type into a single coin +class _UniffiFfiConverterOptionalSequenceTypeOpenMoveType(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeOpenMoveType.check_lower(value) - # BCS + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - The BCS serialized form for this type is defined by the following ABNF: + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeOpenMoveType.write(value, buf) - ```text - merge-coins = argument (vector argument) - ``` - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeOpenMoveType.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _pointer: ctypes.c_void_p - def __init__(self, coin: "Argument",coins_to_merge: "typing.List[Argument]"): - _UniffiConverterTypeArgument.check_lower(coin) +@dataclass +class MoveFunctionTypeParameter: + def __init__(self, *, constraints:typing.List[MoveAbility]): + self.constraints = constraints - _UniffiConverterSequenceTypeArgument.check_lower(coins_to_merge) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new, - _UniffiConverterTypeArgument.lower(coin), - _UniffiConverterSequenceTypeArgument.lower(coins_to_merge)) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins, pointer) + + def __str__(self): + return "MoveFunctionTypeParameter(constraints={})".format(self.constraints) + def __eq__(self, other): + if self.constraints != other.constraints: + return False + return True - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins, self._pointer) +class _UniffiFfiConverterTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveFunctionTypeParameter( + constraints=_UniffiFfiConverterSequenceTypeMoveAbility.read(buf), + ) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + @staticmethod + def check_lower(value): + _UniffiFfiConverterSequenceTypeMoveAbility.check_lower(value.constraints) + @staticmethod + def write(value, buf): + _UniffiFfiConverterSequenceTypeMoveAbility.write(value.constraints, buf) - def coin(self, ) -> "Argument": - """ - Coin to merge coins into - """ +class _UniffiFfiConverterSequenceTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveFunctionTypeParameter.check_lower(item) - return _UniffiConverterTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveFunctionTypeParameter.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeMoveFunctionTypeParameter.read(buf) for i in range(count) + ] +class _UniffiFfiConverterOptionalSequenceTypeMoveFunctionTypeParameter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeMoveFunctionTypeParameter.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def coins_to_merge(self, ) -> "typing.List[Argument]": - """ - Set of coins to merge into `coin` + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeMoveFunctionTypeParameter.write(value, buf) - All listed coins must be of the same type and be the same type as `coin` - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeMoveFunctionTypeParameter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - return _UniffiConverterSequenceTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge,self._uniffi_clone_pointer(),) - ) +class MoveVisibility(enum.Enum): + + PUBLIC = 0 + + PRIVATE = 1 + + FRIEND = 2 + -class _UniffiConverterTypeMergeCoins: +class _UniffiFfiConverterTypeMoveVisibility(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MergeCoins._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return MoveVisibility.PUBLIC + if variant == 2: + return MoveVisibility.PRIVATE + if variant == 3: + return MoveVisibility.FRIEND + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: MergeCoins): - if not isinstance(value, MergeCoins): - raise TypeError("Expected MergeCoins instance, {} found".format(type(value).__name__)) + def check_lower(value): + if value == MoveVisibility.PUBLIC: + return + if value == MoveVisibility.PRIVATE: + return + if value == MoveVisibility.FRIEND: + return + raise ValueError(value) @staticmethod - def lower(value: MergeCoinsProtocol): - if not isinstance(value, MergeCoins): - raise TypeError("Expected MergeCoins instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: MergeCoinsProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MoveCallProtocol(typing.Protocol): - """ - Command to call a move function - - Functions that can be called by a `MoveCall` command are those that have a - function signature that is either `entry` or `public` (which don't have a - reference return type). - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - move-call = object-id ; package id - identifier ; module name - identifier ; function name - (vector type-tag) ; type arguments, if any - (vector argument) ; input arguments - ``` - """ - - def arguments(self, ): - """ - The arguments to the function. - """ - - raise NotImplementedError - def function(self, ): - """ - The function to be called. - """ + def write(value, buf): + if value == MoveVisibility.PUBLIC: + buf.write_i32(1) + if value == MoveVisibility.PRIVATE: + buf.write_i32(2) + if value == MoveVisibility.FRIEND: + buf.write_i32(3) - raise NotImplementedError - def module(self, ): - """ - The specific module in the package containing the function. - """ - raise NotImplementedError - def package(self, ): - """ - The package containing the module and function. - """ - raise NotImplementedError - def type_arguments(self, ): - """ - The type arguments to the function. - """ +class _UniffiFfiConverterOptionalTypeMoveVisibility(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveVisibility.check_lower(value) - raise NotImplementedError -# MoveCall is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveCall(): - """ - Command to call a move function + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - Functions that can be called by a `MoveCall` command are those that have a - function signature that is either `entry` or `public` (which don't have a - reference return type). + buf.write_u8(1) + _UniffiFfiConverterTypeMoveVisibility.write(value, buf) - # BCS + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveVisibility.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - The BCS serialized form for this type is defined by the following ABNF: - ```text - move-call = object-id ; package id - identifier ; module name - identifier ; function name - (vector type-tag) ; type arguments, if any - (vector argument) ; input arguments - ``` - """ +class MoveFunctionProtocol(typing.Protocol): + + def is_entry(self, ) -> bool: + raise NotImplementedError + def name(self, ) -> str: + raise NotImplementedError + def parameters(self, ) -> typing.Optional[typing.List[OpenMoveType]]: + raise NotImplementedError + def return_type(self, ) -> typing.Optional[typing.List[OpenMoveType]]: + raise NotImplementedError + def type_parameters(self, ) -> typing.Optional[typing.List[MoveFunctionTypeParameter]]: + raise NotImplementedError + def visibility(self, ) -> typing.Optional[MoveVisibility]: + raise NotImplementedError - _pointer: ctypes.c_void_p - def __init__(self, package: "ObjectId",module: "Identifier",function: "Identifier",type_arguments: "typing.List[TypeTag]",arguments: "typing.List[Argument]"): - _UniffiConverterTypeObjectId.check_lower(package) - - _UniffiConverterTypeIdentifier.check_lower(module) - - _UniffiConverterTypeIdentifier.check_lower(function) - - _UniffiConverterSequenceTypeTypeTag.check_lower(type_arguments) - - _UniffiConverterSequenceTypeArgument.check_lower(arguments) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new, - _UniffiConverterTypeObjectId.lower(package), - _UniffiConverterTypeIdentifier.lower(module), - _UniffiConverterTypeIdentifier.lower(function), - _UniffiConverterSequenceTypeTypeTag.lower(type_arguments), - _UniffiConverterSequenceTypeArgument.lower(arguments)) +class MoveFunction(MoveFunctionProtocol): + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def is_entry(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def name(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def parameters(self, ) -> typing.Optional[typing.List[OpenMoveType]]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalSequenceTypeOpenMoveType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def return_type(self, ) -> typing.Optional[typing.List[OpenMoveType]]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalSequenceTypeOpenMoveType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def type_parameters(self, ) -> typing.Optional[typing.List[MoveFunctionTypeParameter]]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalSequenceTypeMoveFunctionTypeParameter.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def visibility(self, ) -> typing.Optional[MoveVisibility]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMoveVisibility.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - - def arguments(self, ) -> "typing.List[Argument]": - """ - The arguments to the function. - """ - - return _UniffiConverterSequenceTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments,self._uniffi_clone_pointer(),) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def function(self, ) -> "Identifier": - """ - The function to be called. - """ - - return _UniffiConverterTypeIdentifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) +class _UniffiFfiConverterTypeMoveFunction: + @staticmethod + def lift(value: int) -> MoveFunction: + return MoveFunction._uniffi_make_instance(value) + @staticmethod + def check_lower(value: MoveFunction): + if not isinstance(value, MoveFunction): + raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) - def module(self, ) -> "Identifier": - """ - The specific module in the package containing the function. - """ - - return _UniffiConverterTypeIdentifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module,self._uniffi_clone_pointer(),) - ) - - - + @staticmethod + def lower(value: MoveFunction) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> MoveFunction: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - def package(self, ) -> "ObjectId": - """ - The package containing the module and function. - """ + @classmethod + def write(cls, value: MoveFunction, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterSequenceTypeMoveFunction(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveFunction.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveFunction.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeMoveFunction.read(buf) for i in range(count) + ] +@dataclass +class MoveFunctionConnection: + def __init__(self, *, nodes:typing.List[MoveFunction], page_info:PageInfo): + self.nodes = nodes + self.page_info = page_info + + - def type_arguments(self, ) -> "typing.List[TypeTag]": - """ - The type arguments to the function. - """ + + def __str__(self): + return "MoveFunctionConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) + def __eq__(self, other): + if self.nodes != other.nodes: + return False + if self.page_info != other.page_info: + return False + return True - return _UniffiConverterSequenceTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveFunctionConnection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveFunctionConnection( + nodes=_UniffiFfiConverterSequenceTypeMoveFunction.read(buf), + page_info=_UniffiFfiConverterTypePageInfo.read(buf), ) - - - - - -class _UniffiConverterTypeMoveCall: - @staticmethod - def lift(value: int): - return MoveCall._make_instance_(value) + def check_lower(value): + _UniffiFfiConverterSequenceTypeMoveFunction.check_lower(value.nodes) + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) @staticmethod - def check_lower(value: MoveCall): - if not isinstance(value, MoveCall): - raise TypeError("Expected MoveCall instance, {} found".format(type(value).__name__)) + def write(value, buf): + _UniffiFfiConverterSequenceTypeMoveFunction.write(value.nodes, buf) + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) - @staticmethod - def lower(value: MoveCallProtocol): - if not isinstance(value, MoveCall): - raise TypeError("Expected MoveCall instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() +class _UniffiFfiConverterOptionalTypeMoveEnumConnection(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveEnumConnection.check_lower(value) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeMoveEnumConnection.write(value, buf) @classmethod - def write(cls, value: MoveCallProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MoveFunctionProtocol(typing.Protocol): - def is_entry(self, ): - raise NotImplementedError - def name(self, ): - raise NotImplementedError - def parameters(self, ): - raise NotImplementedError - def return_type(self, ): - raise NotImplementedError - def type_parameters(self, ): - raise NotImplementedError - def visibility(self, ): - raise NotImplementedError -# MoveFunction is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveFunction(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveEnumConnection.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction, self._pointer) +class _UniffiFfiConverterTypeBase64: + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value, buf) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + @staticmethod + def read(buf): + return _UniffiFfiConverterString.read(buf) + @staticmethod + def lift(value): + return _UniffiFfiConverterString.lift(value) - def is_entry(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_is_entry,self._uniffi_clone_pointer(),) - ) + @staticmethod + def check_lower(value): + return _UniffiFfiConverterString.check_lower(value) + @staticmethod + def lower(value): + return _UniffiFfiConverterString.lower(value) +Base64 = str +class _UniffiFfiConverterOptionalTypeBase64(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeBase64.check_lower(value) - def name(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_name,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeBase64.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeBase64.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class MovePackageQuery: + def __init__(self, *, address:Address, bcs:typing.Optional[Base64] = _DEFAULT): + self.address = address + if bcs is _DEFAULT: + self.bcs = None + else: + self.bcs = bcs + + + + def __str__(self): + return "MovePackageQuery(address={}, bcs={})".format(self.address, self.bcs) + def __eq__(self, other): + if self.address != other.address: + return False + if self.bcs != other.bcs: + return False + return True - def parameters(self, ) -> "typing.Optional[typing.List[OpenMoveType]]": - return _UniffiConverterOptionalSequenceTypeOpenMoveType.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_parameters,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMovePackageQuery(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MovePackageQuery( + address=_UniffiFfiConverterTypeAddress.read(buf), + bcs=_UniffiFfiConverterOptionalTypeBase64.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeAddress.check_lower(value.address) + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.bcs) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeAddress.write(value.address, buf) + _UniffiFfiConverterOptionalTypeBase64.write(value.bcs, buf) +@dataclass +class MoveModuleQuery: + def __init__(self, *, package:MovePackageQuery, name:str): + self.package = package + self.name = name + + + + def __str__(self): + return "MoveModuleQuery(package={}, name={})".format(self.package, self.name) + def __eq__(self, other): + if self.package != other.package: + return False + if self.name != other.name: + return False + return True - def return_type(self, ) -> "typing.Optional[typing.List[OpenMoveType]]": - return _UniffiConverterOptionalSequenceTypeOpenMoveType.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_return_type,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveModuleQuery(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveModuleQuery( + package=_UniffiFfiConverterTypeMovePackageQuery.read(buf), + name=_UniffiFfiConverterString.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeMovePackageQuery.check_lower(value.package) + _UniffiFfiConverterString.check_lower(value.name) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeMovePackageQuery.write(value.package, buf) + _UniffiFfiConverterString.write(value.name, buf) +class _UniffiFfiConverterSequenceTypeMoveModuleQuery(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveModuleQuery.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveModuleQuery.write(item, buf) - def type_parameters(self, ) -> "typing.Optional[typing.List[MoveFunctionTypeParameter]]": - return _UniffiConverterOptionalSequenceTypeMoveFunctionTypeParameter.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_type_parameters,self._uniffi_clone_pointer(),) - ) - + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeMoveModuleQuery.read(buf) for i in range(count) + ] +@dataclass +class MoveModuleConnection: + def __init__(self, *, nodes:typing.List[MoveModuleQuery], page_info:PageInfo): + self.nodes = nodes + self.page_info = page_info + + + + def __str__(self): + return "MoveModuleConnection(nodes={}, page_info={})".format(self.nodes, self.page_info) + def __eq__(self, other): + if self.nodes != other.nodes: + return False + if self.page_info != other.page_info: + return False + return True - def visibility(self, ) -> "typing.Optional[MoveVisibility]": - return _UniffiConverterOptionalTypeMoveVisibility.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_visibility,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveModuleConnection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveModuleConnection( + nodes=_UniffiFfiConverterSequenceTypeMoveModuleQuery.read(buf), + page_info=_UniffiFfiConverterTypePageInfo.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterSequenceTypeMoveModuleQuery.check_lower(value.nodes) + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + @staticmethod + def write(value, buf): + _UniffiFfiConverterSequenceTypeMoveModuleQuery.write(value.nodes, buf) + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) +class _UniffiFfiConverterOptionalTypeMoveFunctionConnection(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveFunctionConnection.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def __str__(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movefunction_uniffi_trait_display,self._uniffi_clone_pointer(),) - ) - - - + buf.write_u8(1) + _UniffiFfiConverterTypeMoveFunctionConnection.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveFunctionConnection.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class MoveStructQuery: + def __init__(self, *, abilities:typing.Optional[typing.List[MoveAbility]] = _DEFAULT, name:str, fields:typing.Optional[typing.List[MoveField]] = _DEFAULT, type_parameters:typing.Optional[typing.List[MoveStructTypeParameter]] = _DEFAULT): + if abilities is _DEFAULT: + self.abilities = None + else: + self.abilities = abilities + self.name = name + if fields is _DEFAULT: + self.fields = None + else: + self.fields = fields + if type_parameters is _DEFAULT: + self.type_parameters = None + else: + self.type_parameters = type_parameters + + -class _UniffiConverterTypeMoveFunction: + + def __str__(self): + return "MoveStructQuery(abilities={}, name={}, fields={}, type_parameters={})".format(self.abilities, self.name, self.fields, self.type_parameters) + def __eq__(self, other): + if self.abilities != other.abilities: + return False + if self.name != other.name: + return False + if self.fields != other.fields: + return False + if self.type_parameters != other.type_parameters: + return False + return True +class _UniffiFfiConverterTypeMoveStructQuery(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MoveFunction._make_instance_(value) + def read(buf): + return MoveStructQuery( + abilities=_UniffiFfiConverterOptionalSequenceTypeMoveAbility.read(buf), + name=_UniffiFfiConverterString.read(buf), + fields=_UniffiFfiConverterOptionalSequenceTypeMoveField.read(buf), + type_parameters=_UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.read(buf), + ) @staticmethod - def check_lower(value: MoveFunction): - if not isinstance(value, MoveFunction): - raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterOptionalSequenceTypeMoveAbility.check_lower(value.abilities) + _UniffiFfiConverterString.check_lower(value.name) + _UniffiFfiConverterOptionalSequenceTypeMoveField.check_lower(value.fields) + _UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.check_lower(value.type_parameters) @staticmethod - def lower(value: MoveFunctionProtocol): - if not isinstance(value, MoveFunction): - raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterOptionalSequenceTypeMoveAbility.write(value.abilities, buf) + _UniffiFfiConverterString.write(value.name, buf) + _UniffiFfiConverterOptionalSequenceTypeMoveField.write(value.fields, buf) + _UniffiFfiConverterOptionalSequenceTypeMoveStructTypeParameter.write(value.type_parameters, buf) +class _UniffiFfiConverterSequenceTypeMoveStructQuery(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMoveStructQuery.check_lower(item) @classmethod - def write(cls, value: MoveFunctionProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MovePackageProtocol(typing.Protocol): - """ - A move package - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - object-move-package = object-id u64 move-modules type-origin-table linkage-table - - move-modules = map (identifier bytes) - type-origin-table = vector type-origin - linkage-table = map (object-id upgrade-info) - ``` - """ - - def id(self, ): - raise NotImplementedError - def linkage_table(self, ): - raise NotImplementedError - def modules(self, ): - raise NotImplementedError - def type_origin_table(self, ): - raise NotImplementedError - def version(self, ): - raise NotImplementedError -# MovePackage is a Rust-only trait - it's a wrapper around a Rust implementation. -class MovePackage(): - """ - A move package - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMoveStructQuery.write(item, buf) - ```text - object-move-package = object-id u64 move-modules type-origin-table linkage-table + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - move-modules = map (identifier bytes) - type-origin-table = vector type-origin - linkage-table = map (object-id upgrade-info) - ``` - """ + return [ + _UniffiFfiConverterTypeMoveStructQuery.read(buf) for i in range(count) + ] - _pointer: ctypes.c_void_p - def __init__(self, id: "ObjectId",version: "int",modules: "dict[Identifier, bytes]",type_origin_table: "typing.List[TypeOrigin]",linkage_table: "dict[ObjectId, UpgradeInfo]"): - _UniffiConverterTypeObjectId.check_lower(id) - - _UniffiConverterUInt64.check_lower(version) - - _UniffiConverterMapTypeIdentifierBytes.check_lower(modules) - - _UniffiConverterSequenceTypeTypeOrigin.check_lower(type_origin_table) +@dataclass +class MoveStructConnection: + def __init__(self, *, page_info:PageInfo, nodes:typing.List[MoveStructQuery]): + self.page_info = page_info + self.nodes = nodes - _UniffiConverterMapTypeObjectIdTypeUpgradeInfo.check_lower(linkage_table) - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new, - _UniffiConverterTypeObjectId.lower(id), - _UniffiConverterUInt64.lower(version), - _UniffiConverterMapTypeIdentifierBytes.lower(modules), - _UniffiConverterSequenceTypeTypeOrigin.lower(type_origin_table), - _UniffiConverterMapTypeObjectIdTypeUpgradeInfo.lower(linkage_table)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + + def __str__(self): + return "MoveStructConnection(page_info={}, nodes={})".format(self.page_info, self.nodes) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.nodes != other.nodes: + return False + return True - def id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveStructConnection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveStructConnection( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + nodes=_UniffiFfiConverterSequenceTypeMoveStructQuery.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeMoveStructQuery.check_lower(value.nodes) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeMoveStructQuery.write(value.nodes, buf) +class _UniffiFfiConverterOptionalTypeMoveStructConnection(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveStructConnection.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def linkage_table(self, ) -> "dict[ObjectId, UpgradeInfo]": - return _UniffiConverterMapTypeObjectIdTypeUpgradeInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table,self._uniffi_clone_pointer(),) - ) - + buf.write_u8(1) + _UniffiFfiConverterTypeMoveStructConnection.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveStructConnection.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class MoveModule: + def __init__(self, *, file_format_version:int, enums:typing.Optional[MoveEnumConnection] = _DEFAULT, friends:MoveModuleConnection, functions:typing.Optional[MoveFunctionConnection] = _DEFAULT, structs:typing.Optional[MoveStructConnection] = _DEFAULT): + self.file_format_version = file_format_version + if enums is _DEFAULT: + self.enums = None + else: + self.enums = enums + self.friends = friends + if functions is _DEFAULT: + self.functions = None + else: + self.functions = functions + if structs is _DEFAULT: + self.structs = None + else: + self.structs = structs + + + + def __str__(self): + return "MoveModule(file_format_version={}, enums={}, friends={}, functions={}, structs={})".format(self.file_format_version, self.enums, self.friends, self.functions, self.structs) + def __eq__(self, other): + if self.file_format_version != other.file_format_version: + return False + if self.enums != other.enums: + return False + if self.friends != other.friends: + return False + if self.functions != other.functions: + return False + if self.structs != other.structs: + return False + return True - def modules(self, ) -> "dict[Identifier, bytes]": - return _UniffiConverterMapTypeIdentifierBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveModule(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveModule( + file_format_version=_UniffiFfiConverterInt32.read(buf), + enums=_UniffiFfiConverterOptionalTypeMoveEnumConnection.read(buf), + friends=_UniffiFfiConverterTypeMoveModuleConnection.read(buf), + functions=_UniffiFfiConverterOptionalTypeMoveFunctionConnection.read(buf), + structs=_UniffiFfiConverterOptionalTypeMoveStructConnection.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterInt32.check_lower(value.file_format_version) + _UniffiFfiConverterOptionalTypeMoveEnumConnection.check_lower(value.enums) + _UniffiFfiConverterTypeMoveModuleConnection.check_lower(value.friends) + _UniffiFfiConverterOptionalTypeMoveFunctionConnection.check_lower(value.functions) + _UniffiFfiConverterOptionalTypeMoveStructConnection.check_lower(value.structs) + @staticmethod + def write(value, buf): + _UniffiFfiConverterInt32.write(value.file_format_version, buf) + _UniffiFfiConverterOptionalTypeMoveEnumConnection.write(value.enums, buf) + _UniffiFfiConverterTypeMoveModuleConnection.write(value.friends, buf) + _UniffiFfiConverterOptionalTypeMoveFunctionConnection.write(value.functions, buf) + _UniffiFfiConverterOptionalTypeMoveStructConnection.write(value.structs, buf) +@dataclass +class MoveObject: + def __init__(self, *, bcs:typing.Optional[Base64] = _DEFAULT): + if bcs is _DEFAULT: + self.bcs = None + else: + self.bcs = bcs + + + + def __str__(self): + return "MoveObject(bcs={})".format(self.bcs) + def __eq__(self, other): + if self.bcs != other.bcs: + return False + return True - def type_origin_table(self, ) -> "typing.List[TypeOrigin]": - return _UniffiConverterSequenceTypeTypeOrigin.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveObject(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveObject( + bcs=_UniffiFfiConverterOptionalTypeBase64.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.bcs) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalTypeBase64.write(value.bcs, buf) +@dataclass +class UpgradeInfo: + """ + Upgraded package info for the linkage table + # BCS - def version(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version,self._uniffi_clone_pointer(),) - ) - - - - + The BCS serialized form for this type is defined by the following ABNF: + ```text + upgrade-info = object-id u64 + ``` +""" + def __init__(self, *, upgraded_id:ObjectId, upgraded_version:int): + self.upgraded_id = upgraded_id + self.upgraded_version = upgraded_version + + -class _UniffiConverterTypeMovePackage: + + def __str__(self): + return "UpgradeInfo(upgraded_id={}, upgraded_version={})".format(self.upgraded_id, self.upgraded_version) + def __eq__(self, other): + if self.upgraded_id != other.upgraded_id: + return False + if self.upgraded_version != other.upgraded_version: + return False + return True +class _UniffiFfiConverterTypeUpgradeInfo(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MovePackage._make_instance_(value) + def read(buf): + return UpgradeInfo( + upgraded_id=_UniffiFfiConverterTypeObjectId.read(buf), + upgraded_version=_UniffiFfiConverterUInt64.read(buf), + ) @staticmethod - def check_lower(value: MovePackage): - if not isinstance(value, MovePackage): - raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.upgraded_id) + _UniffiFfiConverterUInt64.check_lower(value.upgraded_version) @staticmethod - def lower(value: MovePackageProtocol): - if not isinstance(value, MovePackage): - raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.upgraded_id, buf) + _UniffiFfiConverterUInt64.write(value.upgraded_version, buf) +class _UniffiFfiConverterMapTypeObjectIdTypeUpgradeInfo(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, items): + for (key, value) in items.items(): + _UniffiFfiConverterTypeObjectId.check_lower(key) + _UniffiFfiConverterTypeUpgradeInfo.check_lower(value) @classmethod - def write(cls, value: MovePackageProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MultisigAggregatedSignatureProtocol(typing.Protocol): + def write(cls, items, buf): + buf.write_i32(len(items)) + for (key, value) in items.items(): + _UniffiFfiConverterTypeObjectId.write(key, buf) + _UniffiFfiConverterTypeUpgradeInfo.write(value, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative map size") + + # It would be nice to use a dict comprehension, + # but in Python 3.7 and before the evaluation order is not according to spec, + # so we we're reading the value before the key. + # This loop makes the order explicit: first reading the key, then the value. + d = {} + for i in range(count): + key = _UniffiFfiConverterTypeObjectId.read(buf) + val = _UniffiFfiConverterTypeUpgradeInfo.read(buf) + d[key] = val + return d + + +class IdentifierProtocol(typing.Protocol): """ - Aggregated signature from members of a multisig committee. + A move identifier # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - multisig-aggregated-signature = (vector multisig-member-signature) - u16 ; bitmap - multisig-committee - ``` - - There is also a legacy encoding for this type defined as: + identifier = %x01-80 ; length of the identifier + (ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) / + (UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE)) - ```text - legacy-multisig-aggregated-signature = (vector multisig-member-signature) - roaring-bitmap ; bitmap - legacy-multisig-committee - roaring-bitmap = bytes ; where the contents of the bytes are valid - ; according to the serialized spec for - ; roaring bitmaps + UNDERSCORE = %x95 ``` - - See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the - serialized format of RoaringBitmaps. - """ - - def bitmap(self, ): - """ - The bitmap that indicates which committee members provided their - signature. - """ - - raise NotImplementedError - def committee(self, ): +""" + + def as_str(self, ) -> str: raise NotImplementedError - def signatures(self, ): - """ - The list of signatures from committee members - """ - raise NotImplementedError -# MultisigAggregatedSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigAggregatedSignature(): +class Identifier(IdentifierProtocol): """ - Aggregated signature from members of a multisig committee. + A move identifier # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - multisig-aggregated-signature = (vector multisig-member-signature) - u16 ; bitmap - multisig-committee - ``` - - There is also a legacy encoding for this type defined as: + identifier = %x01-80 ; length of the identifier + (ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) / + (UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE)) - ```text - legacy-multisig-aggregated-signature = (vector multisig-member-signature) - roaring-bitmap ; bitmap - legacy-multisig-committee - roaring-bitmap = bytes ; where the contents of the bytes are valid - ; according to the serialized spec for - ; roaring bitmaps + UNDERSCORE = %x95 ``` - - See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the - serialized format of RoaringBitmaps. - """ - - _pointer: ctypes.c_void_p - def __init__(self, committee: "MultisigCommittee",signatures: "typing.List[MultisigMemberSignature]",bitmap: "int"): - """ - Construct a new aggregated multisig signature. - - Since the list of signatures doesn't contain sufficient information to - identify which committee member provided the signature, it is up to - the caller to ensure that the provided signature list is in the same - order as it's corresponding member in the provided committee - and that it's position in the provided bitmap is set. - """ - - _UniffiConverterTypeMultisigCommittee.check_lower(committee) - - _UniffiConverterSequenceTypeMultisigMemberSignature.check_lower(signatures) - - _UniffiConverterUInt16.check_lower(bitmap) +""" + + _handle: ctypes.c_uint64 + def __init__(self, identifier: str): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new, - _UniffiConverterTypeMultisigCommittee.lower(committee), - _UniffiConverterSequenceTypeMultisigMemberSignature.lower(signatures), - _UniffiConverterUInt16.lower(bitmap)) + _UniffiFfiConverterString.check_lower(identifier) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(identifier), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeIdentifier.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_identifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_identifier, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_identifier, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def bitmap(self, ) -> "int": - """ - The bitmap that indicates which committee members provided their - signature. - """ - - return _UniffiConverterUInt16.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap,self._uniffi_clone_pointer(),) + def as_str(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def committee(self, ) -> "MultisigCommittee": - return _UniffiConverterTypeMultisigCommittee.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_as_str, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - - - - - def signatures(self, ) -> "typing.List[MultisigMemberSignature]": - """ - The list of signatures from committee members - """ - - return _UniffiConverterSequenceTypeMultisigMemberSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures,self._uniffi_clone_pointer(),) + + # The Rust `Hash::hash` implementation. + def __hash__(self) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_identifier_uniffi_trait_hash, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - - - -class _UniffiConverterTypeMultisigAggregatedSignature: - +class _UniffiFfiConverterTypeIdentifier: @staticmethod - def lift(value: int): - return MultisigAggregatedSignature._make_instance_(value) + def lift(value: int) -> Identifier: + return Identifier._uniffi_make_instance(value) @staticmethod - def check_lower(value: MultisigAggregatedSignature): - if not isinstance(value, MultisigAggregatedSignature): - raise TypeError("Expected MultisigAggregatedSignature instance, {} found".format(type(value).__name__)) + def check_lower(value: Identifier): + if not isinstance(value, Identifier): + raise TypeError("Expected Identifier instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MultisigAggregatedSignatureProtocol): - if not isinstance(value, MultisigAggregatedSignature): - raise TypeError("Expected MultisigAggregatedSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Identifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Identifier: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: MultisigAggregatedSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Identifier, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MultisigAggregatorProtocol(typing.Protocol): - def finish(self, ): - raise NotImplementedError - def verifier(self, ): - raise NotImplementedError - def with_signature(self, signature: "UserSignature"): - raise NotImplementedError - def with_verifier(self, verifier: "MultisigVerifier"): - raise NotImplementedError -# MultisigAggregator is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigAggregator(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator, self._pointer) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst +class _UniffiFfiConverterMapTypeIdentifierBytes(_UniffiConverterRustBuffer): @classmethod - def new_with_message(cls, committee: "MultisigCommittee",message: "bytes"): - _UniffiConverterTypeMultisigCommittee.check_lower(committee) - - _UniffiConverterBytes.check_lower(message) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message, - _UniffiConverterTypeMultisigCommittee.lower(committee), - _UniffiConverterBytes.lower(message)) - return cls._make_instance_(pointer) + def check_lower(cls, items): + for (key, value) in items.items(): + _UniffiFfiConverterTypeIdentifier.check_lower(key) + _UniffiFfiConverterBytes.check_lower(value) @classmethod - def new_with_transaction(cls, committee: "MultisigCommittee",transaction: "Transaction"): - _UniffiConverterTypeMultisigCommittee.check_lower(committee) - - _UniffiConverterTypeTransaction.check_lower(transaction) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction, - _UniffiConverterTypeMultisigCommittee.lower(committee), - _UniffiConverterTypeTransaction.lower(transaction)) - return cls._make_instance_(pointer) - - - - def finish(self, ) -> "MultisigAggregatedSignature": - return _UniffiConverterTypeMultisigAggregatedSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish,self._uniffi_clone_pointer(),) - ) - - - - + def write(cls, items, buf): + buf.write_i32(len(items)) + for (key, value) in items.items(): + _UniffiFfiConverterTypeIdentifier.write(key, buf) + _UniffiFfiConverterBytes.write(value, buf) - def verifier(self, ) -> "MultisigVerifier": - return _UniffiConverterTypeMultisigVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier,self._uniffi_clone_pointer(),) - ) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative map size") + # It would be nice to use a dict comprehension, + # but in Python 3.7 and before the evaluation order is not according to spec, + # so we we're reading the value before the key. + # This loop makes the order explicit: first reading the key, then the value. + d = {} + for i in range(count): + key = _UniffiFfiConverterTypeIdentifier.read(buf) + val = _UniffiFfiConverterBytes.read(buf) + d[key] = val + return d +@dataclass +class TypeOrigin: + """ + Identifies a struct and the module it was defined in + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def with_signature(self, signature: "UserSignature") -> "MultisigAggregator": - _UniffiConverterTypeUserSignature.check_lower(signature) + ```text + type-origin = identifier identifier object-id + ``` +""" + def __init__(self, *, module_name:Identifier, struct_name:Identifier, package:ObjectId): + self.module_name = module_name + self.struct_name = struct_name + self.package = package - return _UniffiConverterTypeMultisigAggregator.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature,self._uniffi_clone_pointer(), - _UniffiConverterTypeUserSignature.lower(signature)) - ) - - - - - - def with_verifier(self, verifier: "MultisigVerifier") -> "MultisigAggregator": - _UniffiConverterTypeMultisigVerifier.check_lower(verifier) - return _UniffiConverterTypeMultisigAggregator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier,self._uniffi_clone_pointer(), - _UniffiConverterTypeMultisigVerifier.lower(verifier)) - ) - - - + + def __str__(self): + return "TypeOrigin(module_name={}, struct_name={}, package={})".format(self.module_name, self.struct_name, self.package) + def __eq__(self, other): + if self.module_name != other.module_name: + return False + if self.struct_name != other.struct_name: + return False + if self.package != other.package: + return False + return True - -class _UniffiConverterTypeMultisigAggregator: - +class _UniffiFfiConverterTypeTypeOrigin(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MultisigAggregator._make_instance_(value) + def read(buf): + return TypeOrigin( + module_name=_UniffiFfiConverterTypeIdentifier.read(buf), + struct_name=_UniffiFfiConverterTypeIdentifier.read(buf), + package=_UniffiFfiConverterTypeObjectId.read(buf), + ) @staticmethod - def check_lower(value: MultisigAggregator): - if not isinstance(value, MultisigAggregator): - raise TypeError("Expected MultisigAggregator instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterTypeIdentifier.check_lower(value.module_name) + _UniffiFfiConverterTypeIdentifier.check_lower(value.struct_name) + _UniffiFfiConverterTypeObjectId.check_lower(value.package) @staticmethod - def lower(value: MultisigAggregatorProtocol): - if not isinstance(value, MultisigAggregator): - raise TypeError("Expected MultisigAggregator instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterTypeIdentifier.write(value.module_name, buf) + _UniffiFfiConverterTypeIdentifier.write(value.struct_name, buf) + _UniffiFfiConverterTypeObjectId.write(value.package, buf) +class _UniffiFfiConverterSequenceTypeTypeOrigin(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeTypeOrigin.check_lower(item) @classmethod - def write(cls, value: MultisigAggregatorProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MultisigCommitteeProtocol(typing.Protocol): - """ - A multisig committee - - A `MultisigCommittee` is a set of members who collectively control a single - `Address` on the IOTA blockchain. The number of required signatures to - authorize the execution of a transaction is determined by - `(signature_0_weight + signature_1_weight ..) >= threshold`. - - # BCS + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeTypeOrigin.write(item, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ```text - multisig-committee = (vector multisig-member) - u16 ; threshold - ``` + return [ + _UniffiFfiConverterTypeTypeOrigin.read(buf) for i in range(count) + ] - There is also a legacy encoding for this type defined as: - ```text - legacy-multisig-committee = (vector legacy-multisig-member) - u16 ; threshold - ``` +class MovePackageProtocol(typing.Protocol): """ + A move package - def derive_address(self, ): - """ - Derive an `Address` from this MultisigCommittee. - - A MultiSig address - is defined as the 32-byte Blake2b hash of serializing the - `SignatureScheme` flag (0x03), the threshold (in little endian), and - the concatenation of all n flag, public keys and its weight. - - `hash(0x03 || threshold || flag_1 || pk_1 || weight_1 - || ... || flag_n || pk_n || weight_n)`. + # BCS - When flag_i is ZkLogin, the pk_i for the [`ZkLoginPublicIdentifier`] - refers to the same input used when deriving the address using the - [`ZkLoginPublicIdentifier::derive_address_padded`] method (using the - full 32-byte `address_seed` value). + The BCS serialized form for this type is defined by the following ABNF: - [`ZkLoginPublicIdentifier`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier - [`ZkLoginPublicIdentifier::derive_address_padded`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier::derive_address_padded - """ + ```text + object-move-package = object-id u64 move-modules type-origin-table linkage-table + move-modules = map (identifier bytes) + type-origin-table = vector type-origin + linkage-table = map (object-id upgrade-info) + ``` +""" + + def id(self, ) -> ObjectId: raise NotImplementedError - def is_valid(self, ): - """ - Checks if the Committee is valid. - - A valid committee is one that: - - Has a nonzero threshold - - Has at least one member - - Has at most ten members - - No member has weight 0 - - the sum of the weights of all members must be larger than the - threshold - - contains no duplicate members - """ - + def linkage_table(self, ) -> dict[ObjectId, UpgradeInfo]: raise NotImplementedError - def members(self, ): - """ - The members of the committee - """ - + def modules(self, ) -> dict[Identifier, bytes]: raise NotImplementedError - def scheme(self, ): - """ - Return the flag for this signature scheme - """ - + def type_origin_table(self, ) -> typing.List[TypeOrigin]: raise NotImplementedError - def threshold(self, ): - """ - The total signature weight required to authorize a transaction for the - address corresponding to this `MultisigCommittee`. - """ - + def version(self, ) -> int: raise NotImplementedError -# MultisigCommittee is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigCommittee(): - """ - A multisig committee - A `MultisigCommittee` is a set of members who collectively control a single - `Address` on the IOTA blockchain. The number of required signatures to - authorize the execution of a transaction is determined by - `(signature_0_weight + signature_1_weight ..) >= threshold`. +class MovePackage(MovePackageProtocol): + """ + A move package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - multisig-committee = (vector multisig-member) - u16 ; threshold - ``` - - There is also a legacy encoding for this type defined as: + object-move-package = object-id u64 move-modules type-origin-table linkage-table - ```text - legacy-multisig-committee = (vector legacy-multisig-member) - u16 ; threshold + move-modules = map (identifier bytes) + type-origin-table = vector type-origin + linkage-table = map (object-id upgrade-info) ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, members: "typing.List[MultisigMember]",threshold: "int"): - """ - Construct a new committee from a list of `MultisigMember`s and a - `threshold`. - - Note that the order of the members is significant towards deriving the - `Address` governed by this committee. - """ - - _UniffiConverterSequenceTypeMultisigMember.check_lower(members) +""" + + _handle: ctypes.c_uint64 + def __init__(self, id: ObjectId,version: int,modules: dict[Identifier, bytes],type_origin_table: typing.List[TypeOrigin],linkage_table: dict[ObjectId, UpgradeInfo]): + + _UniffiFfiConverterTypeObjectId.check_lower(id) - _UniffiConverterUInt16.check_lower(threshold) + _UniffiFfiConverterUInt64.check_lower(version) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new, - _UniffiConverterSequenceTypeMultisigMember.lower(members), - _UniffiConverterUInt16.lower(threshold)) + _UniffiFfiConverterMapTypeIdentifierBytes.check_lower(modules) + + _UniffiFfiConverterSequenceTypeTypeOrigin.check_lower(type_origin_table) + + _UniffiFfiConverterMapTypeObjectIdTypeUpgradeInfo.check_lower(linkage_table) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + _UniffiFfiConverterUInt64.lower(version), + _UniffiFfiConverterMapTypeIdentifierBytes.lower(modules), + _UniffiFfiConverterSequenceTypeTypeOrigin.lower(type_origin_table), + _UniffiFfiConverterMapTypeObjectIdTypeUpgradeInfo.lower(linkage_table), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMovePackage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movepackage_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def id(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def linkage_table(self, ) -> dict[ObjectId, UpgradeInfo]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterMapTypeObjectIdTypeUpgradeInfo.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_linkage_table, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def modules(self, ) -> dict[Identifier, bytes]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterMapTypeIdentifierBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_modules, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def type_origin_table(self, ) -> typing.List[TypeOrigin]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeTypeOrigin.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_type_origin_table, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackage_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def derive_address(self, ) -> "Address": - """ - Derive an `Address` from this MultisigCommittee. - A MultiSig address - is defined as the 32-byte Blake2b hash of serializing the - `SignatureScheme` flag (0x03), the threshold (in little endian), and - the concatenation of all n flag, public keys and its weight. - `hash(0x03 || threshold || flag_1 || pk_1 || weight_1 - || ... || flag_n || pk_n || weight_n)`. - When flag_i is ZkLogin, the pk_i for the [`ZkLoginPublicIdentifier`] - refers to the same input used when deriving the address using the - [`ZkLoginPublicIdentifier::derive_address_padded`] method (using the - full 32-byte `address_seed` value). +class _UniffiFfiConverterTypeMovePackage: + @staticmethod + def lift(value: int) -> MovePackage: + return MovePackage._uniffi_make_instance(value) - [`ZkLoginPublicIdentifier`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier - [`ZkLoginPublicIdentifier::derive_address_padded`]: crate::types::crypto::zklogin::ZkLoginPublicIdentifier::derive_address_padded - """ + @staticmethod + def check_lower(value: MovePackage): + if not isinstance(value, MovePackage): + raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_derive_address,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: MovePackage) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> MovePackage: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: MovePackage, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterSequenceTypeMovePackage(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeMovePackage.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeMovePackage.write(item, buf) - def is_valid(self, ) -> "bool": - """ - Checks if the Committee is valid. + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - A valid committee is one that: - - Has a nonzero threshold - - Has at least one member - - Has at most ten members - - No member has weight 0 - - the sum of the weights of all members must be larger than the - threshold - - contains no duplicate members - """ + return [ + _UniffiFfiConverterTypeMovePackage.read(buf) for i in range(count) + ] - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid,self._uniffi_clone_pointer(),) - ) +@dataclass +class MovePackagePage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[MovePackage]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "MovePackagePage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True +class _UniffiFfiConverterTypeMovePackagePage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MovePackagePage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeMovePackage.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeMovePackage.check_lower(value.data) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeMovePackage.write(value.data, buf) - def members(self, ) -> "typing.List[MultisigMember]": - """ - The members of the committee - """ +@dataclass +class MoveStruct: + """ + A move struct - return _UniffiConverterSequenceTypeMultisigMember.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members,self._uniffi_clone_pointer(),) - ) + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + object-move-struct = compressed-struct-tag bool u64 object-contents + compressed-struct-tag = other-struct-type / gas-coin-type / staked-iota-type / coin-type + other-struct-type = %x00 struct-tag + gas-coin-type = %x01 + staked-iota-type = %x02 + coin-type = %x03 type-tag + ; first 32 bytes of the contents are the object's object-id + object-contents = uleb128 (object-id *OCTET) ; length followed by contents + ``` +""" + def __init__(self, *, struct_type:StructTag, version:int, contents:bytes): + self.struct_type = struct_type + self.version = version + self.contents = contents + + - def scheme(self, ) -> "SignatureScheme": - """ - Return the flag for this signature scheme - """ + + def __str__(self): + return "MoveStruct(struct_type={}, version={}, contents={})".format(self.struct_type, self.version, self.contents) + def __eq__(self, other): + if self.struct_type != other.struct_type: + return False + if self.version != other.version: + return False + if self.contents != other.contents: + return False + return True - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeMoveStruct(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return MoveStruct( + struct_type=_UniffiFfiConverterTypeStructTag.read(buf), + version=_UniffiFfiConverterUInt64.read(buf), + contents=_UniffiFfiConverterBytes.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeStructTag.check_lower(value.struct_type) + _UniffiFfiConverterUInt64.check_lower(value.version) + _UniffiFfiConverterBytes.check_lower(value.contents) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeStructTag.write(value.struct_type, buf) + _UniffiFfiConverterUInt64.write(value.version, buf) + _UniffiFfiConverterBytes.write(value.contents, buf) - def threshold(self, ) -> "int": - """ - The total signature weight required to authorize a transaction for the - address corresponding to this `MultisigCommittee`. - """ - - return _UniffiConverterUInt16.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold,self._uniffi_clone_pointer(),) - ) - - +class NameFormat(enum.Enum): + """ + Two different view options for a name. + `At` -> `test@example` | `Dot` -> `test.example.iota` +""" + + AT = 0 + + DOT = 1 + -class _UniffiConverterTypeMultisigCommittee: +class _UniffiFfiConverterTypeNameFormat(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return MultisigCommittee._make_instance_(value) + def read(buf): + variant = buf.read_i32() + if variant == 1: + return NameFormat.AT + if variant == 2: + return NameFormat.DOT + raise InternalError("Raw enum value doesn't match any cases") @staticmethod - def check_lower(value: MultisigCommittee): - if not isinstance(value, MultisigCommittee): - raise TypeError("Expected MultisigCommittee instance, {} found".format(type(value).__name__)) + def check_lower(value): + if value == NameFormat.AT: + return + if value == NameFormat.DOT: + return + raise ValueError(value) @staticmethod - def lower(value: MultisigCommitteeProtocol): - if not isinstance(value, MultisigCommittee): - raise TypeError("Expected MultisigCommittee instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + if value == NameFormat.AT: + buf.write_i32(1) + if value == NameFormat.DOT: + buf.write_i32(2) + + +class _UniffiFfiConverterSequenceString(_UniffiConverterRustBuffer): @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterString.check_lower(item) @classmethod - def write(cls, value: MultisigCommitteeProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MultisigMemberProtocol(typing.Protocol): - """ - A member in a multisig committee + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterString.write(item, buf) - # BCS + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - The BCS serialized form for this type is defined by the following ABNF: + return [ + _UniffiFfiConverterString.read(buf) for i in range(count) + ] - ```text - multisig-member = multisig-member-public-key - u8 ; weight - ``` +class _UniffiFfiConverterOptionalTypeName(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeName.check_lower(value) - There is also a legacy encoding for this type defined as: + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - ```text - legacy-multisig-member = legacy-multisig-member-public-key - u8 ; weight - ``` - """ + buf.write_u8(1) + _UniffiFfiConverterTypeName.write(value, buf) - def public_key(self, ): + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeName.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class NameProtocol(typing.Protocol): + + def format(self, format: NameFormat) -> str: """ - This member's public key. + Formats a name into a string based on the available output formats. + The default separator is `.` +""" + raise NotImplementedError + def is_sln(self, ) -> bool: """ - + Returns whether this name is a second-level name (Ex. `test.iota`) +""" raise NotImplementedError - def weight(self, ): + def is_subname(self, ) -> bool: """ - Weight of this member's signature. + Returns whether this name is a subname (Ex. `sub.test.iota`) +""" + raise NotImplementedError + def label(self, index: int) -> typing.Optional[str]: """ - + Get the label at the given index +""" raise NotImplementedError -# MultisigMember is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigMember(): - """ - A member in a multisig committee - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - multisig-member = multisig-member-public-key - u8 ; weight - ``` - - There is also a legacy encoding for this type defined as: - - ```text - legacy-multisig-member = legacy-multisig-member-public-key - u8 ; weight - ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, public_key: "MultisigMemberPublicKey",weight: "int"): + def labels(self, ) -> typing.List[str]: """ - Construct a new member from a `MultisigMemberPublicKey` and a `weight`. + Get all of the labels. NOTE: These are in reverse order starting with + the top-level name and proceeding to subnames. +""" + raise NotImplementedError + def num_labels(self, ) -> int: + """ + Returns the number of labels including TLN. +""" + raise NotImplementedError + def parent(self, ) -> typing.Optional[Name]: """ + parents; second-level names return `None`. +""" + raise NotImplementedError - _UniffiConverterTypeMultisigMemberPublicKey.check_lower(public_key) - - _UniffiConverterUInt8.check_lower(weight) +class Name(NameProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_str(cls, s: str) -> Name: - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new, - _UniffiConverterTypeMultisigMemberPublicKey.lower(public_key), - _UniffiConverterUInt8.lower(weight)) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeName.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def public_key(self, ) -> "MultisigMemberPublicKey": + def format(self, format: NameFormat) -> str: """ - This member's public key. + Formats a name into a string based on the available output formats. + The default separator is `.` +""" + + _UniffiFfiConverterTypeNameFormat.check_lower(format) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeNameFormat.lower(format), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_sln(self, ) -> bool: """ - - return _UniffiConverterTypeMultisigMemberPublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key,self._uniffi_clone_pointer(),) + Returns whether this name is a second-level name (Ex. `test.iota`) +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def weight(self, ) -> "int": + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_subname(self, ) -> bool: """ - Weight of this member's signature. + Returns whether this name is a subname (Ex. `sub.test.iota`) +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def label(self, index: int) -> typing.Optional[str]: """ - - return _UniffiConverterUInt8.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight,self._uniffi_clone_pointer(),) + Get the label at the given index +""" + + _UniffiFfiConverterUInt32.check_lower(index) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt32.lower(index), ) + _uniffi_lift_return = _UniffiFfiConverterOptionalString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def labels(self, ) -> typing.List[str]: + """ + Get all of the labels. NOTE: These are in reverse order starting with + the top-level name and proceeding to subnames. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def num_labels(self, ) -> int: + """ + Returns the number of labels including TLN. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt32.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def parent(self, ) -> typing.Optional[Name]: + """ + parents; second-level names return `None`. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeName.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeMultisigMember: - +class _UniffiFfiConverterTypeName: @staticmethod - def lift(value: int): - return MultisigMember._make_instance_(value) + def lift(value: int) -> Name: + return Name._uniffi_make_instance(value) @staticmethod - def check_lower(value: MultisigMember): - if not isinstance(value, MultisigMember): - raise TypeError("Expected MultisigMember instance, {} found".format(type(value).__name__)) + def check_lower(value: Name): + if not isinstance(value, Name): + raise TypeError("Expected Name instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MultisigMemberProtocol): - if not isinstance(value, MultisigMember): - raise TypeError("Expected MultisigMember instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Name) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Name: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: MultisigMemberProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Name, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MultisigMemberPublicKeyProtocol(typing.Protocol): - """ - Enum of valid public keys for multisig committee members - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - ```text - multisig-member-public-key = ed25519-multisig-member-public-key / - secp256k1-multisig-member-public-key / - secp256r1-multisig-member-public-key / - zklogin-multisig-member-public-key - - ed25519-multisig-member-public-key = %x00 ed25519-public-key - secp256k1-multisig-member-public-key = %x01 secp256k1-public-key - secp256r1-multisig-member-public-key = %x02 secp256r1-public-key - zklogin-multisig-member-public-key = %x03 zklogin-public-identifier - ``` - - There is also a legacy encoding for this type defined as: - ```text - legacy-multisig-member-public-key = string ; which is valid base64 encoded - ; and the decoded bytes are defined - ; by legacy-public-key - legacy-public-key = (ed25519-flag ed25519-public-key) / - (secp256k1-flag secp256k1-public-key) / - (secp256r1-flag secp256r1-public-key) - ``` +class NameRegistrationProtocol(typing.Protocol): """ - - def as_ed25519(self, ): - raise NotImplementedError - def as_ed25519_opt(self, ): - raise NotImplementedError - def as_secp256k1(self, ): - raise NotImplementedError - def as_secp256k1_opt(self, ): - raise NotImplementedError - def as_secp256r1(self, ): - raise NotImplementedError - def as_secp256r1_opt(self, ): - raise NotImplementedError - def as_zklogin(self, ): - raise NotImplementedError - def as_zklogin_opt(self, ): - raise NotImplementedError - def is_ed25519(self, ): + An object to manage a second-level name (SLN). +""" + + def expiration_timestamp_ms(self, ) -> int: raise NotImplementedError - def is_secp256k1(self, ): + def id(self, ) -> ObjectId: raise NotImplementedError - def is_secp256r1(self, ): + def name(self, ) -> Name: raise NotImplementedError - def is_zklogin(self, ): + def name_str(self, ) -> str: raise NotImplementedError -# MultisigMemberPublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigMemberPublicKey(): - """ - Enum of valid public keys for multisig committee members - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - multisig-member-public-key = ed25519-multisig-member-public-key / - secp256k1-multisig-member-public-key / - secp256r1-multisig-member-public-key / - zklogin-multisig-member-public-key - - ed25519-multisig-member-public-key = %x00 ed25519-public-key - secp256k1-multisig-member-public-key = %x01 secp256k1-public-key - secp256r1-multisig-member-public-key = %x02 secp256r1-public-key - zklogin-multisig-member-public-key = %x03 zklogin-public-identifier - ``` - There is also a legacy encoding for this type defined as: - - ```text - legacy-multisig-member-public-key = string ; which is valid base64 encoded - ; and the decoded bytes are defined - ; by legacy-public-key - legacy-public-key = (ed25519-flag ed25519-public-key) / - (secp256k1-flag secp256k1-public-key) / - (secp256r1-flag secp256r1-public-key) - ``` +class NameRegistration(NameRegistrationProtocol): """ - - _pointer: ctypes.c_void_p + An object to manage a second-level name (SLN). +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, id: ObjectId,name: Name,name_str: str,expiration_timestamp_ms: int): + + _UniffiFfiConverterTypeObjectId.check_lower(id) + + _UniffiFfiConverterTypeName.check_lower(name) + + _UniffiFfiConverterString.check_lower(name_str) + + _UniffiFfiConverterUInt64.check_lower(expiration_timestamp_ms) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + _UniffiFfiConverterTypeName.lower(name), + _UniffiFfiConverterString.lower(name_str), + _UniffiFfiConverterUInt64.lower(expiration_timestamp_ms), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeNameRegistration.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def as_ed25519(self, ) -> "Ed25519PublicKey": - return _UniffiConverterTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519,self._uniffi_clone_pointer(),) + def expiration_timestamp_ms(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_ed25519_opt(self, ) -> "typing.Optional[Ed25519PublicKey]": - return _UniffiConverterOptionalTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms, + *_uniffi_lowered_args, ) - - - - - - def as_secp256k1(self, ) -> "Secp256k1PublicKey": - return _UniffiConverterTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def id(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_secp256k1_opt(self, ) -> "typing.Optional[Secp256k1PublicKey]": - return _UniffiConverterOptionalTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id, + *_uniffi_lowered_args, ) - - - - - - def as_secp256r1(self, ) -> "Secp256r1PublicKey": - return _UniffiConverterTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def name(self, ) -> Name: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_secp256r1_opt(self, ) -> "typing.Optional[Secp256r1PublicKey]": - return _UniffiConverterOptionalTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeName.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name, + *_uniffi_lowered_args, ) - - - - - - def as_zklogin(self, ) -> "ZkLoginPublicIdentifier": - return _UniffiConverterTypeZkLoginPublicIdentifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def name_str(self, ) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginPublicIdentifier]": - return _UniffiConverterOptionalTypeZkLoginPublicIdentifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeNameRegistration: + @staticmethod + def lift(value: int) -> NameRegistration: + return NameRegistration._uniffi_make_instance(value) + + @staticmethod + def check_lower(value: NameRegistration): + if not isinstance(value, NameRegistration): + raise TypeError("Expected NameRegistration instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: NameRegistration) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> NameRegistration: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: NameRegistration, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterSequenceTypeNameRegistration(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeNameRegistration.check_lower(item) - def is_ed25519(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeNameRegistration.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeNameRegistration.read(buf) for i in range(count) + ] +@dataclass +class NameRegistrationPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[NameRegistration]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "NameRegistrationPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - def is_secp256k1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeNameRegistrationPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return NameRegistrationPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeNameRegistration.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeNameRegistration.check_lower(value.data) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeNameRegistration.write(value.data, buf) +class _UniffiFfiConverterOptionalSequenceTypeObjectId(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeObjectId.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def is_secp256r1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1,self._uniffi_clone_pointer(),) - ) - + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeObjectId.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeObjectId.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class ObjectFilter: + def __init__(self, *, type_tag:typing.Optional[str] = _DEFAULT, owner:typing.Optional[Address] = _DEFAULT, object_ids:typing.Optional[typing.List[ObjectId]] = _DEFAULT): + if type_tag is _DEFAULT: + self.type_tag = None + else: + self.type_tag = type_tag + if owner is _DEFAULT: + self.owner = None + else: + self.owner = owner + if object_ids is _DEFAULT: + self.object_ids = None + else: + self.object_ids = object_ids + + + + def __str__(self): + return "ObjectFilter(type_tag={}, owner={}, object_ids={})".format(self.type_tag, self.owner, self.object_ids) + def __eq__(self, other): + if self.type_tag != other.type_tag: + return False + if self.owner != other.owner: + return False + if self.object_ids != other.object_ids: + return False + return True - def is_zklogin(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeObjectFilter(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ObjectFilter( + type_tag=_UniffiFfiConverterOptionalString.read(buf), + owner=_UniffiFfiConverterOptionalTypeAddress.read(buf), + object_ids=_UniffiFfiConverterOptionalSequenceTypeObjectId.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalString.check_lower(value.type_tag) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.owner) + _UniffiFfiConverterOptionalSequenceTypeObjectId.check_lower(value.object_ids) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalString.write(value.type_tag, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.owner, buf) + _UniffiFfiConverterOptionalSequenceTypeObjectId.write(value.object_ids, buf) +class _UniffiFfiConverterOptionalTypeMovePackage(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMovePackage.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeMovePackage.write(value, buf) -class _UniffiConverterTypeMultisigMemberPublicKey: + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMovePackage.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @staticmethod - def lift(value: int): - return MultisigMemberPublicKey._make_instance_(value) +class _UniffiFfiConverterOptionalTypeMoveStruct(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveStruct.check_lower(value) - @staticmethod - def check_lower(value: MultisigMemberPublicKey): - if not isinstance(value, MultisigMemberPublicKey): - raise TypeError("Expected MultisigMemberPublicKey instance, {} found".format(type(value).__name__)) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - @staticmethod - def lower(value: MultisigMemberPublicKeyProtocol): - if not isinstance(value, MultisigMemberPublicKey): - raise TypeError("Expected MultisigMemberPublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + buf.write_u8(1) + _UniffiFfiConverterTypeMoveStruct.write(value, buf) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveStruct.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @classmethod - def write(cls, value: MultisigMemberPublicKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class MultisigMemberSignatureProtocol(typing.Protocol): + +class ObjectDataProtocol(typing.Protocol): """ - A signature from a member of a multisig committee. + Object data, either a package or struct # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - multisig-member-signature = ed25519-multisig-member-signature / - secp256k1-multisig-member-signature / - secp256r1-multisig-member-signature / - zklogin-multisig-member-signature + object-data = object-data-struct / object-data-package - ed25519-multisig-member-signature = %x00 ed25519-signature - secp256k1-multisig-member-signature = %x01 secp256k1-signature - secp256r1-multisig-member-signature = %x02 secp256r1-signature - zklogin-multisig-member-signature = %x03 zklogin-authenticator + object-data-struct = %x00 object-move-struct + object-data-package = %x01 object-move-package ``` - """ - - def as_ed25519(self, ): - raise NotImplementedError - def as_ed25519_opt(self, ): - raise NotImplementedError - def as_secp256k1(self, ): - raise NotImplementedError - def as_secp256k1_opt(self, ): - raise NotImplementedError - def as_secp256r1(self, ): - raise NotImplementedError - def as_secp256r1_opt(self, ): - raise NotImplementedError - def as_zklogin(self, ): - raise NotImplementedError - def as_zklogin_opt(self, ): - raise NotImplementedError - def is_ed25519(self, ): +""" + + def as_package_opt(self, ) -> typing.Optional[MovePackage]: + """ + Try to interpret this object as a `MovePackage` +""" raise NotImplementedError - def is_secp256k1(self, ): + def as_struct_opt(self, ) -> typing.Optional[MoveStruct]: + """ + Try to interpret this object as a `MoveStruct` +""" raise NotImplementedError - def is_secp256r1(self, ): + def is_package(self, ) -> bool: + """ + Return whether this object is a `MovePackage` +""" raise NotImplementedError - def is_zklogin(self, ): + def is_struct(self, ) -> bool: + """ + Return whether this object is a `MoveStruct` +""" raise NotImplementedError -# MultisigMemberSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigMemberSignature(): + +class ObjectData(ObjectDataProtocol): """ - A signature from a member of a multisig committee. + Object data, either a package or struct # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - multisig-member-signature = ed25519-multisig-member-signature / - secp256k1-multisig-member-signature / - secp256r1-multisig-member-signature / - zklogin-multisig-member-signature + object-data = object-data-struct / object-data-package - ed25519-multisig-member-signature = %x00 ed25519-signature - secp256k1-multisig-member-signature = %x01 secp256k1-signature - secp256r1-multisig-member-signature = %x02 secp256r1-signature - zklogin-multisig-member-signature = %x03 zklogin-authenticator + object-data-struct = %x00 object-move-struct + object-data-package = %x01 object-move-package ``` - """ - - _pointer: ctypes.c_void_p +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_move_package(cls, move_package: MovePackage) -> ObjectData: + """ + Create an `ObjectData` from `MovePackage` +""" + + _UniffiFfiConverterTypeMovePackage.check_lower(move_package) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMovePackage.lower(move_package), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectData.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_move_struct(cls, move_struct: MoveStruct) -> ObjectData: + """ + Create an `ObjectData` from a `MoveStruct` +""" + + _UniffiFfiConverterTypeMoveStruct.check_lower(move_struct) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMoveStruct.lower(move_struct), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectData.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def as_ed25519(self, ) -> "Ed25519Signature": - return _UniffiConverterTypeEd25519Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519,self._uniffi_clone_pointer(),) - ) - - - - - - def as_ed25519_opt(self, ) -> "typing.Optional[Ed25519Signature]": - return _UniffiConverterOptionalTypeEd25519Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt,self._uniffi_clone_pointer(),) - ) - - - - - - def as_secp256k1(self, ) -> "Secp256k1Signature": - return _UniffiConverterTypeSecp256k1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1,self._uniffi_clone_pointer(),) - ) - - - - - - def as_secp256k1_opt(self, ) -> "typing.Optional[Secp256k1Signature]": - return _UniffiConverterOptionalTypeSecp256k1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt,self._uniffi_clone_pointer(),) - ) - - - - - - def as_secp256r1(self, ) -> "Secp256r1Signature": - return _UniffiConverterTypeSecp256r1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1,self._uniffi_clone_pointer(),) + def as_package_opt(self, ) -> typing.Optional[MovePackage]: + """ + Try to interpret this object as a `MovePackage` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_secp256r1_opt(self, ) -> "typing.Optional[Secp256r1Signature]": - return _UniffiConverterOptionalTypeSecp256r1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMovePackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt, + *_uniffi_lowered_args, ) - - - - - - def as_zklogin(self, ) -> "ZkLoginAuthenticator": - return _UniffiConverterTypeZkLoginAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_struct_opt(self, ) -> typing.Optional[MoveStruct]: + """ + Try to interpret this object as a `MoveStruct` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginAuthenticator]": - return _UniffiConverterOptionalTypeZkLoginAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMoveStruct.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt, + *_uniffi_lowered_args, ) - - - - - - def is_ed25519(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_package(self, ) -> bool: + """ + Return whether this object is a `MovePackage` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_secp256k1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package, + *_uniffi_lowered_args, ) - - - - - - def is_secp256r1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_struct(self, ) -> bool: + """ + Return whether this object is a `MoveStruct` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_zklogin(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeMultisigMemberSignature: - +class _UniffiFfiConverterTypeObjectData: @staticmethod - def lift(value: int): - return MultisigMemberSignature._make_instance_(value) + def lift(value: int) -> ObjectData: + return ObjectData._uniffi_make_instance(value) @staticmethod - def check_lower(value: MultisigMemberSignature): - if not isinstance(value, MultisigMemberSignature): - raise TypeError("Expected MultisigMemberSignature instance, {} found".format(type(value).__name__)) + def check_lower(value: ObjectData): + if not isinstance(value, ObjectData): + raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MultisigMemberSignatureProtocol): - if not isinstance(value, MultisigMemberSignature): - raise TypeError("Expected MultisigMemberSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ObjectData) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ObjectData: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: MultisigMemberSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ObjectData, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MultisigVerifierProtocol(typing.Protocol): - def verify(self, message: "bytes",signature: "MultisigAggregatedSignature"): + + +class ObjectTypeProtocol(typing.Protocol): + """ + Type of an IOTA object +""" + + def as_struct(self, ) -> StructTag: raise NotImplementedError - def with_zklogin_verifier(self, zklogin_verifier: "ZkloginVerifier"): + def as_struct_opt(self, ) -> typing.Optional[StructTag]: raise NotImplementedError - def zklogin_verifier(self, ): + def is_package(self, ) -> bool: raise NotImplementedError -# MultisigVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class MultisigVerifier(): - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new,) + def is_struct(self, ) -> bool: + raise NotImplementedError + +class ObjectType(ObjectTypeProtocol): + """ + Type of an IOTA object +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_package(cls, ) -> ObjectType: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_struct(cls, struct_tag: StructTag) -> ObjectType: + + _UniffiFfiConverterTypeStructTag.check_lower(struct_tag) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeStructTag.lower(struct_tag), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + def as_struct(self, ) -> StructTag: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_struct_opt(self, ) -> typing.Optional[StructTag]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeStructTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_package(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_struct(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - - def verify(self, message: "bytes",signature: "MultisigAggregatedSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeMultisigAggregatedSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeMultisigAggregatedSignature.lower(signature)) - - - - - - - def with_zklogin_verifier(self, zklogin_verifier: "ZkloginVerifier") -> "MultisigVerifier": - _UniffiConverterTypeZkloginVerifier.check_lower(zklogin_verifier) - - return _UniffiConverterTypeMultisigVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier,self._uniffi_clone_pointer(), - _UniffiConverterTypeZkloginVerifier.lower(zklogin_verifier)) + + # The Rust `Display::fmt` implementation. + def __str__(self) -> str: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def zklogin_verifier(self, ) -> "typing.Optional[ZkloginVerifier]": - return _UniffiConverterOptionalTypeZkloginVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - - - -class _UniffiConverterTypeMultisigVerifier: - +class _UniffiFfiConverterTypeObjectType: @staticmethod - def lift(value: int): - return MultisigVerifier._make_instance_(value) + def lift(value: int) -> ObjectType: + return ObjectType._uniffi_make_instance(value) @staticmethod - def check_lower(value: MultisigVerifier): - if not isinstance(value, MultisigVerifier): - raise TypeError("Expected MultisigVerifier instance, {} found".format(type(value).__name__)) + def check_lower(value: ObjectType): + if not isinstance(value, ObjectType): + raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MultisigVerifierProtocol): - if not isinstance(value, MultisigVerifier): - raise TypeError("Expected MultisigVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ObjectType) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ObjectType: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: MultisigVerifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ObjectType, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class NameProtocol(typing.Protocol): - def format(self, format: "NameFormat"): + + +class ObjectProtocol(typing.Protocol): + """ + An object on the IOTA blockchain + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + object = object-data owner digest u64 + ``` +""" + + def as_package(self, ) -> MovePackage: """ - Formats a name into a string based on the available output formats. - The default separator is `.` + Interpret this object as a move package +""" + raise NotImplementedError + def as_package_opt(self, ) -> typing.Optional[MovePackage]: """ - + Try to interpret this object as a move package +""" raise NotImplementedError - def is_sln(self, ): + def as_struct(self, ) -> MoveStruct: """ - Returns whether this name is a second-level name (Ex. `test.iota`) + Interpret this object as a move struct +""" + raise NotImplementedError + def as_struct_opt(self, ) -> typing.Optional[MoveStruct]: """ - + Try to interpret this object as a move struct +""" raise NotImplementedError - def is_subname(self, ): + def data(self, ) -> ObjectData: """ - Returns whether this name is a subname (Ex. `sub.test.iota`) + Return this object's data +""" + raise NotImplementedError + def digest(self, ) -> Digest: """ + Calculate the digest of this `Object` + This is done by hashing the BCS bytes of this `Object` prefixed +""" raise NotImplementedError - def label(self, index: "int"): + def object_id(self, ) -> ObjectId: """ - Get the label at the given index - """ - + Return this object's id +""" raise NotImplementedError - def labels(self, ): + def object_type(self, ) -> ObjectType: """ - Get all of the labels. NOTE: These are in reverse order starting with - the top-level name and proceeding to subnames. + Return this object's type +""" + raise NotImplementedError + def owner(self, ) -> Owner: """ - + Return this object's owner +""" raise NotImplementedError - def num_labels(self, ): + def previous_transaction(self, ) -> Digest: """ - Returns the number of labels including TLN. + Return the digest of the transaction that last modified this object +""" + raise NotImplementedError + def storage_rebate(self, ) -> int: """ + Return the storage rebate locked in this object + Storage rebates are credited to the gas coin used in a transaction that + deletes this object. +""" raise NotImplementedError - def parent(self, ): - """ - parents; second-level names return `None`. + def version(self, ) -> int: """ - + Return this object's version +""" raise NotImplementedError -# Name is a Rust-only trait - it's a wrapper around a Rust implementation. -class Name(): - _pointer: ctypes.c_void_p + +class Object(ObjectProtocol): + """ + An object on the IOTA blockchain + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + object = object-data owner digest u64 + ``` +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, data: ObjectData,owner: Owner,previous_transaction: Digest,storage_rebate: int): + + _UniffiFfiConverterTypeObjectData.check_lower(data) + + _UniffiFfiConverterTypeOwner.check_lower(owner) + + _UniffiFfiConverterTypeDigest.check_lower(previous_transaction) + + _UniffiFfiConverterUInt64.check_lower(storage_rebate) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectData.lower(data), + _UniffiFfiConverterTypeOwner.lower(owner), + _UniffiFfiConverterTypeDigest.lower(previous_transaction), + _UniffiFfiConverterUInt64.lower(storage_rebate), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObject.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_name, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_name, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_name_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - - - def format(self, format: "NameFormat") -> "str": + def as_package(self, ) -> MovePackage: """ - Formats a name into a string based on the available output formats. - The default separator is `.` + Interpret this object as a move package +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMovePackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_package_opt(self, ) -> typing.Optional[MovePackage]: """ - - _UniffiConverterTypeNameFormat.check_lower(format) - - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_format,self._uniffi_clone_pointer(), - _UniffiConverterTypeNameFormat.lower(format)) + Try to interpret this object as a move package +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_sln(self, ) -> "bool": + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMovePackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_struct(self, ) -> MoveStruct: """ - Returns whether this name is a second-level name (Ex. `test.iota`) + Interpret this object as a move struct +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMoveStruct.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def as_struct_opt(self, ) -> typing.Optional[MoveStruct]: """ - - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_sln,self._uniffi_clone_pointer(),) + Try to interpret this object as a move struct +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_subname(self, ) -> "bool": + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMoveStruct.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def data(self, ) -> ObjectData: """ - Returns whether this name is a subname (Ex. `sub.test.iota`) + Return this object's data +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectData.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def digest(self, ) -> Digest: """ + Calculate the digest of this `Object` - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_is_subname,self._uniffi_clone_pointer(),) + This is done by hashing the BCS bytes of this `Object` prefixed +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def label(self, index: "int") -> "typing.Optional[str]": - """ - Get the label at the given index + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def object_id(self, ) -> ObjectId: """ - - _UniffiConverterUInt32.check_lower(index) - - return _UniffiConverterOptionalString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_label,self._uniffi_clone_pointer(), - _UniffiConverterUInt32.lower(index)) + Return this object's id +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def labels(self, ) -> "typing.List[str]": + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def object_type(self, ) -> ObjectType: """ - Get all of the labels. NOTE: These are in reverse order starting with - the top-level name and proceeding to subnames. + Return this object's type +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def owner(self, ) -> Owner: """ - - return _UniffiConverterSequenceString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_labels,self._uniffi_clone_pointer(),) + Return this object's owner +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def num_labels(self, ) -> "int": + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def previous_transaction(self, ) -> Digest: """ - Returns the number of labels including TLN. + Return the digest of the transaction that last modified this object +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def storage_rebate(self, ) -> int: """ + Return the storage rebate locked in this object - return _UniffiConverterUInt32.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_num_labels,self._uniffi_clone_pointer(),) + Storage rebates are credited to the gas coin used in a transaction that + deletes this object. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def parent(self, ) -> "typing.Optional[Name]": - """ - parents; second-level names return `None`. + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version(self, ) -> int: """ - - return _UniffiConverterOptionalTypeName.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_name_parent,self._uniffi_clone_pointer(),) + Return this object's version +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeName: - +class _UniffiFfiConverterTypeObject: @staticmethod - def lift(value: int): - return Name._make_instance_(value) + def lift(value: int) -> Object: + return Object._uniffi_make_instance(value) @staticmethod - def check_lower(value: Name): - if not isinstance(value, Name): - raise TypeError("Expected Name instance, {} found".format(type(value).__name__)) + def check_lower(value: Object): + if not isinstance(value, Object): + raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: NameProtocol): - if not isinstance(value, Name): - raise TypeError("Expected Name instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Object) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Object: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: NameProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Object, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class NameRegistrationProtocol(typing.Protocol): - """ - An object to manage a second-level name (SLN). - """ - def expiration_timestamp_ms(self, ): - raise NotImplementedError - def id(self, ): - raise NotImplementedError - def name(self, ): - raise NotImplementedError - def name_str(self, ): - raise NotImplementedError -# NameRegistration is a Rust-only trait - it's a wrapper around a Rust implementation. -class NameRegistration(): - """ - An object to manage a second-level name (SLN). - """ +class _UniffiFfiConverterSequenceTypeObject(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeObject.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeObject.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeObject.read(buf) for i in range(count) + ] - _pointer: ctypes.c_void_p - def __init__(self, id: "ObjectId",name: "Name",name_str: "str",expiration_timestamp_ms: "int"): - _UniffiConverterTypeObjectId.check_lower(id) +@dataclass +class ObjectPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[Object]): + self.page_info = page_info + self.data = data - _UniffiConverterTypeName.check_lower(name) - _UniffiConverterString.check_lower(name_str) + + + def __str__(self): + return "ObjectPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True + +class _UniffiFfiConverterTypeObjectPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ObjectPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeObject.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeObject.check_lower(value.data) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeObject.write(value.data, buf) + +@dataclass +class ObjectRef: + def __init__(self, *, address:ObjectId, digest:str, version:int): + self.address = address + self.digest = digest + self.version = version - _UniffiConverterUInt64.check_lower(expiration_timestamp_ms) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_nameregistration_new, - _UniffiConverterTypeObjectId.lower(id), - _UniffiConverterTypeName.lower(name), - _UniffiConverterString.lower(name_str), - _UniffiConverterUInt64.lower(expiration_timestamp_ms)) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_nameregistration, pointer) + + def __str__(self): + return "ObjectRef(address={}, digest={}, version={})".format(self.address, self.digest, self.version) + def __eq__(self, other): + if self.address != other.address: + return False + if self.digest != other.digest: + return False + if self.version != other.version: + return False + return True - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_nameregistration, self._pointer) +class _UniffiFfiConverterTypeObjectRef(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ObjectRef( + address=_UniffiFfiConverterTypeObjectId.read(buf), + digest=_UniffiFfiConverterString.read(buf), + version=_UniffiFfiConverterUInt64.read(buf), + ) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeObjectId.check_lower(value.address) + _UniffiFfiConverterString.check_lower(value.digest) + _UniffiFfiConverterUInt64.check_lower(value.version) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeObjectId.write(value.address, buf) + _UniffiFfiConverterString.write(value.digest, buf) + _UniffiFfiConverterUInt64.write(value.version, buf) - def expiration_timestamp_ms(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_expiration_timestamp_ms,self._uniffi_clone_pointer(),) - ) +class Direction(enum.Enum): + """ + Pagination direction. +""" + + FORWARD = 0 + + BACKWARD = 1 + + + +class _UniffiFfiConverterTypeDirection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return Direction.FORWARD + if variant == 2: + return Direction.BACKWARD + raise InternalError("Raw enum value doesn't match any cases") + + @staticmethod + def check_lower(value): + if value == Direction.FORWARD: + return + if value == Direction.BACKWARD: + return + raise ValueError(value) + + @staticmethod + def write(value, buf): + if value == Direction.FORWARD: + buf.write_i32(1) + if value == Direction.BACKWARD: + buf.write_i32(2) + + + +@dataclass +class PaginationFilter: + """ + Pagination options for querying the GraphQL server. It defaults to forward + pagination with the GraphQL server's max page size. +""" + def __init__(self, *, direction:Direction, cursor:typing.Optional[str] = _DEFAULT, limit:typing.Optional[int] = _DEFAULT): + self.direction = direction + if cursor is _DEFAULT: + self.cursor = None + else: + self.cursor = cursor + if limit is _DEFAULT: + self.limit = None + else: + self.limit = limit + + + + + def __str__(self): + return "PaginationFilter(direction={}, cursor={}, limit={})".format(self.direction, self.cursor, self.limit) + def __eq__(self, other): + if self.direction != other.direction: + return False + if self.cursor != other.cursor: + return False + if self.limit != other.limit: + return False + return True - def id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_id,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypePaginationFilter(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return PaginationFilter( + direction=_UniffiFfiConverterTypeDirection.read(buf), + cursor=_UniffiFfiConverterOptionalString.read(buf), + limit=_UniffiFfiConverterOptionalInt32.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeDirection.check_lower(value.direction) + _UniffiFfiConverterOptionalString.check_lower(value.cursor) + _UniffiFfiConverterOptionalInt32.check_lower(value.limit) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeDirection.write(value.direction, buf) + _UniffiFfiConverterOptionalString.write(value.cursor, buf) + _UniffiFfiConverterOptionalInt32.write(value.limit, buf) +@dataclass +class Query: + def __init__(self, *, query:str, variables:typing.Optional[Value] = _DEFAULT): + self.query = query + if variables is _DEFAULT: + self.variables = None + else: + self.variables = variables + + + + def __str__(self): + return "Query(query={}, variables={})".format(self.query, self.variables) + def __eq__(self, other): + if self.query != other.query: + return False + if self.variables != other.variables: + return False + return True - def name(self, ) -> "Name": - return _UniffiConverterTypeName.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeQuery(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return Query( + query=_UniffiFfiConverterString.read(buf), + variables=_UniffiFfiConverterOptionalTypeValue.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterString.check_lower(value.query) + _UniffiFfiConverterOptionalTypeValue.check_lower(value.variables) + @staticmethod + def write(value, buf): + _UniffiFfiConverterString.write(value.query, buf) + _UniffiFfiConverterOptionalTypeValue.write(value.variables, buf) +@dataclass +class RandomnessStateUpdate: + """ + Randomness update + # BCS - def name_str(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_nameregistration_name_str,self._uniffi_clone_pointer(),) - ) - - - - + The BCS serialized form for this type is defined by the following ABNF: + ```text + randomness-state-update = u64 u64 bytes u64 + ``` +""" + def __init__(self, *, epoch:int, randomness_round:int, random_bytes:bytes, randomness_obj_initial_shared_version:int): + self.epoch = epoch + self.randomness_round = randomness_round + self.random_bytes = random_bytes + self.randomness_obj_initial_shared_version = randomness_obj_initial_shared_version + + -class _UniffiConverterTypeNameRegistration: + + def __str__(self): + return "RandomnessStateUpdate(epoch={}, randomness_round={}, random_bytes={}, randomness_obj_initial_shared_version={})".format(self.epoch, self.randomness_round, self.random_bytes, self.randomness_obj_initial_shared_version) + def __eq__(self, other): + if self.epoch != other.epoch: + return False + if self.randomness_round != other.randomness_round: + return False + if self.random_bytes != other.random_bytes: + return False + if self.randomness_obj_initial_shared_version != other.randomness_obj_initial_shared_version: + return False + return True +class _UniffiFfiConverterTypeRandomnessStateUpdate(_UniffiConverterRustBuffer): @staticmethod - def lift(value: int): - return NameRegistration._make_instance_(value) + def read(buf): + return RandomnessStateUpdate( + epoch=_UniffiFfiConverterUInt64.read(buf), + randomness_round=_UniffiFfiConverterUInt64.read(buf), + random_bytes=_UniffiFfiConverterBytes.read(buf), + randomness_obj_initial_shared_version=_UniffiFfiConverterUInt64.read(buf), + ) @staticmethod - def check_lower(value: NameRegistration): - if not isinstance(value, NameRegistration): - raise TypeError("Expected NameRegistration instance, {} found".format(type(value).__name__)) + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.epoch) + _UniffiFfiConverterUInt64.check_lower(value.randomness_round) + _UniffiFfiConverterBytes.check_lower(value.random_bytes) + _UniffiFfiConverterUInt64.check_lower(value.randomness_obj_initial_shared_version) @staticmethod - def lower(value: NameRegistrationProtocol): - if not isinstance(value, NameRegistration): - raise TypeError("Expected NameRegistration instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.epoch, buf) + _UniffiFfiConverterUInt64.write(value.randomness_round, buf) + _UniffiFfiConverterBytes.write(value.random_bytes, buf) + _UniffiFfiConverterUInt64.write(value.randomness_obj_initial_shared_version, buf) - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: NameRegistrationProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ObjectProtocol(typing.Protocol): - """ - An object on the IOTA blockchain - # BCS - The BCS serialized form for this type is defined by the following ABNF: - ```text - object = object-data owner digest u64 - ``` - """ - def as_package(self, ): - """ - Interpret this object as a move package - """ +class Feature(enum.Enum): + + ANALYTICS = 0 + + COINS = 1 + + DYNAMIC_FIELDS = 2 + + SUBSCRIPTIONS = 3 + + SYSTEM_STATE = 4 + - raise NotImplementedError - def as_package_opt(self, ): - """ - Try to interpret this object as a move package - """ - raise NotImplementedError - def as_struct(self, ): - """ - Interpret this object as a move struct - """ +class _UniffiFfiConverterTypeFeature(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return Feature.ANALYTICS + if variant == 2: + return Feature.COINS + if variant == 3: + return Feature.DYNAMIC_FIELDS + if variant == 4: + return Feature.SUBSCRIPTIONS + if variant == 5: + return Feature.SYSTEM_STATE + raise InternalError("Raw enum value doesn't match any cases") - raise NotImplementedError - def as_struct_opt(self, ): - """ - Try to interpret this object as a move struct - """ + @staticmethod + def check_lower(value): + if value == Feature.ANALYTICS: + return + if value == Feature.COINS: + return + if value == Feature.DYNAMIC_FIELDS: + return + if value == Feature.SUBSCRIPTIONS: + return + if value == Feature.SYSTEM_STATE: + return + raise ValueError(value) - raise NotImplementedError - def data(self, ): - """ - Return this object's data - """ + @staticmethod + def write(value, buf): + if value == Feature.ANALYTICS: + buf.write_i32(1) + if value == Feature.COINS: + buf.write_i32(2) + if value == Feature.DYNAMIC_FIELDS: + buf.write_i32(3) + if value == Feature.SUBSCRIPTIONS: + buf.write_i32(4) + if value == Feature.SYSTEM_STATE: + buf.write_i32(5) - raise NotImplementedError - def digest(self, ): - """ - Calculate the digest of this `Object` - This is done by hashing the BCS bytes of this `Object` prefixed - """ - raise NotImplementedError - def object_id(self, ): - """ - Return this object's id - """ +class _UniffiFfiConverterSequenceTypeFeature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeFeature.check_lower(item) - raise NotImplementedError - def object_type(self, ): - """ - Return this object's type - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeFeature.write(item, buf) - raise NotImplementedError - def owner(self, ): - """ - Return this object's owner - """ + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - raise NotImplementedError - def previous_transaction(self, ): - """ - Return the digest of the transaction that last modified this object - """ + return [ + _UniffiFfiConverterTypeFeature.read(buf) for i in range(count) + ] - raise NotImplementedError - def storage_rebate(self, ): - """ - Return the storage rebate locked in this object +@dataclass +class ServiceConfig: + def __init__(self, *, default_page_size:int, enabled_features:typing.List[Feature], max_move_value_depth:int, max_output_nodes:int, max_page_size:int, max_query_depth:int, max_query_nodes:int, max_query_payload_size:int, max_type_argument_depth:int, max_type_argument_width:int, max_type_nodes:int, mutation_timeout_ms:int, request_timeout_ms:int): + self.default_page_size = default_page_size + self.enabled_features = enabled_features + self.max_move_value_depth = max_move_value_depth + self.max_output_nodes = max_output_nodes + self.max_page_size = max_page_size + self.max_query_depth = max_query_depth + self.max_query_nodes = max_query_nodes + self.max_query_payload_size = max_query_payload_size + self.max_type_argument_depth = max_type_argument_depth + self.max_type_argument_width = max_type_argument_width + self.max_type_nodes = max_type_nodes + self.mutation_timeout_ms = mutation_timeout_ms + self.request_timeout_ms = request_timeout_ms + + + + + def __str__(self): + return "ServiceConfig(default_page_size={}, enabled_features={}, max_move_value_depth={}, max_output_nodes={}, max_page_size={}, max_query_depth={}, max_query_nodes={}, max_query_payload_size={}, max_type_argument_depth={}, max_type_argument_width={}, max_type_nodes={}, mutation_timeout_ms={}, request_timeout_ms={})".format(self.default_page_size, self.enabled_features, self.max_move_value_depth, self.max_output_nodes, self.max_page_size, self.max_query_depth, self.max_query_nodes, self.max_query_payload_size, self.max_type_argument_depth, self.max_type_argument_width, self.max_type_nodes, self.mutation_timeout_ms, self.request_timeout_ms) + def __eq__(self, other): + if self.default_page_size != other.default_page_size: + return False + if self.enabled_features != other.enabled_features: + return False + if self.max_move_value_depth != other.max_move_value_depth: + return False + if self.max_output_nodes != other.max_output_nodes: + return False + if self.max_page_size != other.max_page_size: + return False + if self.max_query_depth != other.max_query_depth: + return False + if self.max_query_nodes != other.max_query_nodes: + return False + if self.max_query_payload_size != other.max_query_payload_size: + return False + if self.max_type_argument_depth != other.max_type_argument_depth: + return False + if self.max_type_argument_width != other.max_type_argument_width: + return False + if self.max_type_nodes != other.max_type_nodes: + return False + if self.mutation_timeout_ms != other.mutation_timeout_ms: + return False + if self.request_timeout_ms != other.request_timeout_ms: + return False + return True - Storage rebates are credited to the gas coin used in a transaction that - deletes this object. - """ +class _UniffiFfiConverterTypeServiceConfig(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ServiceConfig( + default_page_size=_UniffiFfiConverterInt32.read(buf), + enabled_features=_UniffiFfiConverterSequenceTypeFeature.read(buf), + max_move_value_depth=_UniffiFfiConverterInt32.read(buf), + max_output_nodes=_UniffiFfiConverterInt32.read(buf), + max_page_size=_UniffiFfiConverterInt32.read(buf), + max_query_depth=_UniffiFfiConverterInt32.read(buf), + max_query_nodes=_UniffiFfiConverterInt32.read(buf), + max_query_payload_size=_UniffiFfiConverterInt32.read(buf), + max_type_argument_depth=_UniffiFfiConverterInt32.read(buf), + max_type_argument_width=_UniffiFfiConverterInt32.read(buf), + max_type_nodes=_UniffiFfiConverterInt32.read(buf), + mutation_timeout_ms=_UniffiFfiConverterInt32.read(buf), + request_timeout_ms=_UniffiFfiConverterInt32.read(buf), + ) - raise NotImplementedError - def version(self, ): - """ - Return this object's version - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterInt32.check_lower(value.default_page_size) + _UniffiFfiConverterSequenceTypeFeature.check_lower(value.enabled_features) + _UniffiFfiConverterInt32.check_lower(value.max_move_value_depth) + _UniffiFfiConverterInt32.check_lower(value.max_output_nodes) + _UniffiFfiConverterInt32.check_lower(value.max_page_size) + _UniffiFfiConverterInt32.check_lower(value.max_query_depth) + _UniffiFfiConverterInt32.check_lower(value.max_query_nodes) + _UniffiFfiConverterInt32.check_lower(value.max_query_payload_size) + _UniffiFfiConverterInt32.check_lower(value.max_type_argument_depth) + _UniffiFfiConverterInt32.check_lower(value.max_type_argument_width) + _UniffiFfiConverterInt32.check_lower(value.max_type_nodes) + _UniffiFfiConverterInt32.check_lower(value.mutation_timeout_ms) + _UniffiFfiConverterInt32.check_lower(value.request_timeout_ms) - raise NotImplementedError -# Object is a Rust-only trait - it's a wrapper around a Rust implementation. -class Object(): - """ - An object on the IOTA blockchain + @staticmethod + def write(value, buf): + _UniffiFfiConverterInt32.write(value.default_page_size, buf) + _UniffiFfiConverterSequenceTypeFeature.write(value.enabled_features, buf) + _UniffiFfiConverterInt32.write(value.max_move_value_depth, buf) + _UniffiFfiConverterInt32.write(value.max_output_nodes, buf) + _UniffiFfiConverterInt32.write(value.max_page_size, buf) + _UniffiFfiConverterInt32.write(value.max_query_depth, buf) + _UniffiFfiConverterInt32.write(value.max_query_nodes, buf) + _UniffiFfiConverterInt32.write(value.max_query_payload_size, buf) + _UniffiFfiConverterInt32.write(value.max_type_argument_depth, buf) + _UniffiFfiConverterInt32.write(value.max_type_argument_width, buf) + _UniffiFfiConverterInt32.write(value.max_type_nodes, buf) + _UniffiFfiConverterInt32.write(value.mutation_timeout_ms, buf) + _UniffiFfiConverterInt32.write(value.request_timeout_ms, buf) + +class _UniffiFfiConverterSequenceTypeSignedTransaction(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeSignedTransaction.check_lower(item) - # BCS + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeSignedTransaction.write(item, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ```text - object = object-data owner digest u64 - ``` - """ + return [ + _UniffiFfiConverterTypeSignedTransaction.read(buf) for i in range(count) + ] - _pointer: ctypes.c_void_p - def __init__(self, data: "ObjectData",owner: "Owner",previous_transaction: "Digest",storage_rebate: "int"): - _UniffiConverterTypeObjectData.check_lower(data) - - _UniffiConverterTypeOwner.check_lower(owner) - - _UniffiConverterTypeDigest.check_lower(previous_transaction) +@dataclass +class SignedTransactionPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[SignedTransaction]): + self.page_info = page_info + self.data = data - _UniffiConverterUInt64.check_lower(storage_rebate) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new, - _UniffiConverterTypeObjectData.lower(data), - _UniffiConverterTypeOwner.lower(owner), - _UniffiConverterTypeDigest.lower(previous_transaction), - _UniffiConverterUInt64.lower(storage_rebate)) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def as_package(self, ) -> "MovePackage": - """ - Interpret this object as a move package - """ + + def __str__(self): + return "SignedTransactionPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - return _UniffiConverterTypeMovePackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeSignedTransactionPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return SignedTransactionPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeSignedTransaction.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeSignedTransaction.check_lower(value.data) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeSignedTransaction.write(value.data, buf) +@dataclass +class TransactionDataEffects: + def __init__(self, *, tx:SignedTransaction, effects:TransactionEffects): + self.tx = tx + self.effects = effects + + + + def __str__(self): + return "TransactionDataEffects(tx={}, effects={})".format(self.tx, self.effects) + def __eq__(self, other): + if self.tx != other.tx: + return False + if self.effects != other.effects: + return False + return True - def as_package_opt(self, ) -> "typing.Optional[MovePackage]": - """ - Try to interpret this object as a move package - """ - - return _UniffiConverterOptionalTypeMovePackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_package_opt,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeTransactionDataEffects(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionDataEffects( + tx=_UniffiFfiConverterTypeSignedTransaction.read(buf), + effects=_UniffiFfiConverterTypeTransactionEffects.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeSignedTransaction.check_lower(value.tx) + _UniffiFfiConverterTypeTransactionEffects.check_lower(value.effects) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeSignedTransaction.write(value.tx, buf) + _UniffiFfiConverterTypeTransactionEffects.write(value.effects, buf) +class _UniffiFfiConverterSequenceTypeTransactionDataEffects(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeTransactionDataEffects.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeTransactionDataEffects.write(item, buf) - def as_struct(self, ) -> "MoveStruct": - """ - Interpret this object as a move struct - """ + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - return _UniffiConverterTypeMoveStruct.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct,self._uniffi_clone_pointer(),) - ) + return [ + _UniffiFfiConverterTypeTransactionDataEffects.read(buf) for i in range(count) + ] +@dataclass +class TransactionDataEffectsPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[TransactionDataEffects]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "TransactionDataEffectsPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True +class _UniffiFfiConverterTypeTransactionDataEffectsPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionDataEffectsPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeTransactionDataEffects.read(buf), + ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeTransactionDataEffects.check_lower(value.data) - def as_struct_opt(self, ) -> "typing.Optional[MoveStruct]": - """ - Try to interpret this object as a move struct - """ + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeTransactionDataEffects.write(value.data, buf) - return _UniffiConverterOptionalTypeMoveStruct.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct_opt,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterSequenceTypeTransactionEffects(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeTransactionEffects.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeTransactionEffects.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeTransactionEffects.read(buf) for i in range(count) + ] +@dataclass +class TransactionEffectsPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[TransactionEffects]): + self.page_info = page_info + self.data = data + + - def data(self, ) -> "ObjectData": - """ - Return this object's data - """ + + def __str__(self): + return "TransactionEffectsPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - return _UniffiConverterTypeObjectData.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeTransactionEffectsPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionEffectsPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeTransactionEffects.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeTransactionEffects.check_lower(value.data) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeTransactionEffects.write(value.data, buf) +class _UniffiFfiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeObjectRef.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeObjectRef.write(item, buf) - def digest(self, ) -> "Digest": - """ - Calculate the digest of this `Object` + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - This is done by hashing the BCS bytes of this `Object` prefixed - """ + return [ + _UniffiFfiConverterTypeObjectRef.read(buf) for i in range(count) + ] - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_digest,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterOptionalSequenceTypeObjectRef(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceTypeObjectRef.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterSequenceTypeObjectRef.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceTypeObjectRef.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +@dataclass +class TransactionMetadata: + def __init__(self, *, gas_budget:typing.Optional[int] = _DEFAULT, gas_objects:typing.Optional[typing.List[ObjectRef]] = _DEFAULT, gas_price:typing.Optional[int] = _DEFAULT, gas_sponsor:typing.Optional[Address] = _DEFAULT, sender:typing.Optional[Address] = _DEFAULT): + if gas_budget is _DEFAULT: + self.gas_budget = None + else: + self.gas_budget = gas_budget + if gas_objects is _DEFAULT: + self.gas_objects = None + else: + self.gas_objects = gas_objects + if gas_price is _DEFAULT: + self.gas_price = None + else: + self.gas_price = gas_price + if gas_sponsor is _DEFAULT: + self.gas_sponsor = None + else: + self.gas_sponsor = gas_sponsor + if sender is _DEFAULT: + self.sender = None + else: + self.sender = sender + + - def object_id(self, ) -> "ObjectId": - """ - Return this object's id - """ + + def __str__(self): + return "TransactionMetadata(gas_budget={}, gas_objects={}, gas_price={}, gas_sponsor={}, sender={})".format(self.gas_budget, self.gas_objects, self.gas_price, self.gas_sponsor, self.sender) + def __eq__(self, other): + if self.gas_budget != other.gas_budget: + return False + if self.gas_objects != other.gas_objects: + return False + if self.gas_price != other.gas_price: + return False + if self.gas_sponsor != other.gas_sponsor: + return False + if self.sender != other.sender: + return False + return True - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeTransactionMetadata(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionMetadata( + gas_budget=_UniffiFfiConverterOptionalUInt64.read(buf), + gas_objects=_UniffiFfiConverterOptionalSequenceTypeObjectRef.read(buf), + gas_price=_UniffiFfiConverterOptionalUInt64.read(buf), + gas_sponsor=_UniffiFfiConverterOptionalTypeAddress.read(buf), + sender=_UniffiFfiConverterOptionalTypeAddress.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalUInt64.check_lower(value.gas_budget) + _UniffiFfiConverterOptionalSequenceTypeObjectRef.check_lower(value.gas_objects) + _UniffiFfiConverterOptionalUInt64.check_lower(value.gas_price) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.gas_sponsor) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.sender) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalUInt64.write(value.gas_budget, buf) + _UniffiFfiConverterOptionalSequenceTypeObjectRef.write(value.gas_objects, buf) + _UniffiFfiConverterOptionalUInt64.write(value.gas_price, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.gas_sponsor, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.sender, buf) - def object_type(self, ) -> "ObjectType": - """ - Return this object's type - """ - return _UniffiConverterTypeObjectType.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type,self._uniffi_clone_pointer(),) - ) +class TransactionBlockKindInput(enum.Enum): + + SYSTEM_TX = 0 + + PROGRAMMABLE_TX = 1 + + GENESIS = 2 + + CONSENSUS_COMMIT_PROLOGUE_V1 = 3 + + AUTHENTICATOR_STATE_UPDATE_V1 = 4 + + RANDOMNESS_STATE_UPDATE = 5 + + END_OF_EPOCH_TX = 6 + +class _UniffiFfiConverterTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return TransactionBlockKindInput.SYSTEM_TX + if variant == 2: + return TransactionBlockKindInput.PROGRAMMABLE_TX + if variant == 3: + return TransactionBlockKindInput.GENESIS + if variant == 4: + return TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1 + if variant == 5: + return TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1 + if variant == 6: + return TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE + if variant == 7: + return TransactionBlockKindInput.END_OF_EPOCH_TX + raise InternalError("Raw enum value doesn't match any cases") - def owner(self, ) -> "Owner": - """ - Return this object's owner - """ + @staticmethod + def check_lower(value): + if value == TransactionBlockKindInput.SYSTEM_TX: + return + if value == TransactionBlockKindInput.PROGRAMMABLE_TX: + return + if value == TransactionBlockKindInput.GENESIS: + return + if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: + return + if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: + return + if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: + return + if value == TransactionBlockKindInput.END_OF_EPOCH_TX: + return + raise ValueError(value) - return _UniffiConverterTypeOwner.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner,self._uniffi_clone_pointer(),) - ) + @staticmethod + def write(value, buf): + if value == TransactionBlockKindInput.SYSTEM_TX: + buf.write_i32(1) + if value == TransactionBlockKindInput.PROGRAMMABLE_TX: + buf.write_i32(2) + if value == TransactionBlockKindInput.GENESIS: + buf.write_i32(3) + if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: + buf.write_i32(4) + if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: + buf.write_i32(5) + if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: + buf.write_i32(6) + if value == TransactionBlockKindInput.END_OF_EPOCH_TX: + buf.write_i32(7) +class _UniffiFfiConverterOptionalTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeTransactionBlockKindInput.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def previous_transaction(self, ) -> "Digest": - """ - Return the digest of the transaction that last modified this object - """ + buf.write_u8(1) + _UniffiFfiConverterTypeTransactionBlockKindInput.write(value, buf) - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction,self._uniffi_clone_pointer(),) - ) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTransactionBlockKindInput.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalSequenceString(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterSequenceString.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterSequenceString.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterSequenceString.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def storage_rebate(self, ) -> "int": - """ - Return the storage rebate locked in this object +@dataclass +class TransactionsFilter: + def __init__(self, *, function:typing.Optional[str] = _DEFAULT, kind:typing.Optional[TransactionBlockKindInput] = _DEFAULT, after_checkpoint:typing.Optional[int] = _DEFAULT, at_checkpoint:typing.Optional[int] = _DEFAULT, before_checkpoint:typing.Optional[int] = _DEFAULT, sign_address:typing.Optional[Address] = _DEFAULT, recv_address:typing.Optional[Address] = _DEFAULT, input_object:typing.Optional[ObjectId] = _DEFAULT, changed_object:typing.Optional[ObjectId] = _DEFAULT, transaction_ids:typing.Optional[typing.List[str]] = _DEFAULT, wrapped_or_deleted_object:typing.Optional[ObjectId] = _DEFAULT): + if function is _DEFAULT: + self.function = None + else: + self.function = function + if kind is _DEFAULT: + self.kind = None + else: + self.kind = kind + if after_checkpoint is _DEFAULT: + self.after_checkpoint = None + else: + self.after_checkpoint = after_checkpoint + if at_checkpoint is _DEFAULT: + self.at_checkpoint = None + else: + self.at_checkpoint = at_checkpoint + if before_checkpoint is _DEFAULT: + self.before_checkpoint = None + else: + self.before_checkpoint = before_checkpoint + if sign_address is _DEFAULT: + self.sign_address = None + else: + self.sign_address = sign_address + if recv_address is _DEFAULT: + self.recv_address = None + else: + self.recv_address = recv_address + if input_object is _DEFAULT: + self.input_object = None + else: + self.input_object = input_object + if changed_object is _DEFAULT: + self.changed_object = None + else: + self.changed_object = changed_object + if transaction_ids is _DEFAULT: + self.transaction_ids = None + else: + self.transaction_ids = transaction_ids + if wrapped_or_deleted_object is _DEFAULT: + self.wrapped_or_deleted_object = None + else: + self.wrapped_or_deleted_object = wrapped_or_deleted_object + + - Storage rebates are credited to the gas coin used in a transaction that - deletes this object. - """ + + def __str__(self): + return "TransactionsFilter(function={}, kind={}, after_checkpoint={}, at_checkpoint={}, before_checkpoint={}, sign_address={}, recv_address={}, input_object={}, changed_object={}, transaction_ids={}, wrapped_or_deleted_object={})".format(self.function, self.kind, self.after_checkpoint, self.at_checkpoint, self.before_checkpoint, self.sign_address, self.recv_address, self.input_object, self.changed_object, self.transaction_ids, self.wrapped_or_deleted_object) + def __eq__(self, other): + if self.function != other.function: + return False + if self.kind != other.kind: + return False + if self.after_checkpoint != other.after_checkpoint: + return False + if self.at_checkpoint != other.at_checkpoint: + return False + if self.before_checkpoint != other.before_checkpoint: + return False + if self.sign_address != other.sign_address: + return False + if self.recv_address != other.recv_address: + return False + if self.input_object != other.input_object: + return False + if self.changed_object != other.changed_object: + return False + if self.transaction_ids != other.transaction_ids: + return False + if self.wrapped_or_deleted_object != other.wrapped_or_deleted_object: + return False + return True - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeTransactionsFilter(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TransactionsFilter( + function=_UniffiFfiConverterOptionalString.read(buf), + kind=_UniffiFfiConverterOptionalTypeTransactionBlockKindInput.read(buf), + after_checkpoint=_UniffiFfiConverterOptionalUInt64.read(buf), + at_checkpoint=_UniffiFfiConverterOptionalUInt64.read(buf), + before_checkpoint=_UniffiFfiConverterOptionalUInt64.read(buf), + sign_address=_UniffiFfiConverterOptionalTypeAddress.read(buf), + recv_address=_UniffiFfiConverterOptionalTypeAddress.read(buf), + input_object=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + changed_object=_UniffiFfiConverterOptionalTypeObjectId.read(buf), + transaction_ids=_UniffiFfiConverterOptionalSequenceString.read(buf), + wrapped_or_deleted_object=_UniffiFfiConverterOptionalTypeObjectId.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalString.check_lower(value.function) + _UniffiFfiConverterOptionalTypeTransactionBlockKindInput.check_lower(value.kind) + _UniffiFfiConverterOptionalUInt64.check_lower(value.after_checkpoint) + _UniffiFfiConverterOptionalUInt64.check_lower(value.at_checkpoint) + _UniffiFfiConverterOptionalUInt64.check_lower(value.before_checkpoint) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.sign_address) + _UniffiFfiConverterOptionalTypeAddress.check_lower(value.recv_address) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.input_object) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.changed_object) + _UniffiFfiConverterOptionalSequenceString.check_lower(value.transaction_ids) + _UniffiFfiConverterOptionalTypeObjectId.check_lower(value.wrapped_or_deleted_object) + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalString.write(value.function, buf) + _UniffiFfiConverterOptionalTypeTransactionBlockKindInput.write(value.kind, buf) + _UniffiFfiConverterOptionalUInt64.write(value.after_checkpoint, buf) + _UniffiFfiConverterOptionalUInt64.write(value.at_checkpoint, buf) + _UniffiFfiConverterOptionalUInt64.write(value.before_checkpoint, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.sign_address, buf) + _UniffiFfiConverterOptionalTypeAddress.write(value.recv_address, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.input_object, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.changed_object, buf) + _UniffiFfiConverterOptionalSequenceString.write(value.transaction_ids, buf) + _UniffiFfiConverterOptionalTypeObjectId.write(value.wrapped_or_deleted_object, buf) + +@dataclass +class ValidatorCredentials: + """ + The credentials related fields associated with a validator. +""" + def __init__(self, *, authority_pub_key:typing.Optional[Base64] = _DEFAULT, network_pub_key:typing.Optional[Base64] = _DEFAULT, protocol_pub_key:typing.Optional[Base64] = _DEFAULT, proof_of_possession:typing.Optional[Base64] = _DEFAULT, net_address:typing.Optional[str] = _DEFAULT, p2p_address:typing.Optional[str] = _DEFAULT, primary_address:typing.Optional[str] = _DEFAULT): + if authority_pub_key is _DEFAULT: + self.authority_pub_key = None + else: + self.authority_pub_key = authority_pub_key + if network_pub_key is _DEFAULT: + self.network_pub_key = None + else: + self.network_pub_key = network_pub_key + if protocol_pub_key is _DEFAULT: + self.protocol_pub_key = None + else: + self.protocol_pub_key = protocol_pub_key + if proof_of_possession is _DEFAULT: + self.proof_of_possession = None + else: + self.proof_of_possession = proof_of_possession + if net_address is _DEFAULT: + self.net_address = None + else: + self.net_address = net_address + if p2p_address is _DEFAULT: + self.p2p_address = None + else: + self.p2p_address = p2p_address + if primary_address is _DEFAULT: + self.primary_address = None + else: + self.primary_address = primary_address + + + + def __str__(self): + return "ValidatorCredentials(authority_pub_key={}, network_pub_key={}, protocol_pub_key={}, proof_of_possession={}, net_address={}, p2p_address={}, primary_address={})".format(self.authority_pub_key, self.network_pub_key, self.protocol_pub_key, self.proof_of_possession, self.net_address, self.p2p_address, self.primary_address) + def __eq__(self, other): + if self.authority_pub_key != other.authority_pub_key: + return False + if self.network_pub_key != other.network_pub_key: + return False + if self.protocol_pub_key != other.protocol_pub_key: + return False + if self.proof_of_possession != other.proof_of_possession: + return False + if self.net_address != other.net_address: + return False + if self.p2p_address != other.p2p_address: + return False + if self.primary_address != other.primary_address: + return False + return True - - def version(self, ) -> "int": - """ - Return this object's version - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeValidatorCredentials(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorCredentials( + authority_pub_key=_UniffiFfiConverterOptionalTypeBase64.read(buf), + network_pub_key=_UniffiFfiConverterOptionalTypeBase64.read(buf), + protocol_pub_key=_UniffiFfiConverterOptionalTypeBase64.read(buf), + proof_of_possession=_UniffiFfiConverterOptionalTypeBase64.read(buf), + net_address=_UniffiFfiConverterOptionalString.read(buf), + p2p_address=_UniffiFfiConverterOptionalString.read(buf), + primary_address=_UniffiFfiConverterOptionalString.read(buf), ) - - - - - -class _UniffiConverterTypeObject: - @staticmethod - def lift(value: int): - return Object._make_instance_(value) + def check_lower(value): + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.authority_pub_key) + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.network_pub_key) + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.protocol_pub_key) + _UniffiFfiConverterOptionalTypeBase64.check_lower(value.proof_of_possession) + _UniffiFfiConverterOptionalString.check_lower(value.net_address) + _UniffiFfiConverterOptionalString.check_lower(value.p2p_address) + _UniffiFfiConverterOptionalString.check_lower(value.primary_address) @staticmethod - def check_lower(value: Object): - if not isinstance(value, Object): - raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) + def write(value, buf): + _UniffiFfiConverterOptionalTypeBase64.write(value.authority_pub_key, buf) + _UniffiFfiConverterOptionalTypeBase64.write(value.network_pub_key, buf) + _UniffiFfiConverterOptionalTypeBase64.write(value.protocol_pub_key, buf) + _UniffiFfiConverterOptionalTypeBase64.write(value.proof_of_possession, buf) + _UniffiFfiConverterOptionalString.write(value.net_address, buf) + _UniffiFfiConverterOptionalString.write(value.p2p_address, buf) + _UniffiFfiConverterOptionalString.write(value.primary_address, buf) - @staticmethod - def lower(value: ObjectProtocol): - if not isinstance(value, Object): - raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() +class _UniffiFfiConverterOptionalTypeValidatorCredentials(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeValidatorCredentials.check_lower(value) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeValidatorCredentials.write(value, buf) @classmethod - def write(cls, value: ObjectProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ObjectDataProtocol(typing.Protocol): - """ - Object data, either a package or struct + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeValidatorCredentials.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - # BCS +class _UniffiFfiConverterOptionalBytes(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterBytes.check_lower(value) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - ```text - object-data = object-data-struct / object-data-package + buf.write_u8(1) + _UniffiFfiConverterBytes.write(value, buf) - object-data-struct = %x00 object-move-struct - object-data-package = %x01 object-move-package - ``` - """ + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterBytes.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def as_package_opt(self, ): - """ - Try to interpret this object as a `MovePackage` - """ +@dataclass +class Validator: + """ + Represents a validator in the system. +""" + def __init__(self, *, apy:typing.Optional[int] = _DEFAULT, address:Address, commission_rate:typing.Optional[int] = _DEFAULT, credentials:typing.Optional[ValidatorCredentials] = _DEFAULT, description:typing.Optional[str] = _DEFAULT, exchange_rates_size:typing.Optional[int] = _DEFAULT, gas_price:typing.Optional[int] = _DEFAULT, name:typing.Optional[str] = _DEFAULT, image_url:typing.Optional[str] = _DEFAULT, next_epoch_commission_rate:typing.Optional[int] = _DEFAULT, next_epoch_credentials:typing.Optional[ValidatorCredentials] = _DEFAULT, next_epoch_gas_price:typing.Optional[int] = _DEFAULT, next_epoch_stake:typing.Optional[int] = _DEFAULT, operation_cap:typing.Optional[bytes] = _DEFAULT, pending_pool_token_withdraw:typing.Optional[int] = _DEFAULT, pending_stake:typing.Optional[int] = _DEFAULT, pending_total_iota_withdraw:typing.Optional[int] = _DEFAULT, pool_token_balance:typing.Optional[int] = _DEFAULT, project_url:typing.Optional[str] = _DEFAULT, rewards_pool:typing.Optional[int] = _DEFAULT, staking_pool_activation_epoch:typing.Optional[int] = _DEFAULT, staking_pool_id:ObjectId, staking_pool_iota_balance:typing.Optional[int] = _DEFAULT, voting_power:typing.Optional[int] = _DEFAULT): + if apy is _DEFAULT: + self.apy = None + else: + self.apy = apy + self.address = address + if commission_rate is _DEFAULT: + self.commission_rate = None + else: + self.commission_rate = commission_rate + if credentials is _DEFAULT: + self.credentials = None + else: + self.credentials = credentials + if description is _DEFAULT: + self.description = None + else: + self.description = description + if exchange_rates_size is _DEFAULT: + self.exchange_rates_size = None + else: + self.exchange_rates_size = exchange_rates_size + if gas_price is _DEFAULT: + self.gas_price = None + else: + self.gas_price = gas_price + if name is _DEFAULT: + self.name = None + else: + self.name = name + if image_url is _DEFAULT: + self.image_url = None + else: + self.image_url = image_url + if next_epoch_commission_rate is _DEFAULT: + self.next_epoch_commission_rate = None + else: + self.next_epoch_commission_rate = next_epoch_commission_rate + if next_epoch_credentials is _DEFAULT: + self.next_epoch_credentials = None + else: + self.next_epoch_credentials = next_epoch_credentials + if next_epoch_gas_price is _DEFAULT: + self.next_epoch_gas_price = None + else: + self.next_epoch_gas_price = next_epoch_gas_price + if next_epoch_stake is _DEFAULT: + self.next_epoch_stake = None + else: + self.next_epoch_stake = next_epoch_stake + if operation_cap is _DEFAULT: + self.operation_cap = None + else: + self.operation_cap = operation_cap + if pending_pool_token_withdraw is _DEFAULT: + self.pending_pool_token_withdraw = None + else: + self.pending_pool_token_withdraw = pending_pool_token_withdraw + if pending_stake is _DEFAULT: + self.pending_stake = None + else: + self.pending_stake = pending_stake + if pending_total_iota_withdraw is _DEFAULT: + self.pending_total_iota_withdraw = None + else: + self.pending_total_iota_withdraw = pending_total_iota_withdraw + if pool_token_balance is _DEFAULT: + self.pool_token_balance = None + else: + self.pool_token_balance = pool_token_balance + if project_url is _DEFAULT: + self.project_url = None + else: + self.project_url = project_url + if rewards_pool is _DEFAULT: + self.rewards_pool = None + else: + self.rewards_pool = rewards_pool + if staking_pool_activation_epoch is _DEFAULT: + self.staking_pool_activation_epoch = None + else: + self.staking_pool_activation_epoch = staking_pool_activation_epoch + self.staking_pool_id = staking_pool_id + if staking_pool_iota_balance is _DEFAULT: + self.staking_pool_iota_balance = None + else: + self.staking_pool_iota_balance = staking_pool_iota_balance + if voting_power is _DEFAULT: + self.voting_power = None + else: + self.voting_power = voting_power + + - raise NotImplementedError - def as_struct_opt(self, ): - """ - Try to interpret this object as a `MoveStruct` - """ + + def __str__(self): + return "Validator(apy={}, address={}, commission_rate={}, credentials={}, description={}, exchange_rates_size={}, gas_price={}, name={}, image_url={}, next_epoch_commission_rate={}, next_epoch_credentials={}, next_epoch_gas_price={}, next_epoch_stake={}, operation_cap={}, pending_pool_token_withdraw={}, pending_stake={}, pending_total_iota_withdraw={}, pool_token_balance={}, project_url={}, rewards_pool={}, staking_pool_activation_epoch={}, staking_pool_id={}, staking_pool_iota_balance={}, voting_power={})".format(self.apy, self.address, self.commission_rate, self.credentials, self.description, self.exchange_rates_size, self.gas_price, self.name, self.image_url, self.next_epoch_commission_rate, self.next_epoch_credentials, self.next_epoch_gas_price, self.next_epoch_stake, self.operation_cap, self.pending_pool_token_withdraw, self.pending_stake, self.pending_total_iota_withdraw, self.pool_token_balance, self.project_url, self.rewards_pool, self.staking_pool_activation_epoch, self.staking_pool_id, self.staking_pool_iota_balance, self.voting_power) + def __eq__(self, other): + if self.apy != other.apy: + return False + if self.address != other.address: + return False + if self.commission_rate != other.commission_rate: + return False + if self.credentials != other.credentials: + return False + if self.description != other.description: + return False + if self.exchange_rates_size != other.exchange_rates_size: + return False + if self.gas_price != other.gas_price: + return False + if self.name != other.name: + return False + if self.image_url != other.image_url: + return False + if self.next_epoch_commission_rate != other.next_epoch_commission_rate: + return False + if self.next_epoch_credentials != other.next_epoch_credentials: + return False + if self.next_epoch_gas_price != other.next_epoch_gas_price: + return False + if self.next_epoch_stake != other.next_epoch_stake: + return False + if self.operation_cap != other.operation_cap: + return False + if self.pending_pool_token_withdraw != other.pending_pool_token_withdraw: + return False + if self.pending_stake != other.pending_stake: + return False + if self.pending_total_iota_withdraw != other.pending_total_iota_withdraw: + return False + if self.pool_token_balance != other.pool_token_balance: + return False + if self.project_url != other.project_url: + return False + if self.rewards_pool != other.rewards_pool: + return False + if self.staking_pool_activation_epoch != other.staking_pool_activation_epoch: + return False + if self.staking_pool_id != other.staking_pool_id: + return False + if self.staking_pool_iota_balance != other.staking_pool_iota_balance: + return False + if self.voting_power != other.voting_power: + return False + return True - raise NotImplementedError - def is_package(self, ): - """ - Return whether this object is a `MovePackage` - """ +class _UniffiFfiConverterTypeValidator(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return Validator( + apy=_UniffiFfiConverterOptionalInt32.read(buf), + address=_UniffiFfiConverterTypeAddress.read(buf), + commission_rate=_UniffiFfiConverterOptionalInt32.read(buf), + credentials=_UniffiFfiConverterOptionalTypeValidatorCredentials.read(buf), + description=_UniffiFfiConverterOptionalString.read(buf), + exchange_rates_size=_UniffiFfiConverterOptionalUInt64.read(buf), + gas_price=_UniffiFfiConverterOptionalUInt64.read(buf), + name=_UniffiFfiConverterOptionalString.read(buf), + image_url=_UniffiFfiConverterOptionalString.read(buf), + next_epoch_commission_rate=_UniffiFfiConverterOptionalInt32.read(buf), + next_epoch_credentials=_UniffiFfiConverterOptionalTypeValidatorCredentials.read(buf), + next_epoch_gas_price=_UniffiFfiConverterOptionalUInt64.read(buf), + next_epoch_stake=_UniffiFfiConverterOptionalUInt64.read(buf), + operation_cap=_UniffiFfiConverterOptionalBytes.read(buf), + pending_pool_token_withdraw=_UniffiFfiConverterOptionalUInt64.read(buf), + pending_stake=_UniffiFfiConverterOptionalUInt64.read(buf), + pending_total_iota_withdraw=_UniffiFfiConverterOptionalUInt64.read(buf), + pool_token_balance=_UniffiFfiConverterOptionalUInt64.read(buf), + project_url=_UniffiFfiConverterOptionalString.read(buf), + rewards_pool=_UniffiFfiConverterOptionalUInt64.read(buf), + staking_pool_activation_epoch=_UniffiFfiConverterOptionalUInt64.read(buf), + staking_pool_id=_UniffiFfiConverterTypeObjectId.read(buf), + staking_pool_iota_balance=_UniffiFfiConverterOptionalUInt64.read(buf), + voting_power=_UniffiFfiConverterOptionalInt32.read(buf), + ) - raise NotImplementedError - def is_struct(self, ): - """ - Return whether this object is a `MoveStruct` - """ + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalInt32.check_lower(value.apy) + _UniffiFfiConverterTypeAddress.check_lower(value.address) + _UniffiFfiConverterOptionalInt32.check_lower(value.commission_rate) + _UniffiFfiConverterOptionalTypeValidatorCredentials.check_lower(value.credentials) + _UniffiFfiConverterOptionalString.check_lower(value.description) + _UniffiFfiConverterOptionalUInt64.check_lower(value.exchange_rates_size) + _UniffiFfiConverterOptionalUInt64.check_lower(value.gas_price) + _UniffiFfiConverterOptionalString.check_lower(value.name) + _UniffiFfiConverterOptionalString.check_lower(value.image_url) + _UniffiFfiConverterOptionalInt32.check_lower(value.next_epoch_commission_rate) + _UniffiFfiConverterOptionalTypeValidatorCredentials.check_lower(value.next_epoch_credentials) + _UniffiFfiConverterOptionalUInt64.check_lower(value.next_epoch_gas_price) + _UniffiFfiConverterOptionalUInt64.check_lower(value.next_epoch_stake) + _UniffiFfiConverterOptionalBytes.check_lower(value.operation_cap) + _UniffiFfiConverterOptionalUInt64.check_lower(value.pending_pool_token_withdraw) + _UniffiFfiConverterOptionalUInt64.check_lower(value.pending_stake) + _UniffiFfiConverterOptionalUInt64.check_lower(value.pending_total_iota_withdraw) + _UniffiFfiConverterOptionalUInt64.check_lower(value.pool_token_balance) + _UniffiFfiConverterOptionalString.check_lower(value.project_url) + _UniffiFfiConverterOptionalUInt64.check_lower(value.rewards_pool) + _UniffiFfiConverterOptionalUInt64.check_lower(value.staking_pool_activation_epoch) + _UniffiFfiConverterTypeObjectId.check_lower(value.staking_pool_id) + _UniffiFfiConverterOptionalUInt64.check_lower(value.staking_pool_iota_balance) + _UniffiFfiConverterOptionalInt32.check_lower(value.voting_power) - raise NotImplementedError -# ObjectData is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectData(): + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalInt32.write(value.apy, buf) + _UniffiFfiConverterTypeAddress.write(value.address, buf) + _UniffiFfiConverterOptionalInt32.write(value.commission_rate, buf) + _UniffiFfiConverterOptionalTypeValidatorCredentials.write(value.credentials, buf) + _UniffiFfiConverterOptionalString.write(value.description, buf) + _UniffiFfiConverterOptionalUInt64.write(value.exchange_rates_size, buf) + _UniffiFfiConverterOptionalUInt64.write(value.gas_price, buf) + _UniffiFfiConverterOptionalString.write(value.name, buf) + _UniffiFfiConverterOptionalString.write(value.image_url, buf) + _UniffiFfiConverterOptionalInt32.write(value.next_epoch_commission_rate, buf) + _UniffiFfiConverterOptionalTypeValidatorCredentials.write(value.next_epoch_credentials, buf) + _UniffiFfiConverterOptionalUInt64.write(value.next_epoch_gas_price, buf) + _UniffiFfiConverterOptionalUInt64.write(value.next_epoch_stake, buf) + _UniffiFfiConverterOptionalBytes.write(value.operation_cap, buf) + _UniffiFfiConverterOptionalUInt64.write(value.pending_pool_token_withdraw, buf) + _UniffiFfiConverterOptionalUInt64.write(value.pending_stake, buf) + _UniffiFfiConverterOptionalUInt64.write(value.pending_total_iota_withdraw, buf) + _UniffiFfiConverterOptionalUInt64.write(value.pool_token_balance, buf) + _UniffiFfiConverterOptionalString.write(value.project_url, buf) + _UniffiFfiConverterOptionalUInt64.write(value.rewards_pool, buf) + _UniffiFfiConverterOptionalUInt64.write(value.staking_pool_activation_epoch, buf) + _UniffiFfiConverterTypeObjectId.write(value.staking_pool_id, buf) + _UniffiFfiConverterOptionalUInt64.write(value.staking_pool_iota_balance, buf) + _UniffiFfiConverterOptionalInt32.write(value.voting_power, buf) + +@dataclass +class ValidatorCommittee: """ - Object data, either a package or struct + The Validator Set for a particular epoch. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - object-data = object-data-struct / object-data-package - - object-data-struct = %x00 object-move-struct - object-data-package = %x01 object-move-package + validator-committee = u64 ; epoch + (vector validator-committee-member) ``` - """ - - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def new_move_package(cls, move_package: "MovePackage"): - """ - Create an `ObjectData` from `MovePackage` - """ - - _UniffiConverterTypeMovePackage.check_lower(move_package) +""" + def __init__(self, *, epoch:int, members:typing.List[ValidatorCommitteeMember]): + self.epoch = epoch + self.members = members - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_package, - _UniffiConverterTypeMovePackage.lower(move_package)) - return cls._make_instance_(pointer) - - @classmethod - def new_move_struct(cls, move_struct: "MoveStruct"): - """ - Create an `ObjectData` from a `MoveStruct` - """ - - _UniffiConverterTypeMoveStruct.check_lower(move_struct) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdata_new_move_struct, - _UniffiConverterTypeMoveStruct.lower(move_struct)) - return cls._make_instance_(pointer) - + + def __str__(self): + return "ValidatorCommittee(epoch={}, members={})".format(self.epoch, self.members) + def __eq__(self, other): + if self.epoch != other.epoch: + return False + if self.members != other.members: + return False + return True - def as_package_opt(self, ) -> "typing.Optional[MovePackage]": - """ - Try to interpret this object as a `MovePackage` - """ - - return _UniffiConverterOptionalTypeMovePackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_package_opt,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeValidatorCommittee(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorCommittee( + epoch=_UniffiFfiConverterUInt64.read(buf), + members=_UniffiFfiConverterSequenceTypeValidatorCommitteeMember.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.epoch) + _UniffiFfiConverterSequenceTypeValidatorCommitteeMember.check_lower(value.members) + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.epoch, buf) + _UniffiFfiConverterSequenceTypeValidatorCommitteeMember.write(value.members, buf) +class _UniffiFfiConverterSequenceTypeValidator(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeValidator.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeValidator.write(item, buf) - def as_struct_opt(self, ) -> "typing.Optional[MoveStruct]": - """ - Try to interpret this object as a `MoveStruct` - """ - - return _UniffiConverterOptionalTypeMoveStruct.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_as_struct_opt,self._uniffi_clone_pointer(),) - ) - - + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeValidator.read(buf) for i in range(count) + ] +@dataclass +class ValidatorConnection: + def __init__(self, *, page_info:PageInfo, nodes:typing.List[Validator]): + self.page_info = page_info + self.nodes = nodes + + - def is_package(self, ) -> "bool": - """ - Return whether this object is a `MovePackage` - """ + + def __str__(self): + return "ValidatorConnection(page_info={}, nodes={})".format(self.page_info, self.nodes) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.nodes != other.nodes: + return False + return True - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_package,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeValidatorConnection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorConnection( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + nodes=_UniffiFfiConverterSequenceTypeValidator.read(buf), ) + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeValidator.check_lower(value.nodes) + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeValidator.write(value.nodes, buf) +@dataclass +class ValidatorPage: + """ + A page of items returned by the GraphQL server. +""" + def __init__(self, *, page_info:PageInfo, data:typing.List[Validator]): + self.page_info = page_info + self.data = data + + + + def __str__(self): + return "ValidatorPage(page_info={}, data={})".format(self.page_info, self.data) + def __eq__(self, other): + if self.page_info != other.page_info: + return False + if self.data != other.data: + return False + return True - def is_struct(self, ) -> "bool": - """ - Return whether this object is a `MoveStruct` - """ - - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdata_is_struct,self._uniffi_clone_pointer(),) +class _UniffiFfiConverterTypeValidatorPage(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ValidatorPage( + page_info=_UniffiFfiConverterTypePageInfo.read(buf), + data=_UniffiFfiConverterSequenceTypeValidator.read(buf), ) - - - - - -class _UniffiConverterTypeObjectData: - @staticmethod - def lift(value: int): - return ObjectData._make_instance_(value) + def check_lower(value): + _UniffiFfiConverterTypePageInfo.check_lower(value.page_info) + _UniffiFfiConverterSequenceTypeValidator.check_lower(value.data) @staticmethod - def check_lower(value: ObjectData): - if not isinstance(value, ObjectData): - raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) + def write(value, buf): + _UniffiFfiConverterTypePageInfo.write(value.page_info, buf) + _UniffiFfiConverterSequenceTypeValidator.write(value.data, buf) - @staticmethod - def lower(value: ObjectDataProtocol): - if not isinstance(value, ObjectData): - raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() +class _UniffiFfiConverterOptionalTypeArgument(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeArgument.check_lower(value) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeArgument.write(value, buf) @classmethod - def write(cls, value: ObjectDataProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ObjectIdProtocol(typing.Protocol): - """ - An `ObjectId` is a 32-byte identifier used to uniquely identify an object on - the IOTA blockchain. + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeArgument.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - ## Relationship to Address - [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure, - cryptographically, that there won't be any overlap, e.g. there can't be a - valid `Object` whose `ObjectId` is equal to that of the `Address` of a user - account. +class ArgumentProtocol(typing.Protocol): + """ + An argument to a programmable transaction command # BCS - An `ObjectId`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - object-id = 32*OCTET - ``` - """ - - def derive_dynamic_child_id(self, key_type_tag: "TypeTag",key_bytes: "bytes"): - """ - Derive an ObjectId for a Dynamic Child Object. + argument = argument-gas + =/ argument-input + =/ argument-result + =/ argument-nested-result - hash(parent || len(key) || key || key_type_tag) + argument-gas = %x00 + argument-input = %x01 u16 + argument-result = %x02 u16 + argument-nested-result = %x03 u16 u16 + ``` +""" + + def get_nested_result(self, ix: int) -> typing.Optional[Argument]: """ - - raise NotImplementedError - def to_address(self, ): - raise NotImplementedError - def to_bytes(self, ): - raise NotImplementedError - def to_hex(self, ): + Get the nested result for this result at the given index. Returns None + if this is not a Result. +""" raise NotImplementedError -# ObjectId is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectId(): - """ - An `ObjectId` is a 32-byte identifier used to uniquely identify an object on - the IOTA blockchain. - - ## Relationship to Address - [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure, - cryptographically, that there won't be any overlap, e.g. there can't be a - valid `Object` whose `ObjectId` is equal to that of the `Address` of a user - account. +class Argument(ArgumentProtocol): + """ + An argument to a programmable transaction command # BCS - An `ObjectId`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - object-id = 32*OCTET - ``` - """ + argument = argument-gas + =/ argument-input + =/ argument-result + =/ argument-nested-result - _pointer: ctypes.c_void_p + argument-gas = %x00 + argument-input = %x01 u16 + argument-result = %x02 u16 + argument-nested-result = %x03 u16 u16 + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_gas(cls, ) -> Argument: + """ + The gas coin. The gas coin can only be used by-ref, except for with + `TransferObjects`, which can use it by-value. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_gas, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_input(cls, input: int) -> Argument: + """ + One of the input objects or primitive values (from + `ProgrammableTransaction` inputs) +""" + + _UniffiFfiConverterUInt16.check_lower(input) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt16.lower(input), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_input, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_nested_result(cls, command_index: int,subresult_index: int) -> Argument: + """ + Like a `Result` but it accesses a nested result. Currently, the only + usage of this is to access a value from a Move call with multiple + return values. +""" + + _UniffiFfiConverterUInt16.check_lower(command_index) + + _UniffiFfiConverterUInt16.check_lower(subresult_index) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt16.lower(command_index), + _UniffiFfiConverterUInt16.lower(subresult_index), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_nested_result, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_result(cls, result: int) -> Argument: + """ + The result of another command (from `ProgrammableTransaction` commands) +""" + + _UniffiFfiConverterUInt16.check_lower(result) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt16.lower(result), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_argument_new_result, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_argument, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_argument, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def derive_id(cls, digest: "Digest",count: "int"): - """ - Create an ObjectId from a transaction digest and the number of objects - that have been created during a transactions. - """ - - _UniffiConverterTypeDigest.check_lower(digest) - - _UniffiConverterUInt64.check_lower(count) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_derive_id, - _UniffiConverterTypeDigest.lower(digest), - _UniffiConverterUInt64.lower(count)) - return cls._make_instance_(pointer) - - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_hex(cls, hex: "str"): - _UniffiConverterString.check_lower(hex) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex, - _UniffiConverterString.lower(hex)) - return cls._make_instance_(pointer) - - - - def derive_dynamic_child_id(self, key_type_tag: "TypeTag",key_bytes: "bytes") -> "ObjectId": - """ - Derive an ObjectId for a Dynamic Child Object. - - hash(parent || len(key) || key || key_type_tag) + def get_nested_result(self, ix: int) -> typing.Optional[Argument]: """ - - _UniffiConverterTypeTypeTag.check_lower(key_type_tag) - - _UniffiConverterBytes.check_lower(key_bytes) + Get the nested result for this result at the given index. Returns None + if this is not a Result. +""" - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_derive_dynamic_child_id,self._uniffi_clone_pointer(), - _UniffiConverterTypeTypeTag.lower(key_type_tag), - _UniffiConverterBytes.lower(key_bytes)) - ) - - - - - - def to_address(self, ) -> "Address": - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address,self._uniffi_clone_pointer(),) - ) - - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes,self._uniffi_clone_pointer(),) - ) - - - - - - def to_hex(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex,self._uniffi_clone_pointer(),) + _UniffiFfiConverterUInt16.check_lower(ix) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt16.lower(ix), ) - - - - - - def __hash__(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_uniffi_trait_hash,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_argument_get_nested_result, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeObjectId: - +class _UniffiFfiConverterTypeArgument: @staticmethod - def lift(value: int): - return ObjectId._make_instance_(value) + def lift(value: int) -> Argument: + return Argument._uniffi_make_instance(value) @staticmethod - def check_lower(value: ObjectId): - if not isinstance(value, ObjectId): - raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) + def check_lower(value: Argument): + if not isinstance(value, Argument): + raise TypeError("Expected Argument instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectIdProtocol): - if not isinstance(value, ObjectId): - raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Argument) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Argument: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ObjectIdProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Argument, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectTypeProtocol(typing.Protocol): - """ - Type of an IOTA object + + +class Bls12381SignatureProtocol(typing.Protocol): """ + A bls12381 min-sig public key. - def as_struct(self, ): - raise NotImplementedError - def as_struct_opt(self, ): - raise NotImplementedError - def is_package(self, ): - raise NotImplementedError - def is_struct(self, ): + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + bls-public-key = %x60 96OCTECT + ``` + + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +""" + + def to_bytes(self, ) -> bytes: raise NotImplementedError -# ObjectType is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectType(): - """ - Type of an IOTA object + +class Bls12381Signature(Bls12381SignatureProtocol): """ + A bls12381 min-sig public key. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + bls-public-key = %x60 96OCTECT + ``` - _pointer: ctypes.c_void_p + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. +""" + + _handle: ctypes.c_uint64 + @classmethod + def from_bytes(cls, bytes: bytes) -> Bls12381Signature: + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_str(cls, s: str) -> Bls12381Signature: + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Bls12381Signature: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_package(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_package,) - return cls._make_instance_(pointer) - - @classmethod - def new_struct(cls, struct_tag: "StructTag"): - _UniffiConverterTypeStructTag.check_lower(struct_tag) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objecttype_new_struct, - _UniffiConverterTypeStructTag.lower(struct_tag)) - return cls._make_instance_(pointer) - - - - def as_struct(self, ) -> "StructTag": - return _UniffiConverterTypeStructTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct,self._uniffi_clone_pointer(),) - ) - - - - - - def as_struct_opt(self, ) -> "typing.Optional[StructTag]": - return _UniffiConverterOptionalTypeStructTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_as_struct_opt,self._uniffi_clone_pointer(),) - ) - - - - - - def is_package(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_package,self._uniffi_clone_pointer(),) - ) - - - - - - def is_struct(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_is_struct,self._uniffi_clone_pointer(),) + def to_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def __str__(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objecttype_uniffi_trait_display,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeObjectType: - +class _UniffiFfiConverterTypeBls12381Signature: @staticmethod - def lift(value: int): - return ObjectType._make_instance_(value) + def lift(value: int) -> Bls12381Signature: + return Bls12381Signature._uniffi_make_instance(value) @staticmethod - def check_lower(value: ObjectType): - if not isinstance(value, ObjectType): - raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) + def check_lower(value: Bls12381Signature): + if not isinstance(value, Bls12381Signature): + raise TypeError("Expected Bls12381Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectTypeProtocol): - if not isinstance(value, ObjectType): - raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Bls12381Signature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Bls12381Signature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ObjectTypeProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Bls12381Signature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class OwnerProtocol(typing.Protocol): + + +class ValidatorSignatureProtocol(typing.Protocol): """ - Enum of different types of ownership for an object. + A signature from a Validator # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - owner = owner-address / owner-object / owner-shared / owner-immutable - - owner-address = %x00 address - owner-object = %x01 object-id - owner-shared = %x02 u64 - owner-immutable = %x03 + validator-signature = u64 ; epoch + bls-public-key + bls-signature ``` - """ - - def as_address(self, ): - raise NotImplementedError - def as_address_opt(self, ): - raise NotImplementedError - def as_object(self, ): - raise NotImplementedError - def as_object_opt(self, ): - raise NotImplementedError - def as_shared(self, ): - raise NotImplementedError - def as_shared_opt(self, ): - raise NotImplementedError - def is_address(self, ): - raise NotImplementedError - def is_immutable(self, ): +""" + + def epoch(self, ) -> int: raise NotImplementedError - def is_object(self, ): + def public_key(self, ) -> Bls12381PublicKey: raise NotImplementedError - def is_shared(self, ): + def signature(self, ) -> Bls12381Signature: raise NotImplementedError -# Owner is a Rust-only trait - it's a wrapper around a Rust implementation. -class Owner(): + +class ValidatorSignature(ValidatorSignatureProtocol): """ - Enum of different types of ownership for an object. + A signature from a Validator # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - owner = owner-address / owner-object / owner-shared / owner-immutable - - owner-address = %x00 address - owner-object = %x01 object-id - owner-shared = %x02 u64 - owner-immutable = %x03 + validator-signature = u64 ; epoch + bls-public-key + bls-signature ``` - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,public_key: Bls12381PublicKey,signature: Bls12381Signature): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterTypeBls12381PublicKey.check_lower(public_key) + + _UniffiFfiConverterTypeBls12381Signature.check_lower(signature) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterTypeBls12381PublicKey.lower(public_key), + _UniffiFfiConverterTypeBls12381Signature.lower(signature), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_address(cls, address: "Address"): - _UniffiConverterTypeAddress.check_lower(address) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_address, - _UniffiConverterTypeAddress.lower(address)) - return cls._make_instance_(pointer) - - @classmethod - def new_immutable(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_immutable,) - return cls._make_instance_(pointer) - - @classmethod - def new_object(cls, id: "ObjectId"): - _UniffiConverterTypeObjectId.check_lower(id) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_object, - _UniffiConverterTypeObjectId.lower(id)) - return cls._make_instance_(pointer) - - @classmethod - def new_shared(cls, version: "int"): - _UniffiConverterUInt64.check_lower(version) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_owner_new_shared, - _UniffiConverterUInt64.lower(version)) - return cls._make_instance_(pointer) - - - - def as_address(self, ) -> "Address": - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address,self._uniffi_clone_pointer(),) + def epoch(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_address_opt(self, ) -> "typing.Optional[Address]": - return _UniffiConverterOptionalTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_address_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch, + *_uniffi_lowered_args, ) - - - - - - def as_object(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def public_key(self, ) -> Bls12381PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_object_opt(self, ) -> "typing.Optional[ObjectId]": - return _UniffiConverterOptionalTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_object_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signature(self, ) -> Bls12381Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def as_shared(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared,self._uniffi_clone_pointer(),) - ) - - - +class _UniffiFfiConverterTypeValidatorSignature: + @staticmethod + def lift(value: int) -> ValidatorSignature: + return ValidatorSignature._uniffi_make_instance(value) + @staticmethod + def check_lower(value: ValidatorSignature): + if not isinstance(value, ValidatorSignature): + raise TypeError("Expected ValidatorSignature instance, {} found".format(type(value).__name__)) - def as_shared_opt(self, ) -> "typing.Optional[int]": - return _UniffiConverterOptionalUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_as_shared_opt,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: ValidatorSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ValidatorSignature: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ValidatorSignature, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class Bls12381VerifyingKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Bls12381PublicKey: + raise NotImplementedError + def verify(self, message: bytes,signature: Bls12381Signature) -> None: + raise NotImplementedError - def is_address(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_address,self._uniffi_clone_pointer(),) +class Bls12381VerifyingKey(Bls12381VerifyingKeyProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, public_key: Bls12381PublicKey): + + _UniffiFfiConverterTypeBls12381PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeBls12381PublicKey.lower(public_key), ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381verifyingkey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381verifyingkey, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381verifyingkey, self._handle) - - - def is_immutable(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_immutable,self._uniffi_clone_pointer(),) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def public_key(self, ) -> Bls12381PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: Bls12381Signature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeBls12381Signature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeBls12381Signature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381verifyingkey_verify, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def is_object(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_object,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeBls12381VerifyingKey: + @staticmethod + def lift(value: int) -> Bls12381VerifyingKey: + return Bls12381VerifyingKey._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Bls12381VerifyingKey): + if not isinstance(value, Bls12381VerifyingKey): + raise TypeError("Expected Bls12381VerifyingKey instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: Bls12381VerifyingKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Bls12381VerifyingKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Bls12381VerifyingKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def is_shared(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_is_shared,self._uniffi_clone_pointer(),) - ) +class Bls12381PrivateKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Bls12381PublicKey: + raise NotImplementedError + def scheme(self, ) -> SignatureScheme: + raise NotImplementedError + def sign_checkpoint_summary(self, summary: CheckpointSummary) -> ValidatorSignature: + raise NotImplementedError + def try_sign(self, message: bytes) -> Bls12381Signature: + raise NotImplementedError + def verifying_key(self, ) -> Bls12381VerifyingKey: + raise NotImplementedError +class Bls12381PrivateKey(Bls12381PrivateKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def generate(cls, ) -> Bls12381PrivateKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PrivateKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, bytes: bytes): + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381privatekey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381privatekey, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381privatekey, self._handle) - def __str__(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_owner_uniffi_trait_display,self._uniffi_clone_pointer(),) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def public_key(self, ) -> Bls12381PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def sign_checkpoint_summary(self, summary: CheckpointSummary) -> ValidatorSignature: + + _UniffiFfiConverterTypeCheckpointSummary.check_lower(summary) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeCheckpointSummary.lower(summary), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_sign_checkpoint_summary, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign(self, message: bytes) -> Bls12381Signature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_try_sign, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifying_key(self, ) -> Bls12381VerifyingKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381VerifyingKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381privatekey_verifying_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeOwner: - +class _UniffiFfiConverterTypeBls12381PrivateKey: @staticmethod - def lift(value: int): - return Owner._make_instance_(value) + def lift(value: int) -> Bls12381PrivateKey: + return Bls12381PrivateKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: Owner): - if not isinstance(value, Owner): - raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) + def check_lower(value: Bls12381PrivateKey): + if not isinstance(value, Bls12381PrivateKey): + raise TypeError("Expected Bls12381PrivateKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: OwnerProtocol): - if not isinstance(value, Owner): - raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Bls12381PrivateKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Bls12381PrivateKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: OwnerProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Bls12381PrivateKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class PasskeyAuthenticatorProtocol(typing.Protocol): + + +class VersionAssignmentProtocol(typing.Protocol): """ - A passkey authenticator. + Object version assignment from consensus # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - passkey-bcs = bytes ; where the contents of the bytes are - ; defined by - passkey = passkey-flag - bytes ; passkey authenticator data - client-data-json ; valid json - simple-signature ; required to be a secp256r1 signature - - client-data-json = string ; valid json + version-assignment = object-id u64 ``` - - See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for - the required json-schema for the `client-data-json` rule. In addition, IOTA - currently requires that the `CollectedClientData.type` field is required to - be `webauthn.get`. - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - - def authenticator_data(self, ): - """ - Opaque authenticator data for this passkey signature. - - See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for - more information on this field. - """ - - raise NotImplementedError - def challenge(self, ): - """ - The parsed challenge message for this passkey signature. - - This is parsed by decoding the base64url data from the - `client_data_json.challenge` field. - """ - - raise NotImplementedError - def client_data_json(self, ): - """ - Structured, unparsed, JSON for this passkey signature. - - See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) - for more information on this field. - """ - +""" + + def object_id(self, ) -> ObjectId: raise NotImplementedError - def public_key(self, ): - """ - The passkey public key - """ - + def version(self, ) -> int: raise NotImplementedError - def signature(self, ): - """ - The passkey signature. - """ - raise NotImplementedError -# PasskeyAuthenticator is a Rust-only trait - it's a wrapper around a Rust implementation. -class PasskeyAuthenticator(): +class VersionAssignment(VersionAssignmentProtocol): """ - A passkey authenticator. + Object version assignment from consensus # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - passkey-bcs = bytes ; where the contents of the bytes are - ; defined by - passkey = passkey-flag - bytes ; passkey authenticator data - client-data-json ; valid json - simple-signature ; required to be a secp256r1 signature - - client-data-json = string ; valid json + version-assignment = object-id u64 ``` - - See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for - the required json-schema for the `client-data-json` rule. In addition, IOTA - currently requires that the `CollectedClientData.type` field is required to - be `webauthn.get`. - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, object_id: ObjectId,version: int): + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + + _UniffiFfiConverterUInt64.check_lower(version) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(object_id), + _UniffiFfiConverterUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeVersionAssignment.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def authenticator_data(self, ) -> "bytes": - """ - Opaque authenticator data for this passkey signature. - - See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for - more information on this field. - """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data,self._uniffi_clone_pointer(),) + def object_id(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def challenge(self, ) -> "bytes": - """ - The parsed challenge message for this passkey signature. - - This is parsed by decoding the base64url data from the - `client_data_json.challenge` field. - """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge,self._uniffi_clone_pointer(),) - ) - - +class _UniffiFfiConverterTypeVersionAssignment: + @staticmethod + def lift(value: int) -> VersionAssignment: + return VersionAssignment._uniffi_make_instance(value) + @staticmethod + def check_lower(value: VersionAssignment): + if not isinstance(value, VersionAssignment): + raise TypeError("Expected VersionAssignment instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: VersionAssignment) -> ctypes.c_uint64: + return value._uniffi_clone_handle() - def client_data_json(self, ) -> "str": - """ - Structured, unparsed, JSON for this passkey signature. + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> VersionAssignment: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) - for more information on this field. - """ + @classmethod + def write(cls, value: VersionAssignment, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterSequenceTypeVersionAssignment(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeVersionAssignment.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeVersionAssignment.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeVersionAssignment.read(buf) for i in range(count) + ] - def public_key(self, ) -> "PasskeyPublicKey": - """ - The passkey public key - """ +class CancelledTransactionProtocol(typing.Protocol): + """ + A transaction that was cancelled - return _UniffiConverterTypePasskeyPublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_public_key,self._uniffi_clone_pointer(),) - ) + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + cancelled-transaction = digest (vector version-assignment) + ``` +""" + + def digest(self, ) -> Digest: + raise NotImplementedError + def version_assignments(self, ) -> typing.List[VersionAssignment]: + raise NotImplementedError +class CancelledTransaction(CancelledTransactionProtocol): + """ + A transaction that was cancelled + # BCS - def signature(self, ) -> "SimpleSignature": - """ - The passkey signature. - """ + The BCS serialized form for this type is defined by the following ABNF: - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature,self._uniffi_clone_pointer(),) + ```text + cancelled-transaction = digest (vector version-assignment) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, digest: Digest,version_assignments: typing.List[VersionAssignment]): + + _UniffiFfiConverterTypeDigest.check_lower(digest) + + _UniffiFfiConverterSequenceTypeVersionAssignment.check_lower(version_assignments) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeDigest.lower(digest), + _UniffiFfiConverterSequenceTypeVersionAssignment.lower(version_assignments), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCancelledTransaction.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_cancelledtransaction_new, + *_uniffi_lowered_args, ) + self._handle = _uniffi_ffi_result + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_cancelledtransaction, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_cancelledtransaction, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version_assignments(self, ) -> typing.List[VersionAssignment]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeVersionAssignment.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_cancelledtransaction_version_assignments, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypePasskeyAuthenticator: +class _UniffiFfiConverterTypeCancelledTransaction: @staticmethod - def lift(value: int): - return PasskeyAuthenticator._make_instance_(value) + def lift(value: int) -> CancelledTransaction: + return CancelledTransaction._uniffi_make_instance(value) @staticmethod - def check_lower(value: PasskeyAuthenticator): - if not isinstance(value, PasskeyAuthenticator): - raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) + def check_lower(value: CancelledTransaction): + if not isinstance(value, CancelledTransaction): + raise TypeError("Expected CancelledTransaction instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: PasskeyAuthenticatorProtocol): - if not isinstance(value, PasskeyAuthenticator): - raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: CancelledTransaction) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> CancelledTransaction: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: PasskeyAuthenticatorProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CancelledTransaction, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class PasskeyPublicKeyProtocol(typing.Protocol): - """ - Public key of a `PasskeyAuthenticator`. - This is used to derive the onchain `Address` for a `PasskeyAuthenticator`. +class _UniffiFfiConverterSequenceBytes(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterBytes.check_lower(item) - # BCS + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterBytes.write(item, buf) - The BCS serialized form for this type is defined by the following ABNF: + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - ```text - passkey-public-key = passkey-flag secp256r1-public-key - ``` - """ + return [ + _UniffiFfiConverterBytes.read(buf) for i in range(count) + ] - def derive_address(self, ): - """ - Derive an `Address` from this Passkey Public Key - An `Address` can be derived from a `PasskeyPublicKey` by hashing the - bytes of the `Secp256r1PublicKey` that corresponds to this passkey - prefixed with the Passkey `SignatureScheme` flag (`0x06`). +class SystemPackageProtocol(typing.Protocol): + """ + System package - `hash( 0x06 || 33-byte secp256r1 public key)` - """ + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + ```text + system-package = u64 ; version + (vector bytes) ; modules + (vector object-id) ; dependencies + ``` +""" + + def dependencies(self, ) -> typing.List[ObjectId]: raise NotImplementedError - def inner(self, ): + def modules(self, ) -> typing.List[bytes]: + raise NotImplementedError + def version(self, ) -> int: raise NotImplementedError -# PasskeyPublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class PasskeyPublicKey(): - """ - Public key of a `PasskeyAuthenticator`. - This is used to derive the onchain `Address` for a `PasskeyAuthenticator`. +class SystemPackage(SystemPackageProtocol): + """ + System package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - passkey-public-key = passkey-flag secp256r1-public-key + system-package = u64 ; version + (vector bytes) ; modules + (vector object-id) ; dependencies ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, public_key: "Secp256r1PublicKey"): - _UniffiConverterTypeSecp256r1PublicKey.check_lower(public_key) +""" + + _handle: ctypes.c_uint64 + def __init__(self, version: int,modules: typing.List[bytes],dependencies: typing.List[ObjectId]): + + _UniffiFfiConverterUInt64.check_lower(version) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeypublickey_new, - _UniffiConverterTypeSecp256r1PublicKey.lower(public_key)) + _UniffiFfiConverterSequenceBytes.check_lower(modules) + + _UniffiFfiConverterSequenceTypeObjectId.check_lower(dependencies) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(version), + _UniffiFfiConverterSequenceBytes.lower(modules), + _UniffiFfiConverterSequenceTypeObjectId.lower(dependencies), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSystemPackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeypublickey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeypublickey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def derive_address(self, ) -> "Address": - """ - Derive an `Address` from this Passkey Public Key - - An `Address` can be derived from a `PasskeyPublicKey` by hashing the - bytes of the `Secp256r1PublicKey` that corresponds to this passkey - prefixed with the Passkey `SignatureScheme` flag (`0x06`). - - `hash( 0x06 || 33-byte secp256r1 public key)` - """ - - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_derive_address,self._uniffi_clone_pointer(),) + def dependencies(self, ) -> typing.List[ObjectId]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def inner(self, ) -> "Secp256r1PublicKey": - return _UniffiConverterTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeypublickey_inner,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def modules(self, ) -> typing.List[bytes]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypePasskeyPublicKey: - +class _UniffiFfiConverterTypeSystemPackage: @staticmethod - def lift(value: int): - return PasskeyPublicKey._make_instance_(value) + def lift(value: int) -> SystemPackage: + return SystemPackage._uniffi_make_instance(value) @staticmethod - def check_lower(value: PasskeyPublicKey): - if not isinstance(value, PasskeyPublicKey): - raise TypeError("Expected PasskeyPublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: SystemPackage): + if not isinstance(value, SystemPackage): + raise TypeError("Expected SystemPackage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: PasskeyPublicKeyProtocol): - if not isinstance(value, PasskeyPublicKey): - raise TypeError("Expected PasskeyPublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: SystemPackage) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> SystemPackage: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: PasskeyPublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SystemPackage, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class PasskeyVerifierProtocol(typing.Protocol): - def verify(self, message: "bytes",authenticator: "PasskeyAuthenticator"): - raise NotImplementedError -# PasskeyVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class PasskeyVerifier(): - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new,) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier, self._pointer) - - # Used by alternative constructors or any methods which return this type. +class _UniffiFfiConverterSequenceTypeSystemPackage(_UniffiConverterRustBuffer): @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def verify(self, message: "bytes",authenticator: "PasskeyAuthenticator") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypePasskeyAuthenticator.check_lower(authenticator) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypePasskeyAuthenticator.lower(authenticator)) + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeSystemPackage.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeSystemPackage.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeSystemPackage.read(buf) for i in range(count) + ] +class ChangeEpochProtocol(typing.Protocol): + """ + System transaction used to change the epoch + # BCS -class _UniffiConverterTypePasskeyVerifier: + The BCS serialized form for this type is defined by the following ABNF: - @staticmethod - def lift(value: int): - return PasskeyVerifier._make_instance_(value) + ```text + change-epoch = u64 ; next epoch + u64 ; protocol version + u64 ; storage charge + u64 ; computation charge + u64 ; storage rebate + u64 ; non-refundable storage fee + u64 ; epoch start timestamp + (vector system-package) + ``` +""" + + def computation_charge(self, ) -> int: + """ + The total amount of gas charged for computation during the epoch. +""" + raise NotImplementedError + def epoch(self, ) -> int: + """ + The next (to become) epoch ID. +""" + raise NotImplementedError + def epoch_start_timestamp_ms(self, ) -> int: + """ + Unix timestamp when epoch started +""" + raise NotImplementedError + def non_refundable_storage_fee(self, ) -> int: + """ + The non-refundable storage fee. +""" + raise NotImplementedError + def protocol_version(self, ) -> int: + """ + The protocol version in effect in the new epoch. +""" + raise NotImplementedError + def storage_charge(self, ) -> int: + """ + The total amount of gas charged for storage during the epoch. +""" + raise NotImplementedError + def storage_rebate(self, ) -> int: + """ + The amount of storage rebate refunded to the txn senders. +""" + raise NotImplementedError + def system_packages(self, ) -> typing.List[SystemPackage]: + """ + System packages (specifically framework and move stdlib) that are + written before the new epoch starts. +""" + raise NotImplementedError - @staticmethod - def check_lower(value: PasskeyVerifier): - if not isinstance(value, PasskeyVerifier): - raise TypeError("Expected PasskeyVerifier instance, {} found".format(type(value).__name__)) +class ChangeEpoch(ChangeEpochProtocol): + """ + System transaction used to change the epoch - @staticmethod - def lower(value: PasskeyVerifierProtocol): - if not isinstance(value, PasskeyVerifier): - raise TypeError("Expected PasskeyVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + # BCS - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value: PasskeyVerifierProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class PersonalMessageProtocol(typing.Protocol): - def message_bytes(self, ): - raise NotImplementedError - def signing_digest(self, ): - raise NotImplementedError -# PersonalMessage is a Rust-only trait - it's a wrapper around a Rust implementation. -class PersonalMessage(): - _pointer: ctypes.c_void_p - def __init__(self, message_bytes: "bytes"): - _UniffiConverterBytes.check_lower(message_bytes) + ```text + change-epoch = u64 ; next epoch + u64 ; protocol version + u64 ; storage charge + u64 ; computation charge + u64 ; storage rebate + u64 ; non-refundable storage fee + u64 ; epoch start timestamp + (vector system-package) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,protocol_version: int,storage_charge: int,computation_charge: int,storage_rebate: int,non_refundable_storage_fee: int,epoch_start_timestamp_ms: int,system_packages: typing.List[SystemPackage]): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterUInt64.check_lower(protocol_version) + + _UniffiFfiConverterUInt64.check_lower(storage_charge) + + _UniffiFfiConverterUInt64.check_lower(computation_charge) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new, - _UniffiConverterBytes.lower(message_bytes)) + _UniffiFfiConverterUInt64.check_lower(storage_rebate) + + _UniffiFfiConverterUInt64.check_lower(non_refundable_storage_fee) + + _UniffiFfiConverterUInt64.check_lower(epoch_start_timestamp_ms) + + _UniffiFfiConverterSequenceTypeSystemPackage.check_lower(system_packages) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterUInt64.lower(protocol_version), + _UniffiFfiConverterUInt64.lower(storage_charge), + _UniffiFfiConverterUInt64.lower(computation_charge), + _UniffiFfiConverterUInt64.lower(storage_rebate), + _UniffiFfiConverterUInt64.lower(non_refundable_storage_fee), + _UniffiFfiConverterUInt64.lower(epoch_start_timestamp_ms), + _UniffiFfiConverterSequenceTypeSystemPackage.lower(system_packages), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeChangeEpoch.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepoch_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def message_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes,self._uniffi_clone_pointer(),) + def computation_charge(self, ) -> int: + """ + The total amount of gas charged for computation during the epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_computation_charge, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch(self, ) -> int: + """ + The next (to become) epoch ID. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch_start_timestamp_ms(self, ) -> int: + """ + Unix timestamp when epoch started +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_epoch_start_timestamp_ms, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def non_refundable_storage_fee(self, ) -> int: + """ + The non-refundable storage fee. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def signing_digest(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_non_refundable_storage_fee, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def protocol_version(self, ) -> int: + """ + The protocol version in effect in the new epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_protocol_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def storage_charge(self, ) -> int: + """ + The total amount of gas charged for storage during the epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_charge, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def storage_rebate(self, ) -> int: + """ + The amount of storage rebate refunded to the txn senders. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_storage_rebate, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def system_packages(self, ) -> typing.List[SystemPackage]: + """ + System packages (specifically framework and move stdlib) that are + written before the new epoch starts. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeSystemPackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepoch_system_packages, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypePersonalMessage: - +class _UniffiFfiConverterTypeChangeEpoch: @staticmethod - def lift(value: int): - return PersonalMessage._make_instance_(value) + def lift(value: int) -> ChangeEpoch: + return ChangeEpoch._uniffi_make_instance(value) @staticmethod - def check_lower(value: PersonalMessage): - if not isinstance(value, PersonalMessage): - raise TypeError("Expected PersonalMessage instance, {} found".format(type(value).__name__)) + def check_lower(value: ChangeEpoch): + if not isinstance(value, ChangeEpoch): + raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: PersonalMessageProtocol): - if not isinstance(value, PersonalMessage): - raise TypeError("Expected PersonalMessage instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ChangeEpoch) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ChangeEpoch: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: PersonalMessageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ChangeEpoch, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ProgrammableTransactionProtocol(typing.Protocol): - """ - A user transaction - Contains a series of native commands and move calls where the results of one - command can be used in future commands. + +class ChangeEpochV2Protocol(typing.Protocol): + """ + System transaction used to change the epoch # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ptb = (vector input) (vector command) + change-epoch = u64 ; next epoch + u64 ; protocol version + u64 ; storage charge + u64 ; computation charge + u64 ; computation charge burned + u64 ; storage rebate + u64 ; non-refundable storage fee + u64 ; epoch start timestamp + (vector system-package) ``` - """ - - def commands(self, ): +""" + + def computation_charge(self, ) -> int: """ - The commands to be executed sequentially. A failure in any command will - result in the failure of the entire transaction. + The total amount of gas charged for computation during the epoch. +""" + raise NotImplementedError + def computation_charge_burned(self, ) -> int: """ - + The total amount of gas burned for computation during the epoch. +""" raise NotImplementedError - def inputs(self, ): + def epoch(self, ) -> int: """ - Input objects or primitive values + The next (to become) epoch ID. +""" + raise NotImplementedError + def epoch_start_timestamp_ms(self, ) -> int: """ - + Unix timestamp when epoch started +""" + raise NotImplementedError + def non_refundable_storage_fee(self, ) -> int: + """ + The non-refundable storage fee. +""" + raise NotImplementedError + def protocol_version(self, ) -> int: + """ + The protocol version in effect in the new epoch. +""" + raise NotImplementedError + def storage_charge(self, ) -> int: + """ + The total amount of gas charged for storage during the epoch. +""" + raise NotImplementedError + def storage_rebate(self, ) -> int: + """ + The amount of storage rebate refunded to the txn senders. +""" + raise NotImplementedError + def system_packages(self, ) -> typing.List[SystemPackage]: + """ + System packages (specifically framework and move stdlib) that are + written before the new epoch starts. +""" raise NotImplementedError -# ProgrammableTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class ProgrammableTransaction(): - """ - A user transaction - Contains a series of native commands and move calls where the results of one - command can be used in future commands. +class ChangeEpochV2(ChangeEpochV2Protocol): + """ + System transaction used to change the epoch # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - ptb = (vector input) (vector command) + change-epoch = u64 ; next epoch + u64 ; protocol version + u64 ; storage charge + u64 ; computation charge + u64 ; computation charge burned + u64 ; storage rebate + u64 ; non-refundable storage fee + u64 ; epoch start timestamp + (vector system-package) ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, inputs: "typing.List[Input]",commands: "typing.List[Command]"): - _UniffiConverterSequenceTypeInput.check_lower(inputs) +""" + + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,protocol_version: int,storage_charge: int,computation_charge: int,computation_charge_burned: int,storage_rebate: int,non_refundable_storage_fee: int,epoch_start_timestamp_ms: int,system_packages: typing.List[SystemPackage]): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterUInt64.check_lower(protocol_version) + + _UniffiFfiConverterUInt64.check_lower(storage_charge) + + _UniffiFfiConverterUInt64.check_lower(computation_charge) - _UniffiConverterSequenceTypeCommand.check_lower(commands) + _UniffiFfiConverterUInt64.check_lower(computation_charge_burned) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new, - _UniffiConverterSequenceTypeInput.lower(inputs), - _UniffiConverterSequenceTypeCommand.lower(commands)) + _UniffiFfiConverterUInt64.check_lower(storage_rebate) + + _UniffiFfiConverterUInt64.check_lower(non_refundable_storage_fee) + + _UniffiFfiConverterUInt64.check_lower(epoch_start_timestamp_ms) + + _UniffiFfiConverterSequenceTypeSystemPackage.check_lower(system_packages) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterUInt64.lower(protocol_version), + _UniffiFfiConverterUInt64.lower(storage_charge), + _UniffiFfiConverterUInt64.lower(computation_charge), + _UniffiFfiConverterUInt64.lower(computation_charge_burned), + _UniffiFfiConverterUInt64.lower(storage_rebate), + _UniffiFfiConverterUInt64.lower(non_refundable_storage_fee), + _UniffiFfiConverterUInt64.lower(epoch_start_timestamp_ms), + _UniffiFfiConverterSequenceTypeSystemPackage.lower(system_packages), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeChangeEpochV2.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_changeepochv2_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def commands(self, ) -> "typing.List[Command]": + def computation_charge(self, ) -> int: """ - The commands to be executed sequentially. A failure in any command will - result in the failure of the entire transaction. + The total amount of gas charged for computation during the epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def computation_charge_burned(self, ) -> int: """ - - return _UniffiConverterSequenceTypeCommand.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands,self._uniffi_clone_pointer(),) + The total amount of gas burned for computation during the epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def inputs(self, ) -> "typing.List[Input]": + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_computation_charge_burned, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch(self, ) -> int: """ - Input objects or primitive values + The next (to become) epoch ID. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch_start_timestamp_ms(self, ) -> int: """ - - return _UniffiConverterSequenceTypeInput.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs,self._uniffi_clone_pointer(),) + Unix timestamp when epoch started +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_epoch_start_timestamp_ms, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def non_refundable_storage_fee(self, ) -> int: + """ + The non-refundable storage fee. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_non_refundable_storage_fee, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def protocol_version(self, ) -> int: + """ + The protocol version in effect in the new epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_protocol_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def storage_charge(self, ) -> int: + """ + The total amount of gas charged for storage during the epoch. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_charge, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def storage_rebate(self, ) -> int: + """ + The amount of storage rebate refunded to the txn senders. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_storage_rebate, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def system_packages(self, ) -> typing.List[SystemPackage]: + """ + System packages (specifically framework and move stdlib) that are + written before the new epoch starts. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeSystemPackage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_changeepochv2_system_packages, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeProgrammableTransaction: - +class _UniffiFfiConverterTypeChangeEpochV2: @staticmethod - def lift(value: int): - return ProgrammableTransaction._make_instance_(value) + def lift(value: int) -> ChangeEpochV2: + return ChangeEpochV2._uniffi_make_instance(value) @staticmethod - def check_lower(value: ProgrammableTransaction): - if not isinstance(value, ProgrammableTransaction): - raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) + def check_lower(value: ChangeEpochV2): + if not isinstance(value, ChangeEpochV2): + raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ProgrammableTransactionProtocol): - if not isinstance(value, ProgrammableTransaction): - raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ChangeEpochV2) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ChangeEpochV2: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ProgrammableTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ChangeEpochV2, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class PtbArgumentProtocol(typing.Protocol): - pass -# PtbArgument is a Rust-only trait - it's a wrapper around a Rust implementation. -class PtbArgument(): - _pointer: ctypes.c_void_p + + +class CheckpointTransactionInfoProtocol(typing.Protocol): + """ + Transaction information committed to in a checkpoint +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def effects(self, ) -> Digest: + raise NotImplementedError + def signatures(self, ) -> typing.List[UserSignature]: + raise NotImplementedError + def transaction(self, ) -> Digest: + raise NotImplementedError + +class CheckpointTransactionInfo(CheckpointTransactionInfoProtocol): + """ + Transaction information committed to in a checkpoint +""" + + _handle: ctypes.c_uint64 + def __init__(self, transaction: Digest,effects: Digest,signatures: typing.List[UserSignature]): + + _UniffiFfiConverterTypeDigest.check_lower(transaction) + + _UniffiFfiConverterTypeDigest.check_lower(effects) + + _UniffiFfiConverterSequenceTypeUserSignature.check_lower(signatures) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeDigest.lower(transaction), + _UniffiFfiConverterTypeDigest.lower(effects), + _UniffiFfiConverterSequenceTypeUserSignature.lower(signatures), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCheckpointTransactionInfo.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointtransactioninfo_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointtransactioninfo, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointtransactioninfo, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def address(cls, address: "Address"): - _UniffiConverterTypeAddress.check_lower(address) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address, - _UniffiConverterTypeAddress.lower(address)) - return cls._make_instance_(pointer) - - @classmethod - def digest(cls, digest: "Digest"): - _UniffiConverterTypeDigest.check_lower(digest) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest, - _UniffiConverterTypeDigest.lower(digest)) - return cls._make_instance_(pointer) - - @classmethod - def gas(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas,) - return cls._make_instance_(pointer) - - @classmethod - def object_id(cls, id: "ObjectId"): - _UniffiConverterTypeObjectId.check_lower(id) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id, - _UniffiConverterTypeObjectId.lower(id)) - return cls._make_instance_(pointer) - - @classmethod - def receiving(cls, id: "ObjectId"): - _UniffiConverterTypeObjectId.check_lower(id) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving, - _UniffiConverterTypeObjectId.lower(id)) - return cls._make_instance_(pointer) - - @classmethod - def res(cls, name: "str"): - _UniffiConverterString.check_lower(name) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res, - _UniffiConverterString.lower(name)) - return cls._make_instance_(pointer) - - @classmethod - def shared(cls, id: "ObjectId"): - _UniffiConverterTypeObjectId.check_lower(id) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared, - _UniffiConverterTypeObjectId.lower(id)) - return cls._make_instance_(pointer) - - @classmethod - def shared_mut(cls, id: "ObjectId"): - _UniffiConverterTypeObjectId.check_lower(id) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut, - _UniffiConverterTypeObjectId.lower(id)) - return cls._make_instance_(pointer) - - @classmethod - def string(cls, string: "str"): - _UniffiConverterString.check_lower(string) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string, - _UniffiConverterString.lower(string)) - return cls._make_instance_(pointer) - - @classmethod - def u128(cls, value: "str"): - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def u16(cls, value: "int"): - _UniffiConverterUInt16.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16, - _UniffiConverterUInt16.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def u256(cls, value: "str"): - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def u32(cls, value: "int"): - _UniffiConverterUInt32.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32, - _UniffiConverterUInt32.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def u64(cls, value: "int"): - _UniffiConverterUInt64.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64, - _UniffiConverterUInt64.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def u8(cls, value: "int"): - _UniffiConverterUInt8.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8, - _UniffiConverterUInt8.lower(value)) - return cls._make_instance_(pointer) - - @classmethod - def vector(cls, vec: "typing.List[bytes]"): - _UniffiConverterSequenceBytes.check_lower(vec) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector, - _UniffiConverterSequenceBytes.lower(vec)) - return cls._make_instance_(pointer) + def effects(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_effects, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signatures(self, ) -> typing.List[UserSignature]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeUserSignature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_signatures, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def transaction(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointtransactioninfo_transaction, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypePtbArgument: +class _UniffiFfiConverterTypeCheckpointTransactionInfo: @staticmethod - def lift(value: int): - return PtbArgument._make_instance_(value) + def lift(value: int) -> CheckpointTransactionInfo: + return CheckpointTransactionInfo._uniffi_make_instance(value) @staticmethod - def check_lower(value: PtbArgument): - if not isinstance(value, PtbArgument): - raise TypeError("Expected PtbArgument instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointTransactionInfo): + if not isinstance(value, CheckpointTransactionInfo): + raise TypeError("Expected CheckpointTransactionInfo instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: PtbArgumentProtocol): - if not isinstance(value, PtbArgument): - raise TypeError("Expected PtbArgument instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: CheckpointTransactionInfo) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> CheckpointTransactionInfo: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: PtbArgumentProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointTransactionInfo, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class PublishProtocol(typing.Protocol): + +class _UniffiFfiConverterSequenceTypeCheckpointTransactionInfo(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeCheckpointTransactionInfo.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeCheckpointTransactionInfo.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeCheckpointTransactionInfo.read(buf) for i in range(count) + ] + + +class CheckpointContentsProtocol(typing.Protocol): """ - Command to publish a new move package + The committed to contents of a checkpoint. + + `CheckpointContents` contains a list of digests of Transactions, their + effects, and the user signatures that authorized their execution included in + a checkpoint. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - publish = (vector bytes) ; the serialized move modules - (vector object-id) ; the set of package dependencies - ``` - """ - - def dependencies(self, ): - """ - Set of packages that the to-be published package depends on - """ + checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0 + checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests + (vector (vector bcs-user-signature)) ; set of user signatures for each + ; transaction. MUST be the same + ; length as the vector of digests + ``` +""" + + def digest(self, ) -> Digest: raise NotImplementedError - def modules(self, ): - """ - The serialized move modules - """ - + def transaction_info(self, ) -> typing.List[CheckpointTransactionInfo]: raise NotImplementedError -# Publish is a Rust-only trait - it's a wrapper around a Rust implementation. -class Publish(): + +class CheckpointContents(CheckpointContentsProtocol): """ - Command to publish a new move package + The committed to contents of a checkpoint. + + `CheckpointContents` contains a list of digests of Transactions, their + effects, and the user signatures that authorized their execution included in + a checkpoint. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - publish = (vector bytes) ; the serialized move modules - (vector object-id) ; the set of package dependencies - ``` - """ + checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0 - _pointer: ctypes.c_void_p - def __init__(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]"): - _UniffiConverterSequenceBytes.check_lower(modules) - - _UniffiConverterSequenceTypeObjectId.check_lower(dependencies) + checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests + (vector (vector bcs-user-signature)) ; set of user signatures for each + ; transaction. MUST be the same + ; length as the vector of digests + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, transaction_info: typing.List[CheckpointTransactionInfo]): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new, - _UniffiConverterSequenceBytes.lower(modules), - _UniffiConverterSequenceTypeObjectId.lower(dependencies)) + _UniffiFfiConverterSequenceTypeCheckpointTransactionInfo.check_lower(transaction_info) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeCheckpointTransactionInfo.lower(transaction_info), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCheckpointContents.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontents_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontents, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontents, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def dependencies(self, ) -> "typing.List[ObjectId]": - """ - Set of packages that the to-be published package depends on - """ - - return _UniffiConverterSequenceTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies,self._uniffi_clone_pointer(),) + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def modules(self, ) -> "typing.List[bytes]": - """ - The serialized move modules - """ - - return _UniffiConverterSequenceBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_digest, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def transaction_info(self, ) -> typing.List[CheckpointTransactionInfo]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeCheckpointTransactionInfo.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontents_transaction_info, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypePublish: - +class _UniffiFfiConverterTypeCheckpointContents: @staticmethod - def lift(value: int): - return Publish._make_instance_(value) + def lift(value: int) -> CheckpointContents: + return CheckpointContents._uniffi_make_instance(value) @staticmethod - def check_lower(value: Publish): - if not isinstance(value, Publish): - raise TypeError("Expected Publish instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointContents): + if not isinstance(value, CheckpointContents): + raise TypeError("Expected CheckpointContents instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: PublishProtocol): - if not isinstance(value, Publish): - raise TypeError("Expected Publish instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: CheckpointContents) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> CheckpointContents: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: PublishProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointContents, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1PrivateKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def scheme(self, ): - raise NotImplementedError - def to_bech32(self, ): - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ - raise NotImplementedError - def to_bytes(self, ): - """ - Serialize this private key to bytes. - """ - raise NotImplementedError - def to_der(self, ): - """ - Serialize this private key as DER-encoded PKCS#8 - """ +class CommandProtocol(typing.Protocol): + """ + A single command in a programmable transaction. - raise NotImplementedError - def to_pem(self, ): - """ - Serialize this private key as PEM-encoded PKCS#8 - """ + # BCS - raise NotImplementedError - def try_sign(self, message: "bytes"): - raise NotImplementedError - def try_sign_simple(self, message: "bytes"): - raise NotImplementedError - def try_sign_user(self, message: "bytes"): - raise NotImplementedError - def verifying_key(self, ): - raise NotImplementedError -# Secp256k1PrivateKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1PrivateKey(): - _pointer: ctypes.c_void_p - def __init__(self, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new, - _UniffiConverterBytes.lower(bytes)) + The BCS serialized form for this type is defined by the following ABNF: - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey, pointer) + ```text + command = command-move-call + =/ command-transfer-objects + =/ command-split-coins + =/ command-merge-coins + =/ command-publish + =/ command-make-move-vector + =/ command-upgrade - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey, self._pointer) + command-move-call = %x00 move-call + command-transfer-objects = %x01 transfer-objects + command-split-coins = %x02 split-coins + command-merge-coins = %x03 merge-coins + command-publish = %x04 publish + command-make-move-vector = %x05 make-move-vector + command-upgrade = %x06 upgrade + ``` +""" + + pass - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_bech32(cls, value: "str"): - """ - Decode a private key from `flag || privkey` in Bech32 starting with - "iotaprivkey". - """ +class Command(CommandProtocol): + """ + A single command in a programmable transaction. - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) + # BCS - @classmethod - def from_der(cls, bytes: "bytes"): - """ - Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary - format). - """ + The BCS serialized form for this type is defined by the following ABNF: - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + ```text + command = command-move-call + =/ command-transfer-objects + =/ command-split-coins + =/ command-merge-coins + =/ command-publish + =/ command-make-move-vector + =/ command-upgrade + command-move-call = %x00 move-call + command-transfer-objects = %x01 transfer-objects + command-split-coins = %x02 split-coins + command-merge-coins = %x03 merge-coins + command-publish = %x04 publish + command-make-move-vector = %x05 make-move-vector + command-upgrade = %x06 upgrade + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize PKCS#8-encoded private key from PEM. + def new_make_move_vector(cls, make_move_vector: MakeMoveVector) -> Command: """ - - _UniffiConverterString.check_lower(s) + Given n-values of the same type, it constructs a vector. For non objects + or an empty vector, the type tag must be specified. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate,) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "Secp256k1PublicKey": - return _UniffiConverterTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key,self._uniffi_clone_pointer(),) - ) - - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme,self._uniffi_clone_pointer(),) - ) - - - - - - def to_bech32(self, ) -> "str": - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32,self._uniffi_clone_pointer(),) + _UniffiFfiConverterTypeMakeMoveVector.check_lower(make_move_vector) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMakeMoveVector.lower(make_move_vector), ) - - - - - - def to_bytes(self, ) -> "bytes": - """ - Serialize this private key to bytes. - """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_make_move_vector, + *_uniffi_lowered_args, ) - - - - - - def to_der(self, ) -> "bytes": - """ - Serialize this private key as DER-encoded PKCS#8 + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_merge_coins(cls, merge_coins: MergeCoins) -> Command: """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der,self._uniffi_clone_pointer(),) - ) - - - - - - def to_pem(self, ) -> "str": + It merges n-coins into the first coin +""" + + _UniffiFfiConverterTypeMergeCoins.check_lower(merge_coins) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMergeCoins.lower(merge_coins), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_merge_coins, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_move_call(cls, move_call: MoveCall) -> Command: """ - Serialize this private key as PEM-encoded PKCS#8 + A call to either an entry or a public Move function +""" + + _UniffiFfiConverterTypeMoveCall.check_lower(move_call) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMoveCall.lower(move_call), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_move_call, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_publish(cls, publish: Publish) -> Command: """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem,self._uniffi_clone_pointer(),) + Publishes a Move package. It takes the package bytes and a list of the + package's transitive dependencies to link against on-chain. +""" + + _UniffiFfiConverterTypePublish.check_lower(publish) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypePublish.lower(publish), ) - - - - - - def try_sign(self, message: "bytes") -> "Secp256k1Signature": - _UniffiConverterBytes.check_lower(message) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_publish, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_split_coins(cls, split_coins: SplitCoins) -> Command: + """ + It splits off some amounts into a new coins with those amounts +""" - return _UniffiConverterTypeSecp256k1Signature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + _UniffiFfiConverterTypeSplitCoins.check_lower(split_coins) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSplitCoins.lower(split_coins), ) - - - - - - def try_sign_simple(self, message: "bytes") -> "SimpleSignature": - _UniffiConverterBytes.check_lower(message) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_split_coins, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_transfer_objects(cls, transfer_objects: TransferObjects) -> Command: + """ + It sends n-objects to the specified address. These objects must have + store (public transfer) and either the previous owner must be an + address or the object must be newly created. +""" - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + _UniffiFfiConverterTypeTransferObjects.check_lower(transfer_objects) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeTransferObjects.lower(transfer_objects), ) - - - - - - def try_sign_user(self, message: "bytes") -> "UserSignature": - _UniffiConverterBytes.check_lower(message) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_transfer_objects, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_upgrade(cls, upgrade: Upgrade) -> Command: + """ + Upgrades a Move package + Takes (in order): + 1. A vector of serialized modules for the package. + 2. A vector of object ids for the transitive dependencies of the new + package. + 3. The object ID of the package being upgraded. + 4. An argument holding the `UpgradeTicket` that must have been produced + from an earlier command in the same programmable transaction. +""" - return _UniffiConverterTypeUserSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + _UniffiFfiConverterTypeUpgrade.check_lower(upgrade) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeUpgrade.lower(upgrade), ) - - - - - - def verifying_key(self, ) -> "Secp256k1VerifyingKey": - return _UniffiConverterTypeSecp256k1VerifyingKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_command_new_upgrade, + *_uniffi_lowered_args, ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_command, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_command, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst -class _UniffiConverterTypeSecp256k1PrivateKey: +class _UniffiFfiConverterTypeCommand: @staticmethod - def lift(value: int): - return Secp256k1PrivateKey._make_instance_(value) + def lift(value: int) -> Command: + return Command._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256k1PrivateKey): - if not isinstance(value, Secp256k1PrivateKey): - raise TypeError("Expected Secp256k1PrivateKey instance, {} found".format(type(value).__name__)) + def check_lower(value: Command): + if not isinstance(value, Command): + raise TypeError("Expected Command instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1PrivateKeyProtocol): - if not isinstance(value, Secp256k1PrivateKey): - raise TypeError("Expected Secp256k1PrivateKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Command) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Command: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1PrivateKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Command, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1PublicKeyProtocol(typing.Protocol): - """ - A secp256k1 signature. - - # BCS - The BCS serialized form for this type is defined by the following ABNF: - - ```text - secp256k1-signature = 64OCTECT - ``` - """ +class _UniffiFfiConverterSequenceTypeCancelledTransaction(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeCancelledTransaction.check_lower(item) - def derive_address(self, ): - """ - Derive an `Address` from this Public Key + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeCancelledTransaction.write(item, buf) - An `Address` can be derived from a `Secp256k1PublicKey` by hashing the - bytes of the public key prefixed with the Secp256k1 - `SignatureScheme` flag (`0x01`). + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - `hash( 0x01 || 33-byte secp256k1 public key)` - """ + return [ + _UniffiFfiConverterTypeCancelledTransaction.read(buf) for i in range(count) + ] - raise NotImplementedError - def scheme(self, ): - """ - Return the flag for this signature scheme - """ +class ConsensusDeterminedVersionAssignmentsProtocol(typing.Protocol): + + def as_cancelled_transactions(self, ) -> typing.List[CancelledTransaction]: raise NotImplementedError - def to_bytes(self, ): + def is_cancelled_transactions(self, ) -> bool: raise NotImplementedError -# Secp256k1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1PublicKey(): - """ - A secp256k1 signature. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - secp256k1-signature = 64OCTECT - ``` - """ - _pointer: ctypes.c_void_p +class ConsensusDeterminedVersionAssignments(ConsensusDeterminedVersionAssignmentsProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def new_cancelled_transactions(cls, cancelled_transactions: typing.List[CancelledTransaction]) -> ConsensusDeterminedVersionAssignments: + + _UniffiFfiConverterSequenceTypeCancelledTransaction.check_lower(cancelled_transactions) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeCancelledTransaction.lower(cancelled_transactions), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeConsensusDeterminedVersionAssignments.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensusdeterminedversionassignments_new_cancelled_transactions, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensusdeterminedversionassignments, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensusdeterminedversionassignments, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate,) - return cls._make_instance_(pointer) - - - - def derive_address(self, ) -> "Address": - """ - Derive an `Address` from this Public Key - - An `Address` can be derived from a `Secp256k1PublicKey` by hashing the - bytes of the public key prefixed with the Secp256k1 - `SignatureScheme` flag (`0x01`). - - `hash( 0x01 || 33-byte secp256k1 public key)` - """ - - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_derive_address,self._uniffi_clone_pointer(),) + def as_cancelled_transactions(self, ) -> typing.List[CancelledTransaction]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def scheme(self, ) -> "SignatureScheme": - """ - Return the flag for this signature scheme - """ - - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_scheme,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeCancelledTransaction.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_as_cancelled_transactions, + *_uniffi_lowered_args, ) - - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def is_cancelled_transactions(self, ) -> bool: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterBoolean.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensusdeterminedversionassignments_is_cancelled_transactions, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeSecp256k1PublicKey: - +class _UniffiFfiConverterTypeConsensusDeterminedVersionAssignments: @staticmethod - def lift(value: int): - return Secp256k1PublicKey._make_instance_(value) + def lift(value: int) -> ConsensusDeterminedVersionAssignments: + return ConsensusDeterminedVersionAssignments._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256k1PublicKey): - if not isinstance(value, Secp256k1PublicKey): - raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: ConsensusDeterminedVersionAssignments): + if not isinstance(value, ConsensusDeterminedVersionAssignments): + raise TypeError("Expected ConsensusDeterminedVersionAssignments instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1PublicKeyProtocol): - if not isinstance(value, Secp256k1PublicKey): - raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ConsensusDeterminedVersionAssignments) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ConsensusDeterminedVersionAssignments: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusDeterminedVersionAssignments, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1SignatureProtocol(typing.Protocol): + + +class ConsensusCommitPrologueV1Protocol(typing.Protocol): """ - A secp256k1 public key. + V1 of the consensus commit prologue system transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256k1-public-key = 33OCTECT + consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest + consensus-determined-version-assignments ``` - """ - - def to_bytes(self, ): +""" + + def commit_timestamp_ms(self, ) -> int: + """ + Unix timestamp from consensus +""" + raise NotImplementedError + def consensus_commit_digest(self, ) -> Digest: + """ + Digest of consensus output +""" + raise NotImplementedError + def consensus_determined_version_assignments(self, ) -> ConsensusDeterminedVersionAssignments: + """ + Stores consensus handler determined shared object version assignments. +""" + raise NotImplementedError + def epoch(self, ) -> int: + """ + Epoch of the commit prologue transaction +""" + raise NotImplementedError + def round(self, ) -> int: + """ + Consensus round of the commit +""" + raise NotImplementedError + def sub_dag_index(self, ) -> typing.Optional[int]: + """ + The sub DAG index of the consensus commit. This field will be populated + if there are multiple consensus commits per round. +""" raise NotImplementedError -# Secp256k1Signature is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1Signature(): + +class ConsensusCommitPrologueV1(ConsensusCommitPrologueV1Protocol): """ - A secp256k1 public key. + V1 of the consensus commit prologue system transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256k1-public-key = 33OCTECT + consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest + consensus-determined-version-assignments ``` - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,round: int,sub_dag_index: typing.Optional[int],commit_timestamp_ms: int,consensus_commit_digest: Digest,consensus_determined_version_assignments: ConsensusDeterminedVersionAssignments): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterUInt64.check_lower(round) + + _UniffiFfiConverterOptionalUInt64.check_lower(sub_dag_index) + + _UniffiFfiConverterUInt64.check_lower(commit_timestamp_ms) + + _UniffiFfiConverterTypeDigest.check_lower(consensus_commit_digest) + + _UniffiFfiConverterTypeConsensusDeterminedVersionAssignments.check_lower(consensus_determined_version_assignments) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterUInt64.lower(round), + _UniffiFfiConverterOptionalUInt64.lower(sub_dag_index), + _UniffiFfiConverterUInt64.lower(commit_timestamp_ms), + _UniffiFfiConverterTypeDigest.lower(consensus_commit_digest), + _UniffiFfiConverterTypeConsensusDeterminedVersionAssignments.lower(consensus_determined_version_assignments), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeConsensusCommitPrologueV1.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitprologuev1_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate,) - return cls._make_instance_(pointer) - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes,self._uniffi_clone_pointer(),) + def commit_timestamp_ms(self, ) -> int: + """ + Unix timestamp from consensus +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_commit_timestamp_ms, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def consensus_commit_digest(self, ) -> Digest: + """ + Digest of consensus output +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_commit_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def consensus_determined_version_assignments(self, ) -> ConsensusDeterminedVersionAssignments: + """ + Stores consensus handler determined shared object version assignments. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeConsensusDeterminedVersionAssignments.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_consensus_determined_version_assignments, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch(self, ) -> int: + """ + Epoch of the commit prologue transaction +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def round(self, ) -> int: + """ + Consensus round of the commit +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_round, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def sub_dag_index(self, ) -> typing.Optional[int]: + """ + The sub DAG index of the consensus commit. This field will be populated + if there are multiple consensus commits per round. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitprologuev1_sub_dag_index, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeSecp256k1Signature: - +class _UniffiFfiConverterTypeConsensusCommitPrologueV1: @staticmethod - def lift(value: int): - return Secp256k1Signature._make_instance_(value) + def lift(value: int) -> ConsensusCommitPrologueV1: + return ConsensusCommitPrologueV1._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256k1Signature): - if not isinstance(value, Secp256k1Signature): - raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) + def check_lower(value: ConsensusCommitPrologueV1): + if not isinstance(value, ConsensusCommitPrologueV1): + raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1SignatureProtocol): - if not isinstance(value, Secp256k1Signature): - raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ConsensusCommitPrologueV1) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ConsensusCommitPrologueV1: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1SignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusCommitPrologueV1, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1VerifierProtocol(typing.Protocol): - def verify_simple(self, message: "bytes",signature: "SimpleSignature"): + + +class Ed25519VerifyingKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Ed25519PublicKey: raise NotImplementedError - def verify_user(self, message: "bytes",signature: "UserSignature"): + def to_der(self, ) -> bytes: + """ + Serialize this public key as DER-encoded data +""" raise NotImplementedError -# Secp256k1Verifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1Verifier(): - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new,) + def to_pem(self, ) -> str: + """ + Serialize this public key into PEM format +""" + raise NotImplementedError + def verify(self, message: bytes,signature: Ed25519Signature) -> None: + raise NotImplementedError + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + raise NotImplementedError + def verify_user(self, message: bytes,signature: UserSignature) -> None: + raise NotImplementedError + +class Ed25519VerifyingKey(Ed25519VerifyingKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_der(cls, bytes: bytes) -> Ed25519VerifyingKey: + """ + Deserialize public key from ASN.1 DER-encoded data (binary format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> Ed25519VerifyingKey: + """ + Deserialize public key from PEM. +""" + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, public_key: Ed25519PublicKey): + + _UniffiFfiConverterTypeEd25519PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeEd25519PublicKey.lower(public_key), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519verifyingkey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifyingkey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifyingkey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def verify_simple(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) + def public_key(self, ) -> Ed25519PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: + """ + Serialize this public key as DER-encoded data +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: + """ + Serialize this public key into PEM format +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: Ed25519Signature) -> None: - _UniffiConverterTypeSimpleSignature.check_lower(signature) + _UniffiFfiConverterBytes.check_lower(message) - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) - - - - - - - def verify_user(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) + _UniffiFfiConverterTypeEd25519Signature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeEd25519Signature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: - _UniffiConverterTypeUserSignature.check_lower(signature) + _UniffiFfiConverterBytes.check_lower(message) - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) - - - + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_user(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519verifyingkey_verify_user, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeSecp256k1Verifier: +class _UniffiFfiConverterTypeEd25519VerifyingKey: @staticmethod - def lift(value: int): - return Secp256k1Verifier._make_instance_(value) + def lift(value: int) -> Ed25519VerifyingKey: + return Ed25519VerifyingKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256k1Verifier): - if not isinstance(value, Secp256k1Verifier): - raise TypeError("Expected Secp256k1Verifier instance, {} found".format(type(value).__name__)) + def check_lower(value: Ed25519VerifyingKey): + if not isinstance(value, Ed25519VerifyingKey): + raise TypeError("Expected Ed25519VerifyingKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1VerifierProtocol): - if not isinstance(value, Secp256k1Verifier): - raise TypeError("Expected Secp256k1Verifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Ed25519VerifyingKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Ed25519VerifyingKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1VerifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519VerifyingKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1VerifyingKeyProtocol(typing.Protocol): - def public_key(self, ): + + +class Ed25519PrivateKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Ed25519PublicKey: raise NotImplementedError - def to_der(self, ): + def scheme(self, ) -> SignatureScheme: + raise NotImplementedError + def to_bech32(self, ) -> str: """ - Serialize this public key as DER-encoded data + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" + raise NotImplementedError + def to_bytes(self, ) -> bytes: """ - + Serialize this private key to bytes. +""" raise NotImplementedError - def to_pem(self, ): + def to_der(self, ) -> bytes: """ - Serialize this public key into PEM + Serialize this private key as DER-encoded PKCS#8 +""" + raise NotImplementedError + def to_pem(self, ) -> str: """ - + Serialize this private key as PEM-encoded PKCS#8 +""" raise NotImplementedError - def verify(self, message: "bytes",signature: "Secp256k1Signature"): + def try_sign(self, message: bytes) -> Ed25519Signature: raise NotImplementedError - def verify_simple(self, message: "bytes",signature: "SimpleSignature"): + def try_sign_simple(self, message: bytes) -> SimpleSignature: raise NotImplementedError - def verify_user(self, message: "bytes",signature: "UserSignature"): + def try_sign_user(self, message: bytes) -> UserSignature: raise NotImplementedError -# Secp256k1VerifyingKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1VerifyingKey(): - _pointer: ctypes.c_void_p - def __init__(self, public_key: "Secp256k1PublicKey"): - _UniffiConverterTypeSecp256k1PublicKey.check_lower(public_key) + def verifying_key(self, ) -> Ed25519VerifyingKey: + raise NotImplementedError + +class Ed25519PrivateKey(Ed25519PrivateKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_bech32(cls, value: str) -> Ed25519PrivateKey: + """ + Decode a private key from `flag || privkey` in Bech32 starting with + "iotaprivkey". +""" + + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_bech32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_der(cls, bytes: bytes) -> Ed25519PrivateKey: + """ + Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary + format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> Ed25519PrivateKey: + """ + Deserialize PKCS#8-encoded private key from PEM. +""" + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Ed25519PrivateKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PrivateKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, bytes: bytes): - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new, - _UniffiConverterTypeSecp256k1PublicKey.lower(public_key)) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519privatekey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519privatekey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_der(cls, bytes: "bytes"): + def public_key(self, ) -> Ed25519PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bech32(self, ) -> str: """ - Deserialize public key from ASN.1 DER-encoded data (binary format). + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bech32, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: """ - - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_pem(cls, s: "str"): + Serialize this private key to bytes. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: """ - Deserialize public key from PEM. + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: """ - - _UniffiConverterString.check_lower(s) + Serialize this private key as PEM-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign(self, message: bytes) -> Ed25519Signature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_simple(self, message: bytes) -> SimpleSignature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_user(self, message: bytes) -> UserSignature: - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_try_sign_user, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifying_key(self, ) -> Ed25519VerifyingKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEd25519VerifyingKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519privatekey_verifying_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + - def public_key(self, ) -> "Secp256k1PublicKey": - return _UniffiConverterTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeEd25519PrivateKey: + @staticmethod + def lift(value: int) -> Ed25519PrivateKey: + return Ed25519PrivateKey._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Ed25519PrivateKey): + if not isinstance(value, Ed25519PrivateKey): + raise TypeError("Expected Ed25519PrivateKey instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: Ed25519PrivateKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Ed25519PrivateKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - def to_der(self, ) -> "bytes": - """ - Serialize this public key as DER-encoded data - """ + @classmethod + def write(cls, value: Ed25519PrivateKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der,self._uniffi_clone_pointer(),) - ) +class Ed25519VerifierProtocol(typing.Protocol): + + pass +class Ed25519Verifier(Ed25519VerifierProtocol): + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519verifier, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519verifier, self._handle) - def to_pem(self, ) -> "str": - """ - Serialize this public key into PEM - """ + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeEd25519Verifier: + @staticmethod + def lift(value: int) -> Ed25519Verifier: + return Ed25519Verifier._uniffi_make_instance(value) - def verify(self, message: "bytes",signature: "Secp256k1Signature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSecp256k1Signature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSecp256k1Signature.lower(signature)) + @staticmethod + def check_lower(value: Ed25519Verifier): + if not isinstance(value, Ed25519Verifier): + raise TypeError("Expected Ed25519Verifier instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: Ed25519Verifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Ed25519Verifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Ed25519Verifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class EndOfEpochTransactionKindProtocol(typing.Protocol): + """ + Operation run at the end of an epoch + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def verify_simple(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSimpleSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) + ```text + end-of-epoch-transaction-kind = eoe-change-epoch + =/ eoe-authenticator-state-create + =/ eoe-authenticator-state-expire + =/ eoe-randomness-state-create + =/ eoe-deny-list-state-create + =/ eoe-bridge-state-create + =/ eoe-bridge-committee-init + =/ eoe-store-execution-time-observations + eoe-change-epoch = %x00 change-epoch + eoe-authenticator-state-create = %x01 + eoe-authenticator-state-expire = %x02 authenticator-state-expire + eoe-randomness-state-create = %x03 + eoe-deny-list-state-create = %x04 + eoe-bridge-state-create = %x05 digest + eoe-bridge-committee-init = %x06 u64 + eoe-store-execution-time-observations = %x07 stored-execution-time-observations + ``` +""" + + pass +class EndOfEpochTransactionKind(EndOfEpochTransactionKindProtocol): + """ + Operation run at the end of an epoch + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + end-of-epoch-transaction-kind = eoe-change-epoch + =/ eoe-authenticator-state-create + =/ eoe-authenticator-state-expire + =/ eoe-randomness-state-create + =/ eoe-deny-list-state-create + =/ eoe-bridge-state-create + =/ eoe-bridge-committee-init + =/ eoe-store-execution-time-observations - def verify_user(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) + eoe-change-epoch = %x00 change-epoch + eoe-authenticator-state-create = %x01 + eoe-authenticator-state-expire = %x02 authenticator-state-expire + eoe-randomness-state-create = %x03 + eoe-deny-list-state-create = %x04 + eoe-bridge-state-create = %x05 digest + eoe-bridge-committee-init = %x06 u64 + eoe-store-execution-time-observations = %x07 stored-execution-time-observations + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_authenticator_state_create(cls, ) -> EndOfEpochTransactionKind: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEndOfEpochTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_create, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_authenticator_state_expire(cls, tx: AuthenticatorStateExpire) -> EndOfEpochTransactionKind: + + _UniffiFfiConverterTypeAuthenticatorStateExpire.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAuthenticatorStateExpire.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEndOfEpochTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_authenticator_state_expire, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_change_epoch(cls, tx: ChangeEpoch) -> EndOfEpochTransactionKind: - _UniffiConverterTypeUserSignature.check_lower(signature) + _UniffiFfiConverterTypeChangeEpoch.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeChangeEpoch.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEndOfEpochTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_change_epoch_v2(cls, tx: ChangeEpochV2) -> EndOfEpochTransactionKind: - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) + _UniffiFfiConverterTypeChangeEpochV2.check_lower(tx) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeChangeEpochV2.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEndOfEpochTransactionKind.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_new_change_epoch_v2, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst -class _UniffiConverterTypeSecp256k1VerifyingKey: +class _UniffiFfiConverterTypeEndOfEpochTransactionKind: @staticmethod - def lift(value: int): - return Secp256k1VerifyingKey._make_instance_(value) + def lift(value: int) -> EndOfEpochTransactionKind: + return EndOfEpochTransactionKind._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256k1VerifyingKey): - if not isinstance(value, Secp256k1VerifyingKey): - raise TypeError("Expected Secp256k1VerifyingKey instance, {} found".format(type(value).__name__)) + def check_lower(value: EndOfEpochTransactionKind): + if not isinstance(value, EndOfEpochTransactionKind): + raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1VerifyingKeyProtocol): - if not isinstance(value, Secp256k1VerifyingKey): - raise TypeError("Expected Secp256k1VerifyingKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: EndOfEpochTransactionKind) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> EndOfEpochTransactionKind: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1VerifyingKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: EndOfEpochTransactionKind, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1PrivateKeyProtocol(typing.Protocol): - def public_key(self, ): - """ - Get the public key corresponding to this private key. - """ - raise NotImplementedError - def scheme(self, ): - raise NotImplementedError - def to_bech32(self, ): - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ - raise NotImplementedError - def to_bytes(self, ): - """ - Serialize this private key to bytes. - """ +class ExecutionTimeObservationKeyProtocol(typing.Protocol): + """ + Key for an execution time observation - raise NotImplementedError - def to_der(self, ): - """ - Serialize this private key as DER-encoded PKCS#8 - """ + # BCS - raise NotImplementedError - def to_pem(self, ): - """ - Serialize this private key as PEM-encoded PKCS#8 - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def try_sign(self, message: "bytes"): - """ - Sign a message and return a Secp256r1Signature. - """ + ```text + execution-time-observation-key = %x00 move-entry-point + =/ %x01 ; transfer-objects + =/ %x02 ; split-coins + =/ %x03 ; merge-coins + =/ %x04 ; publish + =/ %x05 ; make-move-vec + =/ %x06 ; upgrade - raise NotImplementedError - def try_sign_simple(self, message: "bytes"): - """ - Sign a message and return a SimpleSignature. - """ + move-entry-point = object-id string string (vec type-tag) + ``` +""" + + pass - raise NotImplementedError - def try_sign_user(self, message: "bytes"): - """ - Sign a message and return a UserSignature. - """ +class ExecutionTimeObservationKey(ExecutionTimeObservationKeyProtocol): + """ + Key for an execution time observation - raise NotImplementedError - def verifying_key(self, ): - raise NotImplementedError -# Secp256r1PrivateKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1PrivateKey(): - _pointer: ctypes.c_void_p - def __init__(self, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new, - _UniffiConverterBytes.lower(bytes)) + # BCS - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey, pointer) + The BCS serialized form for this type is defined by the following ABNF: - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey, self._pointer) + ```text + execution-time-observation-key = %x00 move-entry-point + =/ %x01 ; transfer-objects + =/ %x02 ; split-coins + =/ %x03 ; merge-coins + =/ %x04 ; publish + =/ %x05 ; make-move-vec + =/ %x06 ; upgrade - # Used by alternative constructors or any methods which return this type. + move-entry-point = object-id string string (vec type-tag) + ``` +""" + + _handle: ctypes.c_uint64 @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def new_make_move_vec(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_make_move_vec, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def from_bech32(cls, value: "str"): - """ - Decode a private key from `flag || privkey` in Bech32 starting with - "iotaprivkey". - """ - - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) - + def new_merge_coins(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_merge_coins, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def from_der(cls, bytes: "bytes"): - """ - Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary - format). - """ - - _UniffiConverterBytes.check_lower(bytes) + def new_move_entry_point(cls, package: ObjectId,module: str,function: str,type_arguments: typing.List[TypeTag]) -> ExecutionTimeObservationKey: - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize PKCS#8-encoded private key from PEM. - """ - - _UniffiConverterString.check_lower(s) + _UniffiFfiConverterTypeObjectId.check_lower(package) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - + _UniffiFfiConverterString.check_lower(module) + + _UniffiFfiConverterString.check_lower(function) + + _UniffiFfiConverterSequenceTypeTypeTag.check_lower(type_arguments) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(package), + _UniffiFfiConverterString.lower(module), + _UniffiFfiConverterString.lower(function), + _UniffiFfiConverterSequenceTypeTypeTag.lower(type_arguments), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_move_entry_point, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def generate(cls, ): - """ - Generate a new random Secp256r1PrivateKey - """ - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate,) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "Secp256r1PublicKey": - """ - Get the public key corresponding to this private key. - """ - - return _UniffiConverterTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key,self._uniffi_clone_pointer(),) + def new_publish(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( ) - - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_publish, + *_uniffi_lowered_args, ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_split_coins(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_split_coins, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_transfer_objects(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_transfer_objects, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_upgrade(cls, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservationkey_new_upgrade, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservationkey, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservationkey, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst - def to_bech32(self, ) -> "str": - """ - Encode this private key as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. - """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32,self._uniffi_clone_pointer(),) - ) - +class _UniffiFfiConverterTypeExecutionTimeObservationKey: + @staticmethod + def lift(value: int) -> ExecutionTimeObservationKey: + return ExecutionTimeObservationKey._uniffi_make_instance(value) - def to_bytes(self, ) -> "bytes": - """ - Serialize this private key to bytes. - """ + @staticmethod + def check_lower(value: ExecutionTimeObservationKey): + if not isinstance(value, ExecutionTimeObservationKey): + raise TypeError("Expected ExecutionTimeObservationKey instance, {} found".format(type(value).__name__)) - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: ExecutionTimeObservationKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ExecutionTimeObservationKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ExecutionTimeObservationKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +# The Duration type. +Duration = datetime.timedelta +# There is a loss of precision when converting from Rust durations, +# which are accurate to the nanosecond, +# to Python durations, which are only accurate to the microsecond. +class _UniffiFfiConverterDuration(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + seconds = buf.read_u64() + microseconds = buf.read_u32() / 1.0e3 + return datetime.timedelta(seconds=seconds, microseconds=microseconds) - def to_der(self, ) -> "bytes": - """ - Serialize this private key as DER-encoded PKCS#8 - """ + @staticmethod + def check_lower(value): + seconds = value.seconds + value.days * 24 * 3600 + if seconds < 0: + raise ValueError("Invalid duration, must be non-negative") - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der,self._uniffi_clone_pointer(),) - ) + @staticmethod + def write(value, buf): + seconds = value.seconds + value.days * 24 * 3600 + nanoseconds = value.microseconds * 1000 + buf.write_i64(seconds) + buf.write_u32(nanoseconds) +class ValidatorExecutionTimeObservationProtocol(typing.Protocol): + """ + An execution time observation from a particular validator + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def to_pem(self, ) -> "str": - """ - Serialize this private key as PEM-encoded PKCS#8 - """ + ```text + execution-time-observation = bls-public-key duration + duration = u64 ; seconds + u32 ; subsecond nanoseconds + ``` +""" + + def duration(self, ) -> Duration: + raise NotImplementedError + def validator(self, ) -> Bls12381PublicKey: + raise NotImplementedError - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem,self._uniffi_clone_pointer(),) - ) +class ValidatorExecutionTimeObservation(ValidatorExecutionTimeObservationProtocol): + """ + An execution time observation from a particular validator + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + execution-time-observation = bls-public-key duration + duration = u64 ; seconds + u32 ; subsecond nanoseconds + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, validator: Bls12381PublicKey,duration: Duration): + + _UniffiFfiConverterTypeBls12381PublicKey.check_lower(validator) + + _UniffiFfiConverterDuration.check_lower(duration) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeBls12381PublicKey.lower(validator), + _UniffiFfiConverterDuration.lower(duration), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorExecutionTimeObservation.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation, handle) - def try_sign(self, message: "bytes") -> "Secp256r1Signature": - """ - Sign a message and return a Secp256r1Signature. - """ + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation, self._handle) - _UniffiConverterBytes.check_lower(message) - - return _UniffiConverterTypeSecp256r1Signature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def duration(self, ) -> Duration: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterDuration.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def validator(self, ) -> Bls12381PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def try_sign_simple(self, message: "bytes") -> "SimpleSignature": - """ - Sign a message and return a SimpleSignature. - """ - - _UniffiConverterBytes.check_lower(message) - - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) - ) +class _UniffiFfiConverterTypeValidatorExecutionTimeObservation: + @staticmethod + def lift(value: int) -> ValidatorExecutionTimeObservation: + return ValidatorExecutionTimeObservation._uniffi_make_instance(value) + @staticmethod + def check_lower(value: ValidatorExecutionTimeObservation): + if not isinstance(value, ValidatorExecutionTimeObservation): + raise TypeError("Expected ValidatorExecutionTimeObservation instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: ValidatorExecutionTimeObservation) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ValidatorExecutionTimeObservation: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ValidatorExecutionTimeObservation, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def try_sign_user(self, message: "bytes") -> "UserSignature": - """ - Sign a message and return a UserSignature. - """ +class _UniffiFfiConverterSequenceTypeValidatorExecutionTimeObservation(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeValidatorExecutionTimeObservation.check_lower(item) - _UniffiConverterBytes.check_lower(message) - - return _UniffiConverterTypeUserSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) - ) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeValidatorExecutionTimeObservation.write(item, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeValidatorExecutionTimeObservation.read(buf) for i in range(count) + ] +class ExecutionTimeObservationProtocol(typing.Protocol): + + def key(self, ) -> ExecutionTimeObservationKey: + raise NotImplementedError + def observations(self, ) -> typing.List[ValidatorExecutionTimeObservation]: + raise NotImplementedError - def verifying_key(self, ) -> "Secp256r1VerifyingKey": - return _UniffiConverterTypeSecp256r1VerifyingKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key,self._uniffi_clone_pointer(),) +class ExecutionTimeObservation(ExecutionTimeObservationProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, key: ExecutionTimeObservationKey,observations: typing.List[ValidatorExecutionTimeObservation]): + + _UniffiFfiConverterTypeExecutionTimeObservationKey.check_lower(key) + + _UniffiFfiConverterSequenceTypeValidatorExecutionTimeObservation.check_lower(observations) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeExecutionTimeObservationKey.lower(key), + _UniffiFfiConverterSequenceTypeValidatorExecutionTimeObservation.lower(observations), ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservation.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservation_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservation, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservation, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def key(self, ) -> ExecutionTimeObservationKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservationKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def observations(self, ) -> typing.List[ValidatorExecutionTimeObservation]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeValidatorExecutionTimeObservation.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_executiontimeobservation_observations, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeSecp256r1PrivateKey: +class _UniffiFfiConverterTypeExecutionTimeObservation: @staticmethod - def lift(value: int): - return Secp256r1PrivateKey._make_instance_(value) + def lift(value: int) -> ExecutionTimeObservation: + return ExecutionTimeObservation._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256r1PrivateKey): - if not isinstance(value, Secp256r1PrivateKey): - raise TypeError("Expected Secp256r1PrivateKey instance, {} found".format(type(value).__name__)) + def check_lower(value: ExecutionTimeObservation): + if not isinstance(value, ExecutionTimeObservation): + raise TypeError("Expected ExecutionTimeObservation instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256r1PrivateKeyProtocol): - if not isinstance(value, Secp256r1PrivateKey): - raise TypeError("Expected Secp256r1PrivateKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ExecutionTimeObservation) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ExecutionTimeObservation: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256r1PrivateKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ExecutionTimeObservation, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1PublicKeyProtocol(typing.Protocol): + + +class ExecutionTimeObservationsProtocol(typing.Protocol): """ - A secp256r1 signature. + Set of Execution Time Observations from the committee. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-signature = 64OCTECT - ``` - """ - - def derive_address(self, ): - """ - Derive an `Address` from this Public Key - - An `Address` can be derived from a `Secp256r1PublicKey` by hashing the - bytes of the public key prefixed with the Secp256r1 - `SignatureScheme` flag (`0x02`). - - `hash( 0x02 || 33-byte secp256r1 public key)` - """ + stored-execution-time-observations = %x00 v1-stored-execution-time-observations - raise NotImplementedError - def scheme(self, ): - """ - Return the flag for this signature scheme - """ + v1-stored-execution-time-observations = (vec + execution-time-observation-key + (vec execution-time-observation) + ) + ``` +""" + + pass - raise NotImplementedError - def to_bytes(self, ): - raise NotImplementedError -# Secp256r1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1PublicKey(): +class ExecutionTimeObservations(ExecutionTimeObservationsProtocol): """ - A secp256r1 signature. + Set of Execution Time Observations from the committee. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-signature = 64OCTECT - ``` - """ + stored-execution-time-observations = %x00 v1-stored-execution-time-observations - _pointer: ctypes.c_void_p + v1-stored-execution-time-observations = (vec + execution-time-observation-key + (vec execution-time-observation) + ) + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_v1(cls, execution_time_observations: typing.List[ExecutionTimeObservation]) -> ExecutionTimeObservations: + + _UniffiFfiConverterSequenceTypeExecutionTimeObservation.check_lower(execution_time_observations) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeExecutionTimeObservation.lower(execution_time_observations), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeExecutionTimeObservations.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_executiontimeobservations_new_v1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst + + + + + +class _UniffiFfiConverterTypeExecutionTimeObservations: + @staticmethod + def lift(value: int) -> ExecutionTimeObservations: + return ExecutionTimeObservations._uniffi_make_instance(value) + + @staticmethod + def check_lower(value: ExecutionTimeObservations): + if not isinstance(value, ExecutionTimeObservations): + raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ExecutionTimeObservations) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + def read(cls, buf: _UniffiRustBuffer) -> ExecutionTimeObservations: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) + def write(cls, value: ExecutionTimeObservations, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) + +class _UniffiFfiConverterOptionalTypeBatchSendStatus(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeBatchSendStatus.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeBatchSendStatus.write(value, buf) @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate,) - return cls._make_instance_(pointer) + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeBatchSendStatus.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class FaucetClientProtocol(typing.Protocol): + + async def request(self, address: Address) -> typing.Optional[str]: + """ + Request gas from the faucet. Note that this will return the UUID of the + request and not wait until the token is received. Use + `request_and_wait` to wait for the token. +""" + raise NotImplementedError + async def request_and_wait(self, address: Address) -> typing.Optional[FaucetReceipt]: + """ + Request gas from the faucet and wait until the request is completed and + token is transferred. Returns `FaucetReceipt` if the request is + successful, which contains the list of tokens transferred, and the + transaction digest. - def derive_address(self, ) -> "Address": + Note that the faucet is heavily rate-limited, so calling repeatedly the + faucet would likely result in a 429 code or 502 code. +""" + raise NotImplementedError + async def request_status(self, id: str) -> typing.Optional[BatchSendStatus]: """ - Derive an `Address` from this Public Key + Check the faucet request status. - An `Address` can be derived from a `Secp256r1PublicKey` by hashing the - bytes of the public key prefixed with the Secp256r1 - `SignatureScheme` flag (`0x02`). + Possible statuses are defined in: [`BatchSendStatusType`] +""" + raise NotImplementedError - `hash( 0x02 || 33-byte secp256r1 public key)` +class FaucetClient(FaucetClientProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, faucet_url: str): """ + Construct a new `FaucetClient` with the given faucet service URL. This + [`FaucetClient`] expects that the service provides two endpoints: + /v1/gas and /v1/status. As such, do not provide the request + endpoint, just the top level service endpoint. - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_derive_address,self._uniffi_clone_pointer(),) + - /v1/gas is used to request gas + - /v1/status/taks-uuid is used to check the status of the request +""" + + _UniffiFfiConverterString.check_lower(faucet_url) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(faucet_url), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeFaucetClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + @classmethod + def new_devnet(cls, ) -> FaucetClient: + """ + Create a new Faucet client connected to the `devnet` faucet. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeFaucetClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_devnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_localnet(cls, ) -> FaucetClient: + """ + Create a new Faucet client connected to a `localnet` faucet. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeFaucetClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_localnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_testnet(cls, ) -> FaucetClient: + """ + Create a new Faucet client connected to the `testnet` faucet. +""" + _uniffi_lowered_args = ( ) + _uniffi_lift_return = _UniffiFfiConverterTypeFaucetClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new_testnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient, self._handle) - - - def scheme(self, ) -> "SignatureScheme": + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + async def request(self, address: Address) -> typing.Optional[str]: """ - Return the flag for this signature scheme + Request gas from the faucet. Note that this will return the UUID of the + request and not wait until the token is received. Use + `request_and_wait` to wait for the token. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def request_and_wait(self, address: Address) -> typing.Optional[FaucetReceipt]: """ + Request gas from the faucet and wait until the request is completed and + token is transferred. Returns `FaucetReceipt` if the request is + successful, which contains the list of tokens transferred, and the + transaction digest. - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_scheme,self._uniffi_clone_pointer(),) + Note that the faucet is heavily rate-limited, so calling repeatedly the + faucet would likely result in a 429 code or 502 code. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), ) - - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeFaucetReceipt.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def request_status(self, id: str) -> typing.Optional[BatchSendStatus]: + """ + Check the faucet request status. + Possible statuses are defined in: [`BatchSendStatusType`] +""" + + _UniffiFfiConverterString.check_lower(id) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(id), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeBatchSendStatus.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) -class _UniffiConverterTypeSecp256r1PublicKey: - +class _UniffiFfiConverterTypeFaucetClient: @staticmethod - def lift(value: int): - return Secp256r1PublicKey._make_instance_(value) + def lift(value: int) -> FaucetClient: + return FaucetClient._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256r1PublicKey): - if not isinstance(value, Secp256r1PublicKey): - raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: FaucetClient): + if not isinstance(value, FaucetClient): + raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256r1PublicKeyProtocol): - if not isinstance(value, Secp256r1PublicKey): - raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: FaucetClient) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> FaucetClient: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256r1PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: FaucetClient, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1SignatureProtocol(typing.Protocol): + + +class GenesisObjectProtocol(typing.Protocol): """ - A secp256r1 public key. + An object part of the initial chain state + + `GenesisObject`'s are included as a part of genesis, the initial + checkpoint/transaction, that initializes the state of the blockchain. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-public-key = 33OCTECT + genesis-object = object-data owner ``` - """ - - def to_bytes(self, ): +""" + + def data(self, ) -> ObjectData: + raise NotImplementedError + def object_id(self, ) -> ObjectId: + raise NotImplementedError + def object_type(self, ) -> ObjectType: raise NotImplementedError -# Secp256r1Signature is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1Signature(): + def owner(self, ) -> Owner: + raise NotImplementedError + def version(self, ) -> int: + raise NotImplementedError + +class GenesisObject(GenesisObjectProtocol): """ - A secp256r1 public key. + An object part of the initial chain state + + `GenesisObject`'s are included as a part of genesis, the initial + checkpoint/transaction, that initializes the state of the blockchain. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-public-key = 33OCTECT + genesis-object = object-data owner ``` - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, data: ObjectData,owner: Owner): + + _UniffiFfiConverterTypeObjectData.check_lower(data) + + _UniffiFfiConverterTypeOwner.check_lower(owner) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectData.lower(data), + _UniffiFfiConverterTypeOwner.lower(owner), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGenesisObject.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesisobject_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesisobject, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesisobject, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate,) - return cls._make_instance_(pointer) - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes,self._uniffi_clone_pointer(),) + def data(self, ) -> ObjectData: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectData.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_data, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def object_id(self, ) -> ObjectId: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_id, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def object_type(self, ) -> ObjectType: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectType.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_object_type, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def owner(self, ) -> Owner: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeOwner.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_owner, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def version(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesisobject_version, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeSecp256r1Signature: - +class _UniffiFfiConverterTypeGenesisObject: @staticmethod - def lift(value: int): - return Secp256r1Signature._make_instance_(value) + def lift(value: int) -> GenesisObject: + return GenesisObject._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256r1Signature): - if not isinstance(value, Secp256r1Signature): - raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) + def check_lower(value: GenesisObject): + if not isinstance(value, GenesisObject): + raise TypeError("Expected GenesisObject instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256r1SignatureProtocol): - if not isinstance(value, Secp256r1Signature): - raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: GenesisObject) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> GenesisObject: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256r1SignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: GenesisObject, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1VerifierProtocol(typing.Protocol): - def verify_simple(self, message: "bytes",signature: "SimpleSignature"): - raise NotImplementedError - def verify_user(self, message: "bytes",signature: "UserSignature"): - raise NotImplementedError -# Secp256r1Verifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1Verifier(): - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new,) - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier, pointer) +class _UniffiFfiConverterSequenceTypeGenesisObject(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeGenesisObject.check_lower(item) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier, self._pointer) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeGenesisObject.write(item, buf) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeGenesisObject.read(buf) for i in range(count) + ] - def verify_simple(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSimpleSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) +class GenesisTransactionProtocol(typing.Protocol): + """ + The genesis transaction + + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + genesis-transaction = (vector genesis-object) + ``` +""" + + def events(self, ) -> typing.List[Event]: + raise NotImplementedError + def objects(self, ) -> typing.List[GenesisObject]: + raise NotImplementedError +class GenesisTransaction(GenesisTransactionProtocol): + """ + The genesis transaction + # BCS + The BCS serialized form for this type is defined by the following ABNF: - def verify_user(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) + ```text + genesis-transaction = (vector genesis-object) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, objects: typing.List[GenesisObject],events: typing.List[Event]): - _UniffiConverterTypeUserSignature.check_lower(signature) + _UniffiFfiConverterSequenceTypeGenesisObject.check_lower(objects) - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) + _UniffiFfiConverterSequenceTypeEvent.check_lower(events) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeGenesisObject.lower(objects), + _UniffiFfiConverterSequenceTypeEvent.lower(events), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGenesisTransaction.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_genesistransaction_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def events(self, ) -> typing.List[Event]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeEvent.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_events, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def objects(self, ) -> typing.List[GenesisObject]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeGenesisObject.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_genesistransaction_objects, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeSecp256r1Verifier: +class _UniffiFfiConverterTypeGenesisTransaction: @staticmethod - def lift(value: int): - return Secp256r1Verifier._make_instance_(value) + def lift(value: int) -> GenesisTransaction: + return GenesisTransaction._uniffi_make_instance(value) @staticmethod - def check_lower(value: Secp256r1Verifier): - if not isinstance(value, Secp256r1Verifier): - raise TypeError("Expected Secp256r1Verifier instance, {} found".format(type(value).__name__)) + def check_lower(value: GenesisTransaction): + if not isinstance(value, GenesisTransaction): + raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256r1VerifierProtocol): - if not isinstance(value, Secp256r1Verifier): - raise TypeError("Expected Secp256r1Verifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: GenesisTransaction) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> GenesisTransaction: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: Secp256r1VerifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: GenesisTransaction, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1VerifyingKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def to_der(self, ): - """ - Serialize this public key as DER-encoded data. - """ - raise NotImplementedError - def to_pem(self, ): - """ - Serialize this public key into PEM. - """ +class _UniffiFfiConverterOptionalTypePaginationFilter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypePaginationFilter.check_lower(value) - raise NotImplementedError - def verify(self, message: "bytes",signature: "Secp256r1Signature"): - raise NotImplementedError - def verify_simple(self, message: "bytes",signature: "SimpleSignature"): - raise NotImplementedError - def verify_user(self, message: "bytes",signature: "UserSignature"): - raise NotImplementedError -# Secp256r1VerifyingKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1VerifyingKey(): - _pointer: ctypes.c_void_p - def __init__(self, public_key: "Secp256r1PublicKey"): - _UniffiConverterTypeSecp256r1PublicKey.check_lower(public_key) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new, - _UniffiConverterTypeSecp256r1PublicKey.lower(public_key)) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey, pointer) + buf.write_u8(1) + _UniffiFfiConverterTypePaginationFilter.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypePaginationFilter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey, self._pointer) +class _UniffiFfiConverterOptionalTypeCheckpointSummary(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeCheckpointSummary.check_lower(value) - # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeCheckpointSummary.write(value, buf) + @classmethod - def from_der(cls, bytes: "bytes"): - """ - Deserialize public key from ASN.1 DER-encoded data (binary format). - """ + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeCheckpointSummary.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) +class _UniffiFfiConverterOptionalTypeCoinMetadata(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeCoinMetadata.check_lower(value) @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize public key from PEM. - """ + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) + buf.write_u8(1) + _UniffiFfiConverterTypeCoinMetadata.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeCoinMetadata.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalBoolean(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterBoolean.check_lower(value) - def public_key(self, ) -> "Secp256r1PublicKey": - return _UniffiConverterTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterBoolean.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterBoolean.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeDynamicFieldOutput(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeDynamicFieldOutput.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def to_der(self, ) -> "bytes": - """ - Serialize this public key as DER-encoded data. - """ + buf.write_u8(1) + _UniffiFfiConverterTypeDynamicFieldOutput.write(value, buf) - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der,self._uniffi_clone_pointer(),) - ) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeDynamicFieldOutput.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeEpoch(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeEpoch.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeEpoch.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeEpoch.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def to_pem(self, ) -> "str": - """ - Serialize this public key into PEM. - """ +class _UniffiFfiConverterOptionalTypeEventFilter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeEventFilter.check_lower(value) - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem,self._uniffi_clone_pointer(),) - ) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeEventFilter.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeEventFilter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeNameFormat(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeNameFormat.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def verify(self, message: "bytes",signature: "Secp256r1Signature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSecp256r1Signature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSecp256r1Signature.lower(signature)) + buf.write_u8(1) + _UniffiFfiConverterTypeNameFormat.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeNameFormat.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeMoveFunction(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveFunction.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeMoveFunction.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveFunction.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - def verify_simple(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeSimpleSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) +class _UniffiFfiConverterOptionalTypeMoveModule(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeMoveModule.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeMoveModule.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeMoveModule.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeObject(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeObject.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - def verify_user(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeUserSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) + buf.write_u8(1) + _UniffiFfiConverterTypeObject.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeObject.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeObjectFilter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeObjectFilter.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterTypeObjectFilter.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeObjectFilter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeTransactionDataEffects(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeTransactionDataEffects.check_lower(value) -class _UniffiConverterTypeSecp256r1VerifyingKey: + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - @staticmethod - def lift(value: int): - return Secp256r1VerifyingKey._make_instance_(value) + buf.write_u8(1) + _UniffiFfiConverterTypeTransactionDataEffects.write(value, buf) - @staticmethod - def check_lower(value: Secp256r1VerifyingKey): - if not isinstance(value, Secp256r1VerifyingKey): - raise TypeError("Expected Secp256r1VerifyingKey instance, {} found".format(type(value).__name__)) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTransactionDataEffects.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") - @staticmethod - def lower(value: Secp256r1VerifyingKeyProtocol): - if not isinstance(value, Secp256r1VerifyingKey): - raise TypeError("Expected Secp256r1VerifyingKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() +class _UniffiFfiConverterOptionalTypeTransactionsFilter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeTransactionsFilter.check_lower(value) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeTransactionsFilter.write(value, buf) @classmethod - def write(cls, value: Secp256r1VerifyingKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class SimpleKeypairProtocol(typing.Protocol): - def public_key(self, ): + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTransactionsFilter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + +class GraphQlClientProtocol(typing.Protocol): + """ + The GraphQL client for interacting with the IOTA blockchain. +""" + + async def active_validators(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> ValidatorPage: + """ + Get the list of active validators for the provided epoch, including + related metadata. If no epoch is provided, it will return the active + validators for the current epoch. +""" + raise NotImplementedError + async def balance(self, address: Address,coin_type: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> typing.Optional[int]: + """ + Get the balance of all the coins owned by address for the provided coin + type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` + if not provided. +""" + raise NotImplementedError + async def chain_id(self, ) -> str: + """ + Get the chain identifier. +""" raise NotImplementedError - def scheme(self, ): + async def checkpoint(self, digest: typing.Union[object, typing.Optional[Digest]] = _DEFAULT,seq_num: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[CheckpointSummary]: + """ + Get the [`CheckpointSummary`] for a given checkpoint digest or + checkpoint id. If none is provided, it will use the last known + checkpoint id. +""" raise NotImplementedError - def to_bech32(self, ): - """ - Encode a SimpleKeypair as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. Note that the pubkey is not encoded. + async def checkpoints(self, pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> CheckpointSummaryPage: """ - + Get a page of [`CheckpointSummary`] for the provided parameters. +""" raise NotImplementedError - def to_bytes(self, ): + async def coin_metadata(self, coin_type: str) -> typing.Optional[CoinMetadata]: """ - Encode a SimpleKeypair as `flag || privkey` in bytes + Get the coin metadata for the coin type. +""" + raise NotImplementedError + async def coins(self, owner: Address,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,coin_type: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> CoinPage: """ + Get the list of coins for the specified address. + If `coin_type` is not provided, it will default to `0x2::coin::Coin`, + which will return all coins. For IOTA coin, pass in the coin type: + `0x2::coin::Coin<0x2::iota::IOTA>`. +""" raise NotImplementedError - def to_der(self, ): - """ - Serialize this private key as DER-encoded PKCS#8 + async def dry_run_tx(self, tx: Transaction,skip_checks: typing.Union[object, typing.Optional[bool]] = _DEFAULT) -> DryRunResult: """ + Dry run a [`Transaction`] and return the transaction effects and dry run + error (if any). + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. +""" raise NotImplementedError - def to_pem(self, ): - """ - Serialize this private key as DER-encoded PKCS#8 + async def dry_run_tx_kind(self, tx_kind: TransactionKind,tx_meta: TransactionMetadata,skip_checks: typing.Union[object, typing.Optional[bool]] = _DEFAULT) -> DryRunResult: """ + Dry run a [`TransactionKind`] and return the transaction effects and dry + run error (if any). + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. + + `tx_meta` is the transaction metadata. +""" raise NotImplementedError - def try_sign(self, message: "bytes"): - raise NotImplementedError - def verifying_key(self, ): - raise NotImplementedError -# SimpleKeypair is a Rust-only trait - it's a wrapper around a Rust implementation. -class SimpleKeypair(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + async def dynamic_field(self, address: Address,type_tag: TypeTag,name: Value) -> typing.Optional[DynamicFieldOutput]: + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have copy, drop, and store, and are specified + using their type, and their BCS contents, Base64 encoded. - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair, pointer) + The `name` argument is a json serialized type. - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair, self._pointer) + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_bech32(cls, value: "str"): - """ - Decode a SimpleKeypair from `flag || privkey` in Bech32 starting with - "iotaprivkey" to SimpleKeypair. The public key is computed directly from - the private key bytes. - """ + # Example + ```rust,ignore - _UniffiConverterString.check_lower(value) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32, - _UniffiConverterString.lower(value)) - return cls._make_instance_(pointer) + let client = iota_graphql_client::Client::new_devnet(); + let address = Address::from_str("0x5").unwrap(); + let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); - @classmethod - def from_bytes(cls, bytes: "bytes"): + # alternatively, pass in the bcs bytes + let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); + let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); + ``` +""" + raise NotImplementedError + async def dynamic_fields(self, address: Address,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> DynamicFieldOutputPage: """ - Decode a SimpleKeypair from `flag || privkey` bytes + Get a page of dynamic fields for the provided address. Note that this + will also fetch dynamic fields on wrapped objects. + + This returns [`Page`] of [`DynamicFieldOutput`]s. +""" + raise NotImplementedError + async def dynamic_object_field(self, address: Address,type_tag: TypeTag,name: Value) -> typing.Optional[DynamicFieldOutput]: """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have copy, drop, and store, and are + specified using their type, and their BCS contents, Base64 encoded. - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) + The `name` argument is a json serialized type. - @classmethod - def from_der(cls, bytes: "bytes"): + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. +""" + raise NotImplementedError + async def epoch(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Epoch]: """ - Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary - format). + Return the epoch information for the provided epoch. If no epoch is + provided, it will return the last known epoch. +""" + raise NotImplementedError + async def epoch_total_checkpoints(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: """ - - _UniffiConverterBytes.check_lower(bytes) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_ed25519(cls, keypair: "Ed25519PrivateKey"): - _UniffiConverterTypeEd25519PrivateKey.check_lower(keypair) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519, - _UniffiConverterTypeEd25519PrivateKey.lower(keypair)) - return cls._make_instance_(pointer) - - @classmethod - def from_pem(cls, s: "str"): + Return the number of checkpoints in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). +""" + raise NotImplementedError + async def epoch_total_transaction_blocks(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: """ - Deserialize PKCS#8-encoded private key from PEM. + Return the number of transaction blocks in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). +""" + raise NotImplementedError + async def events(self, filter: typing.Union[object, typing.Optional[EventFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> EventPage: """ - - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - @classmethod - def from_secp256k1(cls, keypair: "Secp256k1PrivateKey"): - _UniffiConverterTypeSecp256k1PrivateKey.check_lower(keypair) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1, - _UniffiConverterTypeSecp256k1PrivateKey.lower(keypair)) - return cls._make_instance_(pointer) - - @classmethod - def from_secp256r1(cls, keypair: "Secp256r1PrivateKey"): - _UniffiConverterTypeSecp256r1PrivateKey.check_lower(keypair) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1, - _UniffiConverterTypeSecp256r1PrivateKey.lower(keypair)) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "MultisigMemberPublicKey": - return _UniffiConverterTypeMultisigMemberPublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key,self._uniffi_clone_pointer(),) - ) - - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme,self._uniffi_clone_pointer(),) - ) - - - - - - def to_bech32(self, ) -> "str": + Return a page of tuple (event, transaction digest) based on the + (optional) event filter. +""" + raise NotImplementedError + async def execute_tx(self, signatures: typing.List[UserSignature],tx: Transaction) -> typing.Optional[TransactionEffects]: """ - Encode a SimpleKeypair as `flag || privkey` in Bech32 starting with - "iotaprivkey" to a string. Note that the pubkey is not encoded. + Execute a transaction. +""" + raise NotImplementedError + async def iota_names_default_name(self, address: Address,format: typing.Optional[NameFormat]) -> typing.Optional[Name]: """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32,self._uniffi_clone_pointer(),) - ) - - - - - - def to_bytes(self, ) -> "bytes": + Get the default name pointing to this address, if one exists. +""" + raise NotImplementedError + async def iota_names_lookup(self, name: str) -> typing.Optional[Address]: """ - Encode a SimpleKeypair as `flag || privkey` in bytes + Return the resolved address for the given name. +""" + raise NotImplementedError + async def iota_names_registrations(self, address: Address,pagination_filter: PaginationFilter) -> NameRegistrationPage: """ - - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes,self._uniffi_clone_pointer(),) - ) - - - - - - def to_der(self, ) -> "bytes": + Find all registration NFTs for the given address. +""" + raise NotImplementedError + async def latest_checkpoint_sequence_number(self, ) -> typing.Optional[int]: """ - Serialize this private key as DER-encoded PKCS#8 + Return the sequence number of the latest checkpoint that has been + executed. +""" + raise NotImplementedError + async def max_page_size(self, ) -> int: """ + Lazily fetch the max page size +""" + raise NotImplementedError + async def move_object_contents(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Value]: + """ + Return the contents' JSON of an object that is a Move object. - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der,self._uniffi_clone_pointer(),) - ) - - - - + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + raise NotImplementedError + async def move_object_contents_bcs(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[bytes]: + """ + Return the BCS of an object that is a Move object. - def to_pem(self, ) -> "str": + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + raise NotImplementedError + async def normalized_move_function(self, package: Address,module: str,function: str,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[MoveFunction]: """ - Serialize this private key as DER-encoded PKCS#8 + Return the normalized Move function data for the provided package, + module, and function. +""" + raise NotImplementedError + async def normalized_move_module(self, package: Address,module: str,version: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter_enums: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_friends: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_functions: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_structs: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> typing.Optional[MoveModule]: """ + Return the normalized Move module data for the provided module. +""" + raise NotImplementedError + async def object(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Object]: + """ + Return an object based on the provided [`Address`]. - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem,self._uniffi_clone_pointer(),) - ) - - - - - - def try_sign(self, message: "bytes") -> "SimpleSignature": - _UniffiConverterBytes.check_lower(message) - - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message)) - ) - - - - - - def verifying_key(self, ) -> "SimpleVerifyingKey": - return _UniffiConverterTypeSimpleVerifyingKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key,self._uniffi_clone_pointer(),) - ) - - - - - - -class _UniffiConverterTypeSimpleKeypair: - - @staticmethod - def lift(value: int): - return SimpleKeypair._make_instance_(value) - - @staticmethod - def check_lower(value: SimpleKeypair): - if not isinstance(value, SimpleKeypair): - raise TypeError("Expected SimpleKeypair instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: SimpleKeypairProtocol): - if not isinstance(value, SimpleKeypair): - raise TypeError("Expected SimpleKeypair instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: SimpleKeypairProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class SimpleSignatureProtocol(typing.Protocol): - """ - A basic signature - - This enumeration defines the set of simple or basic signature schemes - supported by IOTA. Most signature schemes supported by IOTA end up - comprising of a at least one simple signature scheme. - - # BCS + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + raise NotImplementedError + async def object_bcs(self, object_id: ObjectId) -> typing.Optional[bytes]: + """ + Return the object's bcs content [`Vec`] based on the provided + [`Address`]. +""" + raise NotImplementedError + async def objects(self, filter: typing.Union[object, typing.Optional[ObjectFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> ObjectPage: + """ + Return a page of objects based on the provided parameters. - The BCS serialized form for this type is defined by the following ABNF: + Use this function together with the [`ObjectFilter::owner`] to get the + objects owned by an address. - ```text - simple-signature-bcs = bytes ; where the contents of the bytes are defined by - simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / - (secp256k1-flag secp256k1-signature secp256k1-public-key) / - (secp256r1-flag secp256r1-signature secp256r1-public-key) - ``` + # Example - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ + ```rust,ignore + let filter = ObjectFilter { + type_tag: None, + owner: Some(Address::from_str("test").unwrap().into()), + object_ids: None, + }; - def ed25519_pub_key(self, ): + let owned_objects = client.objects(None, None, Some(filter), None, None).await; + ``` +""" raise NotImplementedError - def ed25519_pub_key_opt(self, ): + async def package(self, address: Address,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[MovePackage]: + """ + The package corresponding to the given address (at the optionally given + version). When no version is given, the package is loaded directly + from the address given. Otherwise, the address is translated before + loading to point to the package whose original ID matches + the package at address, but whose version is version. For non-system + packages, this might result in a different address than address + because different versions of a package, introduced by upgrades, + exist at distinct addresses. + + Note that this interpretation of version is different from a historical + object read (the interpretation of version for the object query). +""" raise NotImplementedError - def ed25519_sig(self, ): + async def package_latest(self, address: Address) -> typing.Optional[MovePackage]: + """ + Fetch the latest version of the package at address. + This corresponds to the package with the highest version that shares its + original ID with the package at address. +""" raise NotImplementedError - def ed25519_sig_opt(self, ): + async def package_versions(self, address: Address,after_version: typing.Union[object, typing.Optional[int]] = _DEFAULT,before_version: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> MovePackagePage: + """ + Fetch all versions of package at address (packages that share this + package's original ID), optionally bounding the versions exclusively + from below with afterVersion, or from above with beforeVersion. +""" raise NotImplementedError - def is_ed25519(self, ): + async def packages(self, after_checkpoint: typing.Union[object, typing.Optional[int]] = _DEFAULT,before_checkpoint: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> MovePackagePage: + """ + The Move packages that exist in the network, optionally filtered to be + strictly before beforeCheckpoint and/or strictly after + afterCheckpoint. + + This query returns all versions of a given user package that appear + between the specified checkpoints, but only records the latest + versions of system packages. +""" raise NotImplementedError - def is_secp256k1(self, ): + async def protocol_config(self, version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[ProtocolConfigs]: + """ + Get the protocol configuration. +""" raise NotImplementedError - def is_secp256r1(self, ): + async def reference_gas_price(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: + """ + Get the reference gas price for the provided epoch or the last known one + if no epoch is provided. + + This will return `Ok(None)` if the epoch requested is not available in + the GraphQL service (e.g., due to pruning). +""" raise NotImplementedError - def scheme(self, ): + async def run_query(self, query: Query) -> Value: + """ + Run a query. +""" raise NotImplementedError - def secp256k1_pub_key(self, ): + async def service_config(self, ) -> ServiceConfig: + """ + Get the GraphQL service configuration, including complexity limits, read + and mutation limits, supported versions, and others. +""" raise NotImplementedError - def secp256k1_pub_key_opt(self, ): + async def set_rpc_server(self, server: str) -> None: + """ + Set the server address for the GraphQL GraphQL client. It should be a + valid URL with a host and optionally a port number. +""" raise NotImplementedError - def secp256k1_sig(self, ): + async def total_supply(self, coin_type: str) -> typing.Optional[int]: + """ + Get total supply for the coin type. +""" raise NotImplementedError - def secp256k1_sig_opt(self, ): + async def total_transaction_blocks(self, ) -> typing.Optional[int]: + """ + The total number of transaction blocks in the network by the end of the + last known checkpoint. +""" raise NotImplementedError - def secp256r1_pub_key(self, ): + async def total_transaction_blocks_by_digest(self, digest: Digest) -> typing.Optional[int]: + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint digest. +""" raise NotImplementedError - def secp256r1_pub_key_opt(self, ): + async def total_transaction_blocks_by_seq_num(self, seq_num: int) -> typing.Optional[int]: + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint sequence number. +""" raise NotImplementedError - def secp256r1_sig(self, ): + async def transaction(self, digest: Digest) -> typing.Optional[SignedTransaction]: + """ + Get a transaction by its digest. +""" raise NotImplementedError - def secp256r1_sig_opt(self, ): + async def transaction_data_effects(self, digest: Digest) -> typing.Optional[TransactionDataEffects]: + """ + Get a transaction's data and effects by its digest. +""" raise NotImplementedError - def to_bytes(self, ): + async def transaction_effects(self, digest: Digest) -> typing.Optional[TransactionEffects]: + """ + Get a transaction's effects by its digest. +""" + raise NotImplementedError + async def transactions(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> SignedTransactionPage: + """ + Get a page of transactions based on the provided filters. +""" + raise NotImplementedError + async def transactions_data_effects(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> TransactionDataEffectsPage: + """ + Get a page of transactions' data and effects based on the provided + filters. +""" + raise NotImplementedError + async def transactions_effects(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> TransactionEffectsPage: + """ + Get a page of transactions' effects based on the provided filters. +""" raise NotImplementedError -# SimpleSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class SimpleSignature(): - """ - A basic signature - - This enumeration defines the set of simple or basic signature schemes - supported by IOTA. Most signature schemes supported by IOTA end up - comprising of a at least one simple signature scheme. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - simple-signature-bcs = bytes ; where the contents of the bytes are defined by - simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / - (secp256k1-flag secp256k1-signature secp256k1-public-key) / - (secp256r1-flag secp256r1-signature secp256r1-public-key) - ``` - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. +class GraphQlClient(GraphQlClientProtocol): """ - - _pointer: ctypes.c_void_p + The GraphQL client for interacting with the IOTA blockchain. +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, server: str): + """ + Create a new GraphQL client with the provided server address. +""" + + _UniffiFfiConverterString.check_lower(server) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(server), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGraphQLClient.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + @classmethod + def new_devnet(cls, ) -> GraphQlClient: + """ + Create a new GraphQL client connected to the `devnet` GraphQL server: + {DEVNET_HOST}. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGraphQLClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_localnet(cls, ) -> GraphQlClient: + """ + Create a new GraphQL client connected to the `localhost` GraphQL server: + {DEFAULT_LOCAL_HOST}. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGraphQLClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_mainnet(cls, ) -> GraphQlClient: + """ + Create a new GraphQL client connected to the `mainnet` GraphQL server: + {MAINNET_HOST}. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGraphQLClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_testnet(cls, ) -> GraphQlClient: + """ + Create a new GraphQL client connected to the `testnet` GraphQL server: + {TESTNET_HOST}. +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeGraphQLClient.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_ed25519(cls, signature: "Ed25519Signature",public_key: "Ed25519PublicKey"): - _UniffiConverterTypeEd25519Signature.check_lower(signature) + async def active_validators(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> ValidatorPage: + """ + Get the list of active validators for the provided epoch, including + related metadata. If no epoch is provided, it will return the active + validators for the current epoch. +""" + + if epoch is _DEFAULT: + epoch = None + _UniffiFfiConverterOptionalUInt64.check_lower(epoch) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(epoch), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def balance(self, address: Address,coin_type: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> typing.Optional[int]: + """ + Get the balance of all the coins owned by address for the provided coin + type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` + if not provided. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + if coin_type is _DEFAULT: + coin_type = None + _UniffiFfiConverterOptionalString.check_lower(coin_type) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterOptionalString.lower(coin_type), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def chain_id(self, ) -> str: + """ + Get the chain identifier. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def checkpoint(self, digest: typing.Union[object, typing.Optional[Digest]] = _DEFAULT,seq_num: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[CheckpointSummary]: + """ + Get the [`CheckpointSummary`] for a given checkpoint digest or + checkpoint id. If none is provided, it will use the last known + checkpoint id. +""" + + if digest is _DEFAULT: + digest = None + _UniffiFfiConverterOptionalTypeDigest.check_lower(digest) + + if seq_num is _DEFAULT: + seq_num = None + _UniffiFfiConverterOptionalUInt64.check_lower(seq_num) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeDigest.lower(digest), + _UniffiFfiConverterOptionalUInt64.lower(seq_num), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeCheckpointSummary.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def checkpoints(self, pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> CheckpointSummaryPage: + """ + Get a page of [`CheckpointSummary`] for the provided parameters. +""" - _UniffiConverterTypeEd25519PublicKey.check_lower(public_key) + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCheckpointSummaryPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def coin_metadata(self, coin_type: str) -> typing.Optional[CoinMetadata]: + """ + Get the coin metadata for the coin type. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_ed25519, - _UniffiConverterTypeEd25519Signature.lower(signature), - _UniffiConverterTypeEd25519PublicKey.lower(public_key)) - return cls._make_instance_(pointer) + _UniffiFfiConverterString.check_lower(coin_type) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(coin_type), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeCoinMetadata.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def coins(self, owner: Address,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,coin_type: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> CoinPage: + """ + Get the list of coins for the specified address. - @classmethod - def new_secp256k1(cls, signature: "Secp256k1Signature",public_key: "Secp256k1PublicKey"): - _UniffiConverterTypeSecp256k1Signature.check_lower(signature) + If `coin_type` is not provided, it will default to `0x2::coin::Coin`, + which will return all coins. For IOTA coin, pass in the coin type: + `0x2::coin::Coin<0x2::iota::IOTA>`. +""" - _UniffiConverterTypeSecp256k1PublicKey.check_lower(public_key) + _UniffiFfiConverterTypeAddress.check_lower(owner) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256k1, - _UniffiConverterTypeSecp256k1Signature.lower(signature), - _UniffiConverterTypeSecp256k1PublicKey.lower(public_key)) - return cls._make_instance_(pointer) + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + + if coin_type is _DEFAULT: + coin_type = None + _UniffiFfiConverterOptionalString.check_lower(coin_type) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(owner), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + _UniffiFfiConverterOptionalString.lower(coin_type), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCoinPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def dry_run_tx(self, tx: Transaction,skip_checks: typing.Union[object, typing.Optional[bool]] = _DEFAULT) -> DryRunResult: + """ + Dry run a [`Transaction`] and return the transaction effects and dry run + error (if any). - @classmethod - def new_secp256r1(cls, signature: "Secp256r1Signature",public_key: "Secp256r1PublicKey"): - _UniffiConverterTypeSecp256r1Signature.check_lower(signature) + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. +""" - _UniffiConverterTypeSecp256r1PublicKey.check_lower(public_key) + _UniffiFfiConverterTypeTransaction.check_lower(tx) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplesignature_new_secp256r1, - _UniffiConverterTypeSecp256r1Signature.lower(signature), - _UniffiConverterTypeSecp256r1PublicKey.lower(public_key)) - return cls._make_instance_(pointer) - - - - def ed25519_pub_key(self, ) -> "Ed25519PublicKey": - return _UniffiConverterTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key,self._uniffi_clone_pointer(),) + if skip_checks is _DEFAULT: + skip_checks = None + _UniffiFfiConverterOptionalBoolean.check_lower(skip_checks) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeTransaction.lower(tx), + _UniffiFfiConverterOptionalBoolean.lower(skip_checks), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDryRunResult.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def dry_run_tx_kind(self, tx_kind: TransactionKind,tx_meta: TransactionMetadata,skip_checks: typing.Union[object, typing.Optional[bool]] = _DEFAULT) -> DryRunResult: + """ + Dry run a [`TransactionKind`] and return the transaction effects and dry + run error (if any). + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. - - - - def ed25519_pub_key_opt(self, ) -> "typing.Optional[Ed25519PublicKey]": - return _UniffiConverterOptionalTypeEd25519PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt,self._uniffi_clone_pointer(),) + `tx_meta` is the transaction metadata. +""" + + _UniffiFfiConverterTypeTransactionKind.check_lower(tx_kind) + + _UniffiFfiConverterTypeTransactionMetadata.check_lower(tx_meta) + + if skip_checks is _DEFAULT: + skip_checks = None + _UniffiFfiConverterOptionalBoolean.check_lower(skip_checks) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeTransactionKind.lower(tx_kind), + _UniffiFfiConverterTypeTransactionMetadata.lower(tx_meta), + _UniffiFfiConverterOptionalBoolean.lower(skip_checks), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDryRunResult.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def dynamic_field(self, address: Address,type_tag: TypeTag,name: Value) -> typing.Optional[DynamicFieldOutput]: + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have copy, drop, and store, and are specified + using their type, and their BCS contents, Base64 encoded. + The `name` argument is a json serialized type. + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. + # Example + ```rust,ignore + let client = iota_graphql_client::Client::new_devnet(); + let address = Address::from_str("0x5").unwrap(); + let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); - def ed25519_sig(self, ) -> "Ed25519Signature": - return _UniffiConverterTypeEd25519Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig,self._uniffi_clone_pointer(),) + # alternatively, pass in the bcs bytes + let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); + let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); + ``` +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + _UniffiFfiConverterTypeTypeTag.check_lower(type_tag) + + _UniffiFfiConverterTypeValue.check_lower(name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterTypeTypeTag.lower(type_tag), + _UniffiFfiConverterTypeValue.lower(name), ) - - - - - - def ed25519_sig_opt(self, ) -> "typing.Optional[Ed25519Signature]": - return _UniffiConverterOptionalTypeEd25519Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeDynamicFieldOutput.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def dynamic_fields(self, address: Address,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> DynamicFieldOutputPage: + """ + Get a page of dynamic fields for the provided address. Note that this + will also fetch dynamic fields on wrapped objects. - - - - - def is_ed25519(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519,self._uniffi_clone_pointer(),) + This returns [`Page`] of [`DynamicFieldOutput`]s. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeDynamicFieldOutputPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def dynamic_object_field(self, address: Address,type_tag: TypeTag,name: Value) -> typing.Optional[DynamicFieldOutput]: + """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have copy, drop, and store, and are + specified using their type, and their BCS contents, Base64 encoded. + The `name` argument is a json serialized type. - - - - def is_secp256k1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1,self._uniffi_clone_pointer(),) + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + _UniffiFfiConverterTypeTypeTag.check_lower(type_tag) + + _UniffiFfiConverterTypeValue.check_lower(name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterTypeTypeTag.lower(type_tag), + _UniffiFfiConverterTypeValue.lower(name), ) - - - - - - def is_secp256r1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeDynamicFieldOutput.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme,self._uniffi_clone_pointer(),) + async def epoch(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Epoch]: + """ + Return the epoch information for the provided epoch. If no epoch is + provided, it will return the last known epoch. +""" + + if epoch is _DEFAULT: + epoch = None + _UniffiFfiConverterOptionalUInt64.check_lower(epoch) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(epoch), ) - - - - - - def secp256k1_pub_key(self, ) -> "Secp256k1PublicKey": - return _UniffiConverterTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeEpoch.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def secp256k1_pub_key_opt(self, ) -> "typing.Optional[Secp256k1PublicKey]": - return _UniffiConverterOptionalTypeSecp256k1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt,self._uniffi_clone_pointer(),) + async def epoch_total_checkpoints(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: + """ + Return the number of checkpoints in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). +""" + + if epoch is _DEFAULT: + epoch = None + _UniffiFfiConverterOptionalUInt64.check_lower(epoch) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(epoch), ) - - - - - - def secp256k1_sig(self, ) -> "Secp256k1Signature": - return _UniffiConverterTypeSecp256k1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def secp256k1_sig_opt(self, ) -> "typing.Optional[Secp256k1Signature]": - return _UniffiConverterOptionalTypeSecp256k1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt,self._uniffi_clone_pointer(),) + async def epoch_total_transaction_blocks(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: + """ + Return the number of transaction blocks in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). +""" + + if epoch is _DEFAULT: + epoch = None + _UniffiFfiConverterOptionalUInt64.check_lower(epoch) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(epoch), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def events(self, filter: typing.Union[object, typing.Optional[EventFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> EventPage: + """ + Return a page of tuple (event, transaction digest) based on the + (optional) event filter. +""" + + if filter is _DEFAULT: + filter = None + _UniffiFfiConverterOptionalTypeEventFilter.check_lower(filter) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeEventFilter.lower(filter), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeEventPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def execute_tx(self, signatures: typing.List[UserSignature],tx: Transaction) -> typing.Optional[TransactionEffects]: + """ + Execute a transaction. +""" + + _UniffiFfiConverterSequenceTypeUserSignature.check_lower(signatures) + + _UniffiFfiConverterTypeTransaction.check_lower(tx) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterSequenceTypeUserSignature.lower(signatures), + _UniffiFfiConverterTypeTransaction.lower(tx), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTransactionEffects.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def iota_names_default_name(self, address: Address,format: typing.Optional[NameFormat]) -> typing.Optional[Name]: + """ + Get the default name pointing to this address, if one exists. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + _UniffiFfiConverterOptionalTypeNameFormat.check_lower(format) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterOptionalTypeNameFormat.lower(format), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeName.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def iota_names_lookup(self, name: str) -> typing.Optional[Address]: + """ + Return the resolved address for the given name. +""" + + _UniffiFfiConverterString.check_lower(name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(name), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeAddress.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def iota_names_registrations(self, address: Address,pagination_filter: PaginationFilter) -> NameRegistrationPage: + """ + Find all registration NFTs for the given address. +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + _UniffiFfiConverterTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeNameRegistrationPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_registrations(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def latest_checkpoint_sequence_number(self, ) -> typing.Optional[int]: + """ + Return the sequence number of the latest checkpoint that has been + executed. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def secp256r1_pub_key(self, ) -> "Secp256r1PublicKey": - return _UniffiConverterTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def secp256r1_pub_key_opt(self, ) -> "typing.Optional[Secp256r1PublicKey]": - return _UniffiConverterOptionalTypeSecp256r1PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt,self._uniffi_clone_pointer(),) + async def max_page_size(self, ) -> int: + """ + Lazily fetch the max page size +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def secp256r1_sig(self, ) -> "Secp256r1Signature": - return _UniffiConverterTypeSecp256r1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterInt32.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def move_object_contents(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Value]: + """ + Return the contents' JSON of an object that is a Move object. - - - - - def secp256r1_sig_opt(self, ) -> "typing.Optional[Secp256r1Signature]": - return _UniffiConverterOptionalTypeSecp256r1Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt,self._uniffi_clone_pointer(),) + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(object_id), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeValue.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def move_object_contents_bcs(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[bytes]: + """ + Return the BCS of an object that is a Move object. - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes,self._uniffi_clone_pointer(),) + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(object_id), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - -class _UniffiConverterTypeSimpleSignature: - - @staticmethod - def lift(value: int): - return SimpleSignature._make_instance_(value) - - @staticmethod - def check_lower(value: SimpleSignature): - if not isinstance(value, SimpleSignature): - raise TypeError("Expected SimpleSignature instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: SimpleSignatureProtocol): - if not isinstance(value, SimpleSignature): - raise TypeError("Expected SimpleSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: SimpleSignatureProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class SimpleVerifierProtocol(typing.Protocol): - def verify(self, message: "bytes",signature: "SimpleSignature"): - raise NotImplementedError -# SimpleVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class SimpleVerifier(): - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new,) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def verify(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) + async def normalized_move_function(self, package: Address,module: str,function: str,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[MoveFunction]: + """ + Return the normalized Move function data for the provided package, + module, and function. +""" - _UniffiConverterTypeSimpleSignature.check_lower(signature) + _UniffiFfiConverterTypeAddress.check_lower(package) - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) - - - - - - - -class _UniffiConverterTypeSimpleVerifier: - - @staticmethod - def lift(value: int): - return SimpleVerifier._make_instance_(value) - - @staticmethod - def check_lower(value: SimpleVerifier): - if not isinstance(value, SimpleVerifier): - raise TypeError("Expected SimpleVerifier instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: SimpleVerifierProtocol): - if not isinstance(value, SimpleVerifier): - raise TypeError("Expected SimpleVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: SimpleVerifierProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class SimpleVerifyingKeyProtocol(typing.Protocol): - def public_key(self, ): - raise NotImplementedError - def scheme(self, ): - raise NotImplementedError - def to_der(self, ): + _UniffiFfiConverterString.check_lower(module) + + _UniffiFfiConverterString.check_lower(function) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(package), + _UniffiFfiConverterString.lower(module), + _UniffiFfiConverterString.lower(function), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMoveFunction.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def normalized_move_module(self, package: Address,module: str,version: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter_enums: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_friends: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_functions: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT,pagination_filter_structs: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> typing.Optional[MoveModule]: """ - Serialize this private key as DER-encoded PKCS#8 + Return the normalized Move module data for the provided module. +""" + + _UniffiFfiConverterTypeAddress.check_lower(package) + + _UniffiFfiConverterString.check_lower(module) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + + if pagination_filter_enums is _DEFAULT: + pagination_filter_enums = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_enums) + + if pagination_filter_friends is _DEFAULT: + pagination_filter_friends = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_friends) + + if pagination_filter_functions is _DEFAULT: + pagination_filter_functions = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_functions) + + if pagination_filter_structs is _DEFAULT: + pagination_filter_structs = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter_structs) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(package), + _UniffiFfiConverterString.lower(module), + _UniffiFfiConverterOptionalUInt64.lower(version), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter_enums), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter_friends), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter_functions), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter_structs), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMoveModule.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def object(self, object_id: ObjectId,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[Object]: """ + Return an object based on the provided [`Address`]. - raise NotImplementedError - def to_pem(self, ): + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(object_id), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeObject.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def object_bcs(self, object_id: ObjectId) -> typing.Optional[bytes]: """ - Serialize this private key as DER-encoded PKCS#8 + Return the object's bcs content [`Vec`] based on the provided + [`Address`]. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(object_id), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def objects(self, filter: typing.Union[object, typing.Optional[ObjectFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> ObjectPage: """ + Return a page of objects based on the provided parameters. - raise NotImplementedError - def verify(self, message: "bytes",signature: "SimpleSignature"): - raise NotImplementedError -# SimpleVerifyingKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class SimpleVerifyingKey(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + Use this function together with the [`ObjectFilter::owner`] to get the + objects owned by an address. - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey, pointer) + # Example - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey, self._pointer) + ```rust,ignore + let filter = ObjectFilter { + type_tag: None, + owner: Some(Address::from_str("test").unwrap().into()), + object_ids: None, + }; - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - @classmethod - def from_der(cls, bytes: "bytes"): + let owned_objects = client.objects(None, None, Some(filter), None, None).await; + ``` +""" + + if filter is _DEFAULT: + filter = None + _UniffiFfiConverterOptionalTypeObjectFilter.check_lower(filter) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeObjectFilter.lower(filter), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def package(self, address: Address,version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[MovePackage]: """ - Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary - format). + The package corresponding to the given address (at the optionally given + version). When no version is given, the package is loaded directly + from the address given. Otherwise, the address is translated before + loading to point to the package whose original ID matches + the package at address, but whose version is version. For non-system + packages, this might result in a different address than address + because different versions of a package, introduced by upgrades, + exist at distinct addresses. + + Note that this interpretation of version is different from a historical + object read (the interpretation of version for the object query). +""" + + _UniffiFfiConverterTypeAddress.check_lower(address) + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMovePackage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def package_latest(self, address: Address) -> typing.Optional[MovePackage]: """ - - _UniffiConverterBytes.check_lower(bytes) + Fetch the latest version of the package at address. + This corresponds to the package with the highest version that shares its + original ID with the package at address. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_pem(cls, s: "str"): - """ - Deserialize PKCS#8-encoded private key from PEM. + _UniffiFfiConverterTypeAddress.check_lower(address) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeMovePackage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def package_versions(self, address: Address,after_version: typing.Union[object, typing.Optional[int]] = _DEFAULT,before_version: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> MovePackagePage: """ - - _UniffiConverterString.check_lower(s) + Fetch all versions of package at address (packages that share this + package's original ID), optionally bounding the versions exclusively + from below with afterVersion, or from above with beforeVersion. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - - - - def public_key(self, ) -> "MultisigMemberPublicKey": - return _UniffiConverterTypeMultisigMemberPublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key,self._uniffi_clone_pointer(),) + _UniffiFfiConverterTypeAddress.check_lower(address) + + if after_version is _DEFAULT: + after_version = None + _UniffiFfiConverterOptionalUInt64.check_lower(after_version) + + if before_version is _DEFAULT: + before_version = None + _UniffiFfiConverterOptionalUInt64.check_lower(before_version) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(address), + _UniffiFfiConverterOptionalUInt64.lower(after_version), + _UniffiFfiConverterOptionalUInt64.lower(before_version), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMovePackagePage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) + async def packages(self, after_checkpoint: typing.Union[object, typing.Optional[int]] = _DEFAULT,before_checkpoint: typing.Union[object, typing.Optional[int]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> MovePackagePage: + """ + The Move packages that exist in the network, optionally filtered to be + strictly before beforeCheckpoint and/or strictly after + afterCheckpoint. - - - - - def scheme(self, ) -> "SignatureScheme": - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme,self._uniffi_clone_pointer(),) + This query returns all versions of a given user package that appear + between the specified checkpoints, but only records the latest + versions of system packages. +""" + + if after_checkpoint is _DEFAULT: + after_checkpoint = None + _UniffiFfiConverterOptionalUInt64.check_lower(after_checkpoint) + + if before_checkpoint is _DEFAULT: + before_checkpoint = None + _UniffiFfiConverterOptionalUInt64.check_lower(before_checkpoint) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(after_checkpoint), + _UniffiFfiConverterOptionalUInt64.lower(before_checkpoint), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMovePackagePage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def to_der(self, ) -> "bytes": + async def protocol_config(self, version: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[ProtocolConfigs]: """ - Serialize this private key as DER-encoded PKCS#8 + Get the protocol configuration. +""" + + if version is _DEFAULT: + version = None + _UniffiFfiConverterOptionalUInt64.check_lower(version) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(version), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeProtocolConfigs.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def reference_gas_price(self, epoch: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> typing.Optional[int]: """ + Get the reference gas price for the provided epoch or the last known one + if no epoch is provided. - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der,self._uniffi_clone_pointer(),) + This will return `Ok(None)` if the epoch requested is not available in + the GraphQL service (e.g., due to pruning). +""" + + if epoch is _DEFAULT: + epoch = None + _UniffiFfiConverterOptionalUInt64.check_lower(epoch) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalUInt64.lower(epoch), ) - - - - - - def to_pem(self, ) -> "str": + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def run_query(self, query: Query) -> Value: """ - Serialize this private key as DER-encoded PKCS#8 + Run a query. +""" + + _UniffiFfiConverterTypeQuery.check_lower(query) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeQuery.lower(query), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValue.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_run_query(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def service_config(self, ) -> ServiceConfig: """ - - return _UniffiConverterString.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem,self._uniffi_clone_pointer(),) + Get the GraphQL service configuration, including complexity limits, read + and mutation limits, supported versions, and others. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def verify(self, message: "bytes",signature: "SimpleSignature") -> None: - _UniffiConverterBytes.check_lower(message) + _uniffi_lift_return = _UniffiFfiConverterTypeServiceConfig.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def set_rpc_server(self, server: str) -> None: + """ + Set the server address for the GraphQL GraphQL client. It should be a + valid URL with a host and optionally a port number. +""" - _UniffiConverterTypeSimpleSignature.check_lower(signature) + _UniffiFfiConverterString.check_lower(server) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(server), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def total_supply(self, coin_type: str) -> typing.Optional[int]: + """ + Get total supply for the coin type. +""" - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeSimpleSignature.lower(signature)) - - - - - - - -class _UniffiConverterTypeSimpleVerifyingKey: - - @staticmethod - def lift(value: int): - return SimpleVerifyingKey._make_instance_(value) - - @staticmethod - def check_lower(value: SimpleVerifyingKey): - if not isinstance(value, SimpleVerifyingKey): - raise TypeError("Expected SimpleVerifyingKey instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: SimpleVerifyingKeyProtocol): - if not isinstance(value, SimpleVerifyingKey): - raise TypeError("Expected SimpleVerifyingKey instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: SimpleVerifyingKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class SplitCoinsProtocol(typing.Protocol): - """ - Command to split a single coin object into multiple coins - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - split-coins = argument (vector argument) - ``` - """ - - def amounts(self, ): + _UniffiFfiConverterString.check_lower(coin_type) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(coin_type), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def total_transaction_blocks(self, ) -> typing.Optional[int]: """ - The amounts to split off + The total number of transaction blocks in the network by the end of the + last known checkpoint. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def total_transaction_blocks_by_digest(self, digest: Digest) -> typing.Optional[int]: """ - - raise NotImplementedError - def coin(self, ): + The total number of transaction blocks in the network by the end of the + provided checkpoint digest. +""" + + _UniffiFfiConverterTypeDigest.check_lower(digest) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeDigest.lower(digest), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def total_transaction_blocks_by_seq_num(self, seq_num: int) -> typing.Optional[int]: """ - The coin to split + The total number of transaction blocks in the network by the end of the + provided checkpoint sequence number. +""" + + _UniffiFfiConverterUInt64.check_lower(seq_num) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt64.lower(seq_num), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalUInt64.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def transaction(self, digest: Digest) -> typing.Optional[SignedTransaction]: """ - - raise NotImplementedError -# SplitCoins is a Rust-only trait - it's a wrapper around a Rust implementation. -class SplitCoins(): - """ - Command to split a single coin object into multiple coins - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - split-coins = argument (vector argument) - ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, coin: "Argument",amounts: "typing.List[Argument]"): - _UniffiConverterTypeArgument.check_lower(coin) + Get a transaction by its digest. +""" - _UniffiConverterSequenceTypeArgument.check_lower(amounts) + _UniffiFfiConverterTypeDigest.check_lower(digest) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeDigest.lower(digest), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeSignedTransaction.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def transaction_data_effects(self, digest: Digest) -> typing.Optional[TransactionDataEffects]: + """ + Get a transaction's data and effects by its digest. +""" - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new, - _UniffiConverterTypeArgument.lower(coin), - _UniffiConverterSequenceTypeArgument.lower(amounts)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def amounts(self, ) -> "typing.List[Argument]": + _UniffiFfiConverterTypeDigest.check_lower(digest) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeDigest.lower(digest), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTransactionDataEffects.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def transaction_effects(self, digest: Digest) -> typing.Optional[TransactionEffects]: """ - The amounts to split off + Get a transaction's effects by its digest. +""" + + _UniffiFfiConverterTypeDigest.check_lower(digest) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeDigest.lower(digest), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTransactionEffects.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def transactions(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> SignedTransactionPage: """ - - return _UniffiConverterSequenceTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts,self._uniffi_clone_pointer(),) + Get a page of transactions based on the provided filters. +""" + + if filter is _DEFAULT: + filter = None + _UniffiFfiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeTransactionsFilter.lower(filter), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignedTransactionPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - def coin(self, ) -> "Argument": + async def transactions_data_effects(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> TransactionDataEffectsPage: """ - The coin to split + Get a page of transactions' data and effects based on the provided + filters. +""" + + if filter is _DEFAULT: + filter = None + _UniffiFfiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeTransactionsFilter.lower(filter), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionDataEffectsPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def transactions_effects(self, filter: typing.Union[object, typing.Optional[TransactionsFilter]] = _DEFAULT,pagination_filter: typing.Union[object, typing.Optional[PaginationFilter]] = _DEFAULT) -> TransactionEffectsPage: """ - - return _UniffiConverterTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin,self._uniffi_clone_pointer(),) + Get a page of transactions' effects based on the provided filters. +""" + + if filter is _DEFAULT: + filter = None + _UniffiFfiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + if pagination_filter is _DEFAULT: + pagination_filter = None + _UniffiFfiConverterOptionalTypePaginationFilter.check_lower(pagination_filter) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterOptionalTypeTransactionsFilter.lower(filter), + _UniffiFfiConverterOptionalTypePaginationFilter.lower(pagination_filter), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionEffectsPage.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - -class _UniffiConverterTypeSplitCoins: - +class _UniffiFfiConverterTypeGraphQLClient: @staticmethod - def lift(value: int): - return SplitCoins._make_instance_(value) + def lift(value: int) -> GraphQlClient: + return GraphQlClient._uniffi_make_instance(value) @staticmethod - def check_lower(value: SplitCoins): - if not isinstance(value, SplitCoins): - raise TypeError("Expected SplitCoins instance, {} found".format(type(value).__name__)) + def check_lower(value: GraphQlClient): + if not isinstance(value, GraphQlClient): + raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: SplitCoinsProtocol): - if not isinstance(value, SplitCoins): - raise TypeError("Expected SplitCoins instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: GraphQlClient) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> GraphQlClient: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: SplitCoinsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: GraphQlClient, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class StructTagProtocol(typing.Protocol): + + +class InputProtocol(typing.Protocol): """ - Type information for a move struct + An input to a user transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - struct-tag = address ; address of the package - identifier ; name of the module - identifier ; name of the type - (vector type-tag) ; type parameters - ``` - """ - - def address(self, ): - raise NotImplementedError - def coin_type(self, ): - """ - Checks if this is a Coin type - """ + input = input-pure / input-immutable-or-owned / input-shared / input-receiving - raise NotImplementedError - def coin_type_opt(self, ): - """ - Checks if this is a Coin type - """ + input-pure = %x00 bytes + input-immutable-or-owned = %x01 object-ref + input-shared = %x02 object-id u64 bool + input-receiving = %x04 object-ref + ``` +""" + + pass - raise NotImplementedError -# StructTag is a Rust-only trait - it's a wrapper around a Rust implementation. -class StructTag(): +class Input(InputProtocol): """ - Type information for a move struct + An input to a user transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - struct-tag = address ; address of the package - identifier ; name of the module - identifier ; name of the type - (vector type-tag) ; type parameters - ``` - """ + input = input-pure / input-immutable-or-owned / input-shared / input-receiving - _pointer: ctypes.c_void_p - def __init__(self, address: "Address",module: "Identifier",name: "Identifier",type_params: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT): - _UniffiConverterTypeAddress.check_lower(address) + input-pure = %x00 bytes + input-immutable-or-owned = %x01 object-ref + input-shared = %x02 object-id u64 bool + input-receiving = %x04 object-ref + ``` +""" + + _handle: ctypes.c_uint64 + @classmethod + def new_immutable_or_owned(cls, object_ref: ObjectReference) -> Input: + """ + A move object that is either immutable or address owned +""" - _UniffiConverterTypeIdentifier.check_lower(module) + _UniffiFfiConverterTypeObjectReference.check_lower(object_ref) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectReference.lower(object_ref), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeInput.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_immutable_or_owned, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_pure(cls, value: bytes) -> Input: + """ + For normal operations this is required to be a move primitive type and + not contain structs or objects. +""" - _UniffiConverterTypeIdentifier.check_lower(name) + _UniffiFfiConverterBytes.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeInput.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_pure, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_receiving(cls, object_ref: ObjectReference) -> Input: - if type_params is _DEFAULT: - type_params = [] - _UniffiConverterSequenceTypeTypeTag.check_lower(type_params) + _UniffiFfiConverterTypeObjectReference.check_lower(object_ref) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectReference.lower(object_ref), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeInput.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_receiving, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_shared(cls, object_id: ObjectId,initial_shared_version: int,mutable: bool) -> Input: + """ + A move object whose owner is "Shared" +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + + _UniffiFfiConverterUInt64.check_lower(initial_shared_version) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new, - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypeIdentifier.lower(module), - _UniffiConverterTypeIdentifier.lower(name), - _UniffiConverterSequenceTypeTypeTag.lower(type_params)) + _UniffiFfiConverterBoolean.check_lower(mutable) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(object_id), + _UniffiFfiConverterUInt64.lower(initial_shared_version), + _UniffiFfiConverterBoolean.lower(mutable), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeInput.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_input_new_shared, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_input, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_structtag, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_input, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def coin(cls, type_tag: "TypeTag"): - _UniffiConverterTypeTypeTag.check_lower(type_tag) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin, - _UniffiConverterTypeTypeTag.lower(type_tag)) - return cls._make_instance_(pointer) - - @classmethod - def gas_coin(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin,) - return cls._make_instance_(pointer) - - @classmethod - def staked_iota(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota,) - return cls._make_instance_(pointer) - - - - def address(self, ) -> "Address": - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address,self._uniffi_clone_pointer(),) - ) - - - - - - def coin_type(self, ) -> "TypeTag": - """ - Checks if this is a Coin type - """ - - return _UniffiConverterTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type,self._uniffi_clone_pointer(),) - ) - - - - - - def coin_type_opt(self, ) -> "typing.Optional[TypeTag]": - """ - Checks if this is a Coin type - """ - - return _UniffiConverterOptionalTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt,self._uniffi_clone_pointer(),) - ) - - - - - - def __str__(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display,self._uniffi_clone_pointer(),) - ) - -class _UniffiConverterTypeStructTag: - +class _UniffiFfiConverterTypeInput: @staticmethod - def lift(value: int): - return StructTag._make_instance_(value) + def lift(value: int) -> Input: + return Input._uniffi_make_instance(value) @staticmethod - def check_lower(value: StructTag): - if not isinstance(value, StructTag): - raise TypeError("Expected StructTag instance, {} found".format(type(value).__name__)) + def check_lower(value: Input): + if not isinstance(value, Input): + raise TypeError("Expected Input instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: StructTagProtocol): - if not isinstance(value, StructTag): - raise TypeError("Expected StructTag instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Input) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Input: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: StructTagProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Input, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class SystemPackageProtocol(typing.Protocol): + +class _UniffiFfiConverterSequenceTypeArgument(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeArgument.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeArgument.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeArgument.read(buf) for i in range(count) + ] + + +class MakeMoveVectorProtocol(typing.Protocol): """ - System package + Command to build a move vector out of a set of individual elements # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - system-package = u64 ; version - (vector bytes) ; modules - (vector object-id) ; dependencies + make-move-vector = (option type-tag) (vector argument) ``` - """ - - def dependencies(self, ): - raise NotImplementedError - def modules(self, ): +""" + + def elements(self, ) -> typing.List[Argument]: + """ + The set individual elements to build the vector with +""" raise NotImplementedError - def version(self, ): + def type_tag(self, ) -> typing.Optional[TypeTag]: + """ + Type of the individual elements + + This is required to be set when the type can't be inferred, for example + when the set of provided arguments are all pure input values. +""" raise NotImplementedError -# SystemPackage is a Rust-only trait - it's a wrapper around a Rust implementation. -class SystemPackage(): + +class MakeMoveVector(MakeMoveVectorProtocol): """ - System package + Command to build a move vector out of a set of individual elements # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - system-package = u64 ; version - (vector bytes) ; modules - (vector object-id) ; dependencies + make-move-vector = (option type-tag) (vector argument) ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, version: "int",modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]"): - _UniffiConverterUInt64.check_lower(version) - - _UniffiConverterSequenceBytes.check_lower(modules) +""" + + _handle: ctypes.c_uint64 + def __init__(self, type_tag: typing.Optional[TypeTag],elements: typing.List[Argument]): - _UniffiConverterSequenceTypeObjectId.check_lower(dependencies) + _UniffiFfiConverterOptionalTypeTypeTag.check_lower(type_tag) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_systempackage_new, - _UniffiConverterUInt64.lower(version), - _UniffiConverterSequenceBytes.lower(modules), - _UniffiConverterSequenceTypeObjectId.lower(dependencies)) + _UniffiFfiConverterSequenceTypeArgument.check_lower(elements) + _uniffi_lowered_args = ( + _UniffiFfiConverterOptionalTypeTypeTag.lower(type_tag), + _UniffiFfiConverterSequenceTypeArgument.lower(elements), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMakeMoveVector.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_makemovevector_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_systempackage, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_makemovevector, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_systempackage, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_makemovevector, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def dependencies(self, ) -> "typing.List[ObjectId]": - return _UniffiConverterSequenceTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_dependencies,self._uniffi_clone_pointer(),) + def elements(self, ) -> typing.List[Argument]: + """ + The set individual elements to build the vector with +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_elements, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def type_tag(self, ) -> typing.Optional[TypeTag]: + """ + Type of the individual elements - - - - - def modules(self, ) -> "typing.List[bytes]": - return _UniffiConverterSequenceBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_modules,self._uniffi_clone_pointer(),) + This is required to be set when the type can't be inferred, for example + when the set of provided arguments are all pure input values. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def version(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_systempackage_version,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_makemovevector_type_tag, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeSystemPackage: - +class _UniffiFfiConverterTypeMakeMoveVector: @staticmethod - def lift(value: int): - return SystemPackage._make_instance_(value) + def lift(value: int) -> MakeMoveVector: + return MakeMoveVector._uniffi_make_instance(value) @staticmethod - def check_lower(value: SystemPackage): - if not isinstance(value, SystemPackage): - raise TypeError("Expected SystemPackage instance, {} found".format(type(value).__name__)) + def check_lower(value: MakeMoveVector): + if not isinstance(value, MakeMoveVector): + raise TypeError("Expected MakeMoveVector instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: SystemPackageProtocol): - if not isinstance(value, SystemPackage): - raise TypeError("Expected SystemPackage instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MakeMoveVector) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MakeMoveVector: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: SystemPackageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: MakeMoveVector, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionProtocol(typing.Protocol): + + +class MergeCoinsProtocol(typing.Protocol): """ - A transaction + Command to merge multiple coins of the same type into a single coin # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction = %x00 transaction-v1 - - transaction-v1 = transaction-kind address gas-payment transaction-expiration + merge-coins = argument (vector argument) ``` - """ - - def bcs_serialize(self, ): - raise NotImplementedError - def digest(self, ): - raise NotImplementedError - def expiration(self, ): - raise NotImplementedError - def gas_payment(self, ): - raise NotImplementedError - def kind(self, ): - raise NotImplementedError - def sender(self, ): +""" + + def coin(self, ) -> Argument: + """ + Coin to merge coins into +""" raise NotImplementedError - def signing_digest(self, ): + def coins_to_merge(self, ) -> typing.List[Argument]: + """ + Set of coins to merge into `coin` + + All listed coins must be of the same type and be the same type as `coin` +""" raise NotImplementedError -# Transaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class Transaction(): + +class MergeCoins(MergeCoinsProtocol): """ - A transaction + Command to merge multiple coins of the same type into a single coin # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction = %x00 transaction-v1 - - transaction-v1 = transaction-kind address gas-payment transaction-expiration + merge-coins = argument (vector argument) ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, kind: "TransactionKind",sender: "Address",gas_payment: "GasPayment",expiration: "TransactionExpiration"): - _UniffiConverterTypeTransactionKind.check_lower(kind) - - _UniffiConverterTypeAddress.check_lower(sender) - - _UniffiConverterTypeGasPayment.check_lower(gas_payment) +""" + + _handle: ctypes.c_uint64 + def __init__(self, coin: Argument,coins_to_merge: typing.List[Argument]): - _UniffiConverterTypeTransactionExpiration.check_lower(expiration) + _UniffiFfiConverterTypeArgument.check_lower(coin) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new, - _UniffiConverterTypeTransactionKind.lower(kind), - _UniffiConverterTypeAddress.lower(sender), - _UniffiConverterTypeGasPayment.lower(gas_payment), - _UniffiConverterTypeTransactionExpiration.lower(expiration)) + _UniffiFfiConverterSequenceTypeArgument.check_lower(coins_to_merge) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeArgument.lower(coin), + _UniffiFfiConverterSequenceTypeArgument.lower(coins_to_merge), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMergeCoins.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_mergecoins_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_mergecoins, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_mergecoins, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def bcs_serialize(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_bcs_serialize,self._uniffi_clone_pointer(),) - ) - - - - - - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_digest,self._uniffi_clone_pointer(),) - ) - - - - - - def expiration(self, ) -> "TransactionExpiration": - return _UniffiConverterTypeTransactionExpiration.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration,self._uniffi_clone_pointer(),) - ) - - - - - - def gas_payment(self, ) -> "GasPayment": - return _UniffiConverterTypeGasPayment.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment,self._uniffi_clone_pointer(),) + def coin(self, ) -> Argument: + """ + Coin to merge coins into +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def kind(self, ) -> "TransactionKind": - return _UniffiConverterTypeTransactionKind.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coin, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def coins_to_merge(self, ) -> typing.List[Argument]: + """ + Set of coins to merge into `coin` - - - - - def sender(self, ) -> "Address": - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender,self._uniffi_clone_pointer(),) + All listed coins must be of the same type and be the same type as `coin` +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def signing_digest(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_signing_digest,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_mergecoins_coins_to_merge, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeTransaction: - +class _UniffiFfiConverterTypeMergeCoins: @staticmethod - def lift(value: int): - return Transaction._make_instance_(value) + def lift(value: int) -> MergeCoins: + return MergeCoins._uniffi_make_instance(value) @staticmethod - def check_lower(value: Transaction): - if not isinstance(value, Transaction): - raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) + def check_lower(value: MergeCoins): + if not isinstance(value, MergeCoins): + raise TypeError("Expected MergeCoins instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionProtocol): - if not isinstance(value, Transaction): - raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: MergeCoins) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> MergeCoins: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: MergeCoins, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionBuilderProtocol(typing.Protocol): - """ - A builder for creating transactions. Use [`finish`](Self::finish) to - finalize the transaction data. - """ - - def dry_run(self, skip_checks: "typing.Union[object, bool]" = _DEFAULT): - """ - Dry run the transaction. - """ - - raise NotImplementedError - def execute(self, keypair: "SimpleKeypair",wait_for_finalization: "typing.Union[object, bool]" = _DEFAULT): - """ - Execute the transaction and optionally wait for finalization. - """ - - raise NotImplementedError - def execute_with_sponsor(self, keypair: "SimpleKeypair",sponsor_keypair: "SimpleKeypair",wait_for_finalization: "typing.Union[object, bool]" = _DEFAULT): - """ - Execute the transaction and optionally wait for finalization. - """ - - raise NotImplementedError - def expiration(self, epoch: "int"): - """ - Set the expiration of the transaction to be a specific epoch. - """ - - raise NotImplementedError - def finish(self, ): - """ - Convert this builder into a transaction. - """ - - raise NotImplementedError - def gas(self, object_id: "ObjectId"): - """ - Add a gas object to use to pay for the transaction. - """ - - raise NotImplementedError - def gas_budget(self, budget: "int"): - """ - Set the gas budget for the transaction. - """ - raise NotImplementedError - def gas_price(self, price: "int"): - """ - Set the gas price for the transaction. - """ +class _UniffiFfiConverterSequenceTypeTypeTag(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeTypeTag.check_lower(item) - raise NotImplementedError - def gas_station_sponsor(self, url: "str",duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,headers: "typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT): - """ - Set the gas station sponsor. - """ + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeTypeTag.write(item, buf) - raise NotImplementedError - def make_move_vec(self, elements: "typing.List[PtbArgument]",type_tag: "TypeTag",name: "str"): - """ - Make a move vector from a list of elements. The elements must all be of - the type indicated by `type_tag`. - """ + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - raise NotImplementedError - def merge_coins(self, coin: "ObjectId",coins_to_merge: "typing.List[ObjectId]"): - """ - Merge a list of coins into a single coin, without producing any result. - """ + return [ + _UniffiFfiConverterTypeTypeTag.read(buf) for i in range(count) + ] - raise NotImplementedError - def move_call(self, package: "Address",module: "Identifier",function: "Identifier",arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,names: "typing.Union[object, typing.List[str]]" = _DEFAULT): - """ - Call a Move function with the given arguments. - """ - raise NotImplementedError - def publish(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]",upgrade_cap_name: "str"): - """ - Publish a list of modules with the given dependencies. The result - assigned to `upgrade_cap_name` is the `0x2::package::UpgradeCap` - Move type. Note that the upgrade capability needs to be handled - after this call: - - transfer it to the transaction sender or another address - - burn it - - wrap it for access control - - discard the it to make a package immutable +class MoveCallProtocol(typing.Protocol): + """ + Command to call a move function - The arguments required for this command are: - - `modules`: is the modules' bytecode to be published - - `dependencies`: is the list of IDs of the transitive dependencies of - the package - """ + Functions that can be called by a `MoveCall` command are those that have a + function signature that is either `entry` or `public` (which don't have a + reference return type). - raise NotImplementedError - def send_coins(self, coins: "typing.List[ObjectId]",recipient: "Address",amount: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Transfer some coins to a recipient address. If multiple coins are - provided then they will be merged. - """ + # BCS - raise NotImplementedError - def send_iota(self, recipient: "Address",amount: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Send IOTA to a recipient address. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def split_coins(self, coin: "ObjectId",amounts: "typing.List[int]",names: "typing.Union[object, typing.List[str]]" = _DEFAULT): - """ - Split a coin by the provided amounts. + ```text + move-call = object-id ; package id + identifier ; module name + identifier ; function name + (vector type-tag) ; type arguments, if any + (vector argument) ; input arguments + ``` +""" + + def arguments(self, ) -> typing.List[Argument]: """ - + The arguments to the function. +""" raise NotImplementedError - def sponsor(self, sponsor: "Address"): - """ - Set the sponsor of the transaction. + def function(self, ) -> Identifier: """ - + The function to be called. +""" raise NotImplementedError - def transfer_objects(self, recipient: "Address",objects: "typing.List[PtbArgument]"): - """ - Transfer a list of objects to the given address, without producing any - result. + def module(self, ) -> Identifier: """ - + The specific module in the package containing the function. +""" raise NotImplementedError - def upgrade(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]",package: "ObjectId",ticket: "PtbArgument",name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): - """ - Upgrade a Move package. - - - `modules`: is the modules' bytecode for the modules to be published - - `dependencies`: is the list of IDs of the transitive dependencies of - the package to be upgraded - - `package`: is the ID of the current package being upgraded - - `ticket`: is the upgrade ticket - - To get the ticket, you have to call the - `0x2::package::authorize_upgrade` function, and pass the package - ID, the upgrade policy, and package digest. + def package(self, ) -> ObjectId: """ - + The package containing the module and function. +""" raise NotImplementedError -# TransactionBuilder is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionBuilder(): - """ - A builder for creating transactions. Use [`finish`](Self::finish) to - finalize the transaction data. + def type_arguments(self, ) -> typing.List[TypeTag]: + """ + The type arguments to the function. +""" + raise NotImplementedError + +class MoveCall(MoveCallProtocol): """ + Command to call a move function + + Functions that can be called by a `MoveCall` command are those that have a + function signature that is either `entry` or `public` (which don't have a + reference return type). - _pointer: ctypes.c_void_p + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + move-call = object-id ; package id + identifier ; module name + identifier ; function name + (vector type-tag) ; type arguments, if any + (vector argument) ; input arguments + ``` +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, package: ObjectId,module: Identifier,function: Identifier,type_arguments: typing.List[TypeTag],arguments: typing.List[Argument]): + + _UniffiFfiConverterTypeObjectId.check_lower(package) + + _UniffiFfiConverterTypeIdentifier.check_lower(module) + + _UniffiFfiConverterTypeIdentifier.check_lower(function) + + _UniffiFfiConverterSequenceTypeTypeTag.check_lower(type_arguments) + + _UniffiFfiConverterSequenceTypeArgument.check_lower(arguments) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(package), + _UniffiFfiConverterTypeIdentifier.lower(module), + _UniffiFfiConverterTypeIdentifier.lower(function), + _UniffiFfiConverterSequenceTypeTypeTag.lower(type_arguments), + _UniffiFfiConverterSequenceTypeArgument.lower(arguments), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMoveCall.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movecall_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movecall, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - async def init(cls, sender: "Address",client: "GraphQlClient"): - """ - Create a new transaction builder and initialize its elements to default. + def arguments(self, ) -> typing.List[Argument]: """ - - _UniffiConverterTypeAddress.check_lower(sender) - - _UniffiConverterTypeGraphQlClient.check_lower(client) - - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init( - _UniffiConverterTypeAddress.lower(sender), - _UniffiConverterTypeGraphQlClient.lower(client)), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - _UniffiConverterTypeTransactionBuilder.lift, - - # Error FFI converter - - None, - + The arguments to the function. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - async def dry_run(self, skip_checks: "typing.Union[object, bool]" = _DEFAULT) -> "DryRunResult": + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_arguments, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def function(self, ) -> Identifier: """ - Dry run the transaction. + The function to be called. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeIdentifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_function, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def module(self, ) -> Identifier: """ - - if skip_checks is _DEFAULT: - skip_checks = False - _UniffiConverterBool.check_lower(skip_checks) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run( - self._uniffi_clone_pointer(), - _UniffiConverterBool.lower(skip_checks) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeDryRunResult.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + The specific module in the package containing the function. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - async def execute(self, keypair: "SimpleKeypair",wait_for_finalization: "typing.Union[object, bool]" = _DEFAULT) -> "typing.Optional[TransactionEffects]": + _uniffi_lift_return = _UniffiFfiConverterTypeIdentifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_module, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def package(self, ) -> ObjectId: """ - Execute the transaction and optionally wait for finalization. + The package containing the module and function. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_package, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def type_arguments(self, ) -> typing.List[TypeTag]: """ - - _UniffiConverterTypeSimpleKeypair.check_lower(keypair) - - if wait_for_finalization is _DEFAULT: - wait_for_finalization = False - _UniffiConverterBool.check_lower(wait_for_finalization) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute( - self._uniffi_clone_pointer(), - _UniffiConverterTypeSimpleKeypair.lower(keypair), - _UniffiConverterBool.lower(wait_for_finalization) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + The type arguments to the function. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeTypeTag.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_movecall_type_arguments, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - async def execute_with_sponsor(self, keypair: "SimpleKeypair",sponsor_keypair: "SimpleKeypair",wait_for_finalization: "typing.Union[object, bool]" = _DEFAULT) -> "typing.Optional[TransactionEffects]": - """ - Execute the transaction and optionally wait for finalization. - """ - _UniffiConverterTypeSimpleKeypair.check_lower(keypair) - - _UniffiConverterTypeSimpleKeypair.check_lower(sponsor_keypair) - - if wait_for_finalization is _DEFAULT: - wait_for_finalization = False - _UniffiConverterBool.check_lower(wait_for_finalization) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor( - self._uniffi_clone_pointer(), - _UniffiConverterTypeSimpleKeypair.lower(keypair), - _UniffiConverterTypeSimpleKeypair.lower(sponsor_keypair), - _UniffiConverterBool.lower(wait_for_finalization) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +class _UniffiFfiConverterTypeMoveCall: + @staticmethod + def lift(value: int) -> MoveCall: + return MoveCall._uniffi_make_instance(value) + @staticmethod + def check_lower(value: MoveCall): + if not isinstance(value, MoveCall): + raise TypeError("Expected MoveCall instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: MoveCall) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> MoveCall: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - def expiration(self, epoch: "int") -> "TransactionBuilder": - """ - Set the expiration of the transaction to be a specific epoch. - """ + @classmethod + def write(cls, value: MoveCall, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - _UniffiConverterUInt64.check_lower(epoch) - - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration,self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(epoch)) - ) +class _UniffiFfiConverterMapTypeJwkIdTypeJwk(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, items): + for (key, value) in items.items(): + _UniffiFfiConverterTypeJwkId.check_lower(key) + _UniffiFfiConverterTypeJwk.check_lower(value) + @classmethod + def write(cls, items, buf): + buf.write_i32(len(items)) + for (key, value) in items.items(): + _UniffiFfiConverterTypeJwkId.write(key, buf) + _UniffiFfiConverterTypeJwk.write(value, buf) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative map size") + # It would be nice to use a dict comprehension, + # but in Python 3.7 and before the evaluation order is not according to spec, + # so we we're reading the value before the key. + # This loop makes the order explicit: first reading the key, then the value. + d = {} + for i in range(count): + key = _UniffiFfiConverterTypeJwkId.read(buf) + val = _UniffiFfiConverterTypeJwk.read(buf) + d[key] = val + return d - async def finish(self, ) -> "Transaction": - """ - Convert this builder into a transaction. - """ - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeTransaction.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, +class ZkloginVerifierProtocol(typing.Protocol): + + def jwks(self, ) -> dict[JwkId, Jwk]: + raise NotImplementedError + def verify(self, message: bytes,authenticator: ZkLoginAuthenticator) -> None: + raise NotImplementedError + def with_jwks(self, jwks: dict[JwkId, Jwk]) -> ZkloginVerifier: + raise NotImplementedError +class ZkloginVerifier(ZkloginVerifierProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def new_dev(cls, ) -> ZkloginVerifier: + """ + Load a fixed verifying key from zkLogin.vkey output. This is based on a + local setup and should not be used in production. +""" + _uniffi_lowered_args = ( ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkloginVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_mainnet(cls, ) -> ZkloginVerifier: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkloginVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier, self._handle) - - def gas(self, object_id: "ObjectId") -> "TransactionBuilder": - """ - Add a gas object to use to pay for the transaction. - """ - - _UniffiConverterTypeObjectId.check_lower(object_id) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def jwks(self, ) -> dict[JwkId, Jwk]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterMapTypeJwkIdTypeJwk.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,authenticator: ZkLoginAuthenticator) -> None: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas,self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id)) + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeZkLoginAuthenticator.check_lower(authenticator) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeZkLoginAuthenticator.lower(authenticator), ) - - - - - - def gas_budget(self, budget: "int") -> "TransactionBuilder": - """ - Set the gas budget for the transaction. - """ - - _UniffiConverterUInt64.check_lower(budget) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def with_jwks(self, jwks: dict[JwkId, Jwk]) -> ZkloginVerifier: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget,self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(budget)) + _UniffiFfiConverterMapTypeJwkIdTypeJwk.check_lower(jwks) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterMapTypeJwkIdTypeJwk.lower(jwks), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeZkloginVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def gas_price(self, price: "int") -> "TransactionBuilder": - """ - Set the gas price for the transaction. - """ +class _UniffiFfiConverterTypeZkloginVerifier: + @staticmethod + def lift(value: int) -> ZkloginVerifier: + return ZkloginVerifier._uniffi_make_instance(value) - _UniffiConverterUInt64.check_lower(price) - - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price,self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(price)) - ) + @staticmethod + def check_lower(value: ZkloginVerifier): + if not isinstance(value, ZkloginVerifier): + raise TypeError("Expected ZkloginVerifier instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: ZkloginVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ZkloginVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ZkloginVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterOptionalTypeZkloginVerifier(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeZkloginVerifier.check_lower(value) - def gas_station_sponsor(self, url: "str",duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,headers: "typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT) -> "TransactionBuilder": - """ - Set the gas station sponsor. - """ + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return - _UniffiConverterString.check_lower(url) - - if duration is _DEFAULT: - duration = None - _UniffiConverterOptionalDuration.check_lower(duration) - - if headers is _DEFAULT: - headers = None - _UniffiConverterOptionalMapStringSequenceString.check_lower(headers) - - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor,self._uniffi_clone_pointer(), - _UniffiConverterString.lower(url), - _UniffiConverterOptionalDuration.lower(duration), - _UniffiConverterOptionalMapStringSequenceString.lower(headers)) - ) + buf.write_u8(1) + _UniffiFfiConverterTypeZkloginVerifier.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeZkloginVerifier.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class MultisigVerifierProtocol(typing.Protocol): + + def verify(self, message: bytes,signature: MultisigAggregatedSignature) -> None: + raise NotImplementedError + def with_zklogin_verifier(self, zklogin_verifier: ZkloginVerifier) -> MultisigVerifier: + raise NotImplementedError + def zklogin_verifier(self, ) -> typing.Optional[ZkloginVerifier]: + raise NotImplementedError +class MultisigVerifier(MultisigVerifierProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigverifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigverifier, handle) - def make_move_vec(self, elements: "typing.List[PtbArgument]",type_tag: "TypeTag",name: "str") -> "TransactionBuilder": - """ - Make a move vector from a list of elements. The elements must all be of - the type indicated by `type_tag`. - """ + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigverifier, self._handle) - _UniffiConverterSequenceTypePtbArgument.check_lower(elements) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def verify(self, message: bytes,signature: MultisigAggregatedSignature) -> None: - _UniffiConverterTypeTypeTag.check_lower(type_tag) + _UniffiFfiConverterBytes.check_lower(message) - _UniffiConverterString.check_lower(name) + _UniffiFfiConverterTypeMultisigAggregatedSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeMultisigAggregatedSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def with_zklogin_verifier(self, zklogin_verifier: ZkloginVerifier) -> MultisigVerifier: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec,self._uniffi_clone_pointer(), - _UniffiConverterSequenceTypePtbArgument.lower(elements), - _UniffiConverterTypeTypeTag.lower(type_tag), - _UniffiConverterString.lower(name)) + _UniffiFfiConverterTypeZkloginVerifier.check_lower(zklogin_verifier) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeZkloginVerifier.lower(zklogin_verifier), ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_with_zklogin_verifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def zklogin_verifier(self, ) -> typing.Optional[ZkloginVerifier]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeZkloginVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigverifier_zklogin_verifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def merge_coins(self, coin: "ObjectId",coins_to_merge: "typing.List[ObjectId]") -> "TransactionBuilder": - """ - Merge a list of coins into a single coin, without producing any result. - """ +class _UniffiFfiConverterTypeMultisigVerifier: + @staticmethod + def lift(value: int) -> MultisigVerifier: + return MultisigVerifier._uniffi_make_instance(value) - _UniffiConverterTypeObjectId.check_lower(coin) - - _UniffiConverterSequenceTypeObjectId.check_lower(coins_to_merge) - - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins,self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(coin), - _UniffiConverterSequenceTypeObjectId.lower(coins_to_merge)) - ) + @staticmethod + def check_lower(value: MultisigVerifier): + if not isinstance(value, MultisigVerifier): + raise TypeError("Expected MultisigVerifier instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: MultisigVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> MultisigVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: MultisigVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def move_call(self, package: "Address",module: "Identifier",function: "Identifier",arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,names: "typing.Union[object, typing.List[str]]" = _DEFAULT) -> "TransactionBuilder": - """ - Call a Move function with the given arguments. - """ +class MultisigAggregatorProtocol(typing.Protocol): + + def finish(self, ) -> MultisigAggregatedSignature: + raise NotImplementedError + def verifier(self, ) -> MultisigVerifier: + raise NotImplementedError + def with_signature(self, signature: UserSignature) -> MultisigAggregator: + raise NotImplementedError + def with_verifier(self, verifier: MultisigVerifier) -> MultisigAggregator: + raise NotImplementedError - _UniffiConverterTypeAddress.check_lower(package) - - _UniffiConverterTypeIdentifier.check_lower(module) - - _UniffiConverterTypeIdentifier.check_lower(function) +class MultisigAggregator(MultisigAggregatorProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def new_with_message(cls, committee: MultisigCommittee,message: bytes) -> MultisigAggregator: - if arguments is _DEFAULT: - arguments = [] - _UniffiConverterSequenceTypePtbArgument.check_lower(arguments) + _UniffiFfiConverterTypeMultisigCommittee.check_lower(committee) - if type_args is _DEFAULT: - type_args = [] - _UniffiConverterSequenceTypeTypeTag.check_lower(type_args) + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMultisigCommittee.lower(committee), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_message, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def new_with_transaction(cls, committee: MultisigCommittee,transaction: Transaction) -> MultisigAggregator: - if names is _DEFAULT: - names = [] - _UniffiConverterSequenceString.check_lower(names) + _UniffiFfiConverterTypeMultisigCommittee.check_lower(committee) - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call,self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(package), - _UniffiConverterTypeIdentifier.lower(module), - _UniffiConverterTypeIdentifier.lower(function), - _UniffiConverterSequenceTypePtbArgument.lower(arguments), - _UniffiConverterSequenceTypeTypeTag.lower(type_args), - _UniffiConverterSequenceString.lower(names)) + _UniffiFfiConverterTypeTransaction.check_lower(transaction) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeMultisigCommittee.lower(committee), + _UniffiFfiConverterTypeTransaction.lower(transaction), ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregator_new_with_transaction, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregator, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregator, self._handle) - - - def publish(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]",upgrade_cap_name: "str") -> "TransactionBuilder": - """ - Publish a list of modules with the given dependencies. The result - assigned to `upgrade_cap_name` is the `0x2::package::UpgradeCap` - Move type. Note that the upgrade capability needs to be handled - after this call: - - transfer it to the transaction sender or another address - - burn it - - wrap it for access control - - discard the it to make a package immutable - - The arguments required for this command are: - - `modules`: is the modules' bytecode to be published - - `dependencies`: is the list of IDs of the transitive dependencies of - the package - """ - - _UniffiConverterSequenceBytes.check_lower(modules) - - _UniffiConverterSequenceTypeObjectId.check_lower(dependencies) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def finish(self, ) -> MultisigAggregatedSignature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregatedSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_finish, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifier(self, ) -> MultisigVerifier: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_verifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def with_signature(self, signature: UserSignature) -> MultisigAggregator: - _UniffiConverterString.check_lower(upgrade_cap_name) + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeUserSignature.lower(signature), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregator.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def with_verifier(self, verifier: MultisigVerifier) -> MultisigAggregator: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish,self._uniffi_clone_pointer(), - _UniffiConverterSequenceBytes.lower(modules), - _UniffiConverterSequenceTypeObjectId.lower(dependencies), - _UniffiConverterString.lower(upgrade_cap_name)) + _UniffiFfiConverterTypeMultisigVerifier.check_lower(verifier) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeMultisigVerifier.lower(verifier), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigAggregator.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregator_with_verifier, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def send_coins(self, coins: "typing.List[ObjectId]",recipient: "Address",amount: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "TransactionBuilder": - """ - Transfer some coins to a recipient address. If multiple coins are - provided then they will be merged. - """ +class _UniffiFfiConverterTypeMultisigAggregator: + @staticmethod + def lift(value: int) -> MultisigAggregator: + return MultisigAggregator._uniffi_make_instance(value) - _UniffiConverterSequenceTypeObjectId.check_lower(coins) - - _UniffiConverterTypeAddress.check_lower(recipient) - - if amount is _DEFAULT: - amount = None - _UniffiConverterOptionalUInt64.check_lower(amount) - - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins,self._uniffi_clone_pointer(), - _UniffiConverterSequenceTypeObjectId.lower(coins), - _UniffiConverterTypeAddress.lower(recipient), - _UniffiConverterOptionalUInt64.lower(amount)) - ) + @staticmethod + def check_lower(value: MultisigAggregator): + if not isinstance(value, MultisigAggregator): + raise TypeError("Expected MultisigAggregator instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: MultisigAggregator) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> MultisigAggregator: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: MultisigAggregator, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def send_iota(self, recipient: "Address",amount: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "TransactionBuilder": - """ - Send IOTA to a recipient address. - """ +class PtbArgumentProtocol(typing.Protocol): + + pass - _UniffiConverterTypeAddress.check_lower(recipient) +class PtbArgument(PtbArgumentProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def address(cls, address: Address) -> PtbArgument: - if amount is _DEFAULT: - amount = None - _UniffiConverterOptionalUInt64.check_lower(amount) + _UniffiFfiConverterTypeAddress.check_lower(address) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAddress.lower(address), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_address, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def digest(cls, digest: Digest) -> PtbArgument: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota,self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(recipient), - _UniffiConverterOptionalUInt64.lower(amount)) + _UniffiFfiConverterTypeDigest.check_lower(digest) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeDigest.lower(digest), ) - - - - - - def split_coins(self, coin: "ObjectId",amounts: "typing.List[int]",names: "typing.Union[object, typing.List[str]]" = _DEFAULT) -> "TransactionBuilder": - """ - Split a coin by the provided amounts. - """ - - _UniffiConverterTypeObjectId.check_lower(coin) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_digest, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def gas(cls, ) -> PtbArgument: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_gas, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def object_id(cls, id: ObjectId) -> PtbArgument: - _UniffiConverterSequenceUInt64.check_lower(amounts) + _UniffiFfiConverterTypeObjectId.check_lower(id) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_object_id, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def receiving(cls, id: ObjectId) -> PtbArgument: - if names is _DEFAULT: - names = [] - _UniffiConverterSequenceString.check_lower(names) + _UniffiFfiConverterTypeObjectId.check_lower(id) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_receiving, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def res(cls, name: str) -> PtbArgument: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins,self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(coin), - _UniffiConverterSequenceUInt64.lower(amounts), - _UniffiConverterSequenceString.lower(names)) + _UniffiFfiConverterString.check_lower(name) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(name), ) - - - - - - def sponsor(self, sponsor: "Address") -> "TransactionBuilder": - """ - Set the sponsor of the transaction. - """ - - _UniffiConverterTypeAddress.check_lower(sponsor) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_res, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def shared(cls, id: ObjectId) -> PtbArgument: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor,self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(sponsor)) + _UniffiFfiConverterTypeObjectId.check_lower(id) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), ) - - - - - - def transfer_objects(self, recipient: "Address",objects: "typing.List[PtbArgument]") -> "TransactionBuilder": - """ - Transfer a list of objects to the given address, without producing any - result. - """ - - _UniffiConverterTypeAddress.check_lower(recipient) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def shared_mut(cls, id: ObjectId) -> PtbArgument: - _UniffiConverterSequenceTypePtbArgument.check_lower(objects) + _UniffiFfiConverterTypeObjectId.check_lower(id) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeObjectId.lower(id), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_shared_mut, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def string(cls, string: str) -> PtbArgument: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects,self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(recipient), - _UniffiConverterSequenceTypePtbArgument.lower(objects)) + _UniffiFfiConverterString.check_lower(string) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(string), ) - - - - - - def upgrade(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]",package: "ObjectId",ticket: "PtbArgument",name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "TransactionBuilder": - """ - Upgrade a Move package. - - - `modules`: is the modules' bytecode for the modules to be published - - `dependencies`: is the list of IDs of the transitive dependencies of - the package to be upgraded - - `package`: is the ID of the current package being upgraded - - `ticket`: is the upgrade ticket - - To get the ticket, you have to call the - `0x2::package::authorize_upgrade` function, and pass the package - ID, the upgrade policy, and package digest. - """ - - _UniffiConverterSequenceBytes.check_lower(modules) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_string, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u128(cls, value: str) -> PtbArgument: + + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u128, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u16(cls, value: int) -> PtbArgument: + + _UniffiFfiConverterUInt16.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt16.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u16, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u256(cls, value: str) -> PtbArgument: - _UniffiConverterSequenceTypeObjectId.check_lower(dependencies) + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u256, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u32(cls, value: int) -> PtbArgument: - _UniffiConverterTypeObjectId.check_lower(package) + _UniffiFfiConverterUInt32.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt32.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u64(cls, value: int) -> PtbArgument: - _UniffiConverterTypePtbArgument.check_lower(ticket) + _UniffiFfiConverterUInt64.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u64, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def u8(cls, value: int) -> PtbArgument: - if name is _DEFAULT: - name = None - _UniffiConverterOptionalString.check_lower(name) + _UniffiFfiConverterUInt8.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt8.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_u8, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def vector(cls, vec: typing.List[bytes]) -> PtbArgument: - return _UniffiConverterTypeTransactionBuilder.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade,self._uniffi_clone_pointer(), - _UniffiConverterSequenceBytes.lower(modules), - _UniffiConverterSequenceTypeObjectId.lower(dependencies), - _UniffiConverterTypeObjectId.lower(package), - _UniffiConverterTypePtbArgument.lower(ticket), - _UniffiConverterOptionalString.lower(name)) + _UniffiFfiConverterSequenceBytes.check_lower(vec) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceBytes.lower(vec), ) + _uniffi_lift_return = _UniffiFfiConverterTypePTBArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ptbargument_vector, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ptbargument, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ptbargument, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst -class _UniffiConverterTypeTransactionBuilder: +class _UniffiFfiConverterTypePTBArgument: @staticmethod - def lift(value: int): - return TransactionBuilder._make_instance_(value) + def lift(value: int) -> PtbArgument: + return PtbArgument._uniffi_make_instance(value) @staticmethod - def check_lower(value: TransactionBuilder): - if not isinstance(value, TransactionBuilder): - raise TypeError("Expected TransactionBuilder instance, {} found".format(type(value).__name__)) + def check_lower(value: PtbArgument): + if not isinstance(value, PtbArgument): + raise TypeError("Expected PtbArgument instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionBuilderProtocol): - if not isinstance(value, TransactionBuilder): - raise TypeError("Expected TransactionBuilder instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: PtbArgument) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> PtbArgument: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TransactionBuilderProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEffectsProtocol(typing.Protocol): - """ - The output or effects of executing a transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - transaction-effects = %x00 effects-v1 - =/ %x01 effects-v2 - ``` - """ - - def as_v1(self, ): - raise NotImplementedError - def digest(self, ): - raise NotImplementedError - def is_v1(self, ): - raise NotImplementedError -# TransactionEffects is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEffects(): - """ - The output or effects of executing a transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - transaction-effects = %x00 effects-v1 - =/ %x01 effects-v2 - ``` - """ + def write(cls, value: PtbArgument, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) + - _pointer: ctypes.c_void_p +class PasskeyVerifierProtocol(typing.Protocol): - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def verify(self, message: bytes,authenticator: PasskeyAuthenticator) -> None: + raise NotImplementedError + +class PasskeyVerifier(PasskeyVerifierProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypePasskeyVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_passkeyverifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyverifier, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyverifier, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_v1(cls, effects: "TransactionEffectsV1"): - _UniffiConverterTypeTransactionEffectsV1.check_lower(effects) + def verify(self, message: bytes,authenticator: PasskeyAuthenticator) -> None: - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_new_v1, - _UniffiConverterTypeTransactionEffectsV1.lower(effects)) - return cls._make_instance_(pointer) - + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypePasskeyAuthenticator.check_lower(authenticator) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypePasskeyAuthenticator.lower(authenticator), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def as_v1(self, ) -> "TransactionEffectsV1": - return _UniffiConverterTypeTransactionEffectsV1.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypePasskeyVerifier: + @staticmethod + def lift(value: int) -> PasskeyVerifier: + return PasskeyVerifier._uniffi_make_instance(value) + @staticmethod + def check_lower(value: PasskeyVerifier): + if not isinstance(value, PasskeyVerifier): + raise TypeError("Expected PasskeyVerifier instance, {} found".format(type(value).__name__)) - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_digest,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: PasskeyVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> PasskeyVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: PasskeyVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class PersonalMessageProtocol(typing.Protocol): + + def message_bytes(self, ) -> bytes: + raise NotImplementedError + def signing_digest(self, ) -> bytes: + raise NotImplementedError - def is_v1(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1,self._uniffi_clone_pointer(),) +class PersonalMessage(PersonalMessageProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, message_bytes: bytes): + + _UniffiFfiConverterBytes.check_lower(message_bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(message_bytes), ) + _uniffi_lift_return = _UniffiFfiConverterTypePersonalMessage.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_personalmessage_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_personalmessage, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_personalmessage, self._handle) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def message_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_message_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signing_digest(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_personalmessage_signing_digest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeTransactionEffects: +class _UniffiFfiConverterTypePersonalMessage: @staticmethod - def lift(value: int): - return TransactionEffects._make_instance_(value) + def lift(value: int) -> PersonalMessage: + return PersonalMessage._uniffi_make_instance(value) @staticmethod - def check_lower(value: TransactionEffects): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) + def check_lower(value: PersonalMessage): + if not isinstance(value, PersonalMessage): + raise TypeError("Expected PersonalMessage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionEffectsProtocol): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: PersonalMessage) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> PersonalMessage: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEffectsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PersonalMessage, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionEventsProtocol(typing.Protocol): + +class _UniffiFfiConverterSequenceTypeCommand(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeCommand.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeCommand.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeCommand.read(buf) for i in range(count) + ] + +class _UniffiFfiConverterSequenceTypeInput(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeInput.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeInput.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiFfiConverterTypeInput.read(buf) for i in range(count) + ] + + +class ProgrammableTransactionProtocol(typing.Protocol): """ - Events emitted during the successful execution of a transaction + A user transaction + + Contains a series of native commands and move calls where the results of one + command can be used in future commands. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-events = vector event + ptb = (vector input) (vector command) ``` - """ - - def digest(self, ): +""" + + def commands(self, ) -> typing.List[Command]: + """ + The commands to be executed sequentially. A failure in any command will + result in the failure of the entire transaction. +""" raise NotImplementedError - def events(self, ): + def inputs(self, ) -> typing.List[Input]: + """ + Input objects or primitive values +""" raise NotImplementedError -# TransactionEvents is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEvents(): + +class ProgrammableTransaction(ProgrammableTransactionProtocol): """ - Events emitted during the successful execution of a transaction + A user transaction + + Contains a series of native commands and move calls where the results of one + command can be used in future commands. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-events = vector event + ptb = (vector input) (vector command) ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, events: "typing.List[Event]"): - _UniffiConverterSequenceTypeEvent.check_lower(events) +""" + + _handle: ctypes.c_uint64 + def __init__(self, inputs: typing.List[Input],commands: typing.List[Command]): + + _UniffiFfiConverterSequenceTypeInput.check_lower(inputs) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new, - _UniffiConverterSequenceTypeEvent.lower(events)) + _UniffiFfiConverterSequenceTypeCommand.check_lower(commands) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeInput.lower(inputs), + _UniffiFfiConverterSequenceTypeCommand.lower(commands), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeProgrammableTransaction.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_programmabletransaction_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest,self._uniffi_clone_pointer(),) + def commands(self, ) -> typing.List[Command]: + """ + The commands to be executed sequentially. A failure in any command will + result in the failure of the entire transaction. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def events(self, ) -> "typing.List[Event]": - return _UniffiConverterSequenceTypeEvent.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeCommand.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_commands, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def inputs(self, ) -> typing.List[Input]: + """ + Input objects or primitive values +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeInput.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_programmabletransaction_inputs, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeTransactionEvents: - +class _UniffiFfiConverterTypeProgrammableTransaction: @staticmethod - def lift(value: int): - return TransactionEvents._make_instance_(value) + def lift(value: int) -> ProgrammableTransaction: + return ProgrammableTransaction._uniffi_make_instance(value) @staticmethod - def check_lower(value: TransactionEvents): - if not isinstance(value, TransactionEvents): - raise TypeError("Expected TransactionEvents instance, {} found".format(type(value).__name__)) + def check_lower(value: ProgrammableTransaction): + if not isinstance(value, ProgrammableTransaction): + raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionEventsProtocol): - if not isinstance(value, TransactionEvents): - raise TypeError("Expected TransactionEvents instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ProgrammableTransaction) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ProgrammableTransaction: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEventsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ProgrammableTransaction, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionKindProtocol(typing.Protocol): + + +class PublishProtocol(typing.Protocol): """ - Transaction type + Command to publish a new move package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-kind = %x00 ptb - =/ %x01 change-epoch - =/ %x02 genesis-transaction - =/ %x03 consensus-commit-prologue - =/ %x04 authenticator-state-update - =/ %x05 (vector end-of-epoch-transaction-kind) - =/ %x06 randomness-state-update - =/ %x07 consensus-commit-prologue-v2 - =/ %x08 consensus-commit-prologue-v3 + publish = (vector bytes) ; the serialized move modules + (vector object-id) ; the set of package dependencies ``` - """ +""" + + def dependencies(self, ) -> typing.List[ObjectId]: + """ + Set of packages that the to-be published package depends on +""" + raise NotImplementedError + def modules(self, ) -> typing.List[bytes]: + """ + The serialized move modules +""" + raise NotImplementedError - pass -# TransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionKind(): +class Publish(PublishProtocol): """ - Transaction type + Command to publish a new move package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-kind = %x00 ptb - =/ %x01 change-epoch - =/ %x02 genesis-transaction - =/ %x03 consensus-commit-prologue - =/ %x04 authenticator-state-update - =/ %x05 (vector end-of-epoch-transaction-kind) - =/ %x06 randomness-state-update - =/ %x07 consensus-commit-prologue-v2 - =/ %x08 consensus-commit-prologue-v3 + publish = (vector bytes) ; the serialized move modules + (vector object-id) ; the set of package dependencies ``` - """ - - _pointer: ctypes.c_void_p +""" - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId]): + + _UniffiFfiConverterSequenceBytes.check_lower(modules) + + _UniffiFfiConverterSequenceTypeObjectId.check_lower(dependencies) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceBytes.lower(modules), + _UniffiFfiConverterSequenceTypeObjectId.lower(dependencies), + ) + _uniffi_lift_return = _UniffiFfiConverterTypePublish.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_publish_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_publish, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_publish, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_authenticator_state_update_v1(cls, tx: "AuthenticatorStateUpdateV1"): - _UniffiConverterTypeAuthenticatorStateUpdateV1.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_authenticator_state_update_v1, - _UniffiConverterTypeAuthenticatorStateUpdateV1.lower(tx)) - return cls._make_instance_(pointer) - - @classmethod - def new_consensus_commit_prologue_v1(cls, tx: "ConsensusCommitPrologueV1"): - _UniffiConverterTypeConsensusCommitPrologueV1.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_consensus_commit_prologue_v1, - _UniffiConverterTypeConsensusCommitPrologueV1.lower(tx)) - return cls._make_instance_(pointer) - - @classmethod - def new_end_of_epoch(cls, tx: "typing.List[EndOfEpochTransactionKind]"): - _UniffiConverterSequenceTypeEndOfEpochTransactionKind.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_end_of_epoch, - _UniffiConverterSequenceTypeEndOfEpochTransactionKind.lower(tx)) - return cls._make_instance_(pointer) - - @classmethod - def new_genesis(cls, tx: "GenesisTransaction"): - _UniffiConverterTypeGenesisTransaction.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_genesis, - _UniffiConverterTypeGenesisTransaction.lower(tx)) - return cls._make_instance_(pointer) - - @classmethod - def new_programmable_transaction(cls, tx: "ProgrammableTransaction"): - _UniffiConverterTypeProgrammableTransaction.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_programmable_transaction, - _UniffiConverterTypeProgrammableTransaction.lower(tx)) - return cls._make_instance_(pointer) - - @classmethod - def new_randomness_state_update(cls, tx: "RandomnessStateUpdate"): - _UniffiConverterTypeRandomnessStateUpdate.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_new_randomness_state_update, - _UniffiConverterTypeRandomnessStateUpdate.lower(tx)) - return cls._make_instance_(pointer) + def dependencies(self, ) -> typing.List[ObjectId]: + """ + Set of packages that the to-be published package depends on +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_dependencies, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def modules(self, ) -> typing.List[bytes]: + """ + The serialized move modules +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_publish_modules, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -class _UniffiConverterTypeTransactionKind: +class _UniffiFfiConverterTypePublish: @staticmethod - def lift(value: int): - return TransactionKind._make_instance_(value) + def lift(value: int) -> Publish: + return Publish._uniffi_make_instance(value) @staticmethod - def check_lower(value: TransactionKind): - if not isinstance(value, TransactionKind): - raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) + def check_lower(value: Publish): + if not isinstance(value, Publish): + raise TypeError("Expected Publish instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionKindProtocol): - if not isinstance(value, TransactionKind): - raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Publish) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Publish: ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: TransactionKindProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransferObjectsProtocol(typing.Protocol): - """ - Command to transfer ownership of a set of objects to an address - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) - ```text - transfer-objects = (vector argument) argument - ``` - """ + @classmethod + def write(cls, value: Publish, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def address(self, ): - """ - The address to transfer ownership to - """ +class Secp256k1VerifyingKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Secp256k1PublicKey: raise NotImplementedError - def objects(self, ): + def to_der(self, ) -> bytes: """ - Set of objects to transfer + Serialize this public key as DER-encoded data +""" + raise NotImplementedError + def to_pem(self, ) -> str: """ - + Serialize this public key into PEM +""" + raise NotImplementedError + def verify(self, message: bytes,signature: Secp256k1Signature) -> None: + raise NotImplementedError + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + raise NotImplementedError + def verify_user(self, message: bytes,signature: UserSignature) -> None: raise NotImplementedError -# TransferObjects is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransferObjects(): - """ - Command to transfer ownership of a set of objects to an address - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - transfer-objects = (vector argument) argument - ``` - """ - _pointer: ctypes.c_void_p - def __init__(self, objects: "typing.List[Argument]",address: "Argument"): - _UniffiConverterSequenceTypeArgument.check_lower(objects) +class Secp256k1VerifyingKey(Secp256k1VerifyingKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_der(cls, bytes: bytes) -> Secp256k1VerifyingKey: + """ + Deserialize public key from ASN.1 DER-encoded data (binary format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> Secp256k1VerifyingKey: + """ + Deserialize public key from PEM. +""" - _UniffiConverterTypeArgument.check_lower(address) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, public_key: Secp256k1PublicKey): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new, - _UniffiConverterSequenceTypeArgument.lower(objects), - _UniffiConverterTypeArgument.lower(address)) + _UniffiFfiConverterTypeSecp256k1PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256k1PublicKey.lower(public_key), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifyingkey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifyingkey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifyingkey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def address(self, ) -> "Argument": - """ - The address to transfer ownership to - """ - - return _UniffiConverterTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address,self._uniffi_clone_pointer(),) + def public_key(self, ) -> Secp256k1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def objects(self, ) -> "typing.List[Argument]": + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: """ - Set of objects to transfer + Serialize this public key as DER-encoded data +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: """ - - return _UniffiConverterSequenceTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects,self._uniffi_clone_pointer(),) + Serialize this public key into PEM +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: Secp256k1Signature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSecp256k1Signature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSecp256k1Signature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_user(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifyingkey_verify_user, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeTransferObjects: - +class _UniffiFfiConverterTypeSecp256k1VerifyingKey: @staticmethod - def lift(value: int): - return TransferObjects._make_instance_(value) + def lift(value: int) -> Secp256k1VerifyingKey: + return Secp256k1VerifyingKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: TransferObjects): - if not isinstance(value, TransferObjects): - raise TypeError("Expected TransferObjects instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1VerifyingKey): + if not isinstance(value, Secp256k1VerifyingKey): + raise TypeError("Expected Secp256k1VerifyingKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransferObjectsProtocol): - if not isinstance(value, TransferObjects): - raise TypeError("Expected TransferObjects instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256k1VerifyingKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256k1VerifyingKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TransferObjectsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1VerifyingKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TypeTagProtocol(typing.Protocol): - """ - Type of a move value - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - type-tag = type-tag-u8 \ - type-tag-u16 \ - type-tag-u32 \ - type-tag-u64 \ - type-tag-u128 \ - type-tag-u256 \ - type-tag-bool \ - type-tag-address \ - type-tag-signer \ - type-tag-vector \ - type-tag-struct - type-tag-u8 = %x01 - type-tag-u16 = %x08 - type-tag-u32 = %x09 - type-tag-u64 = %x02 - type-tag-u128 = %x03 - type-tag-u256 = %x0a - type-tag-bool = %x00 - type-tag-address = %x04 - type-tag-signer = %x05 - type-tag-vector = %x06 type-tag - type-tag-struct = %x07 struct-tag - ``` - """ - - def as_struct_tag(self, ): - raise NotImplementedError - def as_struct_tag_opt(self, ): - raise NotImplementedError - def as_vector_type_tag(self, ): - raise NotImplementedError - def as_vector_type_tag_opt(self, ): - raise NotImplementedError - def is_address(self, ): - raise NotImplementedError - def is_bool(self, ): +class Secp256k1PrivateKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Secp256k1PublicKey: raise NotImplementedError - def is_signer(self, ): + def scheme(self, ) -> SignatureScheme: raise NotImplementedError - def is_struct(self, ): + def to_bech32(self, ) -> str: + """ + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" raise NotImplementedError - def is_u128(self, ): + def to_bytes(self, ) -> bytes: + """ + Serialize this private key to bytes. +""" raise NotImplementedError - def is_u16(self, ): + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" raise NotImplementedError - def is_u256(self, ): + def to_pem(self, ) -> str: + """ + Serialize this private key as PEM-encoded PKCS#8 +""" raise NotImplementedError - def is_u32(self, ): + def try_sign(self, message: bytes) -> Secp256k1Signature: raise NotImplementedError - def is_u64(self, ): + def try_sign_simple(self, message: bytes) -> SimpleSignature: raise NotImplementedError - def is_u8(self, ): + def try_sign_user(self, message: bytes) -> UserSignature: raise NotImplementedError - def is_vector(self, ): + def verifying_key(self, ) -> Secp256k1VerifyingKey: raise NotImplementedError -# TypeTag is a Rust-only trait - it's a wrapper around a Rust implementation. -class TypeTag(): - """ - Type of a move value - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - type-tag = type-tag-u8 \ - type-tag-u16 \ - type-tag-u32 \ - type-tag-u64 \ - type-tag-u128 \ - type-tag-u256 \ - type-tag-bool \ - type-tag-address \ - type-tag-signer \ - type-tag-vector \ - type-tag-struct - - type-tag-u8 = %x01 - type-tag-u16 = %x08 - type-tag-u32 = %x09 - type-tag-u64 = %x02 - type-tag-u128 = %x03 - type-tag-u256 = %x0a - type-tag-bool = %x00 - type-tag-address = %x04 - type-tag-signer = %x05 - type-tag-vector = %x06 type-tag - type-tag-struct = %x07 struct-tag - ``` - """ - _pointer: ctypes.c_void_p +class Secp256k1PrivateKey(Secp256k1PrivateKeyProtocol): - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + @classmethod + def from_bech32(cls, value: str) -> Secp256k1PrivateKey: + """ + Decode a private key from `flag || privkey` in Bech32 starting with + "iotaprivkey". +""" + + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_bech32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_der(cls, bytes: bytes) -> Secp256k1PrivateKey: + """ + Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary + format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> Secp256k1PrivateKey: + """ + Deserialize PKCS#8-encoded private key from PEM. +""" + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def generate(cls, ) -> Secp256k1PrivateKey: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PrivateKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, bytes: bytes): + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1privatekey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1privatekey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_address(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_address,) - return cls._make_instance_(pointer) - - @classmethod - def new_bool(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_bool,) - return cls._make_instance_(pointer) - - @classmethod - def new_signer(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_signer,) - return cls._make_instance_(pointer) - - @classmethod - def new_struct(cls, struct_tag: "StructTag"): - _UniffiConverterTypeStructTag.check_lower(struct_tag) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_struct, - _UniffiConverterTypeStructTag.lower(struct_tag)) - return cls._make_instance_(pointer) - - @classmethod - def new_u128(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u128,) - return cls._make_instance_(pointer) - - @classmethod - def new_u16(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u16,) - return cls._make_instance_(pointer) - - @classmethod - def new_u256(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u256,) - return cls._make_instance_(pointer) - - @classmethod - def new_u32(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u32,) - return cls._make_instance_(pointer) - - @classmethod - def new_u64(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u64,) - return cls._make_instance_(pointer) - - @classmethod - def new_u8(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_u8,) - return cls._make_instance_(pointer) - - @classmethod - def new_vector(cls, type_tag: "TypeTag"): - _UniffiConverterTypeTypeTag.check_lower(type_tag) + def public_key(self, ) -> Secp256k1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bech32(self, ) -> str: + """ + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bech32, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + """ + Serialize this private key to bytes. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: + """ + Serialize this private key as PEM-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign(self, message: bytes) -> Secp256k1Signature: - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_typetag_new_vector, - _UniffiConverterTypeTypeTag.lower(type_tag)) - return cls._make_instance_(pointer) - - - - def as_struct_tag(self, ) -> "StructTag": - return _UniffiConverterTypeStructTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag,self._uniffi_clone_pointer(),) + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def as_struct_tag_opt(self, ) -> "typing.Optional[StructTag]": - return _UniffiConverterOptionalTypeStructTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_struct_tag_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign, + *_uniffi_lowered_args, ) - - - - - - def as_vector_type_tag(self, ) -> "TypeTag": - return _UniffiConverterTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_simple(self, message: bytes) -> SimpleSignature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def as_vector_type_tag_opt(self, ) -> "typing.Optional[TypeTag]": - return _UniffiConverterOptionalTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_as_vector_type_tag_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_simple, + *_uniffi_lowered_args, ) - - - - - - def is_address(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_address,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_user(self, message: bytes) -> UserSignature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def is_bool(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_bool,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_try_sign_user, + *_uniffi_lowered_args, ) - - - - - - def is_signer(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_signer,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifying_key(self, ) -> Secp256k1VerifyingKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def is_struct(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_struct,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1VerifyingKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1privatekey_verifying_key, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def is_u128(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u128,self._uniffi_clone_pointer(),) - ) - - - +class _UniffiFfiConverterTypeSecp256k1PrivateKey: + @staticmethod + def lift(value: int) -> Secp256k1PrivateKey: + return Secp256k1PrivateKey._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Secp256k1PrivateKey): + if not isinstance(value, Secp256k1PrivateKey): + raise TypeError("Expected Secp256k1PrivateKey instance, {} found".format(type(value).__name__)) - def is_u16(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u16,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: Secp256k1PrivateKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Secp256k1PrivateKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Secp256k1PrivateKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class Secp256k1VerifierProtocol(typing.Protocol): + + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + raise NotImplementedError + def verify_user(self, message: bytes,signature: UserSignature) -> None: + raise NotImplementedError - def is_u256(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u256,self._uniffi_clone_pointer(),) +class Secp256k1Verifier(Secp256k1VerifierProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( ) - - - - - - def is_u32(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u32,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256k1Verifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1verifier_new, + *_uniffi_lowered_args, ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1verifier, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1verifier, self._handle) - - - def is_u64(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u64,self._uniffi_clone_pointer(),) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), ) - - - - - - def is_u8(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_u8,self._uniffi_clone_pointer(),) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_simple, + *_uniffi_lowered_args, ) - - - - - - def is_vector(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_is_vector,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_user(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), ) - - - - - - def __str__(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_typetag_uniffi_trait_display,self._uniffi_clone_pointer(),) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1verifier_verify_user, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeTypeTag: - +class _UniffiFfiConverterTypeSecp256k1Verifier: @staticmethod - def lift(value: int): - return TypeTag._make_instance_(value) + def lift(value: int) -> Secp256k1Verifier: + return Secp256k1Verifier._uniffi_make_instance(value) @staticmethod - def check_lower(value: TypeTag): - if not isinstance(value, TypeTag): - raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1Verifier): + if not isinstance(value, Secp256k1Verifier): + raise TypeError("Expected Secp256k1Verifier instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TypeTagProtocol): - if not isinstance(value, TypeTag): - raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256k1Verifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256k1Verifier: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: TypeTagProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1Verifier, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class UpgradeProtocol(typing.Protocol): - """ - Command to upgrade an already published package - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - upgrade = (vector bytes) ; move modules - (vector object-id) ; dependencies - object-id ; package-id of the package - argument ; upgrade ticket - ``` - """ - def dependencies(self, ): - """ - Set of packages that the to-be published package depends on - """ +class Secp256r1VerifyingKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Secp256r1PublicKey: raise NotImplementedError - def modules(self, ): - """ - The serialized move modules + def to_der(self, ) -> bytes: """ - + Serialize this public key as DER-encoded data. +""" raise NotImplementedError - def package(self, ): + def to_pem(self, ) -> str: """ - Package id of the package to upgrade - """ - + Serialize this public key into PEM. +""" raise NotImplementedError - def ticket(self, ): - """ - Ticket authorizing the upgrade - """ - + def verify(self, message: bytes,signature: Secp256r1Signature) -> None: + raise NotImplementedError + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + raise NotImplementedError + def verify_user(self, message: bytes,signature: UserSignature) -> None: raise NotImplementedError -# Upgrade is a Rust-only trait - it's a wrapper around a Rust implementation. -class Upgrade(): - """ - Command to upgrade an already published package - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - upgrade = (vector bytes) ; move modules - (vector object-id) ; dependencies - object-id ; package-id of the package - argument ; upgrade ticket - ``` - """ - _pointer: ctypes.c_void_p - def __init__(self, modules: "typing.List[bytes]",dependencies: "typing.List[ObjectId]",package: "ObjectId",ticket: "Argument"): - _UniffiConverterSequenceBytes.check_lower(modules) - - _UniffiConverterSequenceTypeObjectId.check_lower(dependencies) +class Secp256r1VerifyingKey(Secp256r1VerifyingKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_der(cls, bytes: bytes) -> Secp256r1VerifyingKey: + """ + Deserialize public key from ASN.1 DER-encoded data (binary format). +""" - _UniffiConverterTypeObjectId.check_lower(package) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> Secp256r1VerifyingKey: + """ + Deserialize public key from PEM. +""" - _UniffiConverterTypeArgument.check_lower(ticket) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, public_key: Secp256r1PublicKey): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new, - _UniffiConverterSequenceBytes.lower(modules), - _UniffiConverterSequenceTypeObjectId.lower(dependencies), - _UniffiConverterTypeObjectId.lower(package), - _UniffiConverterTypeArgument.lower(ticket)) + _UniffiFfiConverterTypeSecp256r1PublicKey.check_lower(public_key) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256r1PublicKey.lower(public_key), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1VerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifyingkey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifyingkey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifyingkey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def dependencies(self, ) -> "typing.List[ObjectId]": - """ - Set of packages that the to-be published package depends on - """ - - return _UniffiConverterSequenceTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies,self._uniffi_clone_pointer(),) + def public_key(self, ) -> Secp256r1PublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def modules(self, ) -> "typing.List[bytes]": - """ - The serialized move modules - """ - - return _UniffiConverterSequenceBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_public_key, + *_uniffi_lowered_args, ) - - - - - - def package(self, ) -> "ObjectId": - """ - Package id of the package to upgrade + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: """ - - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package,self._uniffi_clone_pointer(),) + Serialize this public key as DER-encoded data. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def ticket(self, ) -> "Argument": - """ - Ticket authorizing the upgrade + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: """ - - return _UniffiConverterTypeArgument.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket,self._uniffi_clone_pointer(),) + Serialize this public key into PEM. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: Secp256r1Signature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSecp256r1Signature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSecp256r1Signature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_simple, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_user(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifyingkey_verify_user, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeUpgrade: - +class _UniffiFfiConverterTypeSecp256r1VerifyingKey: @staticmethod - def lift(value: int): - return Upgrade._make_instance_(value) + def lift(value: int) -> Secp256r1VerifyingKey: + return Secp256r1VerifyingKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: Upgrade): - if not isinstance(value, Upgrade): - raise TypeError("Expected Upgrade instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256r1VerifyingKey): + if not isinstance(value, Secp256r1VerifyingKey): + raise TypeError("Expected Secp256r1VerifyingKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: UpgradeProtocol): - if not isinstance(value, Upgrade): - raise TypeError("Expected Upgrade instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256r1VerifyingKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256r1VerifyingKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: UpgradeProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1VerifyingKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class UserSignatureProtocol(typing.Protocol): - """ - A signature from a user - - A `UserSignature` is most commonly used to authorize the execution and - inclusion of a transaction to the blockchain. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - user-signature-bcs = bytes ; where the contents of the bytes are defined by - user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey - ``` - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - def as_multisig(self, ): - raise NotImplementedError - def as_multisig_opt(self, ): - raise NotImplementedError - def as_passkey(self, ): - raise NotImplementedError - def as_passkey_opt(self, ): - raise NotImplementedError - def as_simple(self, ): - raise NotImplementedError - def as_simple_opt(self, ): - raise NotImplementedError - def as_zklogin(self, ): + +class Secp256r1PrivateKeyProtocol(typing.Protocol): + + def public_key(self, ) -> Secp256r1PublicKey: + """ + Get the public key corresponding to this private key. +""" raise NotImplementedError - def as_zklogin_opt(self, ): + def scheme(self, ) -> SignatureScheme: raise NotImplementedError - def is_multisig(self, ): + def to_bech32(self, ) -> str: + """ + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" raise NotImplementedError - def is_passkey(self, ): + def to_bytes(self, ) -> bytes: + """ + Serialize this private key to bytes. +""" raise NotImplementedError - def is_simple(self, ): + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" raise NotImplementedError - def is_zklogin(self, ): + def to_pem(self, ) -> str: + """ + Serialize this private key as PEM-encoded PKCS#8 +""" raise NotImplementedError - def scheme(self, ): + def try_sign(self, message: bytes) -> Secp256r1Signature: """ - Return the flag for this signature scheme + Sign a message and return a Secp256r1Signature. +""" + raise NotImplementedError + def try_sign_simple(self, message: bytes) -> SimpleSignature: """ - + Sign a message and return a SimpleSignature. +""" raise NotImplementedError - def to_base64(self, ): + def try_sign_user(self, message: bytes) -> UserSignature: + """ + Sign a message and return a UserSignature. +""" raise NotImplementedError - def to_bytes(self, ): + def verifying_key(self, ) -> Secp256r1VerifyingKey: raise NotImplementedError -# UserSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class UserSignature(): - """ - A signature from a user - - A `UserSignature` is most commonly used to authorize the execution and - inclusion of a transaction to the blockchain. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - user-signature-bcs = bytes ; where the contents of the bytes are defined by - user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey - ``` - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - _pointer: ctypes.c_void_p +class Secp256r1PrivateKey(Secp256r1PrivateKeyProtocol): - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + _handle: ctypes.c_uint64 @classmethod - def from_base64(cls, base64: "str"): - _UniffiConverterString.check_lower(base64) + def from_bech32(cls, value: str) -> Secp256r1PrivateKey: + """ + Decode a private key from `flag || privkey` in Bech32 starting with + "iotaprivkey". +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64, - _UniffiConverterString.lower(base64)) - return cls._make_instance_(pointer) - + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_bech32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) + def from_der(cls, bytes: bytes) -> Secp256r1PrivateKey: + """ + Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary + format). +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def new_multisig(cls, signature: "MultisigAggregatedSignature"): - _UniffiConverterTypeMultisigAggregatedSignature.check_lower(signature) + def from_pem(cls, s: str) -> Secp256r1PrivateKey: + """ + Deserialize PKCS#8-encoded private key from PEM. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig, - _UniffiConverterTypeMultisigAggregatedSignature.lower(signature)) - return cls._make_instance_(pointer) - + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod - def new_passkey(cls, authenticator: "PasskeyAuthenticator"): - _UniffiConverterTypePasskeyAuthenticator.check_lower(authenticator) + def generate(cls, ) -> Secp256r1PrivateKey: + """ + Generate a new random Secp256r1PrivateKey +""" + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PrivateKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_generate, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + def __init__(self, bytes: bytes): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey, - _UniffiConverterTypePasskeyAuthenticator.lower(authenticator)) - return cls._make_instance_(pointer) + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PrivateKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result - @classmethod - def new_simple(cls, signature: "SimpleSignature"): - _UniffiConverterTypeSimpleSignature.check_lower(signature) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple, - _UniffiConverterTypeSimpleSignature.lower(signature)) - return cls._make_instance_(pointer) + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1privatekey, handle) + + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1privatekey, self._handle) + # Used by alternative constructors or any methods which return this type. @classmethod - def new_zklogin(cls, authenticator: "ZkLoginAuthenticator"): - _UniffiConverterTypeZkLoginAuthenticator.check_lower(authenticator) + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def public_key(self, ) -> Secp256r1PublicKey: + """ + Get the public key corresponding to this private key. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1PublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bech32(self, ) -> str: + """ + Encode this private key as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bech32, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + """ + Serialize this private key to bytes. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: + """ + Serialize this private key as PEM-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign(self, message: bytes) -> Secp256r1Signature: + """ + Sign a message and return a Secp256r1Signature. +""" - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin, - _UniffiConverterTypeZkLoginAuthenticator.lower(authenticator)) - return cls._make_instance_(pointer) - - - - def as_multisig(self, ) -> "MultisigAggregatedSignature": - return _UniffiConverterTypeMultisigAggregatedSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig,self._uniffi_clone_pointer(),) + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def as_multisig_opt(self, ) -> "typing.Optional[MultisigAggregatedSignature]": - return _UniffiConverterOptionalTypeMultisigAggregatedSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Signature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign, + *_uniffi_lowered_args, ) - - - - - - def as_passkey(self, ) -> "PasskeyAuthenticator": - return _UniffiConverterTypePasskeyAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_simple(self, message: bytes) -> SimpleSignature: + """ + Sign a message and return a SimpleSignature. +""" + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def as_passkey_opt(self, ) -> "typing.Optional[PasskeyAuthenticator]": - return _UniffiConverterOptionalTypePasskeyAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_simple, + *_uniffi_lowered_args, ) - - - - - - def as_simple(self, ) -> "SimpleSignature": - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign_user(self, message: bytes) -> UserSignature: + """ + Sign a message and return a UserSignature. +""" + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), ) - - - - - - def as_simple_opt(self, ) -> "typing.Optional[SimpleSignature]": - return _UniffiConverterOptionalTypeSimpleSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_try_sign_user, + *_uniffi_lowered_args, ) - - - - - - def as_zklogin(self, ) -> "ZkLoginAuthenticator": - return _UniffiConverterTypeZkLoginAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifying_key(self, ) -> Secp256r1VerifyingKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginAuthenticator]": - return _UniffiConverterOptionalTypeZkLoginAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1VerifyingKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1privatekey_verifying_key, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - def is_multisig(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig,self._uniffi_clone_pointer(),) - ) - - - +class _UniffiFfiConverterTypeSecp256r1PrivateKey: + @staticmethod + def lift(value: int) -> Secp256r1PrivateKey: + return Secp256r1PrivateKey._uniffi_make_instance(value) + @staticmethod + def check_lower(value: Secp256r1PrivateKey): + if not isinstance(value, Secp256r1PrivateKey): + raise TypeError("Expected Secp256r1PrivateKey instance, {} found".format(type(value).__name__)) - def is_passkey(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: Secp256r1PrivateKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> Secp256r1PrivateKey: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: Secp256r1PrivateKey, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class Secp256r1VerifierProtocol(typing.Protocol): + + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + raise NotImplementedError + def verify_user(self, message: bytes,signature: UserSignature) -> None: + raise NotImplementedError - def is_simple(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple,self._uniffi_clone_pointer(),) +class Secp256r1Verifier(Secp256r1VerifierProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( ) - - - - - - def is_zklogin(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeSecp256r1Verifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1verifier_new, + *_uniffi_lowered_args, ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1verifier, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1verifier, self._handle) - - - def scheme(self, ) -> "SignatureScheme": - """ - Return the flag for this signature scheme - """ - - return _UniffiConverterTypeSignatureScheme.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme,self._uniffi_clone_pointer(),) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def verify_simple(self, message: bytes,signature: SimpleSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), ) - - - - - - def to_base64(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64,self._uniffi_clone_pointer(),) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_simple, + *_uniffi_lowered_args, ) - - - - - - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_user(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1verifier_verify_user, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeUserSignature: - +class _UniffiFfiConverterTypeSecp256r1Verifier: @staticmethod - def lift(value: int): - return UserSignature._make_instance_(value) + def lift(value: int) -> Secp256r1Verifier: + return Secp256r1Verifier._uniffi_make_instance(value) @staticmethod - def check_lower(value: UserSignature): - if not isinstance(value, UserSignature): - raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256r1Verifier): + if not isinstance(value, Secp256r1Verifier): + raise TypeError("Expected Secp256r1Verifier instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: UserSignatureProtocol): - if not isinstance(value, UserSignature): - raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Secp256r1Verifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Secp256r1Verifier: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: UserSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1Verifier, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class UserSignatureVerifierProtocol(typing.Protocol): - """ - Verifier that will verify all UserSignature variants - """ - def verify(self, message: "bytes",signature: "UserSignature"): + +class SimpleVerifyingKeyProtocol(typing.Protocol): + + def public_key(self, ) -> MultisigMemberPublicKey: raise NotImplementedError - def with_zklogin_verifier(self, zklogin_verifier: "ZkloginVerifier"): + def scheme(self, ) -> SignatureScheme: raise NotImplementedError - def zklogin_verifier(self, ): + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + raise NotImplementedError + def to_pem(self, ) -> str: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + raise NotImplementedError + def verify(self, message: bytes,signature: SimpleSignature) -> None: raise NotImplementedError -# UserSignatureVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class UserSignatureVerifier(): - """ - Verifier that will verify all UserSignature variants - """ - _pointer: ctypes.c_void_p - def __init__(self, ): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new,) +class SimpleVerifyingKey(SimpleVerifyingKeyProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_der(cls, bytes: bytes) -> SimpleVerifyingKey: + """ + Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary + format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleVerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> SimpleVerifyingKey: + """ + Deserialize PKCS#8-encoded private key from PEM. +""" + + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleVerifyingKey.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifyingkey_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifyingkey, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifyingkey, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def verify(self, message: "bytes",signature: "UserSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeUserSignature.check_lower(signature) + def public_key(self, ) -> MultisigMemberPublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigMemberPublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: SimpleSignature) -> None: - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeUserSignature.lower(signature)) - - - - - - - def with_zklogin_verifier(self, zklogin_verifier: "ZkloginVerifier") -> "UserSignatureVerifier": - _UniffiConverterTypeZkloginVerifier.check_lower(zklogin_verifier) + _UniffiFfiConverterBytes.check_lower(message) - return _UniffiConverterTypeUserSignatureVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier,self._uniffi_clone_pointer(), - _UniffiConverterTypeZkloginVerifier.lower(zklogin_verifier)) + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), ) - - - - - - def zklogin_verifier(self, ) -> "typing.Optional[ZkloginVerifier]": - return _UniffiConverterOptionalTypeZkloginVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier,self._uniffi_clone_pointer(),) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifyingkey_verify, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeUserSignatureVerifier: - +class _UniffiFfiConverterTypeSimpleVerifyingKey: @staticmethod - def lift(value: int): - return UserSignatureVerifier._make_instance_(value) + def lift(value: int) -> SimpleVerifyingKey: + return SimpleVerifyingKey._uniffi_make_instance(value) @staticmethod - def check_lower(value: UserSignatureVerifier): - if not isinstance(value, UserSignatureVerifier): - raise TypeError("Expected UserSignatureVerifier instance, {} found".format(type(value).__name__)) + def check_lower(value: SimpleVerifyingKey): + if not isinstance(value, SimpleVerifyingKey): + raise TypeError("Expected SimpleVerifyingKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: UserSignatureVerifierProtocol): - if not isinstance(value, UserSignatureVerifier): - raise TypeError("Expected UserSignatureVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: SimpleVerifyingKey) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> SimpleVerifyingKey: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: UserSignatureVerifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SimpleVerifyingKey, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ValidatorAggregatedSignatureProtocol(typing.Protocol): - """ - An aggregated signature from multiple Validators. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-aggregated-signature = u64 ; epoch - bls-signature - roaring-bitmap - roaring-bitmap = bytes ; where the contents of the bytes are valid - ; according to the serialized spec for - ; roaring bitmaps - ``` - See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the - serialized format of RoaringBitmaps. - """ - def bitmap_bytes(self, ): +class SimpleKeypairProtocol(typing.Protocol): + + def public_key(self, ) -> MultisigMemberPublicKey: raise NotImplementedError - def epoch(self, ): + def scheme(self, ) -> SignatureScheme: raise NotImplementedError - def signature(self, ): + def to_bech32(self, ) -> str: + """ + Encode a SimpleKeypair as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. Note that the pubkey is not encoded. +""" + raise NotImplementedError + def to_bytes(self, ) -> bytes: + """ + Encode a SimpleKeypair as `flag || privkey` in bytes +""" + raise NotImplementedError + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + raise NotImplementedError + def to_pem(self, ) -> str: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + raise NotImplementedError + def try_sign(self, message: bytes) -> SimpleSignature: + raise NotImplementedError + def verifying_key(self, ) -> SimpleVerifyingKey: raise NotImplementedError -# ValidatorAggregatedSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorAggregatedSignature(): - """ - An aggregated signature from multiple Validators. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-aggregated-signature = u64 ; epoch - bls-signature - roaring-bitmap - roaring-bitmap = bytes ; where the contents of the bytes are valid - ; according to the serialized spec for - ; roaring bitmaps - ``` - - See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the - serialized format of RoaringBitmaps. - """ - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",signature: "Bls12381Signature",bitmap_bytes: "bytes"): - _UniffiConverterUInt64.check_lower(epoch) +class SimpleKeypair(SimpleKeypairProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def from_bech32(cls, value: str) -> SimpleKeypair: + """ + Decode a SimpleKeypair from `flag || privkey` in Bech32 starting with + "iotaprivkey" to SimpleKeypair. The public key is computed directly from + the private key bytes. +""" + + _UniffiFfiConverterString.check_lower(value) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(value), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bech32, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_bytes(cls, bytes: bytes) -> SimpleKeypair: + """ + Decode a SimpleKeypair from `flag || privkey` bytes +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_bytes, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_der(cls, bytes: bytes) -> SimpleKeypair: + """ + Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary + format). +""" + + _UniffiFfiConverterBytes.check_lower(bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(bytes), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_der, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_ed25519(cls, keypair: Ed25519PrivateKey) -> SimpleKeypair: + + _UniffiFfiConverterTypeEd25519PrivateKey.check_lower(keypair) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeEd25519PrivateKey.lower(keypair), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_ed25519, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_pem(cls, s: str) -> SimpleKeypair: + """ + Deserialize PKCS#8-encoded private key from PEM. +""" - _UniffiConverterTypeBls12381Signature.check_lower(signature) + _UniffiFfiConverterString.check_lower(s) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(s), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_pem, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_secp256k1(cls, keypair: Secp256k1PrivateKey) -> SimpleKeypair: - _UniffiConverterBytes.check_lower(bitmap_bytes) + _UniffiFfiConverterTypeSecp256k1PrivateKey.check_lower(keypair) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256k1PrivateKey.lower(keypair), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256k1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + @classmethod + def from_secp256r1(cls, keypair: Secp256r1PrivateKey) -> SimpleKeypair: - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterTypeBls12381Signature.lower(signature), - _UniffiConverterBytes.lower(bitmap_bytes)) + _UniffiFfiConverterTypeSecp256r1PrivateKey.check_lower(keypair) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeSecp256r1PrivateKey.lower(keypair), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleKeypair.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simplekeypair_from_secp256r1, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplekeypair, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplekeypair, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def bitmap_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes,self._uniffi_clone_pointer(),) + def public_key(self, ) -> MultisigMemberPublicKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeMultisigMemberPublicKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_public_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def scheme(self, ) -> SignatureScheme: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSignatureScheme.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_scheme, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bech32(self, ) -> str: + """ + Encode a SimpleKeypair as `flag || privkey` in Bech32 starting with + "iotaprivkey" to a string. Note that the pubkey is not encoded. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def epoch(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bech32, + *_uniffi_lowered_args, ) - - - - - - def signature(self, ) -> "Bls12381Signature": - return _UniffiConverterTypeBls12381Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_bytes(self, ) -> bytes: + """ + Encode a SimpleKeypair as `flag || privkey` in bytes +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_der(self, ) -> bytes: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_der, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def to_pem(self, ) -> str: + """ + Serialize this private key as DER-encoded PKCS#8 +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_to_pem, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def try_sign(self, message: bytes) -> SimpleSignature: + + _UniffiFfiConverterBytes.check_lower(message) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_try_sign, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verifying_key(self, ) -> SimpleVerifyingKey: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleVerifyingKey.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplekeypair_verifying_key, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeValidatorAggregatedSignature: - +class _UniffiFfiConverterTypeSimpleKeypair: @staticmethod - def lift(value: int): - return ValidatorAggregatedSignature._make_instance_(value) + def lift(value: int) -> SimpleKeypair: + return SimpleKeypair._uniffi_make_instance(value) @staticmethod - def check_lower(value: ValidatorAggregatedSignature): - if not isinstance(value, ValidatorAggregatedSignature): - raise TypeError("Expected ValidatorAggregatedSignature instance, {} found".format(type(value).__name__)) + def check_lower(value: SimpleKeypair): + if not isinstance(value, SimpleKeypair): + raise TypeError("Expected SimpleKeypair instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ValidatorAggregatedSignatureProtocol): - if not isinstance(value, ValidatorAggregatedSignature): - raise TypeError("Expected ValidatorAggregatedSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: SimpleKeypair) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> SimpleKeypair: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ValidatorAggregatedSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SimpleKeypair, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ValidatorCommitteeSignatureAggregatorProtocol(typing.Protocol): - def add_signature(self, signature: "ValidatorSignature"): - raise NotImplementedError - def committee(self, ): - raise NotImplementedError - def finish(self, ): + + +class SimpleVerifierProtocol(typing.Protocol): + + def verify(self, message: bytes,signature: SimpleSignature) -> None: raise NotImplementedError -# ValidatorCommitteeSignatureAggregator is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorCommitteeSignatureAggregator(): - _pointer: ctypes.c_void_p + +class SimpleVerifier(SimpleVerifierProtocol): - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSimpleVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_simpleverifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simpleverifier, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simpleverifier, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_checkpoint_summary(cls, committee: "ValidatorCommittee",summary: "CheckpointSummary"): - _UniffiConverterTypeValidatorCommittee.check_lower(committee) + def verify(self, message: bytes,signature: SimpleSignature) -> None: - _UniffiConverterTypeCheckpointSummary.check_lower(summary) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary, - _UniffiConverterTypeValidatorCommittee.lower(committee), - _UniffiConverterTypeCheckpointSummary.lower(summary)) - return cls._make_instance_(pointer) - - - - def add_signature(self, signature: "ValidatorSignature") -> None: - _UniffiConverterTypeValidatorSignature.check_lower(signature) + _UniffiFfiConverterBytes.check_lower(message) - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature,self._uniffi_clone_pointer(), - _UniffiConverterTypeValidatorSignature.lower(signature)) - - - - + _UniffiFfiConverterTypeSimpleSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeSimpleSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_simpleverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def committee(self, ) -> "ValidatorCommittee": - return _UniffiConverterTypeValidatorCommittee.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee,self._uniffi_clone_pointer(),) - ) +class _UniffiFfiConverterTypeSimpleVerifier: + @staticmethod + def lift(value: int) -> SimpleVerifier: + return SimpleVerifier._uniffi_make_instance(value) + @staticmethod + def check_lower(value: SimpleVerifier): + if not isinstance(value, SimpleVerifier): + raise TypeError("Expected SimpleVerifier instance, {} found".format(type(value).__name__)) - def finish(self, ) -> "ValidatorAggregatedSignature": - return _UniffiConverterTypeValidatorAggregatedSignature.lift( - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish,self._uniffi_clone_pointer(),) - ) + @staticmethod + def lower(value: SimpleVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> SimpleVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: SimpleVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class SplitCoinsProtocol(typing.Protocol): + """ + Command to split a single coin object into multiple coins + # BCS -class _UniffiConverterTypeValidatorCommitteeSignatureAggregator: + The BCS serialized form for this type is defined by the following ABNF: - @staticmethod - def lift(value: int): - return ValidatorCommitteeSignatureAggregator._make_instance_(value) + ```text + split-coins = argument (vector argument) + ``` +""" + + def amounts(self, ) -> typing.List[Argument]: + """ + The amounts to split off +""" + raise NotImplementedError + def coin(self, ) -> Argument: + """ + The coin to split +""" + raise NotImplementedError - @staticmethod - def check_lower(value: ValidatorCommitteeSignatureAggregator): - if not isinstance(value, ValidatorCommitteeSignatureAggregator): - raise TypeError("Expected ValidatorCommitteeSignatureAggregator instance, {} found".format(type(value).__name__)) +class SplitCoins(SplitCoinsProtocol): + """ + Command to split a single coin object into multiple coins - @staticmethod - def lower(value: ValidatorCommitteeSignatureAggregatorProtocol): - if not isinstance(value, ValidatorCommitteeSignatureAggregator): - raise TypeError("Expected ValidatorCommitteeSignatureAggregator instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + # BCS - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def write(cls, value: ValidatorCommitteeSignatureAggregatorProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ValidatorCommitteeSignatureVerifierProtocol(typing.Protocol): - def committee(self, ): - raise NotImplementedError - def verify(self, message: "bytes",signature: "ValidatorSignature"): - raise NotImplementedError - def verify_aggregated(self, message: "bytes",signature: "ValidatorAggregatedSignature"): - raise NotImplementedError - def verify_checkpoint_summary(self, summary: "CheckpointSummary",signature: "ValidatorAggregatedSignature"): - raise NotImplementedError -# ValidatorCommitteeSignatureVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorCommitteeSignatureVerifier(): - _pointer: ctypes.c_void_p - def __init__(self, committee: "ValidatorCommittee"): - _UniffiConverterTypeValidatorCommittee.check_lower(committee) + ```text + split-coins = argument (vector argument) + ``` +""" + + _handle: ctypes.c_uint64 + def __init__(self, coin: Argument,amounts: typing.List[Argument]): - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new, - _UniffiConverterTypeValidatorCommittee.lower(committee)) + _UniffiFfiConverterTypeArgument.check_lower(coin) + + _UniffiFfiConverterSequenceTypeArgument.check_lower(amounts) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeArgument.lower(coin), + _UniffiFfiConverterSequenceTypeArgument.lower(amounts), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeSplitCoins.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_splitcoins_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_splitcoins, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_splitcoins, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def committee(self, ) -> "ValidatorCommittee": - return _UniffiConverterTypeValidatorCommittee.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee,self._uniffi_clone_pointer(),) + def amounts(self, ) -> typing.List[Argument]: + """ + The amounts to split off +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_amounts, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def coin(self, ) -> Argument: + """ + The coin to split +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_splitcoins_coin, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def verify(self, message: "bytes",signature: "ValidatorSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeValidatorSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeValidatorSignature.lower(signature)) - +class _UniffiFfiConverterTypeSplitCoins: + @staticmethod + def lift(value: int) -> SplitCoins: + return SplitCoins._uniffi_make_instance(value) + @staticmethod + def check_lower(value: SplitCoins): + if not isinstance(value, SplitCoins): + raise TypeError("Expected SplitCoins instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: SplitCoins) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> SplitCoins: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: SplitCoins, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def verify_aggregated(self, message: "bytes",signature: "ValidatorAggregatedSignature") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeValidatorAggregatedSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeValidatorAggregatedSignature.lower(signature)) +class _UniffiFfiConverterOptionalDuration(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterDuration.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterDuration.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterDuration.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterMapStringSequenceString(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, items): + for (key, value) in items.items(): + _UniffiFfiConverterString.check_lower(key) + _UniffiFfiConverterSequenceString.check_lower(value) + @classmethod + def write(cls, items, buf): + buf.write_i32(len(items)) + for (key, value) in items.items(): + _UniffiFfiConverterString.write(key, buf) + _UniffiFfiConverterSequenceString.write(value, buf) - def verify_checkpoint_summary(self, summary: "CheckpointSummary",signature: "ValidatorAggregatedSignature") -> None: - _UniffiConverterTypeCheckpointSummary.check_lower(summary) - - _UniffiConverterTypeValidatorAggregatedSignature.check_lower(signature) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary,self._uniffi_clone_pointer(), - _UniffiConverterTypeCheckpointSummary.lower(summary), - _UniffiConverterTypeValidatorAggregatedSignature.lower(signature)) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative map size") + # It would be nice to use a dict comprehension, + # but in Python 3.7 and before the evaluation order is not according to spec, + # so we we're reading the value before the key. + # This loop makes the order explicit: first reading the key, then the value. + d = {} + for i in range(count): + key = _UniffiFfiConverterString.read(buf) + val = _UniffiFfiConverterSequenceString.read(buf) + d[key] = val + return d +class _UniffiFfiConverterOptionalMapStringSequenceString(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterMapStringSequenceString.check_lower(value) + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + buf.write_u8(1) + _UniffiFfiConverterMapStringSequenceString.write(value, buf) + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterMapStringSequenceString.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterSequenceTypePTBArgument(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypePTBArgument.check_lower(item) -class _UniffiConverterTypeValidatorCommitteeSignatureVerifier: + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypePTBArgument.write(item, buf) - @staticmethod - def lift(value: int): - return ValidatorCommitteeSignatureVerifier._make_instance_(value) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - @staticmethod - def check_lower(value: ValidatorCommitteeSignatureVerifier): - if not isinstance(value, ValidatorCommitteeSignatureVerifier): - raise TypeError("Expected ValidatorCommitteeSignatureVerifier instance, {} found".format(type(value).__name__)) + return [ + _UniffiFfiConverterTypePTBArgument.read(buf) for i in range(count) + ] - @staticmethod - def lower(value: ValidatorCommitteeSignatureVerifierProtocol): - if not isinstance(value, ValidatorCommitteeSignatureVerifier): - raise TypeError("Expected ValidatorCommitteeSignatureVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() +class _UniffiFfiConverterSequenceUInt64(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterUInt64.check_lower(item) @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterUInt64.write(item, buf) @classmethod - def write(cls, value: ValidatorCommitteeSignatureVerifierProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ValidatorExecutionTimeObservationProtocol(typing.Protocol): - """ - An execution time observation from a particular validator + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") - # BCS + return [ + _UniffiFfiConverterUInt64.read(buf) for i in range(count) + ] - The BCS serialized form for this type is defined by the following ABNF: - ```text - execution-time-observation = bls-public-key duration - duration = u64 ; seconds - u32 ; subsecond nanoseconds - ``` +class TransactionBuilderProtocol(typing.Protocol): """ + A builder for creating transactions. Use [`finish`](Self::finish) to + finalize the transaction data. +""" + + async def dry_run(self, skip_checks: bool = False) -> DryRunResult: + """ + Dry run the transaction. +""" + raise NotImplementedError + async def execute(self, keypair: SimpleKeypair,wait_for_finalization: bool = False) -> typing.Optional[TransactionEffects]: + """ + Execute the transaction and optionally wait for finalization. +""" + raise NotImplementedError + async def execute_with_sponsor(self, keypair: SimpleKeypair,sponsor_keypair: SimpleKeypair,wait_for_finalization: bool = False) -> typing.Optional[TransactionEffects]: + """ + Execute the transaction and optionally wait for finalization. +""" + raise NotImplementedError + def expiration(self, epoch: int) -> TransactionBuilder: + """ + Set the expiration of the transaction to be a specific epoch. +""" + raise NotImplementedError + async def finish(self, ) -> Transaction: + """ + Convert this builder into a transaction. +""" + raise NotImplementedError + def gas(self, object_id: ObjectId) -> TransactionBuilder: + """ + Add a gas object to use to pay for the transaction. +""" + raise NotImplementedError + def gas_budget(self, budget: int) -> TransactionBuilder: + """ + Set the gas budget for the transaction. +""" + raise NotImplementedError + def gas_price(self, price: int) -> TransactionBuilder: + """ + Set the gas price for the transaction. +""" + raise NotImplementedError + def gas_station_sponsor(self, url: str,duration: typing.Union[object, typing.Optional[Duration]] = _DEFAULT,headers: typing.Union[object, typing.Optional[dict[str, typing.List[str]]]] = _DEFAULT) -> TransactionBuilder: + """ + Set the gas station sponsor. +""" + raise NotImplementedError + def make_move_vec(self, elements: typing.List[PtbArgument],type_tag: TypeTag,name: str) -> TransactionBuilder: + """ + Make a move vector from a list of elements. The elements must all be of + the type indicated by `type_tag`. +""" + raise NotImplementedError + def merge_coins(self, coin: ObjectId,coins_to_merge: typing.List[ObjectId]) -> TransactionBuilder: + """ + Merge a list of coins into a single coin, without producing any result. +""" + raise NotImplementedError + def move_call(self, package: Address,module: Identifier,function: Identifier,arguments: typing.Union[object, typing.List[PtbArgument]] = _DEFAULT,type_args: typing.Union[object, typing.List[TypeTag]] = _DEFAULT,names: typing.Union[object, typing.List[str]] = _DEFAULT) -> TransactionBuilder: + """ + Call a Move function with the given arguments. +""" + raise NotImplementedError + def publish(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId],upgrade_cap_name: str) -> TransactionBuilder: + """ + Publish a list of modules with the given dependencies. The result + assigned to `upgrade_cap_name` is the `0x2::package::UpgradeCap` + Move type. Note that the upgrade capability needs to be handled + after this call: + - transfer it to the transaction sender or another address + - burn it + - wrap it for access control + - discard the it to make a package immutable - def duration(self, ): + The arguments required for this command are: + - `modules`: is the modules' bytecode to be published + - `dependencies`: is the list of IDs of the transitive dependencies of + the package +""" raise NotImplementedError - def validator(self, ): + def send_coins(self, coins: typing.List[ObjectId],recipient: Address,amount: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> TransactionBuilder: + """ + Transfer some coins to a recipient address. If multiple coins are + provided then they will be merged. +""" raise NotImplementedError -# ValidatorExecutionTimeObservation is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorExecutionTimeObservation(): - """ - An execution time observation from a particular validator + def send_iota(self, recipient: Address,amount: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> TransactionBuilder: + """ + Send IOTA to a recipient address. +""" + raise NotImplementedError + def split_coins(self, coin: ObjectId,amounts: typing.List[int],names: typing.Union[object, typing.List[str]] = _DEFAULT) -> TransactionBuilder: + """ + Split a coin by the provided amounts. +""" + raise NotImplementedError + def sponsor(self, sponsor: Address) -> TransactionBuilder: + """ + Set the sponsor of the transaction. +""" + raise NotImplementedError + def transfer_objects(self, recipient: Address,objects: typing.List[PtbArgument]) -> TransactionBuilder: + """ + Transfer a list of objects to the given address, without producing any + result. +""" + raise NotImplementedError + def upgrade(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId],package: ObjectId,ticket: PtbArgument,name: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> TransactionBuilder: + """ + Upgrade a Move package. - # BCS + - `modules`: is the modules' bytecode for the modules to be published + - `dependencies`: is the list of IDs of the transitive dependencies of + the package to be upgraded + - `package`: is the ID of the current package being upgraded + - `ticket`: is the upgrade ticket - The BCS serialized form for this type is defined by the following ABNF: + To get the ticket, you have to call the + `0x2::package::authorize_upgrade` function, and pass the package + ID, the upgrade policy, and package digest. +""" + raise NotImplementedError - ```text - execution-time-observation = bls-public-key duration - duration = u64 ; seconds - u32 ; subsecond nanoseconds - ``` +class TransactionBuilder(TransactionBuilderProtocol): """ - - _pointer: ctypes.c_void_p - def __init__(self, validator: "Bls12381PublicKey",duration: "Duration"): - _UniffiConverterTypeBls12381PublicKey.check_lower(validator) + A builder for creating transactions. Use [`finish`](Self::finish) to + finalize the transaction data. +""" + + _handle: ctypes.c_uint64 + @classmethod + async def init(cls, sender: Address,client: GraphQlClient) -> TransactionBuilder: + """ + Create a new transaction builder and initialize its elements to default. +""" - _UniffiConverterDuration.check_lower(duration) + _UniffiFfiConverterTypeAddress.check_lower(sender) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorexecutiontimeobservation_new, - _UniffiConverterTypeBls12381PublicKey.lower(validator), - _UniffiConverterDuration.lower(duration)) + _UniffiFfiConverterTypeGraphQLClient.check_lower(client) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeAddress.lower(sender), + _UniffiFfiConverterTypeGraphQLClient.lower(client), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionbuilder_init(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64, + _uniffi_lift_return, + _uniffi_error_converter, + ) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorexecutiontimeobservation, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionbuilder, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorexecutiontimeobservation, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionbuilder, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def duration(self, ) -> "Duration": - return _UniffiConverterDuration.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_duration,self._uniffi_clone_pointer(),) + async def dry_run(self, skip_checks: bool = False) -> DryRunResult: + """ + Dry run the transaction. +""" + + _UniffiFfiConverterBoolean.check_lower(skip_checks) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBoolean.lower(skip_checks), ) - - - - - - def validator(self, ) -> "Bls12381PublicKey": - return _UniffiConverterTypeBls12381PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorexecutiontimeobservation_validator,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeDryRunResult.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_dry_run(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, ) - - - - - - -class _UniffiConverterTypeValidatorExecutionTimeObservation: - - @staticmethod - def lift(value: int): - return ValidatorExecutionTimeObservation._make_instance_(value) - - @staticmethod - def check_lower(value: ValidatorExecutionTimeObservation): - if not isinstance(value, ValidatorExecutionTimeObservation): - raise TypeError("Expected ValidatorExecutionTimeObservation instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: ValidatorExecutionTimeObservationProtocol): - if not isinstance(value, ValidatorExecutionTimeObservation): - raise TypeError("Expected ValidatorExecutionTimeObservation instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: ValidatorExecutionTimeObservationProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ValidatorSignatureProtocol(typing.Protocol): - """ - A signature from a Validator - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-signature = u64 ; epoch - bls-public-key - bls-signature - ``` - """ - - def epoch(self, ): - raise NotImplementedError - def public_key(self, ): - raise NotImplementedError - def signature(self, ): - raise NotImplementedError -# ValidatorSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorSignature(): - """ - A signature from a Validator - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - validator-signature = u64 ; epoch - bls-public-key - bls-signature - ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, epoch: "int",public_key: "Bls12381PublicKey",signature: "Bls12381Signature"): - _UniffiConverterUInt64.check_lower(epoch) + async def execute(self, keypair: SimpleKeypair,wait_for_finalization: bool = False) -> typing.Optional[TransactionEffects]: + """ + Execute the transaction and optionally wait for finalization. +""" - _UniffiConverterTypeBls12381PublicKey.check_lower(public_key) + _UniffiFfiConverterTypeSimpleKeypair.check_lower(keypair) - _UniffiConverterTypeBls12381Signature.check_lower(signature) + _UniffiFfiConverterBoolean.check_lower(wait_for_finalization) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeSimpleKeypair.lower(keypair), + _UniffiFfiConverterBoolean.lower(wait_for_finalization), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTransactionEffects.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + async def execute_with_sponsor(self, keypair: SimpleKeypair,sponsor_keypair: SimpleKeypair,wait_for_finalization: bool = False) -> typing.Optional[TransactionEffects]: + """ + Execute the transaction and optionally wait for finalization. +""" - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorsignature_new, - _UniffiConverterUInt64.lower(epoch), - _UniffiConverterTypeBls12381PublicKey.lower(public_key), - _UniffiConverterTypeBls12381Signature.lower(signature)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorsignature, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorsignature, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - + _UniffiFfiConverterTypeSimpleKeypair.check_lower(keypair) + + _UniffiFfiConverterTypeSimpleKeypair.check_lower(sponsor_keypair) + + _UniffiFfiConverterBoolean.check_lower(wait_for_finalization) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeSimpleKeypair.lower(keypair), + _UniffiFfiConverterTypeSimpleKeypair.lower(sponsor_keypair), + _UniffiFfiConverterBoolean.lower(wait_for_finalization), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeTransactionEffects.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_execute_with_sponsor(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + _uniffi_lift_return, + _uniffi_error_converter, + ) + def expiration(self, epoch: int) -> TransactionBuilder: + """ + Set the expiration of the transaction to be a specific epoch. +""" + + _UniffiFfiConverterUInt64.check_lower(epoch) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt64.lower(epoch), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_expiration, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + async def finish(self, ) -> Transaction: + """ + Convert this builder into a transaction. +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransaction.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_finish(*_uniffi_lowered_args), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u64, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u64, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u64, + _uniffi_lift_return, + _uniffi_error_converter, + ) + def gas(self, object_id: ObjectId) -> TransactionBuilder: + """ + Add a gas object to use to pay for the transaction. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(object_id) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(object_id), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def gas_budget(self, budget: int) -> TransactionBuilder: + """ + Set the gas budget for the transaction. +""" + + _UniffiFfiConverterUInt64.check_lower(budget) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt64.lower(budget), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def gas_price(self, price: int) -> TransactionBuilder: + """ + Set the gas price for the transaction. +""" + + _UniffiFfiConverterUInt64.check_lower(price) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterUInt64.lower(price), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def gas_station_sponsor(self, url: str,duration: typing.Union[object, typing.Optional[Duration]] = _DEFAULT,headers: typing.Union[object, typing.Optional[dict[str, typing.List[str]]]] = _DEFAULT) -> TransactionBuilder: + """ + Set the gas station sponsor. +""" + + _UniffiFfiConverterString.check_lower(url) + + if duration is _DEFAULT: + duration = None + _UniffiFfiConverterOptionalDuration.check_lower(duration) + + if headers is _DEFAULT: + headers = None + _UniffiFfiConverterOptionalMapStringSequenceString.check_lower(headers) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterString.lower(url), + _UniffiFfiConverterOptionalDuration.lower(duration), + _UniffiFfiConverterOptionalMapStringSequenceString.lower(headers), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def make_move_vec(self, elements: typing.List[PtbArgument],type_tag: TypeTag,name: str) -> TransactionBuilder: + """ + Make a move vector from a list of elements. The elements must all be of + the type indicated by `type_tag`. +""" + + _UniffiFfiConverterSequenceTypePTBArgument.check_lower(elements) + + _UniffiFfiConverterTypeTypeTag.check_lower(type_tag) + + _UniffiFfiConverterString.check_lower(name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterSequenceTypePTBArgument.lower(elements), + _UniffiFfiConverterTypeTypeTag.lower(type_tag), + _UniffiFfiConverterString.lower(name), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_make_move_vec, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def merge_coins(self, coin: ObjectId,coins_to_merge: typing.List[ObjectId]) -> TransactionBuilder: + """ + Merge a list of coins into a single coin, without producing any result. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(coin) + + _UniffiFfiConverterSequenceTypeObjectId.check_lower(coins_to_merge) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(coin), + _UniffiFfiConverterSequenceTypeObjectId.lower(coins_to_merge), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_merge_coins, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def move_call(self, package: Address,module: Identifier,function: Identifier,arguments: typing.Union[object, typing.List[PtbArgument]] = _DEFAULT,type_args: typing.Union[object, typing.List[TypeTag]] = _DEFAULT,names: typing.Union[object, typing.List[str]] = _DEFAULT) -> TransactionBuilder: + """ + Call a Move function with the given arguments. +""" + + _UniffiFfiConverterTypeAddress.check_lower(package) + + _UniffiFfiConverterTypeIdentifier.check_lower(module) + + _UniffiFfiConverterTypeIdentifier.check_lower(function) + + if arguments is _DEFAULT: + arguments = [] + _UniffiFfiConverterSequenceTypePTBArgument.check_lower(arguments) + + if type_args is _DEFAULT: + type_args = [] + _UniffiFfiConverterSequenceTypeTypeTag.check_lower(type_args) + + if names is _DEFAULT: + names = [] + _UniffiFfiConverterSequenceString.check_lower(names) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(package), + _UniffiFfiConverterTypeIdentifier.lower(module), + _UniffiFfiConverterTypeIdentifier.lower(function), + _UniffiFfiConverterSequenceTypePTBArgument.lower(arguments), + _UniffiFfiConverterSequenceTypeTypeTag.lower(type_args), + _UniffiFfiConverterSequenceString.lower(names), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_move_call, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def publish(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId],upgrade_cap_name: str) -> TransactionBuilder: + """ + Publish a list of modules with the given dependencies. The result + assigned to `upgrade_cap_name` is the `0x2::package::UpgradeCap` + Move type. Note that the upgrade capability needs to be handled + after this call: + - transfer it to the transaction sender or another address + - burn it + - wrap it for access control + - discard the it to make a package immutable - def epoch(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_epoch,self._uniffi_clone_pointer(),) + The arguments required for this command are: + - `modules`: is the modules' bytecode to be published + - `dependencies`: is the list of IDs of the transitive dependencies of + the package +""" + + _UniffiFfiConverterSequenceBytes.check_lower(modules) + + _UniffiFfiConverterSequenceTypeObjectId.check_lower(dependencies) + + _UniffiFfiConverterString.check_lower(upgrade_cap_name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterSequenceBytes.lower(modules), + _UniffiFfiConverterSequenceTypeObjectId.lower(dependencies), + _UniffiFfiConverterString.lower(upgrade_cap_name), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_publish, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def send_coins(self, coins: typing.List[ObjectId],recipient: Address,amount: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> TransactionBuilder: + """ + Transfer some coins to a recipient address. If multiple coins are + provided then they will be merged. +""" + + _UniffiFfiConverterSequenceTypeObjectId.check_lower(coins) + + _UniffiFfiConverterTypeAddress.check_lower(recipient) + + if amount is _DEFAULT: + amount = None + _UniffiFfiConverterOptionalUInt64.check_lower(amount) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterSequenceTypeObjectId.lower(coins), + _UniffiFfiConverterTypeAddress.lower(recipient), + _UniffiFfiConverterOptionalUInt64.lower(amount), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_coins, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def send_iota(self, recipient: Address,amount: typing.Union[object, typing.Optional[int]] = _DEFAULT) -> TransactionBuilder: + """ + Send IOTA to a recipient address. +""" + + _UniffiFfiConverterTypeAddress.check_lower(recipient) + + if amount is _DEFAULT: + amount = None + _UniffiFfiConverterOptionalUInt64.check_lower(amount) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(recipient), + _UniffiFfiConverterOptionalUInt64.lower(amount), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_send_iota, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def split_coins(self, coin: ObjectId,amounts: typing.List[int],names: typing.Union[object, typing.List[str]] = _DEFAULT) -> TransactionBuilder: + """ + Split a coin by the provided amounts. +""" + + _UniffiFfiConverterTypeObjectId.check_lower(coin) + + _UniffiFfiConverterSequenceUInt64.check_lower(amounts) + + if names is _DEFAULT: + names = [] + _UniffiFfiConverterSequenceString.check_lower(names) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeObjectId.lower(coin), + _UniffiFfiConverterSequenceUInt64.lower(amounts), + _UniffiFfiConverterSequenceString.lower(names), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_split_coins, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def sponsor(self, sponsor: Address) -> TransactionBuilder: + """ + Set the sponsor of the transaction. +""" + + _UniffiFfiConverterTypeAddress.check_lower(sponsor) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(sponsor), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_sponsor, + *_uniffi_lowered_args, ) - - - - - - def public_key(self, ) -> "Bls12381PublicKey": - return _UniffiConverterTypeBls12381PublicKey.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_public_key,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def transfer_objects(self, recipient: Address,objects: typing.List[PtbArgument]) -> TransactionBuilder: + """ + Transfer a list of objects to the given address, without producing any + result. +""" + + _UniffiFfiConverterTypeAddress.check_lower(recipient) + + _UniffiFfiConverterSequenceTypePTBArgument.check_lower(objects) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeAddress.lower(recipient), + _UniffiFfiConverterSequenceTypePTBArgument.lower(objects), ) - - - - - - def signature(self, ) -> "Bls12381Signature": - return _UniffiConverterTypeBls12381Signature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorsignature_signature,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_transfer_objects, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def upgrade(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId],package: ObjectId,ticket: PtbArgument,name: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> TransactionBuilder: + """ + Upgrade a Move package. + - `modules`: is the modules' bytecode for the modules to be published + - `dependencies`: is the list of IDs of the transitive dependencies of + the package to be upgraded + - `package`: is the ID of the current package being upgraded + - `ticket`: is the upgrade ticket - - - - -class _UniffiConverterTypeValidatorSignature: - - @staticmethod - def lift(value: int): - return ValidatorSignature._make_instance_(value) - - @staticmethod - def check_lower(value: ValidatorSignature): - if not isinstance(value, ValidatorSignature): - raise TypeError("Expected ValidatorSignature instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: ValidatorSignatureProtocol): - if not isinstance(value, ValidatorSignature): - raise TypeError("Expected ValidatorSignature instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: ValidatorSignatureProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class VersionAssignmentProtocol(typing.Protocol): - """ - Object version assignment from consensus - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - version-assignment = object-id u64 - ``` - """ - - def object_id(self, ): - raise NotImplementedError - def version(self, ): - raise NotImplementedError -# VersionAssignment is a Rust-only trait - it's a wrapper around a Rust implementation. -class VersionAssignment(): - """ - Object version assignment from consensus - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - version-assignment = object-id u64 - ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, object_id: "ObjectId",version: "int"): - _UniffiConverterTypeObjectId.check_lower(object_id) + To get the ticket, you have to call the + `0x2::package::authorize_upgrade` function, and pass the package + ID, the upgrade policy, and package digest. +""" - _UniffiConverterUInt64.check_lower(version) + _UniffiFfiConverterSequenceBytes.check_lower(modules) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_versionassignment_new, - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterUInt64.lower(version)) - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_versionassignment, pointer) - - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_versionassignment, self._pointer) - - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - def object_id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_object_id,self._uniffi_clone_pointer(),) + _UniffiFfiConverterSequenceTypeObjectId.check_lower(dependencies) + + _UniffiFfiConverterTypeObjectId.check_lower(package) + + _UniffiFfiConverterTypePTBArgument.check_lower(ticket) + + if name is _DEFAULT: + name = None + _UniffiFfiConverterOptionalString.check_lower(name) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterSequenceBytes.lower(modules), + _UniffiFfiConverterSequenceTypeObjectId.lower(dependencies), + _UniffiFfiConverterTypeObjectId.lower(package), + _UniffiFfiConverterTypePTBArgument.lower(ticket), + _UniffiFfiConverterOptionalString.lower(name), ) - - - - - - def version(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_versionassignment_version,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionBuilder.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_upgrade, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeVersionAssignment: - +class _UniffiFfiConverterTypeTransactionBuilder: @staticmethod - def lift(value: int): - return VersionAssignment._make_instance_(value) + def lift(value: int) -> TransactionBuilder: + return TransactionBuilder._uniffi_make_instance(value) @staticmethod - def check_lower(value: VersionAssignment): - if not isinstance(value, VersionAssignment): - raise TypeError("Expected VersionAssignment instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionBuilder): + if not isinstance(value, TransactionBuilder): + raise TypeError("Expected TransactionBuilder instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: VersionAssignmentProtocol): - if not isinstance(value, VersionAssignment): - raise TypeError("Expected VersionAssignment instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: TransactionBuilder) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> TransactionBuilder: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: VersionAssignmentProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionBuilder, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ZkLoginAuthenticatorProtocol(typing.Protocol): + + +class TransactionEventsProtocol(typing.Protocol): """ - A zklogin authenticator + Events emitted during the successful execution of a transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-bcs = bytes ; contents are defined by - zklogin = zklogin-flag - zklogin-inputs - u64 ; max epoch - simple-signature + transaction-events = vector event ``` - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - - def inputs(self, ): - raise NotImplementedError - def max_epoch(self, ): +""" + + def digest(self, ) -> Digest: raise NotImplementedError - def signature(self, ): + def events(self, ) -> typing.List[Event]: raise NotImplementedError -# ZkLoginAuthenticator is a Rust-only trait - it's a wrapper around a Rust implementation. -class ZkLoginAuthenticator(): + +class TransactionEvents(TransactionEventsProtocol): """ - A zklogin authenticator + Events emitted during the successful execution of a transaction # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-bcs = bytes ; contents are defined by - zklogin = zklogin-flag - zklogin-inputs - u64 ; max epoch - simple-signature + transaction-events = vector event ``` - - Note: Due to historical reasons, signatures are serialized slightly - different from the majority of the types in IOTA. In particular if a - signature is ever embedded in another structure it generally is serialized - as `bytes` meaning it has a length prefix that defines the length of - the completely serialized signature. - """ - - _pointer: ctypes.c_void_p - def __init__(self, inputs: "ZkLoginInputs",max_epoch: "int",signature: "SimpleSignature"): - _UniffiConverterTypeZkLoginInputs.check_lower(inputs) - - _UniffiConverterUInt64.check_lower(max_epoch) - - _UniffiConverterTypeSimpleSignature.check_lower(signature) +""" + + _handle: ctypes.c_uint64 + def __init__(self, events: typing.List[Event]): - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new, - _UniffiConverterTypeZkLoginInputs.lower(inputs), - _UniffiConverterUInt64.lower(max_epoch), - _UniffiConverterTypeSimpleSignature.lower(signature)) + _UniffiFfiConverterSequenceTypeEvent.check_lower(events) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeEvent.lower(events), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransactionEvents.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionevents_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevents, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevents, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def inputs(self, ) -> "ZkLoginInputs": - return _UniffiConverterTypeZkLoginInputs.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs,self._uniffi_clone_pointer(),) + def digest(self, ) -> Digest: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def max_epoch(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeDigest.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_digest, + *_uniffi_lowered_args, ) - - - - - - def signature(self, ) -> "SimpleSignature": - return _UniffiConverterTypeSimpleSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def events(self, ) -> typing.List[Event]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeEvent.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionevents_events, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeZkLoginAuthenticator: - +class _UniffiFfiConverterTypeTransactionEvents: @staticmethod - def lift(value: int): - return ZkLoginAuthenticator._make_instance_(value) + def lift(value: int) -> TransactionEvents: + return TransactionEvents._uniffi_make_instance(value) @staticmethod - def check_lower(value: ZkLoginAuthenticator): - if not isinstance(value, ZkLoginAuthenticator): - raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionEvents): + if not isinstance(value, TransactionEvents): + raise TypeError("Expected TransactionEvents instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ZkLoginAuthenticatorProtocol): - if not isinstance(value, ZkLoginAuthenticator): - raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: TransactionEvents) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> TransactionEvents: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ZkLoginAuthenticatorProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEvents, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ZkLoginInputsProtocol(typing.Protocol): + + +class TransferObjectsProtocol(typing.Protocol): """ - A zklogin groth16 proof and the required inputs to perform proof - verification. + Command to transfer ownership of a set of objects to an address # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-inputs = zklogin-proof - zklogin-claim - string ; base64url-unpadded encoded JwtHeader - bn254-field-element ; address_seed + transfer-objects = (vector argument) argument ``` - """ - - def address_seed(self, ): - raise NotImplementedError - def header_base64(self, ): - raise NotImplementedError - def iss(self, ): - raise NotImplementedError - def iss_base64_details(self, ): - raise NotImplementedError - def jwk_id(self, ): - raise NotImplementedError - def proof_points(self, ): +""" + + def address(self, ) -> Argument: + """ + The address to transfer ownership to +""" raise NotImplementedError - def public_identifier(self, ): + def objects(self, ) -> typing.List[Argument]: + """ + Set of objects to transfer +""" raise NotImplementedError -# ZkLoginInputs is a Rust-only trait - it's a wrapper around a Rust implementation. -class ZkLoginInputs(): + +class TransferObjects(TransferObjectsProtocol): """ - A zklogin groth16 proof and the required inputs to perform proof - verification. + Command to transfer ownership of a set of objects to an address # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-inputs = zklogin-proof - zklogin-claim - string ; base64url-unpadded encoded JwtHeader - bn254-field-element ; address_seed + transfer-objects = (vector argument) argument ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, proof_points: "ZkLoginProof",iss_base64_details: "ZkLoginClaim",header_base64: "str",address_seed: "Bn254FieldElement"): - _UniffiConverterTypeZkLoginProof.check_lower(proof_points) - - _UniffiConverterTypeZkLoginClaim.check_lower(iss_base64_details) - - _UniffiConverterString.check_lower(header_base64) +""" + + _handle: ctypes.c_uint64 + def __init__(self, objects: typing.List[Argument],address: Argument): - _UniffiConverterTypeBn254FieldElement.check_lower(address_seed) + _UniffiFfiConverterSequenceTypeArgument.check_lower(objects) - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new, - _UniffiConverterTypeZkLoginProof.lower(proof_points), - _UniffiConverterTypeZkLoginClaim.lower(iss_base64_details), - _UniffiConverterString.lower(header_base64), - _UniffiConverterTypeBn254FieldElement.lower(address_seed)) + _UniffiFfiConverterTypeArgument.check_lower(address) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceTypeArgument.lower(objects), + _UniffiFfiConverterTypeArgument.lower(address), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTransferObjects.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transferobjects_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transferobjects, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transferobjects, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def address_seed(self, ) -> "Bn254FieldElement": - return _UniffiConverterTypeBn254FieldElement.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed,self._uniffi_clone_pointer(),) - ) - - - - - - def header_base64(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64,self._uniffi_clone_pointer(),) - ) - - - - - - def iss(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss,self._uniffi_clone_pointer(),) - ) - - - - - - def iss_base64_details(self, ) -> "ZkLoginClaim": - return _UniffiConverterTypeZkLoginClaim.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details,self._uniffi_clone_pointer(),) - ) - - - - - - def jwk_id(self, ) -> "JwkId": - return _UniffiConverterTypeJwkId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_jwk_id,self._uniffi_clone_pointer(),) - ) - - - - - - def proof_points(self, ) -> "ZkLoginProof": - return _UniffiConverterTypeZkLoginProof.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points,self._uniffi_clone_pointer(),) + def address(self, ) -> Argument: + """ + The address to transfer ownership to +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def public_identifier(self, ) -> "ZkLoginPublicIdentifier": - return _UniffiConverterTypeZkLoginPublicIdentifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_public_identifier,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_address, + *_uniffi_lowered_args, ) + return _uniffi_lift_return(_uniffi_ffi_result) + def objects(self, ) -> typing.List[Argument]: + """ + Set of objects to transfer +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transferobjects_objects, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeZkLoginInputs: - +class _UniffiFfiConverterTypeTransferObjects: @staticmethod - def lift(value: int): - return ZkLoginInputs._make_instance_(value) + def lift(value: int) -> TransferObjects: + return TransferObjects._uniffi_make_instance(value) @staticmethod - def check_lower(value: ZkLoginInputs): - if not isinstance(value, ZkLoginInputs): - raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) + def check_lower(value: TransferObjects): + if not isinstance(value, TransferObjects): + raise TypeError("Expected TransferObjects instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ZkLoginInputsProtocol): - if not isinstance(value, ZkLoginInputs): - raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: TransferObjects) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> TransferObjects: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ZkLoginInputsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransferObjects, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ZkLoginProofProtocol(typing.Protocol): + + +class UpgradeProtocol(typing.Protocol): """ - A zklogin groth16 proof + Command to upgrade an already published package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-proof = circom-g1 circom-g2 circom-g1 + upgrade = (vector bytes) ; move modules + (vector object-id) ; dependencies + object-id ; package-id of the package + argument ; upgrade ticket ``` - """ - - def a(self, ): +""" + + def dependencies(self, ) -> typing.List[ObjectId]: + """ + Set of packages that the to-be published package depends on +""" + raise NotImplementedError + def modules(self, ) -> typing.List[bytes]: + """ + The serialized move modules +""" raise NotImplementedError - def b(self, ): + def package(self, ) -> ObjectId: + """ + Package id of the package to upgrade +""" raise NotImplementedError - def c(self, ): + def ticket(self, ) -> Argument: + """ + Ticket authorizing the upgrade +""" raise NotImplementedError -# ZkLoginProof is a Rust-only trait - it's a wrapper around a Rust implementation. -class ZkLoginProof(): + +class Upgrade(UpgradeProtocol): """ - A zklogin groth16 proof + Command to upgrade an already published package # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - zklogin-proof = circom-g1 circom-g2 circom-g1 + upgrade = (vector bytes) ; move modules + (vector object-id) ; dependencies + object-id ; package-id of the package + argument ; upgrade ticket ``` - """ - - _pointer: ctypes.c_void_p - def __init__(self, a: "CircomG1",b: "CircomG2",c: "CircomG1"): - _UniffiConverterTypeCircomG1.check_lower(a) +""" + + _handle: ctypes.c_uint64 + def __init__(self, modules: typing.List[bytes],dependencies: typing.List[ObjectId],package: ObjectId,ticket: Argument): + + _UniffiFfiConverterSequenceBytes.check_lower(modules) - _UniffiConverterTypeCircomG2.check_lower(b) + _UniffiFfiConverterSequenceTypeObjectId.check_lower(dependencies) - _UniffiConverterTypeCircomG1.check_lower(c) + _UniffiFfiConverterTypeObjectId.check_lower(package) - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new, - _UniffiConverterTypeCircomG1.lower(a), - _UniffiConverterTypeCircomG2.lower(b), - _UniffiConverterTypeCircomG1.lower(c)) + _UniffiFfiConverterTypeArgument.check_lower(ticket) + _uniffi_lowered_args = ( + _UniffiFfiConverterSequenceBytes.lower(modules), + _UniffiFfiConverterSequenceTypeObjectId.lower(dependencies), + _UniffiFfiConverterTypeObjectId.lower(package), + _UniffiFfiConverterTypeArgument.lower(ticket), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUpgrade.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_upgrade_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_upgrade, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_upgrade, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def a(self, ) -> "CircomG1": - return _UniffiConverterTypeCircomG1.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a,self._uniffi_clone_pointer(),) + def dependencies(self, ) -> typing.List[ObjectId]: + """ + Set of packages that the to-be published package depends on +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) - - - - - - def b(self, ) -> "CircomG2": - return _UniffiConverterTypeCircomG2.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b,self._uniffi_clone_pointer(),) + _uniffi_lift_return = _UniffiFfiConverterSequenceTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_dependencies, + *_uniffi_lowered_args, ) - - - - - - def c(self, ) -> "CircomG1": - return _UniffiConverterTypeCircomG1.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c,self._uniffi_clone_pointer(),) + return _uniffi_lift_return(_uniffi_ffi_result) + def modules(self, ) -> typing.List[bytes]: + """ + The serialized move modules +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterSequenceBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_modules, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def package(self, ) -> ObjectId: + """ + Package id of the package to upgrade +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeObjectId.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_package, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def ticket(self, ) -> Argument: + """ + Ticket authorizing the upgrade +""" + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeArgument.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_upgrade_ticket, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeZkLoginProof: - +class _UniffiFfiConverterTypeUpgrade: @staticmethod - def lift(value: int): - return ZkLoginProof._make_instance_(value) + def lift(value: int) -> Upgrade: + return Upgrade._uniffi_make_instance(value) @staticmethod - def check_lower(value: ZkLoginProof): - if not isinstance(value, ZkLoginProof): - raise TypeError("Expected ZkLoginProof instance, {} found".format(type(value).__name__)) + def check_lower(value: Upgrade): + if not isinstance(value, Upgrade): + raise TypeError("Expected Upgrade instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ZkLoginProofProtocol): - if not isinstance(value, ZkLoginProof): - raise TypeError("Expected ZkLoginProof instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: Upgrade) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> Upgrade: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ZkLoginProofProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Upgrade, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ZkLoginPublicIdentifierProtocol(typing.Protocol): - """ - Public Key equivalent for Zklogin authenticators - - A `ZkLoginPublicIdentifier` is the equivalent of a public key for other - account authenticators, and contains the information required to derive the - onchain account [`Address`] for a Zklogin authenticator. - - ## Note - - Due to a historical bug that was introduced in the IOTA Typescript SDK when - the zklogin authenticator was first introduced, there are now possibly two - "valid" addresses for each zklogin authenticator depending on the - bit-pattern of the `address_seed` value. - - The original bug incorrectly derived a zklogin's address by stripping any - leading zero-bytes that could have been present in the 32-byte length - `address_seed` value prior to hashing, leading to a different derived - address. This incorrectly derived address was presented to users of various - wallets, leading them to sending funds to these addresses that they couldn't - access. Instead of letting these users lose any assets that were sent to - these addresses, the IOTA network decided to change the protocol to allow - for a zklogin authenticator who's `address_seed` value had leading - zero-bytes be authorized to sign for both the addresses derived from both - the unpadded and padded `address_seed` value. - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - zklogin-public-identifier-bcs = bytes ; where the contents are defined by - ; - - zklogin-public-identifier = zklogin-public-identifier-iss - address-seed - - zklogin-public-identifier-unpadded = zklogin-public-identifier-iss - address-seed-unpadded - - ; The iss, or issuer, is a utf8 string that is less than 255 bytes long - ; and is serialized with the iss's length in bytes as a u8 followed by - ; the bytes of the iss - zklogin-public-identifier-iss = u8 *255(OCTET) - - ; A Bn254FieldElement serialized as a 32-byte big-endian value - address-seed = 32(OCTET) - - ; A Bn254FieldElement serialized as a 32-byte big-endian value - ; with any leading zero bytes stripped - address-seed-unpadded = %x00 / %x01-ff *31(OCTET) - ``` - [`Address`]: crate::Address +class UserSignatureVerifierProtocol(typing.Protocol): """ - - def address_seed(self, ): - raise NotImplementedError - def derive_address(self, ): - """ - Provides an iterator over the addresses that correspond to this zklogin - authenticator. - - In the majority of instances this will only yield a single address, - except for the instances where the `address_seed` value has a - leading zero-byte, in such cases the returned iterator will yield - two addresses. - """ - - raise NotImplementedError - def derive_address_padded(self, ): - """ - Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the - byte length of the `iss` followed by the `iss` bytes themselves and - the full 32 byte `address_seed` value, all prefixed with the zklogin - `SignatureScheme` flag (`0x05`). - - `hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )` - """ - + Verifier that will verify all UserSignature variants +""" + + def verify(self, message: bytes,signature: UserSignature) -> None: raise NotImplementedError - def derive_address_unpadded(self, ): - """ - Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the - byte length of the `iss` followed by the `iss` bytes themselves and - the `address_seed` bytes with any leading zero-bytes stripped, all - prefixed with the zklogin `SignatureScheme` flag (`0x05`). - - `hash( 0x05 || iss_bytes_len || iss_bytes || - unpadded_32_byte_address_seed )` - """ - + def with_zklogin_verifier(self, zklogin_verifier: ZkloginVerifier) -> UserSignatureVerifier: raise NotImplementedError - def iss(self, ): + def zklogin_verifier(self, ) -> typing.Optional[ZkloginVerifier]: raise NotImplementedError -# ZkLoginPublicIdentifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class ZkLoginPublicIdentifier(): - """ - Public Key equivalent for Zklogin authenticators - - A `ZkLoginPublicIdentifier` is the equivalent of a public key for other - account authenticators, and contains the information required to derive the - onchain account [`Address`] for a Zklogin authenticator. - - ## Note - - Due to a historical bug that was introduced in the IOTA Typescript SDK when - the zklogin authenticator was first introduced, there are now possibly two - "valid" addresses for each zklogin authenticator depending on the - bit-pattern of the `address_seed` value. - - The original bug incorrectly derived a zklogin's address by stripping any - leading zero-bytes that could have been present in the 32-byte length - `address_seed` value prior to hashing, leading to a different derived - address. This incorrectly derived address was presented to users of various - wallets, leading them to sending funds to these addresses that they couldn't - access. Instead of letting these users lose any assets that were sent to - these addresses, the IOTA network decided to change the protocol to allow - for a zklogin authenticator who's `address_seed` value had leading - zero-bytes be authorized to sign for both the addresses derived from both - the unpadded and padded `address_seed` value. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - zklogin-public-identifier-bcs = bytes ; where the contents are defined by - ; - - zklogin-public-identifier = zklogin-public-identifier-iss - address-seed - - zklogin-public-identifier-unpadded = zklogin-public-identifier-iss - address-seed-unpadded - - ; The iss, or issuer, is a utf8 string that is less than 255 bytes long - ; and is serialized with the iss's length in bytes as a u8 followed by - ; the bytes of the iss - zklogin-public-identifier-iss = u8 *255(OCTET) - - ; A Bn254FieldElement serialized as a 32-byte big-endian value - address-seed = 32(OCTET) - - ; A Bn254FieldElement serialized as a 32-byte big-endian value - ; with any leading zero bytes stripped - address-seed-unpadded = %x00 / %x01-ff *31(OCTET) - ``` - [`Address`]: crate::Address +class UserSignatureVerifier(UserSignatureVerifierProtocol): """ - - _pointer: ctypes.c_void_p - def __init__(self, iss: "str",address_seed: "Bn254FieldElement"): - _UniffiConverterString.check_lower(iss) - - _UniffiConverterTypeBn254FieldElement.check_lower(address_seed) - - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new, - _UniffiConverterString.lower(iss), - _UniffiConverterTypeBn254FieldElement.lower(address_seed)) + Verifier that will verify all UserSignature variants +""" + + _handle: ctypes.c_uint64 + def __init__(self, ): + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignatureVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignatureverifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignatureverifier, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignatureverifier, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - - - def address_seed(self, ) -> "Bn254FieldElement": - return _UniffiConverterTypeBn254FieldElement.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed,self._uniffi_clone_pointer(),) + def verify(self, message: bytes,signature: UserSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeUserSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeUserSignature.lower(signature), ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def with_zklogin_verifier(self, zklogin_verifier: ZkloginVerifier) -> UserSignatureVerifier: + + _UniffiFfiConverterTypeZkloginVerifier.check_lower(zklogin_verifier) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeZkloginVerifier.lower(zklogin_verifier), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeUserSignatureVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_with_zklogin_verifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def zklogin_verifier(self, ) -> typing.Optional[ZkloginVerifier]: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterOptionalTypeZkloginVerifier.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignatureverifier_zklogin_verifier, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - def derive_address(self, ) -> "typing.List[Address]": - """ - Provides an iterator over the addresses that correspond to this zklogin - authenticator. - - In the majority of instances this will only yield a single address, - except for the instances where the `address_seed` value has a - leading zero-byte, in such cases the returned iterator will yield - two addresses. - """ +class _UniffiFfiConverterTypeUserSignatureVerifier: + @staticmethod + def lift(value: int) -> UserSignatureVerifier: + return UserSignatureVerifier._uniffi_make_instance(value) - return _UniffiConverterSequenceTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address,self._uniffi_clone_pointer(),) - ) + @staticmethod + def check_lower(value: UserSignatureVerifier): + if not isinstance(value, UserSignatureVerifier): + raise TypeError("Expected UserSignatureVerifier instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: UserSignatureVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> UserSignatureVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: UserSignatureVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) - def derive_address_padded(self, ) -> "Address": - """ - Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the - byte length of the `iss` followed by the `iss` bytes themselves and - the full 32 byte `address_seed` value, all prefixed with the zklogin - `SignatureScheme` flag (`0x05`). +class ValidatorAggregatedSignatureProtocol(typing.Protocol): + """ + An aggregated signature from multiple Validators. - `hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )` - """ + # BCS - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_padded,self._uniffi_clone_pointer(),) - ) + The BCS serialized form for this type is defined by the following ABNF: + ```text + validator-aggregated-signature = u64 ; epoch + bls-signature + roaring-bitmap + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps + ``` + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. +""" + + def bitmap_bytes(self, ) -> bytes: + raise NotImplementedError + def epoch(self, ) -> int: + raise NotImplementedError + def signature(self, ) -> Bls12381Signature: + raise NotImplementedError +class ValidatorAggregatedSignature(ValidatorAggregatedSignatureProtocol): + """ + An aggregated signature from multiple Validators. + # BCS - def derive_address_unpadded(self, ) -> "Address": - """ - Derive an `Address` from this `ZkLoginPublicIdentifier` by hashing the - byte length of the `iss` followed by the `iss` bytes themselves and - the `address_seed` bytes with any leading zero-bytes stripped, all - prefixed with the zklogin `SignatureScheme` flag (`0x05`). + The BCS serialized form for this type is defined by the following ABNF: - `hash( 0x05 || iss_bytes_len || iss_bytes || - unpadded_32_byte_address_seed )` - """ + ```text + validator-aggregated-signature = u64 ; epoch + bls-signature + roaring-bitmap + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps + ``` - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_derive_address_unpadded,self._uniffi_clone_pointer(),) + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. +""" + + _handle: ctypes.c_uint64 + def __init__(self, epoch: int,signature: Bls12381Signature,bitmap_bytes: bytes): + + _UniffiFfiConverterUInt64.check_lower(epoch) + + _UniffiFfiConverterTypeBls12381Signature.check_lower(signature) + + _UniffiFfiConverterBytes.check_lower(bitmap_bytes) + _uniffi_lowered_args = ( + _UniffiFfiConverterUInt64.lower(epoch), + _UniffiFfiConverterTypeBls12381Signature.lower(signature), + _UniffiFfiConverterBytes.lower(bitmap_bytes), ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorAggregatedSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatoraggregatedsignature_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatoraggregatedsignature, handle) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatoraggregatedsignature, self._handle) - - - def iss(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss,self._uniffi_clone_pointer(),) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def bitmap_bytes(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_bitmap_bytes, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def epoch(self, ) -> int: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterUInt64.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_epoch, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def signature(self, ) -> Bls12381Signature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBls12381Signature.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatoraggregatedsignature_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeZkLoginPublicIdentifier: - +class _UniffiFfiConverterTypeValidatorAggregatedSignature: @staticmethod - def lift(value: int): - return ZkLoginPublicIdentifier._make_instance_(value) + def lift(value: int) -> ValidatorAggregatedSignature: + return ValidatorAggregatedSignature._uniffi_make_instance(value) @staticmethod - def check_lower(value: ZkLoginPublicIdentifier): - if not isinstance(value, ZkLoginPublicIdentifier): - raise TypeError("Expected ZkLoginPublicIdentifier instance, {} found".format(type(value).__name__)) + def check_lower(value: ValidatorAggregatedSignature): + if not isinstance(value, ValidatorAggregatedSignature): + raise TypeError("Expected ValidatorAggregatedSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ZkLoginPublicIdentifierProtocol): - if not isinstance(value, ZkLoginPublicIdentifier): - raise TypeError("Expected ZkLoginPublicIdentifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ValidatorAggregatedSignature) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ValidatorAggregatedSignature: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ZkLoginPublicIdentifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ValidatorAggregatedSignature, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ZkloginVerifierProtocol(typing.Protocol): - def jwks(self, ): + + +class ValidatorCommitteeSignatureAggregatorProtocol(typing.Protocol): + + def add_signature(self, signature: ValidatorSignature) -> None: raise NotImplementedError - def verify(self, message: "bytes",authenticator: "ZkLoginAuthenticator"): + def committee(self, ) -> ValidatorCommittee: raise NotImplementedError - def with_jwks(self, jwks: "dict[JwkId, Jwk]"): + def finish(self, ) -> ValidatorAggregatedSignature: raise NotImplementedError -# ZkloginVerifier is a Rust-only trait - it's a wrapper around a Rust implementation. -class ZkloginVerifier(): - _pointer: ctypes.c_void_p + +class ValidatorCommitteeSignatureAggregator(ValidatorCommitteeSignatureAggregatorProtocol): + + _handle: ctypes.c_uint64 + @classmethod + def new_checkpoint_summary(cls, committee: ValidatorCommittee,summary: CheckpointSummary) -> ValidatorCommitteeSignatureAggregator: + + _UniffiFfiConverterTypeValidatorCommittee.check_lower(committee) + + _UniffiFfiConverterTypeCheckpointSummary.check_lower(summary) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeValidatorCommittee.lower(committee), + _UniffiFfiConverterTypeCheckpointSummary.lower(summary), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorCommitteeSignatureAggregator.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureaggregator_new_checkpoint_summary, + *_uniffi_lowered_args, + ) + return cls._uniffi_make_instance(_uniffi_ffi_result) def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginverifier, pointer) + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureaggregator, handle) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginverifier, self._pointer) + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureaggregator, self._handle) # Used by alternative constructors or any methods which return this type. @classmethod - def _make_instance_(cls, pointer): + def _uniffi_make_instance(cls, handle): # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. + # and just create a new instance with the required handle. inst = cls.__new__(cls) - inst._pointer = pointer + inst._handle = handle return inst - @classmethod - def new_dev(cls, ): - """ - Load a fixed verifying key from zkLogin.vkey output. This is based on a - local setup and should not be used in production. - """ - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_dev,) - return cls._make_instance_(pointer) - - @classmethod - def new_mainnet(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginverifier_new_mainnet,) - return cls._make_instance_(pointer) - - - - def jwks(self, ) -> "dict[JwkId, Jwk]": - return _UniffiConverterMapTypeJwkIdTypeJwk.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_jwks,self._uniffi_clone_pointer(),) - ) - - - - - - def verify(self, message: "bytes",authenticator: "ZkLoginAuthenticator") -> None: - _UniffiConverterBytes.check_lower(message) - - _UniffiConverterTypeZkLoginAuthenticator.check_lower(authenticator) - - _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_verify,self._uniffi_clone_pointer(), - _UniffiConverterBytes.lower(message), - _UniffiConverterTypeZkLoginAuthenticator.lower(authenticator)) - - - - - - - def with_jwks(self, jwks: "dict[JwkId, Jwk]") -> "ZkloginVerifier": - _UniffiConverterMapTypeJwkIdTypeJwk.check_lower(jwks) + def add_signature(self, signature: ValidatorSignature) -> None: - return _UniffiConverterTypeZkloginVerifier.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginverifier_with_jwks,self._uniffi_clone_pointer(), - _UniffiConverterMapTypeJwkIdTypeJwk.lower(jwks)) + _UniffiFfiConverterTypeValidatorSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeValidatorSignature.lower(signature), ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_add_signature, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def committee(self, ) -> ValidatorCommittee: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorCommittee.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_committee, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def finish(self, ) -> ValidatorAggregatedSignature: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorAggregatedSignature.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureaggregator_finish, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) - -class _UniffiConverterTypeZkloginVerifier: - +class _UniffiFfiConverterTypeValidatorCommitteeSignatureAggregator: @staticmethod - def lift(value: int): - return ZkloginVerifier._make_instance_(value) + def lift(value: int) -> ValidatorCommitteeSignatureAggregator: + return ValidatorCommitteeSignatureAggregator._uniffi_make_instance(value) @staticmethod - def check_lower(value: ZkloginVerifier): - if not isinstance(value, ZkloginVerifier): - raise TypeError("Expected ZkloginVerifier instance, {} found".format(type(value).__name__)) + def check_lower(value: ValidatorCommitteeSignatureAggregator): + if not isinstance(value, ValidatorCommitteeSignatureAggregator): + raise TypeError("Expected ValidatorCommitteeSignatureAggregator instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ZkloginVerifierProtocol): - if not isinstance(value, ZkloginVerifier): - raise TypeError("Expected ZkloginVerifier instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + def lower(value: ValidatorCommitteeSignatureAggregator) -> ctypes.c_uint64: + return value._uniffi_clone_handle() @classmethod - def read(cls, buf: _UniffiRustBuffer): + def read(cls, buf: _UniffiRustBuffer) -> ValidatorCommitteeSignatureAggregator: ptr = buf.read_u64() if ptr == 0: - raise InternalError("Raw pointer value was null") + raise InternalError("Raw handle value was null") return cls.lift(ptr) @classmethod - def write(cls, value: ZkloginVerifierProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ValidatorCommitteeSignatureAggregator, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -Base64 = str -BigInt = str -Value = str -# Async support# RustFuturePoll values -_UNIFFI_RUST_FUTURE_POLL_READY = 0 -_UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1 -# Stores futures for _uniffi_continuation_callback -_UniffiContinuationHandleMap = _UniffiHandleMap() +class ValidatorCommitteeSignatureVerifierProtocol(typing.Protocol): + + def committee(self, ) -> ValidatorCommittee: + raise NotImplementedError + def verify(self, message: bytes,signature: ValidatorSignature) -> None: + raise NotImplementedError + def verify_aggregated(self, message: bytes,signature: ValidatorAggregatedSignature) -> None: + raise NotImplementedError + def verify_checkpoint_summary(self, summary: CheckpointSummary,signature: ValidatorAggregatedSignature) -> None: + raise NotImplementedError -_UNIFFI_GLOBAL_EVENT_LOOP = None +class ValidatorCommitteeSignatureVerifier(ValidatorCommitteeSignatureVerifierProtocol): + + _handle: ctypes.c_uint64 + def __init__(self, committee: ValidatorCommittee): + + _UniffiFfiConverterTypeValidatorCommittee.check_lower(committee) + _uniffi_lowered_args = ( + _UniffiFfiConverterTypeValidatorCommittee.lower(committee), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorCommitteeSignatureVerifier.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_validatorcommitteesignatureverifier_new, + *_uniffi_lowered_args, + ) + self._handle = _uniffi_ffi_result -""" -Set the event loop to use for async functions + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorcommitteesignatureverifier, handle) -This is needed if some async functions run outside of the eventloop, for example: - - A non-eventloop thread is spawned, maybe from `EventLoop.run_in_executor` or maybe from the - Rust code spawning its own thread. - - The Rust code calls an async callback method from a sync callback function, using something - like `pollster` to block on the async call. + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorcommitteesignatureverifier, self._handle) -In this case, we need an event loop to run the Python async function, but there's no eventloop set -for the thread. Use `uniffi_set_event_loop` to force an eventloop to be used in this case. -""" -def uniffi_set_event_loop(eventloop: asyncio.BaseEventLoop): - global _UNIFFI_GLOBAL_EVENT_LOOP - _UNIFFI_GLOBAL_EVENT_LOOP = eventloop + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def committee(self, ) -> ValidatorCommittee: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeValidatorCommittee.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_committee, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, message: bytes,signature: ValidatorSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeValidatorSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeValidatorSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_aggregated(self, message: bytes,signature: ValidatorAggregatedSignature) -> None: + + _UniffiFfiConverterBytes.check_lower(message) + + _UniffiFfiConverterTypeValidatorAggregatedSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(message), + _UniffiFfiConverterTypeValidatorAggregatedSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_aggregated, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify_checkpoint_summary(self, summary: CheckpointSummary,signature: ValidatorAggregatedSignature) -> None: + + _UniffiFfiConverterTypeCheckpointSummary.check_lower(summary) + + _UniffiFfiConverterTypeValidatorAggregatedSignature.check_lower(signature) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeCheckpointSummary.lower(summary), + _UniffiFfiConverterTypeValidatorAggregatedSignature.lower(signature), + ) + _uniffi_lift_return = lambda val: None + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorcommitteesignatureverifier_verify_checkpoint_summary, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) -def _uniffi_get_event_loop(): - if _UNIFFI_GLOBAL_EVENT_LOOP is not None: - return _UNIFFI_GLOBAL_EVENT_LOOP - else: - return asyncio.get_running_loop() -# Continuation callback for async functions -# lift the return value or error and resolve the future, causing the async function to resume. -@_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK -def _uniffi_continuation_callback(future_ptr, poll_code): - (eventloop, future) = _UniffiContinuationHandleMap.remove(future_ptr) - eventloop.call_soon_threadsafe(_uniffi_set_future_result, future, poll_code) -def _uniffi_set_future_result(future, poll_code): - if not future.cancelled(): - future.set_result(poll_code) -async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, lift_func, error_ffi_converter): - try: - eventloop = _uniffi_get_event_loop() - # Loop and poll until we see a _UNIFFI_RUST_FUTURE_POLL_READY value - while True: - future = eventloop.create_future() - ffi_poll( - rust_future, - _uniffi_continuation_callback, - _UniffiContinuationHandleMap.insert((eventloop, future)), - ) - poll_code = await future - if poll_code == _UNIFFI_RUST_FUTURE_POLL_READY: - break +class _UniffiFfiConverterTypeValidatorCommitteeSignatureVerifier: + @staticmethod + def lift(value: int) -> ValidatorCommitteeSignatureVerifier: + return ValidatorCommitteeSignatureVerifier._uniffi_make_instance(value) - return lift_func( - _uniffi_rust_call_with_error(error_ffi_converter, ffi_complete, rust_future) - ) - finally: - ffi_free(rust_future) + @staticmethod + def check_lower(value: ValidatorCommitteeSignatureVerifier): + if not isinstance(value, ValidatorCommitteeSignatureVerifier): + raise TypeError("Expected ValidatorCommitteeSignatureVerifier instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ValidatorCommitteeSignatureVerifier) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> ValidatorCommitteeSignatureVerifier: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) -def base64_decode(input: "str") -> "bytes": - _UniffiConverterString.check_lower(input) - - return _UniffiConverterBytes.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode, - _UniffiConverterString.lower(input))) + @classmethod + def write(cls, value: ValidatorCommitteeSignatureVerifier, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class _UniffiFfiConverterSequenceTypeExecutionTimeObservation(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeExecutionTimeObservation.check_lower(item) -def base64_encode(input: "bytes") -> "str": - _UniffiConverterBytes.check_lower(input) - - return _UniffiConverterString.lift(_uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode, - _UniffiConverterBytes.lower(input))) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeExecutionTimeObservation.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeExecutionTimeObservation.read(buf) for i in range(count) + ] -def hex_decode(input: "str") -> "bytes": - _UniffiConverterString.check_lower(input) - - return _UniffiConverterBytes.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode, - _UniffiConverterString.lower(input))) +class _UniffiFfiConverterSequenceTypeEndOfEpochTransactionKind(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiFfiConverterTypeEndOfEpochTransactionKind.check_lower(item) + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiFfiConverterTypeEndOfEpochTransactionKind.write(item, buf) -def hex_encode(input: "bytes") -> "str": - _UniffiConverterBytes.check_lower(input) - - return _UniffiConverterString.lift(_uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode, - _UniffiConverterBytes.lower(input))) + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + return [ + _UniffiFfiConverterTypeEndOfEpochTransactionKind.read(buf) for i in range(count) + ] +def base64_decode(input: str) -> bytes: + + _UniffiFfiConverterString.check_lower(input) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(input), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_decode, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) +def base64_encode(input: bytes) -> str: + + _UniffiFfiConverterBytes.check_lower(input) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(input), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_func_base64_encode, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) +def hex_decode(input: str) -> bytes: + + _UniffiFfiConverterString.check_lower(input) + _uniffi_lowered_args = ( + _UniffiFfiConverterString.lower(input), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = _UniffiFfiConverterTypeSdkFfiError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_decode, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) +def hex_encode(input: bytes) -> str: + + _UniffiFfiConverterBytes.check_lower(input) + _uniffi_lowered_args = ( + _UniffiFfiConverterBytes.lower(input), + ) + _uniffi_lift_return = _UniffiFfiConverterString.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_iota_sdk_ffi_fn_func_hex_encode, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) __all__ = [ "InternalError", "BatchSendStatusType", + "ObjectIn", + "ObjectOut", + "IdOperation", + "TransactionArgument", + "SdkFfiError", + "TransactionExpiration", + "SignatureScheme", "CommandArgumentError", - "Direction", + "TypeArgumentError", + "PackageUpgradeError", "ExecutionError", "ExecutionStatus", - "Feature", - "IdOperation", + "UnchangedSharedKind", "MoveAbility", "MoveVisibility", "NameFormat", - "ObjectIn", - "ObjectOut", - "PackageUpgradeError", - "SdkFfiError", - "SignatureScheme", - "TransactionArgument", + "Direction", + "Feature", "TransactionBlockKindInput", - "TransactionExpiration", - "TypeArgumentError", - "UnchangedSharedKind", + "JwkId", + "Jwk", "ActiveJwk", "AuthenticatorStateExpire", "AuthenticatorStateUpdateV1", + "CoinInfo", + "FaucetReceipt", "BatchSendStatus", "ChangedObject", + "PageInfo", + "ValidatorCommitteeMember", + "EndOfEpochData", + "GasCostSummary", "CheckpointSummaryPage", - "CoinInfo", "CoinMetadata", "CoinPage", - "DryRunEffect", "DryRunMutation", - "DryRunResult", "DryRunReturn", + "DryRunEffect", + "ObjectReference", + "GasPayment", + "ZkLoginClaim", + "SignedTransaction", + "MoveLocation", + "UnchangedSharedObject", + "TransactionEffectsV1", + "DryRunResult", "DynamicFieldName", + "DynamicFieldValue", "DynamicFieldOutput", "DynamicFieldOutputPage", - "DynamicFieldValue", - "EndOfEpochData", + "ProtocolConfigFeatureFlag", + "ProtocolConfigAttr", + "ProtocolConfigs", + "ValidatorSet", "Epoch", "EpochPage", "Event", "EventFilter", "EventPage", - "FaucetReceipt", - "GasCostSummary", - "GasPayment", "GqlAddress", - "Jwk", - "JwkId", + "MoveStructTypeParameter", + "OpenMoveType", + "MoveField", + "MoveEnumVariant", "MoveEnum", "MoveEnumConnection", - "MoveEnumVariant", - "MoveField", - "MoveFunctionConnection", "MoveFunctionTypeParameter", - "MoveLocation", - "MoveModule", - "MoveModuleConnection", + "MoveFunctionConnection", + "MovePackageQuery", "MoveModuleQuery", + "MoveModuleConnection", + "MoveStructQuery", + "MoveStructConnection", + "MoveModule", "MoveObject", + "UpgradeInfo", + "TypeOrigin", "MovePackagePage", - "MovePackageQuery", "MoveStruct", - "MoveStructConnection", - "MoveStructQuery", - "MoveStructTypeParameter", "NameRegistrationPage", "ObjectFilter", "ObjectPage", "ObjectRef", - "ObjectReference", - "OpenMoveType", - "PageInfo", "PaginationFilter", - "ProtocolConfigAttr", - "ProtocolConfigFeatureFlag", - "ProtocolConfigs", "Query", "RandomnessStateUpdate", "ServiceConfig", - "SignedTransaction", "SignedTransactionPage", "TransactionDataEffects", "TransactionDataEffectsPage", "TransactionEffectsPage", - "TransactionEffectsV1", "TransactionMetadata", "TransactionsFilter", - "TypeOrigin", - "UnchangedSharedObject", - "UpgradeInfo", + "ValidatorCredentials", "Validator", "ValidatorCommittee", - "ValidatorCommitteeMember", "ValidatorConnection", - "ValidatorCredentials", "ValidatorPage", - "ValidatorSet", - "ZkLoginClaim", "base64_decode", "base64_encode", "hex_decode", "hex_encode", "Address", - "Argument", - "Bls12381PrivateKey", + "AddressProtocol", + "StructTag", + "StructTagProtocol", + "TypeTag", + "TypeTagProtocol", + "ObjectId", + "ObjectIdProtocol", + "Digest", + "DigestProtocol", + "Owner", + "OwnerProtocol", + "CheckpointCommitment", + "CheckpointCommitmentProtocol", "Bls12381PublicKey", + "Bls12381PublicKeyProtocol", + "CheckpointSummary", + "CheckpointSummaryProtocol", + "Coin", + "CoinProtocol", + "TransactionKind", + "TransactionKindProtocol", + "Transaction", + "TransactionProtocol", + "Ed25519PublicKey", + "Ed25519PublicKeyProtocol", + "Secp256k1PublicKey", + "Secp256k1PublicKeyProtocol", + "Secp256r1PublicKey", + "Secp256r1PublicKeyProtocol", + "Bn254FieldElement", + "Bn254FieldElementProtocol", + "ZkLoginPublicIdentifier", + "ZkLoginPublicIdentifierProtocol", + "MultisigMemberPublicKey", + "MultisigMemberPublicKeyProtocol", + "MultisigMember", + "MultisigMemberProtocol", + "MultisigCommittee", + "MultisigCommitteeProtocol", + "Ed25519Signature", + "Ed25519SignatureProtocol", + "Secp256k1Signature", + "Secp256k1SignatureProtocol", + "Secp256r1Signature", + "Secp256r1SignatureProtocol", + "CircomG1", + "CircomG1Protocol", + "CircomG2", + "CircomG2Protocol", + "ZkLoginProof", + "ZkLoginProofProtocol", + "ZkLoginInputs", + "ZkLoginInputsProtocol", + "SimpleSignature", + "SimpleSignatureProtocol", + "ZkLoginAuthenticator", + "ZkLoginAuthenticatorProtocol", + "MultisigMemberSignature", + "MultisigMemberSignatureProtocol", + "MultisigAggregatedSignature", + "MultisigAggregatedSignatureProtocol", + "PasskeyPublicKey", + "PasskeyPublicKeyProtocol", + "PasskeyAuthenticator", + "PasskeyAuthenticatorProtocol", + "UserSignature", + "UserSignatureProtocol", + "TransactionEffects", + "TransactionEffectsProtocol", + "MoveFunction", + "MoveFunctionProtocol", + "Identifier", + "IdentifierProtocol", + "MovePackage", + "MovePackageProtocol", + "Name", + "NameProtocol", + "NameRegistration", + "NameRegistrationProtocol", + "ObjectData", + "ObjectDataProtocol", + "ObjectType", + "ObjectTypeProtocol", + "Object", + "ObjectProtocol", + "Argument", + "ArgumentProtocol", "Bls12381Signature", + "Bls12381SignatureProtocol", + "ValidatorSignature", + "ValidatorSignatureProtocol", "Bls12381VerifyingKey", - "Bn254FieldElement", + "Bls12381VerifyingKeyProtocol", + "Bls12381PrivateKey", + "Bls12381PrivateKeyProtocol", + "VersionAssignment", + "VersionAssignmentProtocol", "CancelledTransaction", + "CancelledTransactionProtocol", + "SystemPackage", + "SystemPackageProtocol", "ChangeEpoch", + "ChangeEpochProtocol", "ChangeEpochV2", - "CheckpointCommitment", - "CheckpointContents", - "CheckpointSummary", + "ChangeEpochV2Protocol", "CheckpointTransactionInfo", - "CircomG1", - "CircomG2", - "Coin", + "CheckpointTransactionInfoProtocol", + "CheckpointContents", + "CheckpointContentsProtocol", "Command", - "ConsensusCommitPrologueV1", + "CommandProtocol", "ConsensusDeterminedVersionAssignments", - "Digest", + "ConsensusDeterminedVersionAssignmentsProtocol", + "ConsensusCommitPrologueV1", + "ConsensusCommitPrologueV1Protocol", + "Ed25519VerifyingKey", + "Ed25519VerifyingKeyProtocol", "Ed25519PrivateKey", - "Ed25519PublicKey", - "Ed25519Signature", + "Ed25519PrivateKeyProtocol", "Ed25519Verifier", - "Ed25519VerifyingKey", + "Ed25519VerifierProtocol", "EndOfEpochTransactionKind", - "ExecutionTimeObservation", + "EndOfEpochTransactionKindProtocol", "ExecutionTimeObservationKey", + "ExecutionTimeObservationKeyProtocol", + "ValidatorExecutionTimeObservation", + "ValidatorExecutionTimeObservationProtocol", + "ExecutionTimeObservation", + "ExecutionTimeObservationProtocol", "ExecutionTimeObservations", + "ExecutionTimeObservationsProtocol", "FaucetClient", + "FaucetClientProtocol", "GenesisObject", + "GenesisObjectProtocol", "GenesisTransaction", + "GenesisTransactionProtocol", "GraphQlClient", - "Identifier", + "GraphQlClientProtocol", "Input", + "InputProtocol", "MakeMoveVector", + "MakeMoveVectorProtocol", "MergeCoins", + "MergeCoinsProtocol", "MoveCall", - "MoveFunction", - "MovePackage", - "MultisigAggregatedSignature", - "MultisigAggregator", - "MultisigCommittee", - "MultisigMember", - "MultisigMemberPublicKey", - "MultisigMemberSignature", + "MoveCallProtocol", + "ZkloginVerifier", + "ZkloginVerifierProtocol", "MultisigVerifier", - "Name", - "NameRegistration", - "Object", - "ObjectData", - "ObjectId", - "ObjectType", - "Owner", + "MultisigVerifierProtocol", + "MultisigAggregator", + "MultisigAggregatorProtocol", "PtbArgument", - "PasskeyAuthenticator", - "PasskeyPublicKey", + "PtbArgumentProtocol", "PasskeyVerifier", + "PasskeyVerifierProtocol", "PersonalMessage", + "PersonalMessageProtocol", "ProgrammableTransaction", + "ProgrammableTransactionProtocol", "Publish", + "PublishProtocol", + "Secp256k1VerifyingKey", + "Secp256k1VerifyingKeyProtocol", "Secp256k1PrivateKey", - "Secp256k1PublicKey", - "Secp256k1Signature", + "Secp256k1PrivateKeyProtocol", "Secp256k1Verifier", - "Secp256k1VerifyingKey", + "Secp256k1VerifierProtocol", + "Secp256r1VerifyingKey", + "Secp256r1VerifyingKeyProtocol", "Secp256r1PrivateKey", - "Secp256r1PublicKey", - "Secp256r1Signature", + "Secp256r1PrivateKeyProtocol", "Secp256r1Verifier", - "Secp256r1VerifyingKey", + "Secp256r1VerifierProtocol", + "SimpleVerifyingKey", + "SimpleVerifyingKeyProtocol", "SimpleKeypair", - "SimpleSignature", + "SimpleKeypairProtocol", "SimpleVerifier", - "SimpleVerifyingKey", + "SimpleVerifierProtocol", "SplitCoins", - "StructTag", - "SystemPackage", - "Transaction", + "SplitCoinsProtocol", "TransactionBuilder", - "TransactionEffects", + "TransactionBuilderProtocol", "TransactionEvents", - "TransactionKind", + "TransactionEventsProtocol", "TransferObjects", - "TypeTag", + "TransferObjectsProtocol", "Upgrade", - "UserSignature", + "UpgradeProtocol", "UserSignatureVerifier", + "UserSignatureVerifierProtocol", "ValidatorAggregatedSignature", + "ValidatorAggregatedSignatureProtocol", "ValidatorCommitteeSignatureAggregator", + "ValidatorCommitteeSignatureAggregatorProtocol", "ValidatorCommitteeSignatureVerifier", - "ValidatorExecutionTimeObservation", - "ValidatorSignature", - "VersionAssignment", - "ZkLoginAuthenticator", - "ZkLoginInputs", - "ZkLoginProof", - "ZkLoginPublicIdentifier", - "ZkloginVerifier", -] - + "ValidatorCommitteeSignatureVerifierProtocol", +] \ No newline at end of file diff --git a/crates/iota-sdk-ffi/Cargo.toml b/crates/iota-sdk-ffi/Cargo.toml index 884cde6d1..b75ee8a23 100644 --- a/crates/iota-sdk-ffi/Cargo.toml +++ b/crates/iota-sdk-ffi/Cargo.toml @@ -24,7 +24,7 @@ roaring = { version = "0.11.2", default-features = false } serde = { version = "1.0.144" } serde_json = "1.0.95" tokio = { version = "1.36.0", features = ["time"] } -uniffi = { version = "0.29", features = ["cli", "tokio"] } +uniffi = { version = "0.30", features = ["cli", "tokio"] } iota-crypto = { path = "../iota-crypto", features = ["bls12381", "ed25519", "secp256r1", "passkey", "secp256k1", "zklogin", "pem", "bech32"] } iota-graphql-client = { path = "../iota-graphql-client" } diff --git a/crates/iota-sdk-ffi/src/types/digest.rs b/crates/iota-sdk-ffi/src/types/digest.rs index 3c001e30a..c7256b12c 100644 --- a/crates/iota-sdk-ffi/src/types/digest.rs +++ b/crates/iota-sdk-ffi/src/types/digest.rs @@ -17,7 +17,9 @@ use crate::error::Result; /// IOTA's binary representation of a `Digest` is prefixed with its length /// meaning its serialized binary form (in bcs) is 33 bytes long vs a more /// compact 32 bytes. -#[derive(derive_more::From, derive_more::Deref, uniffi::Object)] +// Implement Display via derive_more so wrapper delegates to inner type's Display. +#[derive(Debug, derive_more::From, derive_more::Deref, derive_more::Display, uniffi::Object)] +#[uniffi::export(Display)] pub struct Digest(pub iota_types::Digest); #[uniffi::export] diff --git a/crates/iota-sdk-ffi/src/types/execution_status.rs b/crates/iota-sdk-ffi/src/types/execution_status.rs index e63bbed5c..dbf71a109 100644 --- a/crates/iota-sdk-ffi/src/types/execution_status.rs +++ b/crates/iota-sdk-ffi/src/types/execution_status.rs @@ -36,6 +36,15 @@ pub enum ExecutionStatus { }, } +impl std::fmt::Display for ExecutionStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Success => write!(f, "SUCCESS"), + Self::Failure { .. } => write!(f, "FAILURE"), + } + } +} + impl From for ExecutionStatus { fn from(value: iota_types::ExecutionStatus) -> Self { match value { diff --git a/crates/iota-sdk-ffi/src/types/object.rs b/crates/iota-sdk-ffi/src/types/object.rs index 008f3bdb0..e4ecd5466 100644 --- a/crates/iota-sdk-ffi/src/types/object.rs +++ b/crates/iota-sdk-ffi/src/types/object.rs @@ -37,7 +37,16 @@ use crate::{ /// ```text /// object-id = 32*OCTET /// ``` -#[derive(PartialEq, Eq, Hash, derive_more::From, derive_more::Deref, uniffi::Object)] +#[derive( + Debug, + PartialEq, + Eq, + Hash, + derive_more::From, + derive_more::Deref, + derive_more::Display, + uniffi::Object, +)] #[uniffi::export(Hash)] pub struct ObjectId(pub iota_types::ObjectId); @@ -481,7 +490,7 @@ impl From for iota_types::MoveStruct { /// owner-shared = %x02 u64 /// owner-immutable = %x03 /// ``` -#[derive(derive_more::From, derive_more::Deref, derive_more::Display, uniffi::Object)] +#[derive(Debug, derive_more::From, derive_more::Deref, derive_more::Display, uniffi::Object)] #[uniffi::export(Display)] pub struct Owner(pub iota_types::Owner); diff --git a/crates/iota-sdk-ffi/src/types/transaction/v1.rs b/crates/iota-sdk-ffi/src/types/transaction/v1.rs index 48c67894b..96a4e6a7c 100644 --- a/crates/iota-sdk-ffi/src/types/transaction/v1.rs +++ b/crates/iota-sdk-ffi/src/types/transaction/v1.rs @@ -1,7 +1,7 @@ // Copyright (c) 2025 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::sync::Arc; +use std::{fmt, sync::Arc}; use iota_types::{GasCostSummary, IdOperation}; @@ -31,6 +31,7 @@ use crate::types::{ /// (option digest) ; auxiliary data digest /// ``` #[derive(uniffi::Record)] +#[uniffi::export(Display)] pub struct TransactionEffectsV1 { /// The status of the execution pub status: ExecutionStatus, @@ -69,6 +70,68 @@ pub struct TransactionEffectsV1 { pub auxiliary_data_digest: Option>, } +impl fmt::Display for TransactionEffectsV1 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Helper to format optional digest + let fmt_opt_digest = |d: &Option>| -> String { + d.as_ref() + .map(|v| v.to_string()) + .unwrap_or_else(|| "-".to_string()) + }; + let dependencies = if self.dependencies.is_empty() { + String::from("[]") + } else { + format!( + "[{}]", + self.dependencies + .iter() + .map(|d| d.to_string()) + .collect::>() + .join(", ") + ) + }; + let changed = if self.changed_objects.is_empty() { + String::from("[]") + } else { + format!( + "[{}]", + self.changed_objects + .iter() + .map(|c| c.to_string()) + .collect::>() + .join(", ") + ) + }; + let unchanged = if self.unchanged_shared_objects.is_empty() { + String::from("[]") + } else { + format!( + "[{}]", + self.unchanged_shared_objects + .iter() + .map(|c| c.to_string()) + .collect::>() + .join(", ") + ) + }; + write!( + f, + "TransactionEffectsV1(status={}, epoch={}, gas_used={}, tx_digest={}, gas_object_index={:?}, events_digest={}, dependencies={}, lamport_version={}, changed_objects={}, unchanged_shared_objects={}, auxiliary_data_digest={})", + self.status, + self.epoch, + self.gas_used, + self.transaction_digest, + self.gas_object_index, + fmt_opt_digest(&self.events_digest), + dependencies, + self.lamport_version, + changed, + unchanged, + fmt_opt_digest(&self.auxiliary_data_digest) + ) + } +} + impl From for TransactionEffectsV1 { fn from(value: iota_types::TransactionEffectsV1) -> Self { Self { @@ -127,7 +190,8 @@ impl From for iota_types::TransactionEffectsV1 { /// ```text /// changed-object = object-id object-in object-out id-operation /// ``` -#[derive(uniffi::Record)] +#[derive(Debug, uniffi::Record)] +#[uniffi::export(Display)] pub struct ChangedObject { /// Id of the object pub object_id: Arc, @@ -141,6 +205,12 @@ pub struct ChangedObject { pub id_operation: IdOperation, } +impl fmt::Display for ChangedObject { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "ChangedObject(object_id={})", self.object_id) + } +} + impl From for ChangedObject { fn from(value: iota_types::ChangedObject) -> Self { Self { @@ -172,12 +242,23 @@ impl From for iota_types::ChangedObject { /// ```text /// unchanged-shared-object = object-id unchanged-shared-object-kind /// ``` -#[derive(uniffi::Record)] +#[derive(Debug, uniffi::Record)] +#[uniffi::export(Display)] pub struct UnchangedSharedObject { pub object_id: Arc, pub kind: UnchangedSharedKind, } +impl fmt::Display for UnchangedSharedObject { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "UnchangedSharedObject(object_id={}, kind={})", + self.object_id, self.kind + ) + } +} + impl From for UnchangedSharedObject { fn from(value: iota_types::UnchangedSharedObject) -> Self { Self { @@ -215,7 +296,7 @@ impl From for iota_types::UnchangedSharedObject { /// cancelled = %x03 u64 /// per-epoch-config = %x04 /// ``` -#[derive(uniffi::Enum)] +#[derive(Debug, uniffi::Enum)] pub enum UnchangedSharedKind { /// Read-only shared objects from the input. We don't really need /// ObjectDigest for protocol correctness, but it will make it easier to @@ -285,7 +366,7 @@ impl From for iota_types::UnchangedSharedKind { /// object-in-missing = %x00 /// object-in-data = %x01 u64 digest owner /// ``` -#[derive(uniffi::Enum)] +#[derive(Debug, uniffi::Enum)] pub enum ObjectIn { Missing, /// The old version, digest and owner. @@ -346,7 +427,7 @@ impl From for iota_types::ObjectIn { /// object-out-object-write = %x01 digest owner /// object-out-package-write = %x02 version digest /// ``` -#[derive(uniffi::Enum)] +#[derive(Debug, uniffi::Enum)] pub enum ObjectOut { /// Same definition as in ObjectIn. Missing, @@ -376,6 +457,27 @@ impl From for ObjectOut { } } +// Display impls for enums (placed after their definitions) +impl fmt::Display for UnchangedSharedKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + UnchangedSharedKind::ReadOnlyRoot { version, digest } => { + write!(f, "ReadOnlyRoot(version={}, digest={})", version, digest) + } + UnchangedSharedKind::MutateDeleted { version } => { + write!(f, "MutateDeleted(version={})", version) + } + UnchangedSharedKind::ReadDeleted { version } => { + write!(f, "ReadDeleted(version={})", version) + } + UnchangedSharedKind::Cancelled { version } => { + write!(f, "Cancelled(version={})", version) + } + UnchangedSharedKind::PerEpochConfig => write!(f, "PerEpochConfig"), + } + } +} + impl From for iota_types::ObjectOut { fn from(value: ObjectOut) -> Self { match value { @@ -392,6 +494,35 @@ impl From for iota_types::ObjectOut { } } +impl fmt::Display for ObjectIn { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ObjectIn::Missing => write!(f, "Missing"), + ObjectIn::Data { + version, + digest, + owner: _, + } => { + write!(f, "Data(version={}, digest={})", version, digest) + } + } + } +} + +impl fmt::Display for ObjectOut { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ObjectOut::Missing => write!(f, "Missing"), + ObjectOut::ObjectWrite { digest, owner: _ } => { + write!(f, "ObjectWrite(digest={})", digest) + } + ObjectOut::PackageWrite { version, digest } => { + write!(f, "PackageWrite(version={}, digest={})", version, digest) + } + } + } +} + /// Defines what happened to an ObjectId during execution /// /// # BCS