diff --git a/Makefile b/Makefile index b255a1008..4d52a29a8 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ go: ## Build Go bindings @printf "Building Go bindings...\n" @$(build_binding) \ uniffi-bindgen-go --library target/release/libiota_sdk_ffi$${LIB_EXT} --out-dir bindings/go --no-format --config bindings/go/uniffi.toml || exit $$? - # TODO: For some reason only the .h file is renamed, not the .go file + @# TODO: For some reason only the .h file is renamed, not the .go file @mv bindings/go/iota_sdk/iota_sdk_ffi.go bindings/go/iota_sdk/iota_sdk.go @sed -i.bak "s/^package iota_sdk_ffi$$/package iota_sdk/" bindings/go/iota_sdk/iota_sdk.go && rm bindings/go/iota_sdk/iota_sdk.go.bak diff --git a/bindings/go/iota_sdk/iota_sdk.go b/bindings/go/iota_sdk/iota_sdk.go index 20d9d07f7..4d34a3b59 100644 --- a/bindings/go/iota_sdk/iota_sdk.go +++ b/bindings/go/iota_sdk/iota_sdk.go @@ -3080,6 +3080,15 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator() + }) + if checksum != 36216 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor() }) @@ -4205,6 +4214,42 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address() + }) + if checksum != 24164 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args() + }) + if checksum != 1111 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate() + }) + if checksum != 40516 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args() + }) + if checksum != 63576 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments() }) @@ -6806,6 +6851,24 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator() + }) + if checksum != 62044 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt() + }) + if checksum != 31940 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig() }) @@ -6825,20 +6888,20 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator() }) - if checksum != 17710 { + if checksum != 38663 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator: UniFFI API checksum mismatch") } } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt() }) - if checksum != 53755 { + if checksum != 5213 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt: UniFFI API checksum mismatch") } } { @@ -6861,20 +6924,29 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator() }) - if checksum != 53484 { + if checksum != 64789 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator: UniFFI API checksum mismatch") } } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt() }) - if checksum != 43934 { + if checksum != 62080 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator() + }) + if checksum != 59771 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator: UniFFI API checksum mismatch") } } { @@ -6888,11 +6960,11 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator() }) - if checksum != 35671 { + if checksum != 7851 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator: UniFFI API checksum mismatch") } } { @@ -6906,11 +6978,11 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin() + return C.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator() }) - if checksum != 38693 { + if checksum != 35546 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator: UniFFI API checksum mismatch") } } { @@ -8390,6 +8462,24 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable() + }) + if checksum != 19047 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared() + }) + if checksum != 5389 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new() }) @@ -10082,6 +10172,15 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator() + }) + if checksum != 7262 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig() }) @@ -10092,11 +10191,11 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey() + return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator() }) - if checksum != 25378 { + if checksum != 45324 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator: UniFFI API checksum mismatch") } } { @@ -10110,11 +10209,11 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin() + return C.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator() }) - if checksum != 43856 { + if checksum != 30659 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator: UniFFI API checksum mismatch") } } { @@ -13447,6 +13546,9 @@ type ClientTransactionBuilderInterface interface { DryRun(skipChecks bool) (DryRunResult, error) // Execute the transaction and optionally wait for finalization. Execute(signer *TransactionSigner, waitFor *WaitForTx) (*TransactionEffects, error) + // Execute the transaction with the provided move authenticator call data + // and optionally wait for finalization. + ExecuteWithMoveAuthenticator(inputs []*PtbArgument, typeArgs []*TypeTag, waitFor *WaitForTx) (*TransactionEffects, error) // Execute the transaction and optionally wait for finalization. ExecuteWithSponsor(signer *TransactionSigner, sponsorSigner *TransactionSigner, waitFor *WaitForTx) (*TransactionEffects, error) // Set the expiration of the transaction to be a specific epoch. @@ -13607,6 +13709,37 @@ func (_self *ClientTransactionBuilder) Execute(signer *TransactionSigner, waitFo return res, err } +// Execute the transaction with the provided move authenticator call data +// and optionally wait for finalization. +func (_self *ClientTransactionBuilder) ExecuteWithMoveAuthenticator(inputs []*PtbArgument, typeArgs []*TypeTag, waitFor *WaitForTx) (*TransactionEffects, error) { + _pointer := _self.ffiObject.incrementPointer("*ClientTransactionBuilder") + defer _self.ffiObject.decrementPointer() + res, err :=uniffiRustCallAsync[SdkFfiError]( + FfiConverterSdkFfiErrorINSTANCE, + // completeFn + func(handle C.uint64_t, status *C.RustCallStatus) unsafe.Pointer { + res := C.ffi_iota_sdk_ffi_rust_future_complete_pointer(handle, status) + return res + }, + // liftFn + func(ffi unsafe.Pointer) *TransactionEffects { + return FfiConverterTransactionEffectsINSTANCE.Lift(ffi) + }, + C.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator( + _pointer,FfiConverterSequencePtbArgumentINSTANCE.Lower(inputs), FfiConverterSequenceTypeTagINSTANCE.Lower(typeArgs), FfiConverterOptionalWaitForTxINSTANCE.Lower(waitFor)), + // pollFn + func (handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) { + C.ffi_iota_sdk_ffi_rust_future_poll_pointer(handle, continuation, data) + }, + // freeFn + func (handle C.uint64_t) { + C.ffi_iota_sdk_ffi_rust_future_free_pointer(handle) + }, + ) + + return res, err +} + // Execute the transaction and optionally wait for finalization. func (_self *ClientTransactionBuilder) ExecuteWithSponsor(signer *TransactionSigner, sponsorSigner *TransactionSigner, waitFor *WaitForTx) (*TransactionEffects, error) { _pointer := _self.ffiObject.incrementPointer("*ClientTransactionBuilder") @@ -19185,6 +19318,132 @@ func (_ FfiDestroyerMoveArg) Destroy(value *MoveArg) { +// MoveAuthenticator is a signature variant that enables a method of +// authentication through Move code. This function represents the data received +// by the Move authenticate function during the Account Abstraction +// authentication flow. +type MoveAuthenticatorInterface interface { + Address() *Address + CallArgs() []*Input + ObjectToAuthenticate() *Input + TypeArgs() []*TypeTag +} +// MoveAuthenticator is a signature variant that enables a method of +// authentication through Move code. This function represents the data received +// by the Move authenticate function during the Account Abstraction +// authentication flow. +type MoveAuthenticator struct { + ffiObject FfiObject +} + + +// Create a new move authenticator from an immutable object. +func MoveAuthenticatorNewImmutable(callArgs []*Input, typeArgs []*TypeTag, objectToAuthenticate ObjectReference) *MoveAuthenticator { + return FfiConverterMoveAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable(FfiConverterSequenceInputINSTANCE.Lower(callArgs), FfiConverterSequenceTypeTagINSTANCE.Lower(typeArgs), FfiConverterObjectReferenceINSTANCE.Lower(objectToAuthenticate),_uniffiStatus) + })) +} + +// Create a new move authenticator from a shared object. +func MoveAuthenticatorNewShared(callArgs []*Input, typeArgs []*TypeTag, objectToAuthenticate *ObjectId, initialSharedVersion uint64) *MoveAuthenticator { + return FfiConverterMoveAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared(FfiConverterSequenceInputINSTANCE.Lower(callArgs), FfiConverterSequenceTypeTagINSTANCE.Lower(typeArgs), FfiConverterObjectIdINSTANCE.Lower(objectToAuthenticate), FfiConverterUint64INSTANCE.Lower(initialSharedVersion),_uniffiStatus) + })) +} + + + +func (_self *MoveAuthenticator) Address() *Address { + _pointer := _self.ffiObject.incrementPointer("*MoveAuthenticator") + defer _self.ffiObject.decrementPointer() + return FfiConverterAddressINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address( + _pointer,_uniffiStatus) + })) +} + +func (_self *MoveAuthenticator) CallArgs() []*Input { + _pointer := _self.ffiObject.incrementPointer("*MoveAuthenticator") + defer _self.ffiObject.decrementPointer() + return FfiConverterSequenceInputINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { + return GoRustBuffer { + inner: C.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args( + _pointer,_uniffiStatus), + } + })) +} + +func (_self *MoveAuthenticator) ObjectToAuthenticate() *Input { + _pointer := _self.ffiObject.incrementPointer("*MoveAuthenticator") + defer _self.ffiObject.decrementPointer() + return FfiConverterInputINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate( + _pointer,_uniffiStatus) + })) +} + +func (_self *MoveAuthenticator) TypeArgs() []*TypeTag { + _pointer := _self.ffiObject.incrementPointer("*MoveAuthenticator") + defer _self.ffiObject.decrementPointer() + return FfiConverterSequenceTypeTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { + return GoRustBuffer { + inner: C.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args( + _pointer,_uniffiStatus), + } + })) +} +func (object *MoveAuthenticator) Destroy() { + runtime.SetFinalizer(object, nil) + object.ffiObject.destroy() +} + +type FfiConverterMoveAuthenticator struct {} + +var FfiConverterMoveAuthenticatorINSTANCE = FfiConverterMoveAuthenticator{} + + +func (c FfiConverterMoveAuthenticator) Lift(pointer unsafe.Pointer) *MoveAuthenticator { + result := &MoveAuthenticator { + newFfiObject( + pointer, + func(pointer unsafe.Pointer, status *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_clone_moveauthenticator(pointer, status) + }, + func(pointer unsafe.Pointer, status *C.RustCallStatus) { + C.uniffi_iota_sdk_ffi_fn_free_moveauthenticator(pointer, status) + }, + ), + } + runtime.SetFinalizer(result, (*MoveAuthenticator).Destroy) + return result +} + +func (c FfiConverterMoveAuthenticator) Read(reader io.Reader) *MoveAuthenticator { + return c.Lift(unsafe.Pointer(uintptr(readUint64(reader)))) +} + +func (c FfiConverterMoveAuthenticator) Lower(value *MoveAuthenticator) unsafe.Pointer { + // TODO: this is bad - all synchronization from ObjectRuntime.go is discarded here, + // because the pointer will be decremented immediately after this function returns, + // and someone will be left holding onto a non-locked pointer. + pointer := value.ffiObject.incrementPointer("*MoveAuthenticator") + defer value.ffiObject.decrementPointer() + return pointer + +} + +func (c FfiConverterMoveAuthenticator) Write(writer io.Writer, value *MoveAuthenticator) { + writeUint64(writer, uint64(uintptr(c.Lower(value)))) +} + +type FfiDestroyerMoveAuthenticator struct {} + +func (_ FfiDestroyerMoveAuthenticator) Destroy(value *MoveAuthenticator) { + value.Destroy() +} + + + // Command to call a move function // // Functions that can be called by a `MoveCall` command are those that have a @@ -29000,7 +29259,7 @@ func (_ FfiDestroyerUpgradePolicy) Destroy(value *UpgradePolicy) { // // ```text // user-signature-bcs = bytes ; where the contents of the bytes are defined by -// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey +// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator // ``` // // Note: Due to historical reasons, signatures are serialized slightly @@ -29009,18 +29268,21 @@ func (_ FfiDestroyerUpgradePolicy) Destroy(value *UpgradePolicy) { // as `bytes` meaning it has a length prefix that defines the length of // the completely serialized signature. type UserSignatureInterface interface { + AsMoveAuthenticator() *MoveAuthenticator + AsMoveAuthenticatorOpt() **MoveAuthenticator AsMultisig() *MultisigAggregatedSignature AsMultisigOpt() **MultisigAggregatedSignature - AsPasskey() *PasskeyAuthenticator - AsPasskeyOpt() **PasskeyAuthenticator + AsPasskeyAuthenticator() *PasskeyAuthenticator + AsPasskeyAuthenticatorOpt() **PasskeyAuthenticator AsSimple() *SimpleSignature AsSimpleOpt() **SimpleSignature - AsZklogin() *ZkLoginAuthenticator - AsZkloginOpt() **ZkLoginAuthenticator + AsZkloginAuthenticator() *ZkLoginAuthenticator + AsZkloginAuthenticatorOpt() **ZkLoginAuthenticator + IsMoveAuthenticator() bool IsMultisig() bool - IsPasskey() bool + IsPasskeyAuthenticator() bool IsSimple() bool - IsZklogin() bool + IsZkloginAuthenticator() bool // Return the flag for this signature scheme Scheme() SignatureScheme ToBase64() string @@ -29037,7 +29299,7 @@ type UserSignatureInterface interface { // // ```text // user-signature-bcs = bytes ; where the contents of the bytes are defined by -// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey +// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator // ``` // // Note: Due to historical reasons, signatures are serialized slightly @@ -29074,15 +29336,21 @@ func UserSignatureFromBytes(bytes []byte) (*UserSignature, error) { } } +func UserSignatureNewMoveAuthenticator(authenticator *MoveAuthenticator) *UserSignature { + return FfiConverterUserSignatureINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_move_authenticator(FfiConverterMoveAuthenticatorINSTANCE.Lower(authenticator),_uniffiStatus) + })) +} + func UserSignatureNewMultisig(signature *MultisigAggregatedSignature) *UserSignature { return FfiConverterUserSignatureINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig(FfiConverterMultisigAggregatedSignatureINSTANCE.Lower(signature),_uniffiStatus) })) } -func UserSignatureNewPasskey(authenticator *PasskeyAuthenticator) *UserSignature { +func UserSignatureNewPasskeyAuthenticator(authenticator *PasskeyAuthenticator) *UserSignature { return FfiConverterUserSignatureINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey(FfiConverterPasskeyAuthenticatorINSTANCE.Lower(authenticator),_uniffiStatus) + return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator(FfiConverterPasskeyAuthenticatorINSTANCE.Lower(authenticator),_uniffiStatus) })) } @@ -29092,14 +29360,34 @@ func UserSignatureNewSimple(signature *SimpleSignature) *UserSignature { })) } -func UserSignatureNewZklogin(authenticator *ZkLoginAuthenticator) *UserSignature { +func UserSignatureNewZkloginAuthenticator(authenticator *ZkLoginAuthenticator) *UserSignature { return FfiConverterUserSignatureINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin(FfiConverterZkLoginAuthenticatorINSTANCE.Lower(authenticator),_uniffiStatus) + return C.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator(FfiConverterZkLoginAuthenticatorINSTANCE.Lower(authenticator),_uniffiStatus) })) } +func (_self *UserSignature) AsMoveAuthenticator() *MoveAuthenticator { + _pointer := _self.ffiObject.incrementPointer("*UserSignature") + defer _self.ffiObject.decrementPointer() + return FfiConverterMoveAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator( + _pointer,_uniffiStatus) + })) +} + +func (_self *UserSignature) AsMoveAuthenticatorOpt() **MoveAuthenticator { + _pointer := _self.ffiObject.incrementPointer("*UserSignature") + defer _self.ffiObject.decrementPointer() + return FfiConverterOptionalMoveAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { + return GoRustBuffer { + inner: C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt( + _pointer,_uniffiStatus), + } + })) +} + func (_self *UserSignature) AsMultisig() *MultisigAggregatedSignature { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() @@ -29120,21 +29408,21 @@ func (_self *UserSignature) AsMultisigOpt() **MultisigAggregatedSignature { })) } -func (_self *UserSignature) AsPasskey() *PasskeyAuthenticator { +func (_self *UserSignature) AsPasskeyAuthenticator() *PasskeyAuthenticator { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterPasskeyAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey( + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator( _pointer,_uniffiStatus) })) } -func (_self *UserSignature) AsPasskeyOpt() **PasskeyAuthenticator { +func (_self *UserSignature) AsPasskeyAuthenticatorOpt() **PasskeyAuthenticator { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterOptionalPasskeyAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { return GoRustBuffer { - inner: C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt( + inner: C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_opt( _pointer,_uniffiStatus), } })) @@ -29160,26 +29448,35 @@ func (_self *UserSignature) AsSimpleOpt() **SimpleSignature { })) } -func (_self *UserSignature) AsZklogin() *ZkLoginAuthenticator { +func (_self *UserSignature) AsZkloginAuthenticator() *ZkLoginAuthenticator { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterZkLoginAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin( + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator( _pointer,_uniffiStatus) })) } -func (_self *UserSignature) AsZkloginOpt() **ZkLoginAuthenticator { +func (_self *UserSignature) AsZkloginAuthenticatorOpt() **ZkLoginAuthenticator { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterOptionalZkLoginAuthenticatorINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { return GoRustBuffer { - inner: C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt( + inner: C.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_opt( _pointer,_uniffiStatus), } })) } +func (_self *UserSignature) IsMoveAuthenticator() bool { + _pointer := _self.ffiObject.incrementPointer("*UserSignature") + defer _self.ffiObject.decrementPointer() + return FfiConverterBoolINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.int8_t { + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator( + _pointer,_uniffiStatus) + })) +} + func (_self *UserSignature) IsMultisig() bool { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() @@ -29189,11 +29486,11 @@ func (_self *UserSignature) IsMultisig() bool { })) } -func (_self *UserSignature) IsPasskey() bool { +func (_self *UserSignature) IsPasskeyAuthenticator() bool { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterBoolINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.int8_t { - return C.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey( + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator( _pointer,_uniffiStatus) })) } @@ -29207,11 +29504,11 @@ func (_self *UserSignature) IsSimple() bool { })) } -func (_self *UserSignature) IsZklogin() bool { +func (_self *UserSignature) IsZkloginAuthenticator() bool { _pointer := _self.ffiObject.incrementPointer("*UserSignature") defer _self.ffiObject.decrementPointer() return FfiConverterBoolINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.int8_t { - return C.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin( + return C.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator( _pointer,_uniffiStatus) })) } @@ -36830,14 +37127,16 @@ func (_ FfiDestroyerSdkFfiError) Destroy(value *SdkFfiError) { // // ```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 +// multisig-flag / bls-flag / zklogin-auth-flag / passkey-auth-flag / +// move-auth-flag +// ed25519-flag = %x00 +// secp256k1-flag = %x01 +// secp256r1-flag = %x02 +// multisig-flag = %x03 +// bls-flag = %x04 +// zklogin-auth-flag = %x05 +// passkey-auth-flag = %x06 +// move-auth-flag = %x07 // ``` type SignatureScheme uint8 @@ -36847,8 +37146,9 @@ const ( SignatureSchemeSecp256r1 SignatureScheme = 2 SignatureSchemeMultisig SignatureScheme = 3 SignatureSchemeBls12381 SignatureScheme = 4 - SignatureSchemeZkLogin SignatureScheme = 5 - SignatureSchemePasskey SignatureScheme = 6 + SignatureSchemeZkLoginAuthenticator SignatureScheme = 5 + SignatureSchemePasskeyAuthenticator SignatureScheme = 6 + SignatureSchemeMoveAuthenticator SignatureScheme = 7 ) type FfiConverterSignatureScheme struct {} @@ -37774,6 +38074,43 @@ func (_ FfiDestroyerOptionalMoveArg) Destroy(value **MoveArg) { } } +type FfiConverterOptionalMoveAuthenticator struct{} + +var FfiConverterOptionalMoveAuthenticatorINSTANCE = FfiConverterOptionalMoveAuthenticator{} + +func (c FfiConverterOptionalMoveAuthenticator) Lift(rb RustBufferI) **MoveAuthenticator { + return LiftFromRustBuffer[**MoveAuthenticator](c, rb) +} + +func (_ FfiConverterOptionalMoveAuthenticator) Read(reader io.Reader) **MoveAuthenticator { + if readInt8(reader) == 0 { + return nil + } + temp := FfiConverterMoveAuthenticatorINSTANCE.Read(reader) + return &temp +} + +func (c FfiConverterOptionalMoveAuthenticator) Lower(value **MoveAuthenticator) C.RustBuffer { + return LowerIntoRustBuffer[**MoveAuthenticator](c, value) +} + +func (_ FfiConverterOptionalMoveAuthenticator) Write(writer io.Writer, value **MoveAuthenticator) { + if value == nil { + writeInt8(writer, 0) + } else { + writeInt8(writer, 1) + FfiConverterMoveAuthenticatorINSTANCE.Write(writer, *value) + } +} + +type FfiDestroyerOptionalMoveAuthenticator struct {} + +func (_ FfiDestroyerOptionalMoveAuthenticator) Destroy(value **MoveAuthenticator) { + if value != nil { + FfiDestroyerMoveAuthenticator{}.Destroy(*value) + } +} + type FfiConverterOptionalMoveFunction struct{} var FfiConverterOptionalMoveFunctionINSTANCE = FfiConverterOptionalMoveFunction{} diff --git a/bindings/go/iota_sdk/iota_sdk.h b/bindings/go/iota_sdk/iota_sdk.h index 514a82eef..6deb92c35 100644 --- a/bindings/go/iota_sdk/iota_sdk.h +++ b/bindings/go/iota_sdk/iota_sdk.h @@ -1159,6 +1159,11 @@ uint64_t uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_dry_run(void* pt uint64_t uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute(void* ptr, void* signer, RustBuffer wait_for ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_MOVE_AUTHENTICATOR +uint64_t uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator(void* ptr, RustBuffer inputs, RustBuffer type_args, RustBuffer wait_for +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_SPONSOR #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_SPONSOR uint64_t uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_sponsor(void* ptr, void* signer, void* sponsor_signer, RustBuffer wait_for @@ -2472,6 +2477,46 @@ void* uniffi_iota_sdk_ffi_fn_constructor_movearg_u8(uint8_t value, RustCallStatu void* uniffi_iota_sdk_ffi_fn_constructor_movearg_u8_vec(RustBuffer values, RustCallStatus *out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CLONE_MOVEAUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CLONE_MOVEAUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_clone_moveauthenticator(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_FREE_MOVEAUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_FREE_MOVEAUTHENTICATOR +void uniffi_iota_sdk_ffi_fn_free_moveauthenticator(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_IMMUTABLE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_IMMUTABLE +void* uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable(RustBuffer call_args, RustBuffer type_args, RustBuffer object_to_authenticate, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_SHARED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_SHARED +void* uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared(RustBuffer call_args, RustBuffer type_args, void* object_to_authenticate, uint64_t initial_shared_version, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_ADDRESS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_ADDRESS +void* uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_CALL_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_CALL_ARGS +RustBuffer uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_OBJECT_TO_AUTHENTICATE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_OBJECT_TO_AUTHENTICATE +void* uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_TYPE_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_MOVEAUTHENTICATOR_TYPE_ARGS +RustBuffer uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args(void* ptr, RustCallStatus *out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CLONE_MOVECALL #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CLONE_MOVECALL void* uniffi_iota_sdk_ffi_fn_clone_movecall(void* ptr, RustCallStatus *out_status @@ -5517,14 +5562,19 @@ void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64(RustBuffer ba void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes(RustBuffer bytes, RustCallStatus *out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_MOVE_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_move_authenticator(void* authenticator, RustCallStatus *out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_MULTISIG #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_MULTISIG void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_multisig(void* signature, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY -void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey(void* authenticator, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator(void* authenticator, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_SIMPLE @@ -5532,9 +5582,19 @@ void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey(void* authent void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_simple(void* signature, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN -void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin(void* authenticator, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator(void* authenticator, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR_OPT +RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt(void* ptr, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_MULTISIG @@ -5547,14 +5607,14 @@ void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig(void* ptr, RustCal RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY -void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_OPT -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_OPT -RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR_OPT +RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_opt(void* ptr, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_SIMPLE @@ -5567,14 +5627,19 @@ void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple(void* ptr, RustCallS RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN -void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR +void* uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR_OPT +RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_opt(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_OPT -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_AS_ZKLOGIN_OPT -RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_MOVE_AUTHENTICATOR +int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator(void* ptr, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_MULTISIG @@ -5582,9 +5647,9 @@ RustBuffer uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt(void* ptr, int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_PASSKEY -int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_PASSKEY_AUTHENTICATOR +int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator(void* ptr, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_SIMPLE @@ -5592,9 +5657,9 @@ int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey(void* ptr, RustCal int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_ZKLOGIN -int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin(void* ptr, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_IS_ZKLOGIN_AUTHENTICATOR +int8_t uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator(void* ptr, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_USERSIGNATURE_SCHEME @@ -9210,6 +9275,12 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_dry_run(vo #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE uint16_t uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_MOVE_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_CLIENTTRANSACTIONBUILDER_EXECUTE_WITH_SPONSOR @@ -9960,6 +10031,30 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin(void #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MERGECOINS_COINS_TO_MERGE uint16_t uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_ADDRESS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_ADDRESS +uint16_t uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_CALL_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_CALL_ARGS +uint16_t uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_OBJECT_TO_AUTHENTICATE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_OBJECT_TO_AUTHENTICATE +uint16_t uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_TYPE_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVEAUTHENTICATOR_TYPE_ARGS +uint16_t uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_MOVECALL_ARGUMENTS @@ -11694,6 +11789,18 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket(void #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_UPGRADEPOLICY_AS_U8 uint16_t uniffi_iota_sdk_ffi_checksum_method_upgradepolicy_as_u8(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_MOVE_AUTHENTICATOR_OPT +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_MULTISIG @@ -11708,15 +11815,15 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_OPT -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_OPT -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_PASSKEY_AUTHENTICATOR_OPT +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt(void ); #endif @@ -11732,15 +11839,21 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_OPT -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_OPT -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR_OPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_AS_ZKLOGIN_AUTHENTICATOR_OPT +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_MOVE_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator(void ); #endif @@ -11750,9 +11863,9 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_PASSKEY -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_PASSKEY_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator(void ); #endif @@ -11762,9 +11875,9 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_ZKLOGIN -uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_USERSIGNATURE_IS_ZKLOGIN_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator(void ); #endif @@ -12750,6 +12863,18 @@ uint16_t uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8(void #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVEARG_U8_VEC uint16_t uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8_vec(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_IMMUTABLE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_IMMUTABLE +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_SHARED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVEAUTHENTICATOR_NEW_SHARED +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_MOVECALL_NEW @@ -13878,6 +14003,12 @@ uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64(void #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_FROM_BYTES uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_MOVE_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_MOVE_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_MULTISIG @@ -13886,9 +14017,9 @@ uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig(voi ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_PASSKEY_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator(void ); #endif @@ -13898,9 +14029,9 @@ uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN_AUTHENTICATOR +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_USERSIGNATURE_NEW_ZKLOGIN_AUTHENTICATOR +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator(void ); #endif diff --git a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt index 47bbf43a3..c9c09ce3a 100644 --- a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt +++ b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt @@ -3142,6 +3142,30 @@ internal open class UniffiVTableCallbackInterfaceTransactionSignerFn( + + + + + + + + + + + + + + + + + + + + + + + + @@ -3782,6 +3806,8 @@ fun uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_dry_run( ): Short fun uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute( ): Short +fun uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator( +): Short fun uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor( ): Short fun uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_expiration( @@ -4032,6 +4058,14 @@ fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coin( ): Short fun uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge( ): Short +fun uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args( +): Short fun uniffi_iota_sdk_ffi_checksum_method_movecall_arguments( ): Short fun uniffi_iota_sdk_ffi_checksum_method_movecall_function( @@ -4610,29 +4644,35 @@ fun uniffi_iota_sdk_ffi_checksum_method_upgrade_ticket( ): Short fun uniffi_iota_sdk_ffi_checksum_method_upgradepolicy_as_u8( ): Short +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt( +): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin( +fun uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator( ): Short fun uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme( ): Short @@ -4962,6 +5002,10 @@ fun uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8_vec( ): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared( +): Short fun uniffi_iota_sdk_ffi_checksum_constructor_movecall_new( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_movepackage_new( @@ -5338,13 +5382,15 @@ fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes( ): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator( +): Short fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey( +fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin( +fun uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new( ): Short @@ -5722,6 +5768,8 @@ fun uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_dry_run(`ptr`: Pointe ): Long fun uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute(`ptr`: Pointer,`signer`: Pointer,`waitFor`: RustBuffer.ByValue, ): Long +fun uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator(`ptr`: Pointer,`inputs`: RustBuffer.ByValue,`typeArgs`: RustBuffer.ByValue,`waitFor`: RustBuffer.ByValue, +): Long fun uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_sponsor(`ptr`: Pointer,`signer`: Pointer,`sponsorSigner`: Pointer,`waitFor`: RustBuffer.ByValue, ): Long fun uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_expiration(`ptr`: Pointer,`epoch`: Long,uniffi_out_err: UniffiRustCallStatus, @@ -6240,6 +6288,22 @@ fun uniffi_iota_sdk_ffi_fn_constructor_movearg_u8(`value`: Byte,uniffi_out_err: ): Pointer fun uniffi_iota_sdk_ffi_fn_constructor_movearg_u8_vec(`values`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer +fun uniffi_iota_sdk_ffi_fn_clone_moveauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_free_moveauthenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Unit +fun uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable(`callArgs`: RustBuffer.ByValue,`typeArgs`: RustBuffer.ByValue,`objectToAuthenticate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared(`callArgs`: RustBuffer.ByValue,`typeArgs`: RustBuffer.ByValue,`objectToAuthenticate`: Pointer,`initialSharedVersion`: Long,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +fun uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args(`ptr`: Pointer,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, @@ -7438,37 +7502,45 @@ fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64(`base64`: RustB ): 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_move_authenticator(`authenticator`: Pointer,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, +fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator(`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, +fun uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator(`authenticator`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue 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, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_opt(`ptr`: Pointer,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, ): RustBuffer.ByValue -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Byte fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_iota_sdk_ffi_fn_method_usersignature_scheme(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue @@ -9110,6 +9182,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute() != 58102.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator() != 36216.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor() != 8183.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -9485,6 +9560,18 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_mergecoins_coins_to_merge() != 44350.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address() != 24164.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args() != 1111.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate() != 40516.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args() != 63576.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_method_movecall_arguments() != 17202.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -10352,16 +10439,22 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_upgradepolicy_as_u8() != 10203.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator() != 62044.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt() != 31940.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig() != 36332.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt() != 21895.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey() != 17710.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator() != 38663.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt() != 53755.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt() != 5213.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple() != 57455.toShort()) { @@ -10370,22 +10463,25 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt() != 47248.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin() != 53484.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator() != 64789.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt() != 43934.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt() != 62080.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator() != 59771.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig() != 61839.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey() != 35671.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator() != 7851.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple() != 58211.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin() != 38693.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator() != 35546.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme() != 25381.toShort()) { @@ -10880,6 +10976,12 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8_vec() != 4587.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable() != 19047.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared() != 5389.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_movecall_new() != 30411.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -11444,16 +11546,19 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes() != 37499.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator() != 7262.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_multisig() != 39922.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey() != 25378.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator() != 45324.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_simple() != 31310.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin() != 43856.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator() != 30659.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignatureverifier_new() != 32322.toShort()) { @@ -18511,6 +18616,12 @@ public interface ClientTransactionBuilderInterface { */ suspend fun `execute`(`signer`: TransactionSigner, `waitFor`: WaitForTx? = null): TransactionEffects + /** + * Execute the transaction with the provided move authenticator call data + * and optionally wait for finalization. + */ + suspend fun `executeWithMoveAuthenticator`(`inputs`: List = listOf(), `typeArgs`: List = listOf(), `waitFor`: WaitForTx? = null): TransactionEffects + /** * Execute the transaction and optionally wait for finalization. */ @@ -18794,6 +18905,31 @@ open class ClientTransactionBuilder: Disposable, AutoCloseable, ClientTransactio } + /** + * Execute the transaction with the provided move authenticator call data + * and optionally wait for finalization. + */ + @Throws(SdkFfiException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `executeWithMoveAuthenticator`(`inputs`: List, `typeArgs`: List, `waitFor`: WaitForTx?) : TransactionEffects { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator( + thisPtr, + FfiConverterSequenceTypePTBArgument.lower(`inputs`),FfiConverterSequenceTypeTypeTag.lower(`typeArgs`),FfiConverterOptionalTypeWaitForTx.lower(`waitFor`), + ) + }, + { 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) }, + // lift function + { FfiConverterTypeTransactionEffects.lift(it) }, + // Error FFI converter + SdkFfiException.ErrorHandler, + ) + } + + /** * Execute the transaction and optionally wait for finalization. */ @@ -28507,6 +28643,323 @@ public object FfiConverterTypeMoveArg: FfiConverter { // +/** + * MoveAuthenticator is a signature variant that enables a method of + * authentication through Move code. This function represents the data received + * by the Move authenticate function during the Account Abstraction + * authentication flow. + */ +public interface MoveAuthenticatorInterface { + + fun `address`(): Address + + fun `callArgs`(): List + + fun `objectToAuthenticate`(): Input + + fun `typeArgs`(): List + + companion object +} + +/** + * MoveAuthenticator is a signature variant that enables a method of + * authentication through Move code. This function represents the data received + * by the Move authenticate function during the Account Abstraction + * authentication flow. + */ +open class MoveAuthenticator: Disposable, AutoCloseable, MoveAuthenticatorInterface +{ + + 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("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() + } + } + } + + // 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_moveauthenticator(ptr, status) + } + } + } + } + + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_clone_moveauthenticator(pointer!!, status) + } + } + + override fun `address`(): Address { + return FfiConverterTypeAddress.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address( + it, _status) +} + } + ) + } + + + override fun `callArgs`(): List { + return FfiConverterSequenceTypeInput.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args( + it, _status) +} + } + ) + } + + + override fun `objectToAuthenticate`(): Input { + return FfiConverterTypeInput.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate( + it, _status) +} + } + ) + } + + + override fun `typeArgs`(): List { + return FfiConverterSequenceTypeTypeTag.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args( + it, _status) +} + } + ) + } + + + + + + companion object { + + /** + * Create a new move authenticator from an immutable object. + */ fun `newImmutable`(`callArgs`: List, `typeArgs`: List, `objectToAuthenticate`: ObjectReference): MoveAuthenticator { + return FfiConverterTypeMoveAuthenticator.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable( + FfiConverterSequenceTypeInput.lower(`callArgs`),FfiConverterSequenceTypeTypeTag.lower(`typeArgs`),FfiConverterTypeObjectReference.lower(`objectToAuthenticate`),_status) +} + ) + } + + + + /** + * Create a new move authenticator from a shared object. + */ fun `newShared`(`callArgs`: List, `typeArgs`: List, `objectToAuthenticate`: ObjectId, `initialSharedVersion`: kotlin.ULong): MoveAuthenticator { + return FfiConverterTypeMoveAuthenticator.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared( + FfiConverterSequenceTypeInput.lower(`callArgs`),FfiConverterSequenceTypeTypeTag.lower(`typeArgs`),FfiConverterTypeObjectId.lower(`objectToAuthenticate`),FfiConverterULong.lower(`initialSharedVersion`),_status) +} + ) + } + + + + } + +} + +/** + * @suppress + */ +public object FfiConverterTypeMoveAuthenticator: FfiConverter { + + override fun lower(value: MoveAuthenticator): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): MoveAuthenticator { + return MoveAuthenticator(value) + } + + override fun read(buf: ByteBuffer): MoveAuthenticator { + // 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: MoveAuthenticator) = 8UL + + override fun write(value: MoveAuthenticator, 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 +// + + /** * Command to call a move function * @@ -48858,7 +49311,7 @@ public object FfiConverterTypeUpgradePolicy: FfiConverter - * user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + * user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator * ``` * * Note: Due to historical reasons, signatures are serialized slightly @@ -48869,29 +49322,35 @@ public object FfiConverterTypeUpgradePolicy: FfiConverter - * user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + * user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator * ``` * * Note: Due to historical reasons, signatures are serialized slightly @@ -49008,6 +49467,30 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } } + override fun `asMoveAuthenticator`(): MoveAuthenticator { + return FfiConverterTypeMoveAuthenticator.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator( + it, _status) +} + } + ) + } + + + override fun `asMoveAuthenticatorOpt`(): MoveAuthenticator? { + return FfiConverterOptionalTypeMoveAuthenticator.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt( + it, _status) +} + } + ) + } + + override fun `asMultisig`(): MultisigAggregatedSignature { return FfiConverterTypeMultisigAggregatedSignature.lift( callWithPointer { @@ -49032,11 +49515,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `asPasskey`(): PasskeyAuthenticator { + override fun `asPasskeyAuthenticator`(): PasskeyAuthenticator { return FfiConverterTypePasskeyAuthenticator.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator( it, _status) } } @@ -49044,11 +49527,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `asPasskeyOpt`(): PasskeyAuthenticator? { + override fun `asPasskeyAuthenticatorOpt`(): PasskeyAuthenticator? { return FfiConverterOptionalTypePasskeyAuthenticator.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_opt( it, _status) } } @@ -49080,11 +49563,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `asZklogin`(): ZkLoginAuthenticator { + override fun `asZkloginAuthenticator`(): ZkLoginAuthenticator { return FfiConverterTypeZkLoginAuthenticator.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator( it, _status) } } @@ -49092,11 +49575,23 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `asZkloginOpt`(): ZkLoginAuthenticator? { + override fun `asZkloginAuthenticatorOpt`(): ZkLoginAuthenticator? { return FfiConverterOptionalTypeZkLoginAuthenticator.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_opt( + it, _status) +} + } + ) + } + + + override fun `isMoveAuthenticator`(): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator( it, _status) } } @@ -49116,11 +49611,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `isPasskey`(): kotlin.Boolean { + override fun `isPasskeyAuthenticator`(): kotlin.Boolean { return FfiConverterBoolean.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator( it, _status) } } @@ -49140,11 +49635,11 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - override fun `isZklogin`(): kotlin.Boolean { + override fun `isZkloginAuthenticator`(): kotlin.Boolean { return FfiConverterBoolean.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator( it, _status) } } @@ -49217,6 +49712,16 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } + fun `newMoveAuthenticator`(`authenticator`: MoveAuthenticator): UserSignature { + return FfiConverterTypeUserSignature.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_move_authenticator( + FfiConverterTypeMoveAuthenticator.lower(`authenticator`),_status) +} + ) + } + + fun `newMultisig`(`signature`: MultisigAggregatedSignature): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> @@ -49227,10 +49732,10 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - fun `newPasskey`(`authenticator`: PasskeyAuthenticator): UserSignature { + fun `newPasskeyAuthenticator`(`authenticator`: PasskeyAuthenticator): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator( FfiConverterTypePasskeyAuthenticator.lower(`authenticator`),_status) } ) @@ -49247,10 +49752,10 @@ open class UserSignature: Disposable, AutoCloseable, UserSignatureInterface } - fun `newZklogin`(`authenticator`: ZkLoginAuthenticator): UserSignature { + fun `newZkloginAuthenticator`(`authenticator`: ZkLoginAuthenticator): UserSignature { return FfiConverterTypeUserSignature.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator( FfiConverterTypeZkLoginAuthenticator.lower(`authenticator`),_status) } ) @@ -60044,14 +60549,16 @@ public object FfiConverterTypeSdkFfiError : FfiConverterRustBuffer +/** + * @suppress + */ +public object FfiConverterOptionalTypeMoveAuthenticator: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): MoveAuthenticator? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeMoveAuthenticator.read(buf) + } + + override fun allocationSize(value: MoveAuthenticator?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeMoveAuthenticator.allocationSize(value) + } + } + + override fun write(value: MoveAuthenticator?, buf: ByteBuffer) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeMoveAuthenticator.write(value, buf) + } + } +} + + + + /** * @suppress */ diff --git a/bindings/python/lib/iota_sdk.py b/bindings/python/lib/iota_sdk.py index 61d77a831..82fbe5f6b 100644 --- a/bindings/python/lib/iota_sdk.py +++ b/bindings/python/lib/iota_sdk.py @@ -1065,6 +1065,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_clienttransactionbuilder_execute() != 58102: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator() != 36216: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor() != 8183: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_expiration() != 32958: @@ -1315,6 +1317,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_mergecoins_coins_to_merge() != 44350: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address() != 24164: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args() != 1111: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate() != 40516: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args() != 63576: + 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: @@ -1893,29 +1903,35 @@ 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_upgradepolicy_as_u8() != 10203: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator() != 62044: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt() != 31940: + 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: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey() != 17710: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator() != 38663: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt() != 53755: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_opt() != 5213: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple() != 57455: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt() != 47248: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin() != 53484: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator() != 64789: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt() != 43934: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_opt() != 62080: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator() != 59771: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig() != 61839: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey() != 35671: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator() != 7851: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple() != 58211: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin() != 38693: + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator() != 35546: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme() != 25381: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -2245,6 +2261,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_constructor_movearg_u8_vec() != 4587: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable() != 19047: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared() != 5389: + 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: @@ -2621,13 +2641,15 @@ 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_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_move_authenticator() != 7262: + 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: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator() != 45324: 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: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator() != 30659: 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") @@ -3572,6 +3594,13 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _UniffiRustBuffer, ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator.argtypes = ( + ctypes.c_void_p, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator.restype = ctypes.c_uint64 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_sponsor.argtypes = ( ctypes.c_void_p, ctypes.c_void_p, @@ -4956,6 +4985,51 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_movearg_u8_vec.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_moveauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_moveauthenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_moveauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_moveauthenticator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared.argtypes = ( + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_void_p, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movecall.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -8045,26 +8119,41 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): 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_move_authenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_move_authenticator.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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator.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_passkey_authenticator.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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator.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_move_authenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -8075,16 +8164,16 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): 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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator.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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_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_passkey_authenticator_opt.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -8095,36 +8184,41 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): 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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator.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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_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_as_zklogin_authenticator_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator.restype = ctypes.c_int8 _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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator.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_passkey_authenticator.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 = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator.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_is_zklogin_authenticator.restype = ctypes.c_int8 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -10844,6 +10938,9 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_move_authenticator.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_clienttransactionbuilder_execute_with_sponsor.restype = ctypes.c_uint16 @@ -11219,6 +11316,18 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _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_moveauthenticator_address.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_address.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_call_args.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_object_to_authenticate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_moveauthenticator_type_args.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 @@ -12086,42 +12195,51 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgradepolicy_as_u8.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_upgradepolicy_as_u8.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_move_authenticator_opt.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_authenticator.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_authenticator.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_authenticator_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_passkey_authenticator_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_authenticator.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_authenticator.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_authenticator_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_as_zklogin_authenticator_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_move_authenticator.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_authenticator.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey_authenticator.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_authenticator.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin_authenticator.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 @@ -12614,6 +12732,12 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8_vec.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_movearg_u8_vec.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_immutable.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_moveauthenticator_new_shared.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 @@ -13178,18 +13302,21 @@ class _UniffiVTableCallbackInterfaceTransactionSignerFn(ctypes.Structure): _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_move_authenticator.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_move_authenticator.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_authenticator.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_passkey_authenticator.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_authenticator.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_new_zklogin_authenticator.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 @@ -13689,6 +13816,8 @@ def write(value, buf): + + @@ -22139,14 +22268,16 @@ class SignatureScheme(enum.Enum): ```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 + multisig-flag / bls-flag / zklogin-auth-flag / passkey-auth-flag / + move-auth-flag + ed25519-flag = %x00 + secp256k1-flag = %x01 + secp256r1-flag = %x02 + multisig-flag = %x03 + bls-flag = %x04 + zklogin-auth-flag = %x05 + passkey-auth-flag = %x06 + move-auth-flag = %x07 ``` """ @@ -22160,9 +22291,11 @@ class SignatureScheme(enum.Enum): BLS12381 = 4 - ZK_LOGIN = 5 + ZK_LOGIN_AUTHENTICATOR = 5 + + PASSKEY_AUTHENTICATOR = 6 - PASSKEY = 6 + MOVE_AUTHENTICATOR = 7 @@ -22181,9 +22314,11 @@ def read(buf): if variant == 5: return SignatureScheme.BLS12381 if variant == 6: - return SignatureScheme.ZK_LOGIN + return SignatureScheme.ZK_LOGIN_AUTHENTICATOR if variant == 7: - return SignatureScheme.PASSKEY + return SignatureScheme.PASSKEY_AUTHENTICATOR + if variant == 8: + return SignatureScheme.MOVE_AUTHENTICATOR raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -22198,9 +22333,11 @@ def check_lower(value): return if value == SignatureScheme.BLS12381: return - if value == SignatureScheme.ZK_LOGIN: + if value == SignatureScheme.ZK_LOGIN_AUTHENTICATOR: + return + if value == SignatureScheme.PASSKEY_AUTHENTICATOR: return - if value == SignatureScheme.PASSKEY: + if value == SignatureScheme.MOVE_AUTHENTICATOR: return raise ValueError(value) @@ -22216,10 +22353,12 @@ def write(value, buf): buf.write_i32(4) if value == SignatureScheme.BLS12381: buf.write_i32(5) - if value == SignatureScheme.ZK_LOGIN: + if value == SignatureScheme.ZK_LOGIN_AUTHENTICATOR: buf.write_i32(6) - if value == SignatureScheme.PASSKEY: + if value == SignatureScheme.PASSKEY_AUTHENTICATOR: buf.write_i32(7) + if value == SignatureScheme.MOVE_AUTHENTICATOR: + buf.write_i32(8) @@ -23282,6 +23421,33 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeMoveAuthenticator(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeMoveAuthenticator.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeMoveAuthenticator.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeMoveAuthenticator.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeMoveFunction(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -30150,6 +30316,13 @@ def execute(self, signer: "TransactionSigner",wait_for: "typing.Union[object, ty Execute the transaction and optionally wait for finalization. """ + raise NotImplementedError + def execute_with_move_authenticator(self, inputs: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT): + """ + Execute the transaction with the provided move authenticator call data + and optionally wait for finalization. + """ + raise NotImplementedError def execute_with_sponsor(self, signer: "TransactionSigner",sponsor_signer: "TransactionSigner",wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT): """ @@ -30402,6 +30575,44 @@ async def execute(self, signer: "TransactionSigner",wait_for: "typing.Union[obje + async def execute_with_move_authenticator(self, inputs: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT) -> "TransactionEffects": + """ + Execute the transaction with the provided move authenticator call data + and optionally wait for finalization. + """ + + if inputs is _DEFAULT: + inputs = [] + _UniffiConverterSequenceTypePtbArgument.check_lower(inputs) + + if type_args is _DEFAULT: + type_args = [] + _UniffiConverterSequenceTypeTypeTag.check_lower(type_args) + + if wait_for is _DEFAULT: + wait_for = None + _UniffiConverterOptionalTypeWaitForTx.check_lower(wait_for) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_clienttransactionbuilder_execute_with_move_authenticator( + self._uniffi_clone_pointer(), + _UniffiConverterSequenceTypePtbArgument.lower(inputs), + _UniffiConverterSequenceTypeTypeTag.lower(type_args), + _UniffiConverterOptionalTypeWaitForTx.lower(wait_for) + ), + _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 + _UniffiConverterTypeTransactionEffects.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + async def execute_with_sponsor(self, signer: "TransactionSigner",sponsor_signer: "TransactionSigner",wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT) -> "TransactionEffects": """ Execute the transaction and optionally wait for finalization. @@ -36402,6 +36613,160 @@ def read(cls, buf: _UniffiRustBuffer): @classmethod def write(cls, value: MoveArgProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) +class MoveAuthenticatorProtocol(typing.Protocol): + """ + MoveAuthenticator is a signature variant that enables a method of + authentication through Move code. This function represents the data received + by the Move authenticate function during the Account Abstraction + authentication flow. + """ + + def address(self, ): + raise NotImplementedError + def call_args(self, ): + raise NotImplementedError + def object_to_authenticate(self, ): + raise NotImplementedError + def type_args(self, ): + raise NotImplementedError +# MoveAuthenticator is a Rust-only trait - it's a wrapper around a Rust implementation. +class MoveAuthenticator(): + """ + MoveAuthenticator is a signature variant that enables a method of + authentication through Move code. This function represents the data received + by the Move authenticate function during the Account Abstraction + authentication flow. + """ + + _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_moveauthenticator, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_moveauthenticator, 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_immutable(cls, call_args: "typing.List[Input]",type_args: "typing.List[TypeTag]",object_to_authenticate: "ObjectReference"): + """ + Create a new move authenticator from an immutable object. + """ + + _UniffiConverterSequenceTypeInput.check_lower(call_args) + + _UniffiConverterSequenceTypeTypeTag.check_lower(type_args) + + _UniffiConverterTypeObjectReference.check_lower(object_to_authenticate) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_immutable, + _UniffiConverterSequenceTypeInput.lower(call_args), + _UniffiConverterSequenceTypeTypeTag.lower(type_args), + _UniffiConverterTypeObjectReference.lower(object_to_authenticate)) + return cls._make_instance_(pointer) + + @classmethod + def new_shared(cls, call_args: "typing.List[Input]",type_args: "typing.List[TypeTag]",object_to_authenticate: "ObjectId",initial_shared_version: "int"): + """ + Create a new move authenticator from a shared object. + """ + + _UniffiConverterSequenceTypeInput.check_lower(call_args) + + _UniffiConverterSequenceTypeTypeTag.check_lower(type_args) + + _UniffiConverterTypeObjectId.check_lower(object_to_authenticate) + + _UniffiConverterUInt64.check_lower(initial_shared_version) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_moveauthenticator_new_shared, + _UniffiConverterSequenceTypeInput.lower(call_args), + _UniffiConverterSequenceTypeTypeTag.lower(type_args), + _UniffiConverterTypeObjectId.lower(object_to_authenticate), + _UniffiConverterUInt64.lower(initial_shared_version)) + return cls._make_instance_(pointer) + + + + def address(self, ) -> "Address": + return _UniffiConverterTypeAddress.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_address,self._uniffi_clone_pointer(),) + ) + + + + + + def call_args(self, ) -> "typing.List[Input]": + return _UniffiConverterSequenceTypeInput.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_call_args,self._uniffi_clone_pointer(),) + ) + + + + + + def object_to_authenticate(self, ) -> "Input": + return _UniffiConverterTypeInput.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_object_to_authenticate,self._uniffi_clone_pointer(),) + ) + + + + + + def type_args(self, ) -> "typing.List[TypeTag]": + return _UniffiConverterSequenceTypeTypeTag.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_moveauthenticator_type_args,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeMoveAuthenticator: + + @staticmethod + def lift(value: int): + return MoveAuthenticator._make_instance_(value) + + @staticmethod + def check_lower(value: MoveAuthenticator): + if not isinstance(value, MoveAuthenticator): + raise TypeError("Expected MoveAuthenticator instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MoveAuthenticatorProtocol): + if not isinstance(value, MoveAuthenticator): + raise TypeError("Expected MoveAuthenticator 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: MoveAuthenticatorProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) class MoveCallProtocol(typing.Protocol): """ Command to call a move function @@ -46954,7 +47319,7 @@ class UserSignatureProtocol(typing.Protocol): ```text user-signature-bcs = bytes ; where the contents of the bytes are defined by - user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator ``` Note: Due to historical reasons, signatures are serialized slightly @@ -46964,29 +47329,35 @@ class UserSignatureProtocol(typing.Protocol): the completely serialized signature. """ + def as_move_authenticator(self, ): + raise NotImplementedError + def as_move_authenticator_opt(self, ): + raise NotImplementedError def as_multisig(self, ): raise NotImplementedError def as_multisig_opt(self, ): raise NotImplementedError - def as_passkey(self, ): + def as_passkey_authenticator(self, ): raise NotImplementedError - def as_passkey_opt(self, ): + def as_passkey_authenticator_opt(self, ): raise NotImplementedError def as_simple(self, ): raise NotImplementedError def as_simple_opt(self, ): raise NotImplementedError - def as_zklogin(self, ): + def as_zklogin_authenticator(self, ): raise NotImplementedError - def as_zklogin_opt(self, ): + def as_zklogin_authenticator_opt(self, ): + raise NotImplementedError + def is_move_authenticator(self, ): raise NotImplementedError def is_multisig(self, ): raise NotImplementedError - def is_passkey(self, ): + def is_passkey_authenticator(self, ): raise NotImplementedError def is_simple(self, ): raise NotImplementedError - def is_zklogin(self, ): + def is_zklogin_authenticator(self, ): raise NotImplementedError def scheme(self, ): """ @@ -47012,7 +47383,7 @@ class UserSignature(): ```text user-signature-bcs = bytes ; where the contents of the bytes are defined by - user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator ``` Note: Due to historical reasons, signatures are serialized slightly @@ -47062,6 +47433,15 @@ def from_bytes(cls, bytes: "bytes"): _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) + @classmethod + def new_move_authenticator(cls, authenticator: "MoveAuthenticator"): + _UniffiConverterTypeMoveAuthenticator.check_lower(authenticator) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_move_authenticator, + _UniffiConverterTypeMoveAuthenticator.lower(authenticator)) + return cls._make_instance_(pointer) + @classmethod def new_multisig(cls, signature: "MultisigAggregatedSignature"): _UniffiConverterTypeMultisigAggregatedSignature.check_lower(signature) @@ -47072,11 +47452,11 @@ def new_multisig(cls, signature: "MultisigAggregatedSignature"): return cls._make_instance_(pointer) @classmethod - def new_passkey(cls, authenticator: "PasskeyAuthenticator"): + def new_passkey_authenticator(cls, authenticator: "PasskeyAuthenticator"): _UniffiConverterTypePasskeyAuthenticator.check_lower(authenticator) # 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, + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_passkey_authenticator, _UniffiConverterTypePasskeyAuthenticator.lower(authenticator)) return cls._make_instance_(pointer) @@ -47090,16 +47470,34 @@ def new_simple(cls, signature: "SimpleSignature"): return cls._make_instance_(pointer) @classmethod - def new_zklogin(cls, authenticator: "ZkLoginAuthenticator"): + def new_zklogin_authenticator(cls, authenticator: "ZkLoginAuthenticator"): _UniffiConverterTypeZkLoginAuthenticator.check_lower(authenticator) # 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, + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_new_zklogin_authenticator, _UniffiConverterTypeZkLoginAuthenticator.lower(authenticator)) return cls._make_instance_(pointer) + def as_move_authenticator(self, ) -> "MoveAuthenticator": + return _UniffiConverterTypeMoveAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator,self._uniffi_clone_pointer(),) + ) + + + + + + def as_move_authenticator_opt(self, ) -> "typing.Optional[MoveAuthenticator]": + return _UniffiConverterOptionalTypeMoveAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_move_authenticator_opt,self._uniffi_clone_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(),) @@ -47118,18 +47516,18 @@ def as_multisig_opt(self, ) -> "typing.Optional[MultisigAggregatedSignature]": - def as_passkey(self, ) -> "PasskeyAuthenticator": + def as_passkey_authenticator(self, ) -> "PasskeyAuthenticator": return _UniffiConverterTypePasskeyAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator,self._uniffi_clone_pointer(),) ) - def as_passkey_opt(self, ) -> "typing.Optional[PasskeyAuthenticator]": + def as_passkey_authenticator_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_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_authenticator_opt,self._uniffi_clone_pointer(),) ) @@ -47154,18 +47552,27 @@ def as_simple_opt(self, ) -> "typing.Optional[SimpleSignature]": - def as_zklogin(self, ) -> "ZkLoginAuthenticator": + def as_zklogin_authenticator(self, ) -> "ZkLoginAuthenticator": return _UniffiConverterTypeZkLoginAuthenticator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator,self._uniffi_clone_pointer(),) ) - def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginAuthenticator]": + def as_zklogin_authenticator_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_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_authenticator_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def is_move_authenticator(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_move_authenticator,self._uniffi_clone_pointer(),) ) @@ -47181,9 +47588,9 @@ def is_multisig(self, ) -> "bool": - def is_passkey(self, ) -> "bool": + def is_passkey_authenticator(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey_authenticator,self._uniffi_clone_pointer(),) ) @@ -47199,9 +47606,9 @@ def is_simple(self, ) -> "bool": - def is_zklogin(self, ) -> "bool": + def is_zklogin_authenticator(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin_authenticator,self._uniffi_clone_pointer(),) ) @@ -51828,6 +52235,7 @@ def zk_login_public_identifier_to_bcs(data: "ZkLoginPublicIdentifier") -> "bytes "MakeMoveVector", "MergeCoins", "MoveArg", + "MoveAuthenticator", "MoveCall", "MoveFunction", "MovePackage", diff --git a/crates/iota-sdk-crypto/src/multisig.rs b/crates/iota-sdk-crypto/src/multisig.rs index f4a426ca1..8453f7f9c 100644 --- a/crates/iota-sdk-crypto/src/multisig.rs +++ b/crates/iota-sdk-crypto/src/multisig.rs @@ -223,30 +223,33 @@ impl UserSignatureVerifier { impl Verifier for UserSignatureVerifier { fn verify(&self, message: &[u8], signature: &UserSignature) -> Result<(), SignatureError> { match signature { - UserSignature::Simple(simple_signature) => { - crate::simple::SimpleVerifier.verify(message, simple_signature) + UserSignature::Simple(signature) => { + crate::simple::SimpleVerifier.verify(message, signature) } - UserSignature::Multisig(multisig) => self.inner.verify(message, multisig), + UserSignature::Multisig(signature) => self.inner.verify(message, signature), #[cfg(not(feature = "zklogin"))] - UserSignature::ZkLogin(_) => Err(SignatureError::from_source( + UserSignature::ZkLoginAuthenticator(_) => Err(SignatureError::from_source( "support for zklogin is not enabled", )), #[cfg(feature = "zklogin")] - UserSignature::ZkLogin(zklogin_authenticator) => { + UserSignature::ZkLoginAuthenticator(authenticator) => { let zklogin_verifier = self .zklogin_verifier() .ok_or_else(|| SignatureError::from_source("no zklogin verifier provided"))?; - zklogin_verifier.verify(message, zklogin_authenticator.as_ref()) + zklogin_verifier.verify(message, authenticator.as_ref()) } #[cfg(not(feature = "passkey"))] - UserSignature::Passkey(_) => Err(SignatureError::from_source( + UserSignature::PasskeyAuthenticator(_) => Err(SignatureError::from_source( "support for passkey is not enabled", )), #[cfg(feature = "passkey")] - UserSignature::Passkey(passkey_authenticator) => { - crate::passkey::PasskeyVerifier::default().verify(message, passkey_authenticator) + UserSignature::PasskeyAuthenticator(authenticator) => { + crate::passkey::PasskeyVerifier::default().verify(message, authenticator) } + UserSignature::MoveAuthenticator(_) => Err(SignatureError::from_source( + "move authenticators cannot be verified", + )), } } } @@ -380,11 +383,11 @@ fn multisig_pubkey_and_signature_from_user_signature( MultisigMemberSignature::Secp256r1(signature), )), #[cfg(not(feature = "zklogin"))] - UserSignature::ZkLogin(_) => Err(SignatureError::from_source( + UserSignature::ZkLoginAuthenticator(_) => Err(SignatureError::from_source( "support for zklogin is not enabled", )), #[cfg(feature = "zklogin")] - UserSignature::ZkLogin(zklogin_authenticator) => { + UserSignature::ZkLoginAuthenticator(zklogin_authenticator) => { let zklogin_identifier = zklogin_authenticator.inputs.public_identifier().to_owned(); Ok(( MultisigMemberPublicKey::ZkLogin(zklogin_identifier), @@ -392,7 +395,9 @@ fn multisig_pubkey_and_signature_from_user_signature( )) } - UserSignature::Multisig(_) | UserSignature::Passkey(_) => { + UserSignature::Multisig(_) + | UserSignature::PasskeyAuthenticator(_) + | UserSignature::MoveAuthenticator(_) => { Err(SignatureError::from_source("invalid signature scheme")) } } diff --git a/crates/iota-sdk-crypto/src/passkey.rs b/crates/iota-sdk-crypto/src/passkey.rs index 4ab6c3ec5..b80b1d4dc 100644 --- a/crates/iota-sdk-crypto/src/passkey.rs +++ b/crates/iota-sdk-crypto/src/passkey.rs @@ -56,7 +56,7 @@ impl Verifier for PasskeyVerifier { impl Verifier for PasskeyVerifier { fn verify(&self, message: &[u8], signature: &UserSignature) -> Result<(), SignatureError> { - let UserSignature::Passkey(authenticator) = signature else { + let UserSignature::PasskeyAuthenticator(authenticator) = signature else { return Err(SignatureError::from_source("not a passkey authenticator")); }; diff --git a/crates/iota-sdk-crypto/src/zklogin/mod.rs b/crates/iota-sdk-crypto/src/zklogin/mod.rs index 2d95d8b02..848629cb0 100644 --- a/crates/iota-sdk-crypto/src/zklogin/mod.rs +++ b/crates/iota-sdk-crypto/src/zklogin/mod.rs @@ -78,10 +78,10 @@ impl Verifier for ZkloginVerifier { impl Verifier for ZkloginVerifier { fn verify(&self, message: &[u8], signature: &UserSignature) -> Result<(), SignatureError> { - let UserSignature::ZkLogin(zklogin_authenticator) = signature else { - return Err(SignatureError::from_source("not a zklogin signature")); + let UserSignature::ZkLoginAuthenticator(authenticator) = signature else { + return Err(SignatureError::from_source("not a zklogin authenticator")); }; - self.verify(message, zklogin_authenticator.as_ref()) + self.verify(message, authenticator.as_ref()) } } diff --git a/crates/iota-sdk-crypto/src/zklogin/tests.rs b/crates/iota-sdk-crypto/src/zklogin/tests.rs index 20e017dec..30f13532b 100644 --- a/crates/iota-sdk-crypto/src/zklogin/tests.rs +++ b/crates/iota-sdk-crypto/src/zklogin/tests.rs @@ -76,7 +76,7 @@ fn zklogin_sign_personal_message() { .verify(&message.signing_digest(), &zklogin_authenticator) .unwrap(); - let user_signature = UserSignature::ZkLogin(zklogin_authenticator.into()); + let user_signature = UserSignature::ZkLoginAuthenticator(zklogin_authenticator.into()); verifier .verify_personal_message(&message, &user_signature) .unwrap(); diff --git a/crates/iota-sdk-ffi/src/transaction_builder/client_builder.rs b/crates/iota-sdk-ffi/src/transaction_builder/client_builder.rs index 32687c91e..9750e5003 100644 --- a/crates/iota-sdk-ffi/src/transaction_builder/client_builder.rs +++ b/crates/iota-sdk-ffi/src/transaction_builder/client_builder.rs @@ -7,7 +7,9 @@ use std::{ time::Duration, }; -use iota_sdk::{graphql_client::WaitForTx, types::Input}; +use iota_sdk::{ + graphql_client::WaitForTx, transaction_builder::MoveAuthenticatorArgs, types::Input, +}; use crate::{ crypto::simple::SimpleKeypair, @@ -368,4 +370,25 @@ impl ClientTransactionBuilder { .await? .into()) } + + /// Execute the transaction with the provided move authenticator call data + /// and optionally wait for finalization. + #[uniffi::method(default(inputs = [], type_args = [], wait_for = None))] + pub async fn execute_with_move_authenticator( + &self, + inputs: Vec>, + type_args: Vec>, + wait_for: Option, + ) -> Result { + Ok(self + .read(|builder| { + builder.clone().execute_with_move_authenticator( + MoveAuthenticatorArgs::inputs(inputs) + .type_tags(type_args.into_iter().map(|v| v.0.clone())), + wait_for, + ) + }) + .await? + .into()) + } } diff --git a/crates/iota-sdk-ffi/src/transaction_builder/ptb_arg.rs b/crates/iota-sdk-ffi/src/transaction_builder/ptb_arg.rs index d319c73f2..3d2dc4a64 100644 --- a/crates/iota-sdk-ffi/src/transaction_builder/ptb_arg.rs +++ b/crates/iota-sdk-ffi/src/transaction_builder/ptb_arg.rs @@ -422,4 +422,17 @@ impl iota_sdk::transaction_builder::PTBArgument for &PTBArgument { PTBArgument::Gas => iota_sdk::transaction_builder::unresolved::Argument::Gas, } } + + fn input(self) -> iota_sdk::transaction_builder::unresolved::InputKind { + match self { + PTBArgument::ObjectId(object_id) => object_id.input(), + PTBArgument::ObjectRef(obj_ref) => obj_ref.clone().input(), + PTBArgument::Move(arg) => arg.input(), + PTBArgument::Res(res) => res.input(), + PTBArgument::Shared(shared) => shared.input(), + PTBArgument::SharedMut(shared_mut) => shared_mut.input(), + PTBArgument::Receiving(receiving) => receiving.input(), + _ => panic!(), + } + } } diff --git a/crates/iota-sdk-ffi/src/types/crypto/mod.rs b/crates/iota-sdk-ffi/src/types/crypto/mod.rs index edd1749f3..22d140529 100644 --- a/crates/iota-sdk-ffi/src/types/crypto/mod.rs +++ b/crates/iota-sdk-ffi/src/types/crypto/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) 2025 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 +pub mod move_authenticator; pub mod multisig; pub mod passkey; pub mod zklogin; diff --git a/crates/iota-sdk-ffi/src/types/crypto/move_authenticator.rs b/crates/iota-sdk-ffi/src/types/crypto/move_authenticator.rs new file mode 100644 index 000000000..730c540ab --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/move_authenticator.rs @@ -0,0 +1,80 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use std::sync::Arc; + +use crate::types::{ + address::Address, + digest::Digest, + object::{ObjectId, ObjectReference}, + transaction::Input, + type_tag::TypeTag, +}; + +/// MoveAuthenticator is a signature variant that enables a method of +/// authentication through Move code. This function represents the data received +/// by the Move authenticate function during the Account Abstraction +/// authentication flow. +#[derive(derive_more::From, uniffi::Object)] +pub struct MoveAuthenticator(pub iota_sdk::types::MoveAuthenticator); + +#[uniffi::export] +impl MoveAuthenticator { + /// Create a new move authenticator from an immutable object. + #[uniffi::constructor] + pub fn new_immutable( + call_args: Vec>, + type_args: Vec>, + object_to_authenticate: ObjectReference, + ) -> Self { + Self(iota_sdk::types::MoveAuthenticator::new_immutable( + call_args.into_iter().map(|v| v.0.clone()).collect(), + type_args.into_iter().map(|v| v.0.clone()).collect(), + object_to_authenticate.into(), + )) + } + + /// Create a new move authenticator from a shared object. + #[uniffi::constructor] + pub fn new_shared( + call_args: Vec>, + type_args: Vec>, + object_to_authenticate: &ObjectId, + initial_shared_version: u64, + ) -> Self { + Self(iota_sdk::types::MoveAuthenticator::new_shared( + call_args.into_iter().map(|v| v.0.clone()).collect(), + type_args.into_iter().map(|v| v.0.clone()).collect(), + **object_to_authenticate, + initial_shared_version, + )) + } + + pub fn address(&self) -> Address { + self.0.address().into() + } + + pub fn call_args(&self) -> Vec> { + self.0 + .call_args() + .iter() + .cloned() + .map(Into::into) + .map(Arc::new) + .collect() + } + + pub fn type_args(&self) -> Vec> { + self.0 + .type_args() + .iter() + .cloned() + .map(Into::into) + .map(Arc::new) + .collect() + } + + pub fn object_to_authenticate(&self) -> Input { + self.0.object_to_authenticate().clone().into() + } +} diff --git a/crates/iota-sdk-ffi/src/types/signature.rs b/crates/iota-sdk-ffi/src/types/signature.rs index 23d3f7bcb..e9b7d4e1b 100644 --- a/crates/iota-sdk-ffi/src/types/signature.rs +++ b/crates/iota-sdk-ffi/src/types/signature.rs @@ -9,8 +9,9 @@ use crate::{ error::Result, types::crypto::{ Ed25519PublicKey, Ed25519Signature, Secp256k1PublicKey, Secp256k1Signature, - Secp256r1PublicKey, Secp256r1Signature, multisig::MultisigAggregatedSignature, - passkey::PasskeyAuthenticator, zklogin::ZkLoginAuthenticator, + Secp256r1PublicKey, Secp256r1Signature, move_authenticator::MoveAuthenticator, + multisig::MultisigAggregatedSignature, passkey::PasskeyAuthenticator, + zklogin::ZkLoginAuthenticator, }, }; @@ -22,14 +23,16 @@ use crate::{ /// /// ```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 +/// multisig-flag / bls-flag / zklogin-auth-flag / passkey-auth-flag / +/// move-auth-flag +/// ed25519-flag = %x00 +/// secp256k1-flag = %x01 +/// secp256r1-flag = %x02 +/// multisig-flag = %x03 +/// bls-flag = %x04 +/// zklogin-auth-flag = %x05 +/// passkey-auth-flag = %x06 +/// move-auth-flag = %x07 /// ``` #[uniffi::remote(Enum)] #[repr(u8)] @@ -39,8 +42,9 @@ pub enum SignatureScheme { Secp256r1 = 0x02, Multisig = 0x03, Bls12381 = 0x04, - ZkLogin = 0x05, - Passkey = 0x06, + ZkLoginAuthenticator = 0x05, + PasskeyAuthenticator = 0x06, + MoveAuthenticator = 0x07, } /// A signature from a user @@ -54,7 +58,7 @@ pub enum SignatureScheme { /// /// ```text /// user-signature-bcs = bytes ; where the contents of the bytes are defined by -/// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey +/// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator /// ``` /// /// Note: Due to historical reasons, signatures are serialized slightly @@ -80,15 +84,22 @@ impl UserSignature { } #[uniffi::constructor] - pub fn new_zklogin(authenticator: &ZkLoginAuthenticator) -> Self { - Self(iota_sdk::types::UserSignature::ZkLogin(Box::new( + pub fn new_zklogin_authenticator(authenticator: &ZkLoginAuthenticator) -> Self { + Self(iota_sdk::types::UserSignature::ZkLoginAuthenticator( + Box::new(authenticator.0.clone()), + )) + } + + #[uniffi::constructor] + pub fn new_passkey_authenticator(authenticator: &PasskeyAuthenticator) -> Self { + Self(iota_sdk::types::UserSignature::PasskeyAuthenticator( authenticator.0.clone(), - ))) + )) } #[uniffi::constructor] - pub fn new_passkey(authenticator: &PasskeyAuthenticator) -> Self { - Self(iota_sdk::types::UserSignature::Passkey( + pub fn new_move_authenticator(authenticator: &MoveAuthenticator) -> Self { + Self(iota_sdk::types::UserSignature::MoveAuthenticator( authenticator.0.clone(), )) } @@ -148,36 +159,52 @@ impl UserSignature { self.0.as_multisig().clone().into() } - pub fn is_zklogin(&self) -> bool { - self.0.is_zklogin() + pub fn is_zklogin_authenticator(&self) -> bool { + self.0.is_zklogin_authenticator() + } + + pub fn as_zklogin_authenticator_opt(&self) -> Option> { + self.0 + .as_zklogin_authenticator_opt() + .cloned() + .map(Into::into) + .map(Arc::new) + } + + pub fn as_zklogin_authenticator(&self) -> ZkLoginAuthenticator { + self.0.as_zklogin_authenticator().clone().into() + } + + pub fn is_passkey_authenticator(&self) -> bool { + self.0.is_passkey_authenticator() } - pub fn as_zklogin_opt(&self) -> Option> { + pub fn as_passkey_authenticator_opt(&self) -> Option> { self.0 - .as_zklogin_opt() + .as_passkey_authenticator_opt() .cloned() .map(Into::into) .map(Arc::new) } - pub fn as_zklogin(&self) -> ZkLoginAuthenticator { - self.0.as_zklogin().clone().into() + pub fn as_passkey_authenticator(&self) -> PasskeyAuthenticator { + self.0.as_passkey_authenticator().clone().into() } - pub fn is_passkey(&self) -> bool { - self.0.is_passkey() + pub fn is_move_authenticator(&self) -> bool { + self.0.is_move_authenticator() } - pub fn as_passkey_opt(&self) -> Option> { + pub fn as_move_authenticator_opt(&self) -> Option> { self.0 - .as_passkey_opt() + .as_move_authenticator_opt() .cloned() .map(Into::into) .map(Arc::new) } - pub fn as_passkey(&self) -> PasskeyAuthenticator { - self.0.as_passkey().clone().into() + pub fn as_move_authenticator(&self) -> MoveAuthenticator { + self.0.as_move_authenticator().clone().into() } } diff --git a/crates/iota-sdk-transaction-builder/src/builder/mod.rs b/crates/iota-sdk-transaction-builder/src/builder/mod.rs index f102b71ad..8e341660e 100644 --- a/crates/iota-sdk-transaction-builder/src/builder/mod.rs +++ b/crates/iota-sdk-transaction-builder/src/builder/mod.rs @@ -11,9 +11,9 @@ use std::{ use iota_graphql_client::Client; use iota_types::{ - Address, DryRunResult, GasPayment, Identifier, MovePackageData, ObjectId, ObjectReference, - Owner, ProgrammableTransaction, StructTag, Transaction, TransactionEffects, - TransactionExpiration, TransactionV1, TypeTag, + Address, DryRunResult, GasPayment, Identifier, MoveAuthenticator, MovePackageData, ObjectId, + ObjectReference, Owner, ProgrammableTransaction, StructTag, Transaction, TransactionEffects, + TransactionExpiration, TransactionV1, TypeTag, UserSignature, }; use reqwest::Url; use serde::Serialize; @@ -22,6 +22,7 @@ use crate::{ ClientMethods, PTBArgument, SharedMut, WaitForTx, builder::{ gas_station::GasStationData, + move_authenticator::MoveAuthenticatorArgs, named_results::{NamedResult, NamedResults}, ptb_arguments::PTBArgumentList, signer::TransactionSigner, @@ -36,6 +37,7 @@ use crate::{ pub(crate) mod client_methods; pub(crate) mod gas_station; +pub mod move_authenticator; mod named_results; /// Argument types for PTBs pub mod ptb_arguments; @@ -1202,6 +1204,92 @@ impl TransactionBuilder { .await .map_err(Error::client) } + + /// Execute the transaction with the provided move authenticator call data + /// and optionally wait for finalization. + pub async fn execute_with_move_authenticator( + mut self, + move_auth_args: MoveAuthenticatorArgs, + wait_for: impl Into>, + ) -> Result { + let account = self + .client + .object(self.data.sender.into(), None) + .await + .map_err(Error::client)? + .ok_or_else(|| Error::Input(format!("missing account {}", self.data.sender)))?; + + let mut call_args = Vec::new(); + for input in move_auth_args.call_args.inputs().iter() { + call_args.push(match input { + InputKind::ImmutableOrOwned(object_id) => { + let obj = self + .client + .object(*object_id, None) + .await + .map_err(Error::client)? + .ok_or_else(|| Error::Input(format!("missing object {object_id}")))?; + iota_types::Input::ImmutableOrOwned(obj.object_ref()) + } + InputKind::Shared { object_id, mutable } => { + let obj = self + .client + .object(*object_id, None) + .await + .map_err(Error::client)? + .ok_or_else(|| Error::Input(format!("missing object {object_id}")))?; + + match obj.owner() { + Owner::Shared(version) => iota_types::Input::Shared { + object_id: *object_id, + initial_shared_version: *version, + mutable: *mutable, + }, + _ => { + return Err(Error::InvalidMoveAuthArg(format!( + "object {object_id} was passed as shared, but is not" + ))); + } + } + } + InputKind::Receiving(_) => { + return Err(Error::InvalidMoveAuthArg( + "call arguments must not be receiving".to_owned(), + )); + } + InputKind::Input(input) => input.clone(), + }) + } + let move_authenticator = match account.owner() { + Owner::Immutable => MoveAuthenticator::new_immutable( + call_args, + move_auth_args.type_args, + account.object_ref(), + ), + Owner::Shared(version) => MoveAuthenticator::new_shared( + call_args, + move_auth_args.type_args, + account.object_id(), + *version, + ), + _ => { + return Err(Error::InvalidMoveAuthAccount( + "account must be immutable or shared".to_owned(), + )); + } + }; + + let txn = self.finish_internal().await?; + + self.client + .execute_tx( + &[UserSignature::MoveAuthenticator(move_authenticator)], + &txn, + wait_for, + ) + .await + .map_err(Error::client) + } } impl TransactionBuilder { diff --git a/crates/iota-sdk-transaction-builder/src/builder/move_authenticator.rs b/crates/iota-sdk-transaction-builder/src/builder/move_authenticator.rs new file mode 100644 index 000000000..8660cafe0 --- /dev/null +++ b/crates/iota-sdk-transaction-builder/src/builder/move_authenticator.rs @@ -0,0 +1,48 @@ +// Copyright 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +//! Defines the [`MoveAuthenticatorArgs`] which represents a call to an +//! authenticator function in move which can authorize a transaction as part of +//! Account Abstraction. + +use iota_types::TypeTag; + +use crate::{PTBArgumentList, types::MoveTypes}; + +/// A function call to authorize a transaction via move. +#[derive(Debug, Clone)] +#[repr(C)] +pub struct MoveAuthenticatorArgs { + /// Input objects or primitive values + pub call_args: I, + /// Type arguments for the Move authenticate function + pub type_args: Vec, +} + +impl MoveAuthenticatorArgs { + /// Create a new move authenticator call with the function inputs. + pub fn inputs(call_args: I) -> MoveAuthenticatorArgs { + MoveAuthenticatorArgs { + call_args, + type_args: Default::default(), + } + } +} + +impl MoveAuthenticatorArgs { + /// Set the move authenticator call type parameters. + pub fn generics(self) -> MoveAuthenticatorArgs { + MoveAuthenticatorArgs { + call_args: self.call_args, + type_args: G::type_tags(), + } + } + + /// Set the move authenticator call type parameters manually. + pub fn type_tags(self, tags: impl IntoIterator) -> MoveAuthenticatorArgs { + MoveAuthenticatorArgs { + call_args: self.call_args, + type_args: tags.into_iter().collect(), + } + } +} diff --git a/crates/iota-sdk-transaction-builder/src/builder/ptb_arguments.rs b/crates/iota-sdk-transaction-builder/src/builder/ptb_arguments.rs index 787a5f2c4..861743b5c 100644 --- a/crates/iota-sdk-transaction-builder/src/builder/ptb_arguments.rs +++ b/crates/iota-sdk-transaction-builder/src/builder/ptb_arguments.rs @@ -15,23 +15,39 @@ use crate::{ pub trait PTBArgument { /// Get the argument. fn arg(self, ptb: &mut TransactionBuildData) -> Argument; + + /// TODO + fn input(self) -> InputKind; } impl PTBArgument for Argument { fn arg(self, _ptb: &mut TransactionBuildData) -> Argument { self } + + fn input(self) -> InputKind { + unreachable!() + } } impl PTBArgument for iota_types::Input { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { + // TODO remove? ptb.input(self) } + + fn input(self) -> InputKind { + InputKind::Input(self) + } } impl PTBArgument for ObjectId { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input(InputKind::ImmutableOrOwned(self), false) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::ImmutableOrOwned(self) } } @@ -39,21 +55,33 @@ impl PTBArgument for &ObjectId { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (*self).arg(ptb) } + + fn input(self) -> InputKind { + (*self).input() + } } impl PTBArgument for ObjectReference { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Input(iota_types::Input::ImmutableOrOwned(self)), - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Input(iota_types::Input::ImmutableOrOwned(self)) } } impl PTBArgument for T { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { + // TODO ptb.pure_bytes(self.pure_bytes().0) } + + fn input(self) -> InputKind { + InputKind::Input(iota_types::Input::Pure { + value: self.pure_bytes().0, + }) + } } impl PTBArgument for std::sync::Arc @@ -63,6 +91,10 @@ where fn arg(self, ptb: &mut TransactionBuildData) -> Argument { self.as_ref().arg(ptb) } + + fn input(self) -> InputKind { + self.as_ref().input() + } } /// A trait which defines a list of arguments for a @@ -84,6 +116,19 @@ pub trait PTBArgumentList { /// Push the args onto the list. fn push_args(self, ptb: &mut TransactionBuildData, args: &mut Vec); + + /// + fn inputs(self) -> Vec + where + Self: Sized, + { + let mut inputs = Vec::new(); + self.push_inputs(&mut inputs); + inputs + } + + /// + fn push_inputs(self, args: &mut Vec); } macro_rules! impl_ptb_args_tuple { @@ -96,6 +141,12 @@ macro_rules! impl_ptb_args_tuple { args.push(self.$n.arg(ptb)); )+ } + + fn push_inputs(self, args: &mut Vec) { + $( + args.push(self.$n.input()); + )+ + } } }; } @@ -108,6 +159,12 @@ impl PTBArgumentList for Vec { args.push(input.arg(ptb)); } } + + fn push_inputs(self, args: &mut Vec) { + for input in self { + args.push(input.input()); + } + } } impl PTBArgumentList for [T; N] { @@ -116,6 +173,12 @@ impl PTBArgumentList for [T; N] { args.push(input.arg(ptb)); } } + + fn push_inputs(self, args: &mut Vec) { + for input in self { + args.push(input.input()); + } + } } impl PTBArgumentList for &[T] @@ -127,6 +190,12 @@ where args.push(input.arg(ptb)); } } + + fn push_inputs(self, args: &mut Vec) { + for input in self { + args.push(input.input()); + } + } } /// Allows specifying shared parameters. @@ -136,23 +205,32 @@ impl PTBArgument for Shared { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { self.0.arg(ptb) } + + fn input(self) -> InputKind { + self.0.input() + } } impl PTBArgument for Shared { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &Shared { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Shared { - object_id: self.0, - mutable: false, - }, - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Shared { + object_id: self.0, + mutable: false, + } } } @@ -160,18 +238,23 @@ impl PTBArgument for Shared { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &Shared { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Input(iota_types::Input::Shared { - object_id: self.0.object_id, - mutable: false, - initial_shared_version: self.0.version, - }), - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Input(iota_types::Input::Shared { + object_id: self.0.object_id, + mutable: false, + initial_shared_version: self.0.version, + }) } } @@ -182,23 +265,32 @@ impl PTBArgument for SharedMut { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { self.0.arg(ptb) } + + fn input(self) -> InputKind { + self.0.input() + } } impl PTBArgument for SharedMut { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &SharedMut { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Shared { - object_id: self.0, - mutable: true, - }, - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Shared { + object_id: self.0, + mutable: true, + } } } @@ -206,18 +298,23 @@ impl PTBArgument for SharedMut { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &SharedMut { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Input(iota_types::Input::Shared { - object_id: self.0.object_id, - mutable: true, - initial_shared_version: self.0.version, - }), - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Input(iota_types::Input::Shared { + object_id: self.0.object_id, + mutable: true, + initial_shared_version: self.0.version, + }) } } @@ -228,17 +325,29 @@ impl PTBArgument for Receiving { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { self.0.arg(ptb) } + + fn input(self) -> InputKind { + self.0.input() + } } impl PTBArgument for Receiving { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &Receiving { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input(InputKind::Receiving(self.0), false) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Receiving(self.0) } } @@ -246,14 +355,19 @@ impl PTBArgument for Receiving { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &Receiving { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { - ptb.set_input( - InputKind::Input(iota_types::Input::Receiving(self.0.clone())), - false, - ) + ptb.set_input(self.input(), false) + } + + fn input(self) -> InputKind { + InputKind::Input(iota_types::Input::Receiving(self.0.clone())) } } @@ -270,6 +384,10 @@ impl PTBArgument for Res { fn arg(self, ptb: &mut TransactionBuildData) -> Argument { (&self).arg(ptb) } + + fn input(self) -> InputKind { + (&self).input() + } } impl PTBArgument for &Res { @@ -280,4 +398,9 @@ impl PTBArgument for &Res { panic!("no command result named `{}` exists", self.0) } } + + fn input(self) -> InputKind { + // TODO + todo!() + } } diff --git a/crates/iota-sdk-transaction-builder/src/error.rs b/crates/iota-sdk-transaction-builder/src/error.rs index a8b3be11c..207a3d1fc 100644 --- a/crates/iota-sdk-transaction-builder/src/error.rs +++ b/crates/iota-sdk-transaction-builder/src/error.rs @@ -47,6 +47,10 @@ pub enum Error { SharedObjectMutability(ObjectId), #[error("Unsupported literal")] UnsupportedLiteral, + #[error("Invalid account for move authenticator: {0}")] + InvalidMoveAuthAccount(String), + #[error("Invalid argument for move authenticator: {0}")] + InvalidMoveAuthArg(String), #[error(transparent)] InvalidUrl(::Err), #[error("Request to gas station `{gas_station_url}` failed: {source}")] diff --git a/crates/iota-sdk-transaction-builder/src/lib.rs b/crates/iota-sdk-transaction-builder/src/lib.rs index cd802ed5c..74e471990 100644 --- a/crates/iota-sdk-transaction-builder/src/lib.rs +++ b/crates/iota-sdk-transaction-builder/src/lib.rs @@ -241,7 +241,7 @@ //! builder //! .move_call(Address::TWO, "vec_map", "from_keys_values") //! .generics::<(Address, u64)>() -//! .arguments((vec![address1, address2], vec![10000000u64, 20000000u64])); +//! .arguments(([address1, address2], [10000000u64, 20000000u64])); //! ``` //! //! ### Custom Type @@ -287,6 +287,7 @@ pub use self::{ builder::{ TransactionBuilder, client_methods::ClientMethods, + move_authenticator::MoveAuthenticatorArgs, ptb_arguments::{PTBArgument, PTBArgumentList, Receiving, Shared, SharedMut, res}, signer::TransactionSigner, }, diff --git a/crates/iota-sdk-types/src/crypto/mod.rs b/crates/iota-sdk-types/src/crypto/mod.rs index 7faacd1b1..87d55d200 100644 --- a/crates/iota-sdk-types/src/crypto/mod.rs +++ b/crates/iota-sdk-types/src/crypto/mod.rs @@ -5,6 +5,7 @@ mod bls12381; mod ed25519; mod intent; +mod move_authenticator; mod multisig; mod passkey; mod secp256k1; @@ -18,6 +19,7 @@ pub use intent::{ HashingIntentScope, INTENT_PREFIX_LENGTH, Intent, IntentAppId, IntentMessage, IntentScope, IntentVersion, PersonalMessage, }; +pub use move_authenticator::MoveAuthenticator; pub use multisig::{ MultisigAggregatedSignature, MultisigCommittee, MultisigMember, MultisigMemberPublicKey, MultisigMemberSignature, diff --git a/crates/iota-sdk-types/src/crypto/move_authenticator.rs b/crates/iota-sdk-types/src/crypto/move_authenticator.rs new file mode 100644 index 000000000..02e757338 --- /dev/null +++ b/crates/iota-sdk-types/src/crypto/move_authenticator.rs @@ -0,0 +1,198 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use crate::{Address, Input, ObjectId, ObjectReference, TypeTag}; + +/// MoveAuthenticator is a signature variant that enables a method of +/// authentication through Move code. This function represents the data received +/// by the Move authenticate function during the Account Abstraction +/// authentication flow. +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))] +pub struct MoveAuthenticator { + /// Input objects or primitive values + call_args: Vec, + /// Type arguments for the Move authenticate function + type_args: Vec, + /// The object that is authenticated. Represents the account being the + /// sender of the transaction. + object_to_authenticate: Input, +} + +impl MoveAuthenticator { + /// Create a new move authenticator from an immutable object. + pub fn new_immutable( + call_args: Vec, + type_args: Vec, + object_to_authenticate: ObjectReference, + ) -> Self { + Self { + call_args, + type_args, + object_to_authenticate: Input::ImmutableOrOwned(object_to_authenticate), + } + } + + /// Create a new move authenticator from a shared object. + pub fn new_shared( + call_args: Vec, + type_args: Vec, + object_to_authenticate: ObjectId, + initial_shared_version: u64, + ) -> Self { + Self { + call_args, + type_args, + object_to_authenticate: Input::Shared { + object_id: object_to_authenticate, + initial_shared_version, + mutable: false, + }, + } + } + + pub fn address(&self) -> Address { + match self.object_to_authenticate { + Input::ImmutableOrOwned(ObjectReference { object_id, .. }) + | Input::Shared { object_id, .. } => object_id.into(), + _ => unreachable!(), + } + } + + pub fn call_args(&self) -> &[Input] { + &self.call_args + } + + pub fn type_args(&self) -> &[TypeTag] { + &self.type_args + } + + pub fn object_to_authenticate(&self) -> &Input { + &self.object_to_authenticate + } +} + +#[cfg(feature = "serde")] +#[cfg_attr(doc_cfg, doc(cfg(feature = "serde")))] +mod serialization { + use std::borrow::Cow; + + use serde::{Deserialize, Deserializer, Serialize, Serializer}; + use serde_with::{Bytes, DeserializeAs}; + + use super::*; + use crate::{SignatureScheme, crypto::SignatureFromBytesError}; + + impl MoveAuthenticator { + pub fn from_serialized_bytes( + bytes: impl AsRef<[u8]>, + ) -> Result { + let bytes = bytes.as_ref(); + let flag = + SignatureScheme::from_byte(*bytes.first().ok_or_else(|| { + SignatureFromBytesError::new("missing signature scheme flag") + })?) + .map_err(SignatureFromBytesError::new)?; + if flag != SignatureScheme::MoveAuthenticator { + return Err(SignatureFromBytesError::new( + "invalid move authenticator flag", + )); + } + let bcs_bytes = &bytes[1..]; + + let auth = bcs::from_bytes::(bcs_bytes) + .map_err(SignatureFromBytesError::new)?; + + Ok(Self { + call_args: auth.call_args, + type_args: auth.type_args, + object_to_authenticate: auth.object_to_authenticate, + }) + } + + pub fn to_bytes(&self) -> Vec { + let as_bytes = bcs::to_bytes(&AuthenticatorRef { + call_args: &self.call_args, + type_args: &self.type_args, + object_to_authenticate: &self.object_to_authenticate, + }) + .expect("BCS serialization should not fail"); + let mut bytes = Vec::with_capacity(1 + as_bytes.len()); + bytes.push(SignatureScheme::MoveAuthenticator as u8); + bytes.extend(as_bytes); + bytes + } + } + + #[derive(serde::Serialize)] + struct AuthenticatorRef<'a> { + call_args: &'a Vec, + type_args: &'a Vec, + object_to_authenticate: &'a Input, + } + + #[derive(serde::Deserialize)] + #[serde(rename = "MoveAuthenticator")] + #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] + struct Authenticator { + call_args: Vec, + #[cfg_attr(feature = "schemars", schemars(with = "Vec"))] + type_args: Vec, + object_to_authenticate: Input, + } + + #[cfg(feature = "schemars")] + impl schemars::JsonSchema for MoveAuthenticator { + fn schema_name() -> String { + Authenticator::schema_name() + } + + fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { + Authenticator::json_schema(gen) + } + } + + impl Serialize for MoveAuthenticator { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + if serializer.is_human_readable() { + let authenticator_ref = AuthenticatorRef { + call_args: &self.call_args, + type_args: &self.type_args, + object_to_authenticate: &self.object_to_authenticate, + }; + + authenticator_ref.serialize(serializer) + } else { + let bytes = self.to_bytes(); + serializer.serialize_bytes(&bytes) + } + } + } + + impl<'de> Deserialize<'de> for MoveAuthenticator { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + if deserializer.is_human_readable() { + let Authenticator { + call_args, + type_args, + object_to_authenticate, + } = Authenticator::deserialize(deserializer)?; + Ok(Self { + call_args, + type_args, + object_to_authenticate, + }) + } else { + let bytes: Cow<'de, [u8]> = Bytes::deserialize_as(deserializer)?; + Self::from_serialized_bytes(bytes) + } + .map_err(serde::de::Error::custom) + } + } +} diff --git a/crates/iota-sdk-types/src/crypto/passkey.rs b/crates/iota-sdk-types/src/crypto/passkey.rs index d0d9a084e..2368d4ad2 100644 --- a/crates/iota-sdk-types/src/crypto/passkey.rs +++ b/crates/iota-sdk-types/src/crypto/passkey.rs @@ -259,7 +259,7 @@ mod serialization { SignatureFromBytesError::new("missing signature scheme flag") })?) .map_err(SignatureFromBytesError::new)?; - if flag != SignatureScheme::Passkey { + if flag != SignatureScheme::PasskeyAuthenticator { return Err(SignatureFromBytesError::new("invalid passkey flag")); } let bcs_bytes = &bytes[1..]; @@ -280,7 +280,7 @@ mod serialization { }; let mut buf = Vec::new(); - buf.push(SignatureScheme::Passkey as u8); + buf.push(SignatureScheme::PasskeyAuthenticator as u8); bcs::serialize_into(&mut buf, &authenticator_ref).expect("serialization cannot fail"); buf @@ -416,6 +416,6 @@ mod tests { let b64 = "BiVYDmenOnqS+thmz5m5SrZnWaKXZLVxgh+rri6LHXs25B0AAAAAnQF7InR5cGUiOiJ3ZWJhdXRobi5nZXQiLCAiY2hhbGxlbmdlIjoiQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQSIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTE3MyIsImNyb3NzT3JpZ2luIjpmYWxzZSwgInVua25vd24iOiAidW5rbm93biJ9YgJMwqcOmZI7F/N+K5SMe4DRYCb4/cDWW68SFneSHoD2GxKKhksbpZ5rZpdrjSYABTCsFQQBpLORzTvbj4edWKd/AsEBeovrGvHR9Ku7critg6k7qvfFlPUngujXfEzXd8Eg"; let sig = UserSignature::from_base64(b64).unwrap(); - assert!(matches!(sig, UserSignature::Passkey(_))); + assert!(matches!(sig, UserSignature::PasskeyAuthenticator(_))); } } diff --git a/crates/iota-sdk-types/src/crypto/signature.rs b/crates/iota-sdk-types/src/crypto/signature.rs index a194a63f8..49cf314d5 100644 --- a/crates/iota-sdk-types/src/crypto/signature.rs +++ b/crates/iota-sdk-types/src/crypto/signature.rs @@ -7,6 +7,7 @@ use super::{ Secp256k1PublicKey, Secp256k1Signature, Secp256r1PublicKey, Secp256r1Signature, ZkLoginAuthenticator, }; +use crate::crypto::move_authenticator::MoveAuthenticator; /// A basic signature /// @@ -203,14 +204,16 @@ impl SimpleSignature { /// /// ```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 +/// multisig-flag / bls-flag / zklogin-auth-flag / passkey-auth-flag / +/// move-auth-flag +/// ed25519-flag = %x00 +/// secp256k1-flag = %x01 +/// secp256r1-flag = %x02 +/// multisig-flag = %x03 +/// bls-flag = %x04 +/// zklogin-auth-flag = %x05 +/// passkey-auth-flag = %x06 +/// move-auth-flag = %x07 /// ``` #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, strum::Display)] #[strum(serialize_all = "lowercase")] @@ -222,13 +225,21 @@ pub enum SignatureScheme { Secp256r1 = 0x02, Multisig = 0x03, Bls12381 = 0x04, // This is currently not supported for user addresses - ZkLogin = 0x05, - Passkey = 0x06, + ZkLoginAuthenticator = 0x05, + PasskeyAuthenticator = 0x06, + MoveAuthenticator = 0x07, } impl SignatureScheme { crate::def_is!( - Ed25519, Secp256k1, Secp256r1, Multisig, Bls12381, ZkLogin, Passkey, + Ed25519, + Secp256k1, + Secp256r1, + Multisig, + Bls12381, + ZkLoginAuthenticator, + PasskeyAuthenticator, + MoveAuthenticator, ); /// Try constructing from a byte flag @@ -239,8 +250,9 @@ impl SignatureScheme { 0x02 => Ok(Self::Secp256r1), 0x03 => Ok(Self::Multisig), 0x04 => Ok(Self::Bls12381), - 0x05 => Ok(Self::ZkLogin), - 0x06 => Ok(Self::Passkey), + 0x05 => Ok(Self::ZkLoginAuthenticator), + 0x06 => Ok(Self::PasskeyAuthenticator), + 0x07 => Ok(Self::MoveAuthenticator), invalid => Err(InvalidSignatureScheme(invalid)), } } @@ -254,14 +266,14 @@ impl SignatureScheme { impl super::ZkLoginPublicIdentifier { /// Return the flag for this signature scheme pub fn scheme(&self) -> SignatureScheme { - SignatureScheme::ZkLogin + SignatureScheme::ZkLoginAuthenticator } } impl super::PasskeyPublicKey { /// Return the flag for this signature scheme pub fn scheme(&self) -> SignatureScheme { - SignatureScheme::Passkey + SignatureScheme::PasskeyAuthenticator } } @@ -285,7 +297,7 @@ impl std::fmt::Display for InvalidSignatureScheme { /// /// ```text /// user-signature-bcs = bytes ; where the contents of the bytes are defined by -/// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey +/// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator /// ``` /// /// Note: Due to historical reasons, signatures are serialized slightly @@ -298,43 +310,46 @@ impl std::fmt::Display for InvalidSignatureScheme { pub enum UserSignature { Simple(SimpleSignature), Multisig(MultisigAggregatedSignature), - ZkLogin(Box), - Passkey(PasskeyAuthenticator), + ZkLoginAuthenticator(Box), + PasskeyAuthenticator(PasskeyAuthenticator), + MoveAuthenticator(MoveAuthenticator), } impl UserSignature { crate::def_is_as_into_opt!( Simple(SimpleSignature), Multisig(MultisigAggregatedSignature), - Passkey(PasskeyAuthenticator) + PasskeyAuthenticator(PasskeyAuthenticator), + MoveAuthenticator(MoveAuthenticator) ); - pub fn is_zklogin(&self) -> bool { - matches!(self, Self::ZkLogin(_)) + pub fn is_zklogin_authenticator(&self) -> bool { + matches!(self, Self::ZkLoginAuthenticator(_)) } - pub fn as_zklogin_opt(&self) -> Option<&ZkLoginAuthenticator> { - if let Self::ZkLogin(auth) = self { + pub fn as_zklogin_authenticator_opt(&self) -> Option<&ZkLoginAuthenticator> { + if let Self::ZkLoginAuthenticator(auth) = self { Some(auth) } else { None } } - pub fn as_zklogin(&self) -> &ZkLoginAuthenticator { - self.as_zklogin_opt().expect("not a ZkLogin authenticator") + pub fn as_zklogin_authenticator(&self) -> &ZkLoginAuthenticator { + self.as_zklogin_authenticator_opt() + .expect("not a ZkLogin authenticator") } - pub fn into_zklogin_opt(self) -> Option { - if let Self::ZkLogin(auth) = self { + pub fn into_zklogin_authenticator_opt(self) -> Option { + if let Self::ZkLoginAuthenticator(auth) = self { Some(*auth) } else { None } } - pub fn into_zklogin(self) -> ZkLoginAuthenticator { - self.into_zklogin_opt() + pub fn into_zklogin_authenticator(self) -> ZkLoginAuthenticator { + self.into_zklogin_authenticator_opt() .expect("not a ZkLogin authenticator") } @@ -343,8 +358,9 @@ impl UserSignature { match self { UserSignature::Simple(simple) => simple.scheme(), UserSignature::Multisig(_) => SignatureScheme::Multisig, - UserSignature::ZkLogin(_) => SignatureScheme::ZkLogin, - UserSignature::Passkey(_) => SignatureScheme::Passkey, + UserSignature::ZkLoginAuthenticator(_) => SignatureScheme::ZkLoginAuthenticator, + UserSignature::PasskeyAuthenticator(_) => SignatureScheme::PasskeyAuthenticator, + UserSignature::MoveAuthenticator(_) => SignatureScheme::MoveAuthenticator, } } } @@ -456,8 +472,9 @@ mod serialization { } SignatureScheme::Multisig | SignatureScheme::Bls12381 - | SignatureScheme::ZkLogin - | SignatureScheme::Passkey => { + | SignatureScheme::ZkLoginAuthenticator + | SignatureScheme::PasskeyAuthenticator + | SignatureScheme::MoveAuthenticator => { Err(SignatureFromBytesError::new("invalid signature scheme")) } } @@ -620,8 +637,9 @@ mod serialization { match self { UserSignature::Simple(s) => s.to_bytes(), UserSignature::Multisig(m) => m.to_bytes(), - UserSignature::ZkLogin(z) => z.to_bytes(), - UserSignature::Passkey(p) => p.to_bytes(), + UserSignature::ZkLoginAuthenticator(z) => z.to_bytes(), + UserSignature::PasskeyAuthenticator(p) => p.to_bytes(), + UserSignature::MoveAuthenticator(m) => m.to_bytes(), } } @@ -653,13 +671,17 @@ mod serialization { SignatureScheme::Bls12381 => Err(SignatureFromBytesError::new( "bls not supported for user signatures", )), - SignatureScheme::ZkLogin => { + SignatureScheme::ZkLoginAuthenticator => { let zklogin = ZkLoginAuthenticator::from_serialized_bytes(bytes)?; - Ok(Self::ZkLogin(Box::new(zklogin))) + Ok(Self::ZkLoginAuthenticator(Box::new(zklogin))) } - SignatureScheme::Passkey => { + SignatureScheme::PasskeyAuthenticator => { let passkey = PasskeyAuthenticator::from_serialized_bytes(bytes)?; - Ok(Self::Passkey(passkey)) + Ok(Self::PasskeyAuthenticator(passkey)) + } + SignatureScheme::MoveAuthenticator => { + let move_auth = MoveAuthenticator::from_serialized_bytes(bytes)?; + Ok(Self::MoveAuthenticator(move_auth)) } } } @@ -695,6 +717,7 @@ mod serialization { Multisig(&'a MultisigAggregatedSignature), ZkLogin(&'a ZkLoginAuthenticator), Passkey(&'a PasskeyAuthenticator), + Move(&'a MoveAuthenticator), } #[derive(serde::Deserialize)] @@ -717,6 +740,7 @@ mod serialization { Multisig(MultisigAggregatedSignature), ZkLogin(Box), Passkey(PasskeyAuthenticator), + Move(MoveAuthenticator), } #[cfg(feature = "schemars")] @@ -761,16 +785,24 @@ mod serialization { UserSignature::Multisig(multisig) => { ReadableUserSignatureRef::Multisig(multisig) } - UserSignature::ZkLogin(zklogin) => ReadableUserSignatureRef::ZkLogin(zklogin), - UserSignature::Passkey(passkey) => ReadableUserSignatureRef::Passkey(passkey), + UserSignature::ZkLoginAuthenticator(zklogin) => { + ReadableUserSignatureRef::ZkLogin(zklogin) + } + UserSignature::PasskeyAuthenticator(passkey) => { + ReadableUserSignatureRef::Passkey(passkey) + } + UserSignature::MoveAuthenticator(move_auth) => { + ReadableUserSignatureRef::Move(move_auth) + } }; readable.serialize(serializer) } else { match self { UserSignature::Simple(simple) => simple.serialize(serializer), UserSignature::Multisig(multisig) => multisig.serialize(serializer), - UserSignature::ZkLogin(zklogin) => zklogin.serialize(serializer), - UserSignature::Passkey(passkey) => passkey.serialize(serializer), + UserSignature::ZkLoginAuthenticator(zklogin) => zklogin.serialize(serializer), + UserSignature::PasskeyAuthenticator(passkey) => passkey.serialize(serializer), + UserSignature::MoveAuthenticator(move_auth) => move_auth.serialize(serializer), } } } @@ -806,8 +838,9 @@ mod serialization { public_key, }), ReadableUserSignature::Multisig(multisig) => Self::Multisig(multisig), - ReadableUserSignature::ZkLogin(zklogin) => Self::ZkLogin(zklogin), - ReadableUserSignature::Passkey(passkey) => Self::Passkey(passkey), + ReadableUserSignature::ZkLogin(zklogin) => Self::ZkLoginAuthenticator(zklogin), + ReadableUserSignature::Passkey(passkey) => Self::PasskeyAuthenticator(passkey), + ReadableUserSignature::Move(move_auth) => Self::MoveAuthenticator(move_auth), }) } else { use serde_with::DeserializeAs; @@ -914,7 +947,7 @@ mod serialization { let bcs = Base64::decode_vec(fixture).unwrap(); let sig: UserSignature = bcs::from_bytes(&bcs).unwrap(); - assert_eq!(SignatureScheme::ZkLogin, sig.scheme()); + assert_eq!(SignatureScheme::ZkLoginAuthenticator, sig.scheme()); let bytes = bcs::to_bytes(&sig).unwrap(); assert_eq!(bcs, bytes); @@ -934,7 +967,7 @@ mod serialization { let bcs = Base64::decode_vec(fixture).unwrap(); let sig: UserSignature = bcs::from_bytes(&bcs).unwrap(); - assert_eq!(SignatureScheme::Passkey, sig.scheme()); + assert_eq!(SignatureScheme::PasskeyAuthenticator, sig.scheme()); let bytes = bcs::to_bytes(&sig).unwrap(); assert_eq!(bcs, bytes); diff --git a/crates/iota-sdk-types/src/crypto/zklogin.rs b/crates/iota-sdk-types/src/crypto/zklogin.rs index f8ad9bce3..77ab1cf11 100644 --- a/crates/iota-sdk-types/src/crypto/zklogin.rs +++ b/crates/iota-sdk-types/src/crypto/zklogin.rs @@ -834,7 +834,7 @@ mod serialization { }; let mut buf = Vec::new(); - buf.push(SignatureScheme::ZkLogin as u8); + buf.push(SignatureScheme::ZkLoginAuthenticator as u8); bcs::serialize_into(&mut buf, &authenticator_ref).expect("serialization cannot fail"); buf @@ -849,7 +849,7 @@ mod serialization { SignatureFromBytesError::new("missing signature scheme flag") })?) .map_err(SignatureFromBytesError::new)?; - if flag != SignatureScheme::ZkLogin { + if flag != SignatureScheme::ZkLoginAuthenticator { return Err(SignatureFromBytesError::new("invalid zklogin flag")); } let bcs_bytes = &bytes[1..]; diff --git a/crates/iota-sdk-types/src/lib.rs b/crates/iota-sdk-types/src/lib.rs index 80f7f1750..8d2f6f560 100644 --- a/crates/iota-sdk-types/src/lib.rs +++ b/crates/iota-sdk-types/src/lib.rs @@ -138,11 +138,11 @@ pub use crypto::{ Bls12381PublicKey, Bls12381Signature, Bn254FieldElement, CircomG1, CircomG2, Ed25519PublicKey, Ed25519Signature, HashingIntentScope, INTENT_PREFIX_LENGTH, Intent, IntentAppId, IntentMessage, IntentScope, IntentVersion, InvalidSignatureScheme, InvalidZkLoginAuthenticatorError, Jwk, - JwkId, MultisigAggregatedSignature, MultisigCommittee, MultisigMember, MultisigMemberPublicKey, - MultisigMemberSignature, PasskeyAuthenticator, PasskeyPublicKey, PersonalMessage, PublicKeyExt, - Secp256k1PublicKey, Secp256k1Signature, Secp256r1PublicKey, Secp256r1Signature, - SignatureScheme, SimpleSignature, UserSignature, ZkLoginAuthenticator, ZkLoginClaim, - ZkLoginInputs, ZkLoginProof, ZkLoginPublicIdentifier, + JwkId, MoveAuthenticator, MultisigAggregatedSignature, MultisigCommittee, MultisigMember, + MultisigMemberPublicKey, MultisigMemberSignature, PasskeyAuthenticator, PasskeyPublicKey, + PersonalMessage, PublicKeyExt, Secp256k1PublicKey, Secp256k1Signature, Secp256r1PublicKey, + Secp256r1Signature, SignatureScheme, SimpleSignature, UserSignature, ZkLoginAuthenticator, + ZkLoginClaim, ZkLoginInputs, ZkLoginProof, ZkLoginPublicIdentifier, }; pub use digest::{Digest, DigestParseError, SigningDigest}; pub use effects::{ diff --git a/crates/iota-sdk-types/src/serialization_proptests.rs b/crates/iota-sdk-types/src/serialization_proptests.rs index 3c31eba1d..6187f0fa0 100644 --- a/crates/iota-sdk-types/src/serialization_proptests.rs +++ b/crates/iota-sdk-types/src/serialization_proptests.rs @@ -112,6 +112,7 @@ serialization_test!(ZkLoginPublicIdentifier); serialization_test!(CircomG1); serialization_test!(CircomG2); serialization_test!(PasskeyAuthenticator); +serialization_test!(MoveAuthenticator); serialization_test!(Digest); serialization_test!(ChangedObject); serialization_test!(IdOperation); @@ -166,11 +167,6 @@ serialization_test!(TransactionV1); serialization_test!(TransactionExpiration); serialization_test!(TransactionKind); serialization_test!(TransferObjects); -// serialization_test!(UnresolvedGasPayment); -// serialization_test!(UnresolvedInputArgument); -// serialization_test!(UnresolvedObjectReference); -// serialization_test!(UnresolvedProgrammableTransaction); -// serialization_test!(UnresolvedTransaction); serialization_test!(Upgrade); serialization_test!(Identifier); serialization_test!(StructTag); diff --git a/crates/iota-sdk-types/src/type_tag/mod.rs b/crates/iota-sdk-types/src/type_tag/mod.rs index bb33197bd..8dd97dfe5 100644 --- a/crates/iota-sdk-types/src/type_tag/mod.rs +++ b/crates/iota-sdk-types/src/type_tag/mod.rs @@ -333,6 +333,12 @@ impl PartialEq for Identifier { } } +impl PartialEq<&IdentifierRef> for Identifier { + fn eq(&self, other: &&IdentifierRef) -> bool { + self.as_ref() == *other + } +} + impl PartialEq for IdentifierRef { fn eq(&self, other: &Identifier) -> bool { self == other.as_ref() diff --git a/crates/iota-sdk/examples/abstract_account.rs b/crates/iota-sdk/examples/abstract_account.rs new file mode 100644 index 000000000..13d060a40 --- /dev/null +++ b/crates/iota-sdk/examples/abstract_account.rs @@ -0,0 +1,180 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use std::str::FromStr; + +use eyre::{OptionExt, Result, bail}; +use iota_sdk::{ + crypto::ed25519::Ed25519PrivateKey, + graphql_client::{Client, WaitForTx, faucet::FaucetClient}, + transaction_builder::{MoveAuthenticatorArgs, Shared, SharedMut, TransactionBuilder, res}, + types::{Address, IdentifierRef, MovePackageData, ObjectId, ObjectOut}, +}; +use rand::rngs::OsRng; + +#[tokio::main] +async fn main() -> Result<()> { + let from_address = Address::from(setup_account().await?); + let to_address = + Address::from_str("0x0000a4984bd495d4346fa208ddff4f5d5e5ad48c21dec631ddebc99809f16900")?; + + // Fund the sender address for gas payment + if FaucetClient::new_localnet() + .request_and_wait(from_address) + .await? + .is_none() + { + bail!("Failed to request coins from faucet"); + }; + + let client = Client::new_localnet(); + + let mut builder = TransactionBuilder::new(from_address).with_client(&client); + builder.send_iota(to_address, 5000000000u64); + + let effects = builder + .execute_with_move_authenticator( + MoveAuthenticatorArgs::inputs(("hello", Shared(ObjectId::from_str("0x06")?))), + WaitForTx::Finalized, + ) + .await?; + + println!("Sending IOTA via abstract account: {:?}", effects.status()); + + Ok(()) +} + +async fn setup_account() -> Result { + // Parse the precompiled move package + let package_data = serde_json::from_str::(PRECOMPILED_PACKAGE)?; + + // Create a random private key to derive a sender address + let private_key = Ed25519PrivateKey::generate(OsRng); + let sender = private_key.public_key().derive_address(); + + // Fund the sender address for gas payment + if FaucetClient::new_localnet() + .request_and_wait(sender) + .await? + .is_none() + { + bail!("Failed to request coins from faucet"); + }; + + let client = Client::new_localnet(); + + // Build the `publish` PTB + let mut builder = TransactionBuilder::new(sender).with_client(&client); + builder + // Publish the package and receive the upgrade cap + .publish(package_data) + .name("upgrade_cap") + // Transfer the upgrade cap to the sender address + .transfer_objects(sender, [res("upgrade_cap")]); + + // Sign and execute the transaction (publish the package) + let effects = builder.execute(&private_key, WaitForTx::Finalized).await?; + + println!("Publishing package: {:?}\n", effects.status()); + + // Wait some time for the indexer to process the tx + tokio::time::sleep(std::time::Duration::from_secs(3)).await; + + // Get package, package metadata and account IDs from the effects + let mut package_id = None::; + let mut package_metadata_id = None::; + let mut account_id = None::; + + for changed_obj in effects.as_v1().changed_objects.iter() { + match changed_obj.output_state { + ObjectOut::PackageWrite { .. } => { + package_id.replace(changed_obj.object_id); + } + ObjectOut::ObjectWrite { .. } => { + let object_id = changed_obj.object_id; + let object = client.object(object_id, None).await?; + + if let Some(object) = object { + if object.as_struct().type_.name + == IdentifierRef::const_new("PackageMetadataV1") + { + package_metadata_id.replace(object_id); + } + if object.as_struct().type_.name == IdentifierRef::const_new("Account") { + account_id.replace(object_id); + } + } + } + _ => continue, + } + } + + let package_id = package_id.ok_or_eyre("Missing package id")?; + let package_metadata_id = package_metadata_id.ok_or_eyre("Missing package metadata id")?; + let account_id = account_id.ok_or_eyre("Missing account id")?; + + println!("Package ID: {package_id}"); + println!("PackageMetadataV1 ID: {package_metadata_id}"); + println!("Account ID: {account_id}\n"); + + // Build the `link_auth` PTB + let mut builder = TransactionBuilder::new(sender).with_client(&client); + builder + .move_call(package_id, "account", "link_auth") + .arguments(( + SharedMut(account_id), + package_metadata_id, + "account", + "authenticate", + )); + + // Sign and execute the transaction (link the authenticator) + let effects = builder.execute(&private_key, WaitForTx::Finalized).await?; + + println!( + "Linking account to authenticate method: {:?}\n", + effects.status() + ); + + Ok(account_id) +} + +/// The package below, compiled and exported using --dump-bytecode-as-base64 +const PRECOMPILED_PACKAGE: &str = r#"{"modules":["oRzrCwYAAAALAQASAhImAzgrBGMGBWlPB7gBmgII0gNgBrIECRC7BCoK5QQLDPAEQgAJAgkCCwINAhUCFgIZAhoBCgABDAAAAAIAAQMHAQgBAgICAAMECAAECAQABQUIAAcHAgAIBgcAABIAAQAAEwIBAAAMAwEAAQ4LAQEIAQ8JCgEIBBQEBQAGFwcBAQwIGAwNAAYGBAYDBgIIAQcIBwAECAAGCAYICAgIBQYIAAgIBggEBggDBggHAQcIBwEIBQEIAAEJAAELAgEIAAMGCAYICAgIAQsCAQkAAgkACwIBCQABCgIBCAgHQUNDT1VOVAdBY2NvdW50C0F1dGhDb250ZXh0E0F1dGhlbnRpY2F0b3JJbmZvVjEFQ2xvY2sRUGFja2FnZU1ldGFkYXRhVjEGU3RyaW5nCVR4Q29udGV4dANVSUQHYWNjb3VudAVhc2NpaQxhdXRoX2NvbnRleHQMYXV0aGVudGljYXRlBWNsb2NrEWNyZWF0ZV9hY2NvdW50X3YxE2NyZWF0ZV9hdXRoX2luZm9fdjELZHVtbXlfZmllbGQCaWQEaW5pdAlsaW5rX2F1dGgDbmV3Bm9iamVjdBBwYWNrYWdlX21ldGFkYXRhE3B1YmxpY19zaGFyZV9vYmplY3QGc3RyaW5nCHRyYW5zZmVyCnR4X2NvbnRleHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIKAgYFaGVsbG8OaW90YTo6bWV0YWRhdGEaAQAAAAAAAAARAQxhdXRoZW50aWNhdGUBAAEAAgERCAUBAgEQAQAAAAABBQsBEQUSADgAAgEBAAAICQsBCwILAzgBDAQLAAsEOAICAgEAAAEJCwEHABEHIQQGBQgGAAAAAAAAAAAnAgA="],"dependencies":["0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000001"],"digest":[131,29,40,201,77,34,214,57,161,173,80,235,179,222,106,170,36,40,167,228,158,203,186,111,92,221,123,217,230,95,165,73]}"#; + +#[expect(unused)] +const PACKAGE: &str = r#" +module account::account; + +use iota::package_metadata::PackageMetadataV1; + +public struct Account has key, store { + id: UID, +} + +public struct ACCOUNT has drop {} + +fun init(_otw: ACCOUNT, ctx: &mut TxContext) { + // Shares the account object, anyone can claim it by calling the link_auth function + transfer::public_share_object(Account { + id: object::new(ctx), + }); +} + +public fun link_auth(account: Account, package: &PackageMetadataV1, module_name: std::ascii::String, function_name: std::ascii::String) { + let authenticator_info = iota::account::create_auth_info_v1(package, module_name, function_name); + iota::account::create_account_v1(account, authenticator_info); +} + +/// An unsecure example authenticator function that checks if the provided message is "hello". +#[authenticator] +public fun authenticate( + _account: &Account, + msg: std::ascii::String, + _clock: &iota::clock::Clock, + _auth_ctx: &iota::auth_context::AuthContext, + _ctx: &TxContext, +) { + assert!(msg == std::ascii::string(b"hello"), 0); +} +"#;