diff --git a/bindings/go/examples/publish_upgrade/main.go b/bindings/go/examples/publish_upgrade/main.go index c625cc590..b741ad5c8 100644 --- a/bindings/go/examples/publish_upgrade/main.go +++ b/bindings/go/examples/publish_upgrade/main.go @@ -124,11 +124,8 @@ func main() { } obj := *objPtr if obj.AsStructOpt() != nil { - structType := obj.AsStruct().StructType - packageIdent, _ := sdk.NewIdentifier("package") - upgradeCapIdent, _ := sdk.NewIdentifier("UpgradeCap") - upgradeCapType := sdk.NewStructTag(sdk.AddressFramework(), packageIdent, upgradeCapIdent, []*sdk.TypeTag{}) - if structType.Eq(upgradeCapType) { + upgradeCapType := sdk.StructTagNewUpgradeCap() + if obj.AsStruct().StructType.Eq(upgradeCapType) { fmt.Printf("UpgradeCap: %s\n", objectId.ToHex()) fmt.Printf("UpgradeCapOwner: %s\n", objectWrite.Owner.AsAddress().ToHex()) upgradeCap = objectId diff --git a/bindings/go/examples/unstake/main.go b/bindings/go/examples/unstake/main.go index 9906887a7..2ef93c3d1 100644 --- a/bindings/go/examples/unstake/main.go +++ b/bindings/go/examples/unstake/main.go @@ -12,7 +12,7 @@ import ( func main() { client := sdk.GraphQlClientNewDevnet() - stakedIotaType := sdk.StructTagStakedIota().String() + stakedIotaType := sdk.StructTagNewStakedIota().String() stakedIotas, err := client.Objects(&sdk.ObjectFilter{TypeTag: &stakedIotaType}, nil) if err.(*sdk.SdkFfiError) != nil { log.Fatalf("Failed to get staked iota: %v", err) diff --git a/bindings/go/iota_sdk_ffi/iota_sdk_ffi.go b/bindings/go/iota_sdk_ffi/iota_sdk_ffi.go index 0a22c79d3..1a7d571a6 100644 --- a/bindings/go/iota_sdk_ffi/iota_sdk_ffi.go +++ b/bindings/go/iota_sdk_ffi/iota_sdk_ffi.go @@ -5546,7 +5546,7 @@ func uniffiCheckChecksums() { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_method_structtag_address() }) - if checksum != 18393 { + if checksum != 20393 { // If this happens try cleaning and rebuilding your project panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_structtag_address: UniFFI API checksum mismatch") } @@ -5570,6 +5570,33 @@ func uniffiCheckChecksums() { } } { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_structtag_module() + }) + if checksum != 28022 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_structtag_module: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_structtag_name() + }) + if checksum != 62865 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_structtag_name: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_method_structtag_type_args() + }) + if checksum != 48594 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_structtag_type_args: UniFFI API checksum mismatch") + } + } + { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { return C.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies() }) @@ -8730,38 +8757,308 @@ func uniffiCheckChecksums() { } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin() + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() }) - if checksum != 13756 { + if checksum != 61625 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new: UniFFI API checksum mismatch") } } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string() }) - if checksum != 37848 { + if checksum != 60972 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string: UniFFI API checksum mismatch") } } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance() }) - if checksum != 61625 { + if checksum != 10874 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock() + }) + if checksum != 18419 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin() + }) + if checksum != 38232 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager() + }) + if checksum != 16973 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata() + }) + if checksum != 56669 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config() + }) + if checksum != 33902 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting() + }) + if checksum != 18224 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key() + }) + if checksum != 6409 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key() + }) + if checksum != 3059 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key() + }) + if checksum != 36813 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created() + }) + if checksum != 24465 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper() + }) + if checksum != 48905 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field() + }) + if checksum != 4196 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin() + }) + if checksum != 5754 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id() + }) + if checksum != 62017 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type() + }) + if checksum != 44499 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap() + }) + if checksum != 5595 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state() + }) + if checksum != 29781 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap() + }) + if checksum != 59282 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name() + }) + if checksum != 26361 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota() + }) + if checksum != 60970 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string() + }) + if checksum != 47333 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event() + }) + if checksum != 36154 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock() + }) + if checksum != 38402 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota() + }) + if checksum != 46742 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving() + }) + if checksum != 40850 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving: UniFFI API checksum mismatch") } } { checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { - return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap() }) - if checksum != 30839 { + if checksum != 2523 { // If this happens try cleaning and rebuilding your project - panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota: UniFFI API checksum mismatch") + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid() + }) + if checksum != 54533 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap() + }) + if checksum != 6365 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt() + }) + if checksum != 44298 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket() + }) + if checksum != 43936 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket: UniFFI API checksum mismatch") + } + } + { + checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t { + return C.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated() + }) + if checksum != 40840 { + // If this happens try cleaning and rebuilding your project + panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated: UniFFI API checksum mismatch") } } { @@ -23752,11 +24049,18 @@ func (_ FfiDestroyerSplitCoins) Destroy(value *SplitCoins) { // (vector type-tag) ; type parameters // ``` type StructTagInterface interface { + // Returns the address part of a `StructTag` Address() *Address // Checks if this is a Coin type CoinType() *TypeTag // Checks if this is a Coin type CoinTypeOpt() **TypeTag + // Returns the module part of a `StructTag` + Module() *Identifier + // Returns the name part of a `StructTag` + Name() *Identifier + // Returns the type params part of a `StructTag` + TypeArgs() []*TypeTag } // Type information for a move struct // @@ -23780,26 +24084,207 @@ func NewStructTag(address *Address, module *Identifier, name *Identifier, typePa } -func StructTagCoin(typeTag *TypeTag) *StructTag { +func StructTagNewAsciiString() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string(_uniffiStatus) + })) +} + +func StructTagNewBalance(typeTag *TypeTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) + })) +} + +func StructTagNewClock() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock(_uniffiStatus) + })) +} + +func StructTagNewCoin(typeTag *TypeTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) + })) +} + +func StructTagNewCoinManager(structTag *StructTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager(FfiConverterStructTagINSTANCE.Lower(structTag),_uniffiStatus) + })) +} + +func StructTagNewCoinMetadata(structTag *StructTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata(FfiConverterStructTagINSTANCE.Lower(structTag),_uniffiStatus) + })) +} + +func StructTagNewConfig() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config(_uniffiStatus) + })) +} + +func StructTagNewConfigSetting(typeTag *TypeTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) + })) +} + +func StructTagNewDenyListAddressKey() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key(_uniffiStatus) + })) +} + +func StructTagNewDenyListConfigKey() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key(_uniffiStatus) + })) +} + +func StructTagNewDenyListGlobalPauseKey() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key(_uniffiStatus) + })) +} + +func StructTagNewDisplayCreated(structTag *StructTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created(FfiConverterStructTagINSTANCE.Lower(structTag),_uniffiStatus) + })) +} + +func StructTagNewDynamicObjectFieldWrapper(typeTag *TypeTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) + })) +} + +func StructTagNewField(key *TypeTag, value *TypeTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field(FfiConverterTypeTagINSTANCE.Lower(key), FfiConverterTypeTagINSTANCE.Lower(value),_uniffiStatus) + })) +} + +func StructTagNewGasCoin() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin(_uniffiStatus) + })) +} + +func StructTagNewId() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id(_uniffiStatus) + })) +} + +func StructTagNewIotaCoinType() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type(_uniffiStatus) + })) +} + +func StructTagNewIotaSystemAdminCap() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap(_uniffiStatus) + })) +} + +func StructTagNewIotaSystemState() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state(_uniffiStatus) + })) +} + +func StructTagNewIotaTreasuryCap() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap(_uniffiStatus) + })) +} + +func StructTagNewName(address *Address) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name(FfiConverterAddressINSTANCE.Lower(address),_uniffiStatus) + })) +} + +func StructTagNewStakedIota() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota(_uniffiStatus) + })) +} + +func StructTagNewString() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string(_uniffiStatus) + })) +} + +func StructTagNewSystemEpochInfoEvent() *StructTag { return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event(_uniffiStatus) })) } -func StructTagGasCoin() *StructTag { +func StructTagNewTimeLock(typeTag *TypeTag) *StructTag { return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin(_uniffiStatus) + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock(FfiConverterTypeTagINSTANCE.Lower(typeTag),_uniffiStatus) })) } -func StructTagStakedIota() *StructTag { +func StructTagNewTimelockedStakedIota() *StructTag { return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { - return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota(_uniffiStatus) + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota(_uniffiStatus) })) } +func StructTagNewTransferReceiving() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving(_uniffiStatus) + })) +} +func StructTagNewTreasuryCap(structTag *StructTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap(FfiConverterStructTagINSTANCE.Lower(structTag),_uniffiStatus) + })) +} +func StructTagNewUid() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid(_uniffiStatus) + })) +} + +func StructTagNewUpgradeCap() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap(_uniffiStatus) + })) +} + +func StructTagNewUpgradeReceipt() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt(_uniffiStatus) + })) +} + +func StructTagNewUpgradeTicket() *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket(_uniffiStatus) + })) +} + +func StructTagNewVersionUpdated(structTag *StructTag) *StructTag { + return FfiConverterStructTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated(FfiConverterStructTagINSTANCE.Lower(structTag),_uniffiStatus) + })) +} + + + +// Returns the address part of a `StructTag` func (_self *StructTag) Address() *Address { _pointer := _self.ffiObject.incrementPointer("*StructTag") defer _self.ffiObject.decrementPointer() @@ -23831,6 +24316,38 @@ func (_self *StructTag) CoinTypeOpt() **TypeTag { })) } +// Returns the module part of a `StructTag` +func (_self *StructTag) Module() *Identifier { + _pointer := _self.ffiObject.incrementPointer("*StructTag") + defer _self.ffiObject.decrementPointer() + return FfiConverterIdentifierINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_method_structtag_module( + _pointer,_uniffiStatus) + })) +} + +// Returns the name part of a `StructTag` +func (_self *StructTag) Name() *Identifier { + _pointer := _self.ffiObject.incrementPointer("*StructTag") + defer _self.ffiObject.decrementPointer() + return FfiConverterIdentifierINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer { + return C.uniffi_iota_sdk_ffi_fn_method_structtag_name( + _pointer,_uniffiStatus) + })) +} + +// Returns the type params part of a `StructTag` +func (_self *StructTag) TypeArgs() []*TypeTag { + _pointer := _self.ffiObject.incrementPointer("*StructTag") + defer _self.ffiObject.decrementPointer() + return FfiConverterSequenceTypeTagINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI { + return GoRustBuffer { + inner: C.uniffi_iota_sdk_ffi_fn_method_structtag_type_args( + _pointer,_uniffiStatus), + } + })) +} + func (_self *StructTag) String() string { _pointer := _self.ffiObject.incrementPointer("*StructTag") defer _self.ffiObject.decrementPointer() diff --git a/bindings/go/iota_sdk_ffi/iota_sdk_ffi.h b/bindings/go/iota_sdk_ffi/iota_sdk_ffi.h index 6b50fcf1e..8ba494d14 100644 --- a/bindings/go/iota_sdk_ffi/iota_sdk_ffi.h +++ b/bindings/go/iota_sdk_ffi/iota_sdk_ffi.h @@ -4147,26 +4147,195 @@ void* uniffi_iota_sdk_ffi_fn_clone_structtag(void* ptr, RustCallStatus *out_stat void uniffi_iota_sdk_ffi_fn_free_structtag(void* ptr, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_COIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_COIN -void* uniffi_iota_sdk_ffi_fn_constructor_structtag_coin(void* type_tag, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new(void* address, void* module, void* name, RustBuffer type_params, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_GAS_COIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_GAS_COIN -void* uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin(RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_ASCII_STRING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_ASCII_STRING +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string(RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW -void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new(void* address, void* module, void* name, RustBuffer type_params, RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_BALANCE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_BALANCE +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance(void* type_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CLOCK +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CLOCK +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin(void* type_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN_MANAGER +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN_MANAGER +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager(void* struct_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN_METADATA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_COIN_METADATA +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata(void* struct_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG_SETTING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG_SETTING +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting(void* type_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_ADDRESS_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_ADDRESS_KEY +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_CONFIG_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_CONFIG_KEY +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_GLOBAL_PAUSE_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_GLOBAL_PAUSE_KEY +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DISPLAY_CREATED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DISPLAY_CREATED +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created(void* struct_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DYNAMIC_OBJECT_FIELD_WRAPPER +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_DYNAMIC_OBJECT_FIELD_WRAPPER +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper(void* type_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_FIELD +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_FIELD +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field(void* key, void* value, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_GAS_COIN +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_GAS_COIN +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_ID +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_ID +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_COIN_TYPE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_COIN_TYPE +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_ADMIN_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_ADMIN_CAP +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_STATE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_STATE +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_TREASURY_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_TREASURY_CAP +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_NAME +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_NAME +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name(void* address, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_STAKED_IOTA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_STAKED_IOTA +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_STRING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_STRING +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_SYSTEM_EPOCH_INFO_EVENT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_SYSTEM_EPOCH_INFO_EVENT +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TIME_LOCK +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TIME_LOCK +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock(void* type_tag, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TIMELOCKED_STAKED_IOTA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TIMELOCKED_STAKED_IOTA +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TRANSFER_RECEIVING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TRANSFER_RECEIVING +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TREASURY_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_TREASURY_CAP +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap(void* struct_tag, RustCallStatus *out_status ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_STAKED_IOTA -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_STAKED_IOTA -void* uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota(RustCallStatus *out_status +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UID +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UID +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid(RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_CAP +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_RECEIPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_RECEIPT +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_TICKET +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_TICKET +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket(RustCallStatus *out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_VERSION_UPDATED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_CONSTRUCTOR_STRUCTTAG_NEW_VERSION_UPDATED +void* uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated(void* struct_tag, RustCallStatus *out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_ADDRESS @@ -4184,6 +4353,21 @@ void* uniffi_iota_sdk_ffi_fn_method_structtag_coin_type(void* ptr, RustCallStatu RustBuffer uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt(void* ptr, RustCallStatus *out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_MODULE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_MODULE +void* uniffi_iota_sdk_ffi_fn_method_structtag_module(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_NAME +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_NAME +void* uniffi_iota_sdk_ffi_fn_method_structtag_name(void* ptr, RustCallStatus *out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_TYPE_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_TYPE_ARGS +RustBuffer uniffi_iota_sdk_ffi_fn_method_structtag_type_args(void* ptr, RustCallStatus *out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_UNIFFI_TRAIT_DISPLAY #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_STRUCTTAG_UNIFFI_TRAIT_DISPLAY RustBuffer uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display(void* ptr, RustCallStatus *out_status @@ -10206,6 +10390,24 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type(void #define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_COIN_TYPE_OPT uint16_t uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt(void +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_MODULE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_MODULE +uint16_t uniffi_iota_sdk_ffi_checksum_method_structtag_module(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_NAME +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_NAME +uint16_t uniffi_iota_sdk_ffi_checksum_method_structtag_name(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_TYPE_ARGS +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_STRUCTTAG_TYPE_ARGS +uint16_t uniffi_iota_sdk_ffi_checksum_method_structtag_type_args(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_SYSTEMPACKAGE_DEPENDENCIES @@ -12314,27 +12516,207 @@ uint16_t uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_COIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_COIN -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_GAS_COIN -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_GAS_COIN -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_ASCII_STRING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_ASCII_STRING +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_BALANCE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_BALANCE +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CLOCK +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CLOCK +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN_MANAGER +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN_MANAGER +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN_METADATA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_COIN_METADATA +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG_SETTING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_CONFIG_SETTING +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_ADDRESS_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_ADDRESS_KEY +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_CONFIG_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_CONFIG_KEY +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_GLOBAL_PAUSE_KEY +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DENY_LIST_GLOBAL_PAUSE_KEY +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DISPLAY_CREATED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DISPLAY_CREATED +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DYNAMIC_OBJECT_FIELD_WRAPPER +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_DYNAMIC_OBJECT_FIELD_WRAPPER +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_FIELD +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_FIELD +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_GAS_COIN +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_GAS_COIN +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_ID +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_ID +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_COIN_TYPE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_COIN_TYPE +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_ADMIN_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_ADMIN_CAP +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_STATE +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_SYSTEM_STATE +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_TREASURY_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_IOTA_TREASURY_CAP +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_NAME +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_NAME +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_STAKED_IOTA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_STAKED_IOTA +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_STRING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_STRING +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_SYSTEM_EPOCH_INFO_EVENT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_SYSTEM_EPOCH_INFO_EVENT +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TIME_LOCK +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TIME_LOCK +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TIMELOCKED_STAKED_IOTA +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TIMELOCKED_STAKED_IOTA +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TRANSFER_RECEIVING +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TRANSFER_RECEIVING +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TREASURY_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_TREASURY_CAP +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UID +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UID +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_CAP +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_CAP +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_RECEIPT +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_RECEIPT +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_TICKET +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_UPGRADE_TICKET +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket(void ); #endif -#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_STAKED_IOTA -#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_STAKED_IOTA -uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota(void +#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_VERSION_UPDATED +#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_CONSTRUCTOR_STRUCTTAG_NEW_VERSION_UPDATED +uint16_t uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated(void ); #endif diff --git a/bindings/kotlin/examples/PublishUpgrade.kt b/bindings/kotlin/examples/PublishUpgrade.kt index f3c0df1f8..f0d216273 100644 --- a/bindings/kotlin/examples/PublishUpgrade.kt +++ b/bindings/kotlin/examples/PublishUpgrade.kt @@ -92,13 +92,7 @@ fun main() = runBlocking { val obj: Object = client.`object`(objectId, null) ?: throw Exception("Missing object ${objectId.toHex()}") - val upgradeCapType = - StructTag( - address = Address.framework(), - module = Identifier("package"), - name = Identifier("UpgradeCap"), - typeParams = emptyList() - ) + val upgradeCapType = StructTag.newUpgradeCap() if (obj.asStruct().structType == upgradeCapType) { println("UpgradeCap: ${objectId.toHex()}") println( diff --git a/bindings/kotlin/examples/Unstake.kt b/bindings/kotlin/examples/Unstake.kt index 540e3b816..2430bf8d2 100644 --- a/bindings/kotlin/examples/Unstake.kt +++ b/bindings/kotlin/examples/Unstake.kt @@ -12,7 +12,8 @@ fun main() = runBlocking { try { val client = GraphQlClient.newDevnet() - val stakedIotas = client.objects(ObjectFilter(typeTag = StructTag.stakedIota().toString())) + val stakedIotas = + client.objects(ObjectFilter(typeTag = StructTag.newStakedIota().toString())) if (stakedIotas.data.isEmpty()) { throw Exception("no validators found") } diff --git a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt index 29c0f4626..65f171218 100644 --- a/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt +++ b/bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt @@ -2884,6 +2884,72 @@ internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4078,6 +4144,12 @@ fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type( ): Short fun uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt( ): Short +fun uniffi_iota_sdk_ffi_checksum_method_structtag_module( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_structtag_name( +): Short +fun uniffi_iota_sdk_ffi_checksum_method_structtag_type_args( +): Short fun uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies( ): Short fun uniffi_iota_sdk_ffi_checksum_method_systempackage_modules( @@ -4780,13 +4852,73 @@ fun uniffi_iota_sdk_ffi_checksum_constructor_simpleverifyingkey_from_pem( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin( +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin( +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new( +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event( ): Short -fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota( +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket( +): Short +fun uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated( ): Short fun uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new( ): Short @@ -6425,13 +6557,73 @@ fun uniffi_iota_sdk_ffi_fn_clone_structtag(`ptr`: Pointer,uniffi_out_err: Uniffi ): Pointer fun uniffi_iota_sdk_ffi_fn_free_structtag(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_coin(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new(`address`: Pointer,`module`: Pointer,`name`: Pointer,`typeParams`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin(uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string(uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new(`address`: Pointer,`module`: Pointer,`name`: Pointer,`typeParams`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field(`key`: Pointer,`value`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name(`address`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string(uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota(uniffi_out_err: UniffiRustCallStatus, +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock(`typeTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket(uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated(`structTag`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_iota_sdk_ffi_fn_method_structtag_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer @@ -6439,6 +6631,12 @@ fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type(`ptr`: Pointer,uniffi_out_ ): Pointer fun uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_iota_sdk_ffi_fn_method_structtag_module(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_structtag_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_iota_sdk_ffi_fn_method_structtag_type_args(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue fun uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_eq_eq(`ptr`: Pointer,`other`: Pointer,uniffi_out_err: UniffiRustCallStatus, @@ -9195,7 +9393,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin() != 17278.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_address() != 18393.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_address() != 20393.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type() != 37745.toShort()) { @@ -9204,6 +9402,15 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt() != 65306.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_module() != 28022.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_name() != 62865.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_method_structtag_type_args() != 48594.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies() != 25411.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -10257,16 +10464,106 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new() != 50321.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin() != 13756.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() != 37848.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string() != 60972.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance() != 10874.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock() != 18419.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin() != 38232.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager() != 16973.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata() != 56669.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config() != 33902.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting() != 18224.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key() != 6409.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key() != 3059.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key() != 36813.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created() != 24465.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper() != 48905.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field() != 4196.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin() != 5754.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id() != 62017.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type() != 44499.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap() != 5595.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state() != 29781.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap() != 59282.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name() != 26361.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota() != 60970.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string() != 47333.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() != 30839.toShort()) { + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event() != 36154.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock() != 38402.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota() != 46742.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving() != 40850.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap() != 2523.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid() != 54533.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap() != 6365.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt() != 44298.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket() != 43936.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated() != 40840.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new() != 25070.toShort()) { @@ -39696,6 +39993,9 @@ public object FfiConverterTypeSplitCoins: FfiConverter { */ public interface StructTagInterface { + /** + * Returns the address part of a `StructTag` + */ fun `address`(): Address /** @@ -39708,6 +40008,21 @@ public interface StructTagInterface { */ fun `coinTypeOpt`(): TypeTag? + /** + * Returns the module part of a `StructTag` + */ + fun `module`(): Identifier + + /** + * Returns the name part of a `StructTag` + */ + fun `name`(): Identifier + + /** + * Returns the type params part of a `StructTag` + */ + fun `typeArgs`(): List + companion object } @@ -39814,7 +40129,10 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface } } - override fun `address`(): Address { + + /** + * Returns the address part of a `StructTag` + */override fun `address`(): Address { return FfiConverterTypeAddress.lift( callWithPointer { uniffiRustCall() { _status -> @@ -39857,6 +40175,51 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface + /** + * Returns the module part of a `StructTag` + */override fun `module`(): Identifier { + return FfiConverterTypeIdentifier.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_module( + it, _status) +} + } + ) + } + + + + /** + * Returns the name part of a `StructTag` + */override fun `name`(): Identifier { + return FfiConverterTypeIdentifier.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_name( + it, _status) +} + } + ) + } + + + + /** + * Returns the type params part of a `StructTag` + */override fun `typeArgs`(): List { + return FfiConverterSequenceTypeTypeTag.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_structtag_type_args( + it, _status) +} + } + ) + } + + + override fun toString(): String { return FfiConverterString.lift( callWithPointer { @@ -39885,36 +40248,336 @@ open class StructTag: Disposable, AutoCloseable, StructTagInterface companion object { - fun `coin`(`typeTag`: TypeTag): StructTag { + fun `newAsciiString`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string( + _status) +} + ) + } + + + fun `newBalance`(`typeTag`: TypeTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) +} + ) + } + + + fun `newClock`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock( + _status) +} + ) + } + + + fun `newCoin`(`typeTag`: TypeTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) +} + ) + } + + + fun `newCoinManager`(`structTag`: StructTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager( + FfiConverterTypeStructTag.lower(`structTag`),_status) +} + ) + } + + + fun `newCoinMetadata`(`structTag`: StructTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata( + FfiConverterTypeStructTag.lower(`structTag`),_status) +} + ) + } + + + fun `newConfig`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config( + _status) +} + ) + } + + + fun `newConfigSetting`(`typeTag`: TypeTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) +} + ) + } + + + fun `newDenyListAddressKey`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key( + _status) +} + ) + } + + + fun `newDenyListConfigKey`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key( + _status) +} + ) + } + + + fun `newDenyListGlobalPauseKey`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key( + _status) +} + ) + } + + + fun `newDisplayCreated`(`structTag`: StructTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created( + FfiConverterTypeStructTag.lower(`structTag`),_status) +} + ) + } + + + fun `newDynamicObjectFieldWrapper`(`typeTag`: TypeTag): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper( FfiConverterTypeTypeTag.lower(`typeTag`),_status) } ) } - fun `gasCoin`(): StructTag { + fun `newField`(`key`: TypeTag, `value`: TypeTag): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field( + FfiConverterTypeTypeTag.lower(`key`),FfiConverterTypeTypeTag.lower(`value`),_status) +} + ) + } + + + fun `newGasCoin`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin( _status) } ) } - fun `stakedIota`(): StructTag { + fun `newId`(): StructTag { return FfiConverterTypeStructTag.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota( + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id( _status) } ) } + fun `newIotaCoinType`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type( + _status) +} + ) + } + + + fun `newIotaSystemAdminCap`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap( + _status) +} + ) + } + + + fun `newIotaSystemState`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state( + _status) +} + ) + } + + + fun `newIotaTreasuryCap`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap( + _status) +} + ) + } + + + fun `newName`(`address`: Address): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name( + FfiConverterTypeAddress.lower(`address`),_status) +} + ) + } + + + fun `newStakedIota`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota( + _status) +} + ) + } + + + fun `newString`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string( + _status) +} + ) + } + + + fun `newSystemEpochInfoEvent`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event( + _status) +} + ) + } + + + fun `newTimeLock`(`typeTag`: TypeTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock( + FfiConverterTypeTypeTag.lower(`typeTag`),_status) +} + ) + } + + + fun `newTimelockedStakedIota`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota( + _status) +} + ) + } + + + fun `newTransferReceiving`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving( + _status) +} + ) + } + + + fun `newTreasuryCap`(`structTag`: StructTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap( + FfiConverterTypeStructTag.lower(`structTag`),_status) +} + ) + } + + + fun `newUid`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid( + _status) +} + ) + } + + + fun `newUpgradeCap`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap( + _status) +} + ) + } + + + fun `newUpgradeReceipt`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt( + _status) +} + ) + } + + + fun `newUpgradeTicket`(): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket( + _status) +} + ) + } + + + fun `newVersionUpdated`(`structTag`: StructTag): StructTag { + return FfiConverterTypeStructTag.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated( + FfiConverterTypeStructTag.lower(`structTag`),_status) +} + ) + } + + } diff --git a/bindings/python/examples/coin_balances.py b/bindings/python/examples/coin_balances.py index dc53780b7..06a072f29 100644 --- a/bindings/python/examples/coin_balances.py +++ b/bindings/python/examples/coin_balances.py @@ -15,7 +15,9 @@ async def main(): coins = await client.coins(address) for coin in coins.data: - print(f"Coin = {coin.id().to_hex()}, Coin Type = {coin.coin_type().as_struct_tag()}, Balance = {coin.balance()}") + print( + f"Coin = {coin.id().to_hex()}, Coin Type = {coin.coin_type().as_struct_tag()}, Balance = {coin.balance()}" + ) balance = await client.balance(address) print(f"Total Balance = {balance}") diff --git a/bindings/python/examples/publish_upgrade.py b/bindings/python/examples/publish_upgrade.py index 32da75c4a..82051bdce 100644 --- a/bindings/python/examples/publish_upgrade.py +++ b/bindings/python/examples/publish_upgrade.py @@ -28,6 +28,7 @@ import json import os + async def main(): try: # Read and parse the compiled package, or use the default package @@ -36,7 +37,7 @@ async def main(): print("No compiled package found in env var. Using default.") package_data_json = PRECOMPILED_PACKAGE else: - print("Using custom Move package found in env var."); + print("Using custom Move package found in env var.") package_data = MovePackageData.from_json(package_data_json) modules = package_data.modules() @@ -96,11 +97,11 @@ async def main(): obj = await client.object(object_id, None) if obj is None: raise Exception(f"Missing object {object_id.to_hex()}") - if obj.as_struct().struct_type == StructTag( - Address.framework(), Identifier("package"), Identifier("UpgradeCap") - ): + if obj.as_struct().struct_type == StructTag.new_upgrade_cap(): print(f"UpgradeCap: {object_id.to_hex()}") - print(f"UpgradeCapOwner: {changed_obj.output_state.owner.as_address().to_hex()}") + print( + f"UpgradeCapOwner: {changed_obj.output_state.owner.as_address().to_hex()}" + ) upgrade_cap = object_id elif changed_obj.output_state.is_package_write(): diff --git a/bindings/python/examples/tx_command_results.py b/bindings/python/examples/tx_command_results.py index 2f948c5c1..16adb4a06 100644 --- a/bindings/python/examples/tx_command_results.py +++ b/bindings/python/examples/tx_command_results.py @@ -5,60 +5,66 @@ import asyncio + async def main(): - try: - client = GraphQlClient.new_devnet() + try: + client = GraphQlClient.new_devnet() + + sender = Address.from_hex( + "0x611830d3641a68f94a690dcc25d1f4b0dac948325ac18f6dd32564371735f32c" + ) - sender = Address.from_hex("0x611830d3641a68f94a690dcc25d1f4b0dac948325ac18f6dd32564371735f32c") + builder = await TransactionBuilder.init(sender, client) - builder = await TransactionBuilder.init(sender, client) + package_addr = Address.std_lib() + module_name = Identifier("u64") + function_name = Identifier("max") - package_addr = Address.std_lib() - module_name = Identifier("u64") - function_name = Identifier("max") + builder.move_call( + package_addr, + module_name, + function_name, + [PtbArgument.u64(0), PtbArgument.u64(1000)], + # Assign a name to the result of this command + names=["res0"], + ) - builder.move_call( - package_addr, - module_name, - function_name, - [PtbArgument.u64(0), PtbArgument.u64(1000)], - # Assign a name to the result of this command - names=["res0"], - ) + builder.move_call( + package_addr, + module_name, + function_name, + [PtbArgument.u64(1000), PtbArgument.u64(2000)], + # Assign a name to the result of this command + names=["res1"], + ) - builder.move_call( - package_addr, - module_name, - function_name, - [PtbArgument.u64(1000), PtbArgument.u64(2000)], - # Assign a name to the result of this command - names=["res1"], - ) + builder.split_coins( + PtbArgument.gas(), + # Use the named results of previous commands as arguments + [PtbArgument.res("res0"), PtbArgument.res("res1")], + # For nested results, a tuple or vec can be used to name them + ["coin0", "coin1"], + ) - builder.split_coins( - PtbArgument.gas(), - # Use the named results of previous commands as arguments - [PtbArgument.res("res0"), PtbArgument.res("res1")], - # For nested results, a tuple or vec can be used to name them - ["coin0", "coin1"], - ) + # Use named results as arguments + builder.transfer_objects( + sender, [PtbArgument.res("coin0"), PtbArgument.res("coin1")] + ) - # Use named results as arguments - builder.transfer_objects(sender, [PtbArgument.res("coin0"), PtbArgument.res("coin1")]) + txn = await builder.finish() - txn = await builder.finish() + print("Signing Digest:", txn.signing_digest_hex()) + print("Txn Bytes:", txn.to_base64()) - print("Signing Digest:", txn.signing_digest_hex()) - print("Txn Bytes:", txn.to_base64()) + res = await client.dry_run_tx(txn, False) + if res.error is not None: + raise Exception("Failed to send tx:", res.error) - res = await client.dry_run_tx(txn, False) - if res.error is not None: - raise Exception("Failed to send tx:", res.error) + print("Tx dry run was successful!") - print("Tx dry run was successful!") + except Exception as e: + print(f"Error: {e}") - except Exception as e: - print(f"Error: {e}") if __name__ == "__main__": - asyncio.run(main()) + asyncio.run(main()) diff --git a/bindings/python/examples/unstake.py b/bindings/python/examples/unstake.py index e5ecc6636..e193c4f7a 100644 --- a/bindings/python/examples/unstake.py +++ b/bindings/python/examples/unstake.py @@ -11,7 +11,7 @@ async def main(): client = GraphQlClient.new_devnet() staked_iotas = await client.objects( - filter=ObjectFilter(type_tag=str(StructTag.staked_iota())) + filter=ObjectFilter(type_tag=str(StructTag.new_staked_iota())) ) if len(staked_iotas.data) == 0: raise Exception("no staked iotas found") diff --git a/bindings/python/lib/iota_sdk_ffi.py b/bindings/python/lib/iota_sdk_ffi.py index 4bc8eff2b..8ad92d403 100644 --- a/bindings/python/lib/iota_sdk_ffi.py +++ b/bindings/python/lib/iota_sdk_ffi.py @@ -1613,12 +1613,18 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_splitcoins_coin() != 17278: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_address() != 18393: + if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_address() != 20393: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type() != 37745: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt() != 65306: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_module() != 28022: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_name() != 62865: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_structtag_type_args() != 48594: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies() != 25411: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_systempackage_modules() != 23597: @@ -2321,13 +2327,73 @@ 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_splitcoins_new() != 50321: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin() != 13756: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin() != 37848: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string() != 60972: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new() != 61625: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance() != 10874: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock() != 18419: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin() != 38232: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager() != 16973: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata() != 56669: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config() != 33902: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting() != 18224: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key() != 6409: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key() != 3059: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key() != 36813: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created() != 24465: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper() != 48905: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field() != 4196: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin() != 5754: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id() != 62017: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type() != 44499: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap() != 5595: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state() != 29781: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap() != 59282: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota() != 30839: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name() != 26361: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota() != 60970: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string() != 47333: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event() != 36154: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock() != 38402: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota() != 46742: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving() != 40850: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap() != 2523: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid() != 54533: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap() != 6365: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt() != 44298: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket() != 43936: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated() != 40840: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new() != 25070: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -6383,27 +6449,159 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_structtag.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, ctypes.c_void_p, + _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string.argtypes = ( ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance.argtypes = ( ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin.argtypes = ( ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager.argtypes = ( ctypes.c_void_p, - _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config.argtypes = ( ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -6419,6 +6617,21 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_coin_type_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_module.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_module.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_name.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_name.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_type_args.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_type_args.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -10746,6 +10959,15 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_coin_type_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_module.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_module.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_name.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_name.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_type_args.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_structtag_type_args.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_systempackage_dependencies.restype = ctypes.c_uint16 @@ -11799,18 +12021,108 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_splitcoins_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_coin.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_gas_coin.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_ascii_string.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_balance.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_clock.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_manager.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_coin_metadata.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_config_setting.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_address_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_staked_iota.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_config_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_deny_list_global_pause_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_display_created.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_dynamic_object_field_wrapper.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_field.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_gas_coin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_coin_type.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_admin_cap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_system_state.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_iota_treasury_cap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_name.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_staked_iota.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_string.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_system_epoch_info_event.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_time_lock.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_timelocked_staked_iota.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_transfer_receiving.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_treasury_cap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_uid.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_cap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_receipt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_upgrade_ticket.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_structtag_new_version_updated.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_systempackage_new.restype = ctypes.c_uint16 @@ -40205,6 +40517,10 @@ class StructTagProtocol(typing.Protocol): """ def address(self, ): + """ + Returns the address part of a `StructTag` + """ + raise NotImplementedError def coin_type(self, ): """ @@ -40217,6 +40533,24 @@ def coin_type_opt(self, ): Checks if this is a Coin type """ + raise NotImplementedError + def module(self, ): + """ + Returns the module part of a `StructTag` + """ + + raise NotImplementedError + def name(self, ): + """ + Returns the name part of a `StructTag` + """ + + raise NotImplementedError + def type_args(self, ): + """ + Returns the type params part of a `StructTag` + """ + raise NotImplementedError # StructTag is a Rust-only trait - it's a wrapper around a Rust implementation. class StructTag(): @@ -40271,29 +40605,249 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def coin(cls, type_tag: "TypeTag"): + def new_ascii_string(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_ascii_string,) + return cls._make_instance_(pointer) + + @classmethod + def new_balance(cls, type_tag: "TypeTag"): + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_balance, + _UniffiConverterTypeTypeTag.lower(type_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_clock(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_clock,) + return cls._make_instance_(pointer) + + @classmethod + def new_coin(cls, type_tag: "TypeTag"): + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin, + _UniffiConverterTypeTypeTag.lower(type_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_coin_manager(cls, struct_tag: "StructTag"): + _UniffiConverterTypeStructTag.check_lower(struct_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_manager, + _UniffiConverterTypeStructTag.lower(struct_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_coin_metadata(cls, struct_tag: "StructTag"): + _UniffiConverterTypeStructTag.check_lower(struct_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_coin_metadata, + _UniffiConverterTypeStructTag.lower(struct_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_config(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config,) + return cls._make_instance_(pointer) + + @classmethod + def new_config_setting(cls, type_tag: "TypeTag"): _UniffiConverterTypeTypeTag.check_lower(type_tag) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_coin, + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_config_setting, _UniffiConverterTypeTypeTag.lower(type_tag)) return cls._make_instance_(pointer) @classmethod - def gas_coin(cls, ): + def new_deny_list_address_key(cls, ): # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_gas_coin,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_address_key,) return cls._make_instance_(pointer) @classmethod - def staked_iota(cls, ): + def new_deny_list_config_key(cls, ): # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_staked_iota,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_config_key,) + return cls._make_instance_(pointer) + + @classmethod + def new_deny_list_global_pause_key(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_deny_list_global_pause_key,) + return cls._make_instance_(pointer) + + @classmethod + def new_display_created(cls, struct_tag: "StructTag"): + _UniffiConverterTypeStructTag.check_lower(struct_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_display_created, + _UniffiConverterTypeStructTag.lower(struct_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_dynamic_object_field_wrapper(cls, type_tag: "TypeTag"): + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_dynamic_object_field_wrapper, + _UniffiConverterTypeTypeTag.lower(type_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_field(cls, key: "TypeTag",value: "TypeTag"): + _UniffiConverterTypeTypeTag.check_lower(key) + + _UniffiConverterTypeTypeTag.check_lower(value) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_field, + _UniffiConverterTypeTypeTag.lower(key), + _UniffiConverterTypeTypeTag.lower(value)) + return cls._make_instance_(pointer) + + @classmethod + def new_gas_coin(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_gas_coin,) + return cls._make_instance_(pointer) + + @classmethod + def new_id(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_id,) + return cls._make_instance_(pointer) + + @classmethod + def new_iota_coin_type(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_coin_type,) + return cls._make_instance_(pointer) + + @classmethod + def new_iota_system_admin_cap(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_admin_cap,) + return cls._make_instance_(pointer) + + @classmethod + def new_iota_system_state(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_system_state,) + return cls._make_instance_(pointer) + + @classmethod + def new_iota_treasury_cap(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_iota_treasury_cap,) + return cls._make_instance_(pointer) + + @classmethod + def new_name(cls, address: "Address"): + _UniffiConverterTypeAddress.check_lower(address) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_name, + _UniffiConverterTypeAddress.lower(address)) + return cls._make_instance_(pointer) + + @classmethod + def new_staked_iota(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_staked_iota,) + return cls._make_instance_(pointer) + + @classmethod + def new_string(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_string,) + return cls._make_instance_(pointer) + + @classmethod + def new_system_epoch_info_event(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_system_epoch_info_event,) + return cls._make_instance_(pointer) + + @classmethod + def new_time_lock(cls, type_tag: "TypeTag"): + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_time_lock, + _UniffiConverterTypeTypeTag.lower(type_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_timelocked_staked_iota(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_timelocked_staked_iota,) + return cls._make_instance_(pointer) + + @classmethod + def new_transfer_receiving(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_transfer_receiving,) + return cls._make_instance_(pointer) + + @classmethod + def new_treasury_cap(cls, struct_tag: "StructTag"): + _UniffiConverterTypeStructTag.check_lower(struct_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_treasury_cap, + _UniffiConverterTypeStructTag.lower(struct_tag)) + return cls._make_instance_(pointer) + + @classmethod + def new_uid(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_uid,) + return cls._make_instance_(pointer) + + @classmethod + def new_upgrade_cap(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_cap,) + return cls._make_instance_(pointer) + + @classmethod + def new_upgrade_receipt(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_receipt,) + return cls._make_instance_(pointer) + + @classmethod + def new_upgrade_ticket(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_upgrade_ticket,) + return cls._make_instance_(pointer) + + @classmethod + def new_version_updated(cls, struct_tag: "StructTag"): + _UniffiConverterTypeStructTag.check_lower(struct_tag) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_structtag_new_version_updated, + _UniffiConverterTypeStructTag.lower(struct_tag)) return cls._make_instance_(pointer) def address(self, ) -> "Address": + """ + Returns the address part of a `StructTag` + """ + return _UniffiConverterTypeAddress.lift( _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_address,self._uniffi_clone_pointer(),) ) @@ -40328,6 +40882,45 @@ def coin_type_opt(self, ) -> "typing.Optional[TypeTag]": + def module(self, ) -> "Identifier": + """ + Returns the module part of a `StructTag` + """ + + return _UniffiConverterTypeIdentifier.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_module,self._uniffi_clone_pointer(),) + ) + + + + + + def name(self, ) -> "Identifier": + """ + Returns the name part of a `StructTag` + """ + + return _UniffiConverterTypeIdentifier.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_name,self._uniffi_clone_pointer(),) + ) + + + + + + def type_args(self, ) -> "typing.List[TypeTag]": + """ + Returns the type params part of a `StructTag` + """ + + return _UniffiConverterSequenceTypeTypeTag.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_type_args,self._uniffi_clone_pointer(),) + ) + + + + + def __str__(self, ) -> "str": return _UniffiConverterString.lift( _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_structtag_uniffi_trait_display,self._uniffi_clone_pointer(),) diff --git a/crates/iota-sdk-ffi/src/types/struct_tag.rs b/crates/iota-sdk-ffi/src/types/struct_tag.rs index 25a4684ea..d3be9aa4d 100644 --- a/crates/iota-sdk-ffi/src/types/struct_tag.rs +++ b/crates/iota-sdk-ffi/src/types/struct_tag.rs @@ -37,6 +37,42 @@ impl Identifier { } } +macro_rules! export_struct_tag_ctors { + ($($name:ident),+ $(,)?) => { paste::paste! { + #[uniffi::export] + impl StructTag {$( + #[uniffi::constructor] + pub fn [< new_ $name:snake >]() -> Self { + Self(iota_sdk::types::StructTag::[< new_ $name:snake >]()) + } + )+} + } } +} + +macro_rules! export_struct_tag_from_type_tag_ctors { + ($($name:ident),+ $(,)?) => { paste::paste! { + #[uniffi::export] + impl StructTag {$( + #[uniffi::constructor] + pub fn [< new_ $name:snake >](type_tag: &TypeTag) -> Self { + Self(iota_sdk::types::StructTag::[< new_ $name:snake >](type_tag.0.clone())) + } + )+} + } } +} + +macro_rules! export_struct_tag_from_struct_tag_ctors { + ($($name:ident),+ $(,)?) => { paste::paste! { + #[uniffi::export] + impl StructTag {$( + #[uniffi::constructor] + pub fn [< new_ $name:snake >](struct_tag: &StructTag) -> Self { + Self(iota_sdk::types::StructTag::[< new_ $name:snake >](struct_tag.0.clone())) + } + )+} + } } +} + /// Type information for a move struct /// /// # BCS @@ -74,8 +110,16 @@ impl StructTag { } #[uniffi::constructor] - pub fn coin(type_tag: &TypeTag) -> Self { - Self(iota_sdk::types::StructTag::coin(type_tag.0.clone())) + pub fn new_name(address: &Address) -> Self { + Self(iota_sdk::types::StructTag::new_name(address.0)) + } + + #[uniffi::constructor] + pub fn new_field(key: &TypeTag, value: &TypeTag) -> Self { + Self(iota_sdk::types::StructTag::new_field( + key.0.clone(), + value.0.clone(), + )) } /// Checks if this is a Coin type @@ -92,19 +136,69 @@ impl StructTag { self.0.coin_type().clone().into() } - #[uniffi::constructor] - pub fn gas_coin() -> Self { - Self(iota_sdk::types::StructTag::gas_coin()) + /// Returns the address part of a `StructTag` + pub fn address(&self) -> Address { + self.0.address().into() } - #[uniffi::constructor] - pub fn staked_iota() -> Self { - Self(iota_sdk::types::StructTag::staked_iota()) + /// Returns the module part of a `StructTag` + pub fn module(&self) -> Identifier { + self.0.module().clone().into() } - pub fn address(&self) -> Address { - self.0.address().into() + /// Returns the name part of a `StructTag` + pub fn name(&self) -> Identifier { + self.0.name().clone().into() + } + + /// Returns the type params part of a `StructTag` + pub fn type_args(&self) -> Vec> { + self.0 + .type_params() + .iter() + .cloned() + .map(TypeTag::from) + .map(Arc::new) + .collect() } } +export_struct_tag_ctors!( + AsciiString, + Clock, + Config, + DenyListAddressKey, + DenyListConfigKey, + DenyListGlobalPauseKey, + GasCoin, + Id, + IotaCoinType, + IotaSystemAdminCap, + IotaSystemState, + IotaTreasuryCap, + UpgradeCap, + UpgradeTicket, + UpgradeReceipt, + StakedIota, + String, + SystemEpochInfoEvent, + TimelockedStakedIota, + TransferReceiving, + Uid, +); +export_struct_tag_from_type_tag_ctors!( + Balance, + ConfigSetting, + DynamicObjectFieldWrapper, + Coin, + TimeLock +); +export_struct_tag_from_struct_tag_ctors!( + CoinManager, + CoinMetadata, + DisplayCreated, + TreasuryCap, + VersionUpdated, +); + crate::export_iota_types_objects_bcs_conversion!(Identifier, StructTag); diff --git a/crates/iota-sdk-graphql-client/src/lib.rs b/crates/iota-sdk-graphql-client/src/lib.rs index 6f7e521ae..b00bd62ad 100644 --- a/crates/iota-sdk-graphql-client/src/lib.rs +++ b/crates/iota-sdk-graphql-client/src/lib.rs @@ -636,7 +636,7 @@ impl Client { type_: Some( coin_type .into() - .map(StructTag::coin) + .map(StructTag::new_coin) .unwrap_or_else(|| StructTag { address: Address::FRAMEWORK, module: IdentifierRef::const_new("coin").into(), @@ -668,7 +668,7 @@ impl Client { owner: Address, pagination_filter: PaginationFilter, ) -> Result> { - self.coins(owner, StructTag::iota(), pagination_filter) + self.coins(owner, StructTag::new_iota_coin_type(), pagination_filter) .await } diff --git a/crates/iota-sdk-transaction-builder/src/builder/mod.rs b/crates/iota-sdk-transaction-builder/src/builder/mod.rs index 42f7c6805..f68ff373b 100644 --- a/crates/iota-sdk-transaction-builder/src/builder/mod.rs +++ b/crates/iota-sdk-transaction-builder/src/builder/mod.rs @@ -881,7 +881,7 @@ impl TransactionBuilder { .client .objects( ObjectFilter { - type_: Some(StructTag::gas_coin().to_string()), + type_: Some(StructTag::new_gas_coin().to_string()), owner: Some(self.data.sender), ..Default::default() }, diff --git a/crates/iota-sdk-types/src/object.rs b/crates/iota-sdk-types/src/object.rs index c419b01d5..bcbc39d5d 100644 --- a/crates/iota-sdk-types/src/object.rs +++ b/crates/iota-sdk-types/src/object.rs @@ -597,9 +597,9 @@ mod serialization { fn into_struct_tag(self) -> StructTag { match self { MoveStructType::Other(tag) => tag, - MoveStructType::GasCoin => StructTag::gas_coin(), - MoveStructType::StakedIota => StructTag::staked_iota(), - MoveStructType::Coin(type_tag) => StructTag::coin(type_tag), + MoveStructType::GasCoin => StructTag::new_gas_coin(), + MoveStructType::StakedIota => StructTag::new_staked_iota(), + MoveStructType::Coin(type_tag) => StructTag::new_coin(type_tag), } } } diff --git a/crates/iota-sdk-types/src/type_tag/mod.rs b/crates/iota-sdk-types/src/type_tag/mod.rs index 461946821..59367a821 100644 --- a/crates/iota-sdk-types/src/type_tag/mod.rs +++ b/crates/iota-sdk-types/src/type_tag/mod.rs @@ -331,8 +331,9 @@ impl IdentifierRef { // already guarantees the transmute is safe (RefCast checks that // IdentStr(str) is #[repr(transparent)]). // (3) both in and out lifetimes are 'static, so we're not widening the - // lifetime. (4) we've just asserted that the IdentStr passes the - // is_valid check. + // lifetime. + // (4) we've just asserted that the IdentStr passes the + // is_valid check. unsafe { std::mem::transmute::<&'static str, &'static Self>(s) } } @@ -379,6 +380,87 @@ impl ToOwned for IdentifierRef { } } +macro_rules! add_struct_tag_ctor { + ($address:ident, $module:literal, $name:literal) => { + paste::paste! { + pub fn [< new_ $name:snake >]() -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![], + } + } + } + }; + ($address:ident, $module:literal, $name:literal, "with-module") => { + paste::paste! { + pub fn [< new_ $module:snake _ $name:snake >]() -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![], + } + } + } + }; +} + +macro_rules! add_struct_tag_ctor_from_struct_tag { + ($address:ident, $module:literal, $name:literal) => { + paste::paste! { + pub fn [< new_ $name:snake >](struct_tag: impl Into) -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![TypeTag::Struct(Box::new(struct_tag.into()))], + } + } + } + }; + ($address:ident, $module:literal, $name:literal, "with-module") => { + paste::paste! { + pub fn [< new_ $module:snake _ $name:snake >](struct_tag: impl Into) -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![TypeTag::Struct(Box::new(struct_tag.into()))], + } + } + } + }; +} + +macro_rules! add_struct_tag_ctor_from_type_tag { + ($address:ident, $module:literal, $name:literal) => { + paste::paste! { + pub fn [< new_ $name:snake >](type_tag: impl Into) -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![type_tag.into()], + } + } + } + }; + ($address:ident, $module:literal, $name:literal, "with-module") => { + paste::paste! { + pub fn [< new_ $module:snake _ $name:snake >](type_tag: impl Into) -> Self { + Self { + address: Address::$address, + module: IdentifierRef::const_new($module).into(), + name: IdentifierRef::const_new($name).into(), + type_params: vec![type_tag.into()], + } + } + } + }; +} + /// Type information for a move struct /// /// # BCS @@ -402,15 +484,83 @@ pub struct StructTag { } impl StructTag { - pub fn coin(type_tag: impl Into) -> Self { + pub fn new_iota_coin_type() -> Self { + Self { + address: Address::FRAMEWORK, + module: IdentifierRef::const_new("iota").into(), + name: IdentifierRef::const_new("IOTA").into(), + type_params: vec![], + } + } + + pub fn new_gas_coin() -> Self { + Self::new_coin(Self::new_iota_coin_type()) + } + + pub fn new_id() -> Self { Self { address: Address::FRAMEWORK, - module: IdentifierRef::const_new("coin").into(), - name: IdentifierRef::const_new("Coin").into(), - type_params: vec![type_tag.into()], + module: IdentifierRef::const_new("object").into(), + name: IdentifierRef::const_new("ID").into(), + type_params: vec![], } } + pub fn new_uid() -> Self { + Self { + address: Address::FRAMEWORK, + module: IdentifierRef::const_new("object").into(), + name: IdentifierRef::const_new("UID").into(), + type_params: vec![], + } + } + + pub fn new_name(address: Address) -> Self { + Self { + address, + module: IdentifierRef::const_new("name").into(), + name: IdentifierRef::const_new("Name").into(), + type_params: vec![], + } + } + + pub fn new_field(key: impl Into, value: impl Into) -> Self { + Self { + address: Address::FRAMEWORK, + module: IdentifierRef::const_new("dynamic_field").into(), + name: IdentifierRef::const_new("Field").into(), + type_params: vec![key.into(), value.into()], + } + } + + add_struct_tag_ctor!(FRAMEWORK, "clock", "Clock"); + add_struct_tag_ctor!(FRAMEWORK, "config", "Config"); + add_struct_tag_ctor!(FRAMEWORK, "deny_list", "ConfigKey", "with-module"); + add_struct_tag_ctor!(FRAMEWORK, "deny_list", "AddressKey", "with-module"); + add_struct_tag_ctor!(FRAMEWORK, "deny_list", "GlobalPauseKey", "with-module"); + add_struct_tag_ctor!(FRAMEWORK, "iota", "IotaTreasuryCap"); + add_struct_tag_ctor!(FRAMEWORK, "package", "UpgradeCap"); + add_struct_tag_ctor!(FRAMEWORK, "package", "UpgradeTicket"); + add_struct_tag_ctor!(FRAMEWORK, "package", "UpgradeReceipt"); + add_struct_tag_ctor!(FRAMEWORK, "system_admin_cap", "IotaSystemAdminCap"); + add_struct_tag_ctor!(FRAMEWORK, "transfer", "Receiving", "with-module"); + add_struct_tag_ctor!(SYSTEM, "iota_system", "IotaSystemState"); + add_struct_tag_ctor!(SYSTEM, "staking_pool", "StakedIota"); + add_struct_tag_ctor!(SYSTEM, "timelocked_staking", "TimelockedStakedIota"); + add_struct_tag_ctor!(SYSTEM, "iota_system_state_inner", "SystemEpochInfoEvent"); + add_struct_tag_ctor!(STD_LIB, "ascii", "String", "with-module"); + add_struct_tag_ctor!(STD_LIB, "string", "String"); + add_struct_tag_ctor_from_struct_tag!(FRAMEWORK, "coin", "CoinMetadata"); + add_struct_tag_ctor_from_struct_tag!(FRAMEWORK, "coin", "TreasuryCap"); + add_struct_tag_ctor_from_struct_tag!(FRAMEWORK, "coin_manager", "CoinManager"); + add_struct_tag_ctor_from_struct_tag!(FRAMEWORK, "display", "VersionUpdated"); + add_struct_tag_ctor_from_struct_tag!(FRAMEWORK, "display", "DisplayCreated"); + add_struct_tag_ctor_from_type_tag!(FRAMEWORK, "coin", "Coin"); + add_struct_tag_ctor_from_type_tag!(FRAMEWORK, "balance", "Balance"); + add_struct_tag_ctor_from_type_tag!(FRAMEWORK, "timelock", "TimeLock"); + add_struct_tag_ctor_from_type_tag!(FRAMEWORK, "config", "Setting", "with-module"); + add_struct_tag_ctor_from_type_tag!(FRAMEWORK, "dynamic_object_field", "Wrapper", "with-module"); + /// Checks if this is a Coin type pub fn coin_type_opt(&self) -> Option<&crate::TypeTag> { let Self { @@ -436,39 +586,24 @@ impl StructTag { self.coin_type_opt().expect("not a coin") } - pub fn iota() -> Self { - Self { - address: Address::FRAMEWORK, - module: IdentifierRef::const_new("iota").into(), - name: IdentifierRef::const_new("IOTA").into(), - type_params: vec![], - } + /// Returns the address part of a `StructTag` + pub fn address(&self) -> Address { + self.address } - pub fn gas_coin() -> Self { - Self::coin(Self::iota()) + /// Returns the module part of a `StructTag` + pub fn module(&self) -> &Identifier { + &self.module } - pub fn staked_iota() -> Self { - Self { - address: Address::SYSTEM, - module: IdentifierRef::const_new("staking_pool").into(), - name: IdentifierRef::const_new("StakedIota").into(), - type_params: vec![], - } - } - - pub fn timelocked_staked_iota() -> Self { - Self { - address: Address::SYSTEM, - module: IdentifierRef::const_new("timelocked_staking").into(), - name: IdentifierRef::const_new("TimelockedStakedIota").into(), - type_params: vec![], - } + /// Returns the name part of a `StructTag` + pub fn name(&self) -> &Identifier { + &self.name } - pub fn address(&self) -> Address { - self.address + /// Returns the type params part of a `StructTag` + pub fn type_params(&self) -> &[TypeTag] { + &self.type_params } } diff --git a/crates/iota-sdk/examples/publish_upgrade.rs b/crates/iota-sdk/examples/publish_upgrade.rs index 6aa890704..a7698a733 100644 --- a/crates/iota-sdk/examples/publish_upgrade.rs +++ b/crates/iota-sdk/examples/publish_upgrade.rs @@ -101,14 +101,7 @@ async fn main() -> Result<()> { let Some(obj) = client.object(object_id, None).await? else { bail!("Missing object {object_id}"); }; - if obj.as_struct().type_ - == (StructTag { - address: Address::FRAMEWORK, - module: iota_types::IdentifierRef::const_new("package").into(), - name: iota_types::IdentifierRef::const_new("UpgradeCap").into(), - type_params: vec![], - }) - { + if obj.as_struct().type_ == StructTag::new_upgrade_cap() { println!("UpgradeCap: {object_id}"); println!("UpgradeCapOwner: {}", owner.into_address()); upgrade_cap.replace(object_id); diff --git a/crates/iota-sdk/examples/unstake.rs b/crates/iota-sdk/examples/unstake.rs index bdcd3e39c..f161a3685 100644 --- a/crates/iota-sdk/examples/unstake.rs +++ b/crates/iota-sdk/examples/unstake.rs @@ -13,7 +13,7 @@ async fn main() -> Result<()> { let staked_iota = client .objects( ObjectFilter { - type_: Some(StructTag::staked_iota().to_string()), + type_: Some(StructTag::new_staked_iota().to_string()), ..Default::default() }, Default::default(),