@@ -7163,6 +7163,24 @@ func uniffiCheckChecksums() {
71637163 }
71647164 }
71657165 {
7166+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
7167+ return C.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_mnemonic()
7168+ })
7169+ if checksum != 55789 {
7170+ // If this happens try cleaning and rebuilding your project
7171+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_mnemonic: UniFFI API checksum mismatch")
7172+ }
7173+ }
7174+ {
7175+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
7176+ return C.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_mnemonic_with_path()
7177+ })
7178+ if checksum != 15255 {
7179+ // If this happens try cleaning and rebuilding your project
7180+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_mnemonic_with_path: UniFFI API checksum mismatch")
7181+ }
7182+ }
7183+ {
71667184 checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
71677185 return C.uniffi_iota_sdk_ffi_checksum_constructor_ed25519privatekey_from_pem()
71687186 })
@@ -8405,6 +8423,24 @@ func uniffiCheckChecksums() {
84058423 }
84068424 }
84078425 {
8426+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
8427+ return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_mnemonic()
8428+ })
8429+ if checksum != 33082 {
8430+ // If this happens try cleaning and rebuilding your project
8431+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_mnemonic: UniFFI API checksum mismatch")
8432+ }
8433+ }
8434+ {
8435+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
8436+ return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_mnemonic_with_path()
8437+ })
8438+ if checksum != 7431 {
8439+ // If this happens try cleaning and rebuilding your project
8440+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_mnemonic_with_path: UniFFI API checksum mismatch")
8441+ }
8442+ }
8443+ {
84088444 checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
84098445 return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1privatekey_from_pem()
84108446 })
@@ -8540,6 +8576,24 @@ func uniffiCheckChecksums() {
85408576 }
85418577 }
85428578 {
8579+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
8580+ return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_mnemonic()
8581+ })
8582+ if checksum != 57849 {
8583+ // If this happens try cleaning and rebuilding your project
8584+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_mnemonic: UniFFI API checksum mismatch")
8585+ }
8586+ }
8587+ {
8588+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
8589+ return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_mnemonic_with_path()
8590+ })
8591+ if checksum != 7709 {
8592+ // If this happens try cleaning and rebuilding your project
8593+ panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_mnemonic_with_path: UniFFI API checksum mismatch")
8594+ }
8595+ }
8596+ {
85438597 checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
85448598 return C.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1privatekey_from_pem()
85458599 })
@@ -13009,6 +13063,33 @@ func Ed25519PrivateKeyFromDer(bytes []byte) (*Ed25519PrivateKey, error) {
1300913063 }
1301013064}
1301113065
13066+ // Construct the private key from a mnemonic phrase
13067+ func Ed25519PrivateKeyFromMnemonic(phrase string, accountIndex uint64, password string) (*Ed25519PrivateKey, error) {
13068+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
13069+ return C.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_mnemonic(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterUint64INSTANCE.Lower(accountIndex), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
13070+ })
13071+ if _uniffiErr != nil {
13072+ var _uniffiDefaultValue *Ed25519PrivateKey
13073+ return _uniffiDefaultValue, _uniffiErr
13074+ } else {
13075+ return FfiConverterEd25519PrivateKeyINSTANCE.Lift(_uniffiRV), nil
13076+ }
13077+ }
13078+
13079+ // Create an instance from a mnemonic phrase and a derivation path like
13080+ // `"m/44'/4218'/0'/0'/0'"`
13081+ func Ed25519PrivateKeyFromMnemonicWithPath(phrase string, path string, password string) (*Ed25519PrivateKey, error) {
13082+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
13083+ return C.uniffi_iota_sdk_ffi_fn_constructor_ed25519privatekey_from_mnemonic_with_path(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterStringINSTANCE.Lower(path), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
13084+ })
13085+ if _uniffiErr != nil {
13086+ var _uniffiDefaultValue *Ed25519PrivateKey
13087+ return _uniffiDefaultValue, _uniffiErr
13088+ } else {
13089+ return FfiConverterEd25519PrivateKeyINSTANCE.Lift(_uniffiRV), nil
13090+ }
13091+ }
13092+
1301213093// Deserialize PKCS#8-encoded private key from PEM.
1301313094func Ed25519PrivateKeyFromPem(s string) (*Ed25519PrivateKey, error) {
1301413095 _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
@@ -21631,6 +21712,33 @@ func Secp256k1PrivateKeyFromDer(bytes []byte) (*Secp256k1PrivateKey, error) {
2163121712 }
2163221713}
2163321714
21715+ // Construct the private key from a mnemonic phrase
21716+ func Secp256k1PrivateKeyFromMnemonic(phrase string, accountIndex uint64, password string) (*Secp256k1PrivateKey, error) {
21717+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
21718+ return C.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_mnemonic(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterUint64INSTANCE.Lower(accountIndex), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
21719+ })
21720+ if _uniffiErr != nil {
21721+ var _uniffiDefaultValue *Secp256k1PrivateKey
21722+ return _uniffiDefaultValue, _uniffiErr
21723+ } else {
21724+ return FfiConverterSecp256k1PrivateKeyINSTANCE.Lift(_uniffiRV), nil
21725+ }
21726+ }
21727+
21728+ // Create an instance from a mnemonic phrase and a derivation path like
21729+ // `"m/54'/4218'/0'/0/0"`
21730+ func Secp256k1PrivateKeyFromMnemonicWithPath(phrase string, path string, password string) (*Secp256k1PrivateKey, error) {
21731+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
21732+ return C.uniffi_iota_sdk_ffi_fn_constructor_secp256k1privatekey_from_mnemonic_with_path(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterStringINSTANCE.Lower(path), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
21733+ })
21734+ if _uniffiErr != nil {
21735+ var _uniffiDefaultValue *Secp256k1PrivateKey
21736+ return _uniffiDefaultValue, _uniffiErr
21737+ } else {
21738+ return FfiConverterSecp256k1PrivateKeyINSTANCE.Lift(_uniffiRV), nil
21739+ }
21740+ }
21741+
2163421742// Deserialize PKCS#8-encoded private key from PEM.
2163521743func Secp256k1PrivateKeyFromPem(s string) (*Secp256k1PrivateKey, error) {
2163621744 _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
@@ -22473,6 +22581,33 @@ func Secp256r1PrivateKeyFromDer(bytes []byte) (*Secp256r1PrivateKey, error) {
2247322581 }
2247422582}
2247522583
22584+ // Construct the private key from a mnemonic phrase
22585+ func Secp256r1PrivateKeyFromMnemonic(phrase string, accountIndex uint64, password string) (*Secp256r1PrivateKey, error) {
22586+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
22587+ return C.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_mnemonic(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterUint64INSTANCE.Lower(accountIndex), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
22588+ })
22589+ if _uniffiErr != nil {
22590+ var _uniffiDefaultValue *Secp256r1PrivateKey
22591+ return _uniffiDefaultValue, _uniffiErr
22592+ } else {
22593+ return FfiConverterSecp256r1PrivateKeyINSTANCE.Lift(_uniffiRV), nil
22594+ }
22595+ }
22596+
22597+ // Create an instance from a mnemonic phrase and a derivation path like
22598+ // `"m/74'/4218'/0'/0/0"`
22599+ func Secp256r1PrivateKeyFromMnemonicWithPath(phrase string, path string, password string) (*Secp256r1PrivateKey, error) {
22600+ _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
22601+ return C.uniffi_iota_sdk_ffi_fn_constructor_secp256r1privatekey_from_mnemonic_with_path(FfiConverterStringINSTANCE.Lower(phrase), FfiConverterStringINSTANCE.Lower(path), FfiConverterStringINSTANCE.Lower(password),_uniffiStatus)
22602+ })
22603+ if _uniffiErr != nil {
22604+ var _uniffiDefaultValue *Secp256r1PrivateKey
22605+ return _uniffiDefaultValue, _uniffiErr
22606+ } else {
22607+ return FfiConverterSecp256r1PrivateKeyINSTANCE.Lift(_uniffiRV), nil
22608+ }
22609+ }
22610+
2247622611// Deserialize PKCS#8-encoded private key from PEM.
2247722612func Secp256r1PrivateKeyFromPem(s string) (*Secp256r1PrivateKey, error) {
2247822613 _uniffiRV, _uniffiErr := rustCallWithError[SdkFfiError](FfiConverterSdkFfiError{},func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
0 commit comments