ping-openmls-sdk-react-native-macos 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Frameworks/libping_ffi.a +0 -0
- package/ios/Generated.swift +132 -0
- package/ios/pingFFI.h +45 -0
- package/package.json +1 -1
package/Frameworks/libping_ffi.a
CHANGED
|
Binary file
|
package/ios/Generated.swift
CHANGED
|
@@ -2953,6 +2953,91 @@ public func FfiConverterTypeMessageEnvelope_lower(_ value: MessageEnvelope) -> R
|
|
|
2953
2953
|
return FfiConverterTypeMessageEnvelope.lower(value)
|
|
2954
2954
|
}
|
|
2955
2955
|
|
|
2956
|
+
public struct RecoveryBackupView {
|
|
2957
|
+
public var v: UInt8
|
|
2958
|
+
public var accountId: Data
|
|
2959
|
+
public var identityExport: Data
|
|
2960
|
+
public var deviceGroupSnapshot: Data
|
|
2961
|
+
public var createdAtMs: UInt64
|
|
2962
|
+
|
|
2963
|
+
/// Default memberwise initializers are never public by default, so we
|
|
2964
|
+
/// declare one manually.
|
|
2965
|
+
public init(v: UInt8, accountId: Data, identityExport: Data, deviceGroupSnapshot: Data, createdAtMs: UInt64) {
|
|
2966
|
+
self.v = v
|
|
2967
|
+
self.accountId = accountId
|
|
2968
|
+
self.identityExport = identityExport
|
|
2969
|
+
self.deviceGroupSnapshot = deviceGroupSnapshot
|
|
2970
|
+
self.createdAtMs = createdAtMs
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
extension RecoveryBackupView: Equatable, Hashable {
|
|
2975
|
+
public static func == (lhs: RecoveryBackupView, rhs: RecoveryBackupView) -> Bool {
|
|
2976
|
+
if lhs.v != rhs.v {
|
|
2977
|
+
return false
|
|
2978
|
+
}
|
|
2979
|
+
if lhs.accountId != rhs.accountId {
|
|
2980
|
+
return false
|
|
2981
|
+
}
|
|
2982
|
+
if lhs.identityExport != rhs.identityExport {
|
|
2983
|
+
return false
|
|
2984
|
+
}
|
|
2985
|
+
if lhs.deviceGroupSnapshot != rhs.deviceGroupSnapshot {
|
|
2986
|
+
return false
|
|
2987
|
+
}
|
|
2988
|
+
if lhs.createdAtMs != rhs.createdAtMs {
|
|
2989
|
+
return false
|
|
2990
|
+
}
|
|
2991
|
+
return true
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
public func hash(into hasher: inout Hasher) {
|
|
2995
|
+
hasher.combine(v)
|
|
2996
|
+
hasher.combine(accountId)
|
|
2997
|
+
hasher.combine(identityExport)
|
|
2998
|
+
hasher.combine(deviceGroupSnapshot)
|
|
2999
|
+
hasher.combine(createdAtMs)
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
#if swift(>=5.8)
|
|
3004
|
+
@_documentation(visibility: private)
|
|
3005
|
+
#endif
|
|
3006
|
+
public struct FfiConverterTypeRecoveryBackupView: FfiConverterRustBuffer {
|
|
3007
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RecoveryBackupView {
|
|
3008
|
+
return
|
|
3009
|
+
try RecoveryBackupView(
|
|
3010
|
+
v: FfiConverterUInt8.read(from: &buf),
|
|
3011
|
+
accountId: FfiConverterData.read(from: &buf),
|
|
3012
|
+
identityExport: FfiConverterData.read(from: &buf),
|
|
3013
|
+
deviceGroupSnapshot: FfiConverterData.read(from: &buf),
|
|
3014
|
+
createdAtMs: FfiConverterUInt64.read(from: &buf)
|
|
3015
|
+
)
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
public static func write(_ value: RecoveryBackupView, into buf: inout [UInt8]) {
|
|
3019
|
+
FfiConverterUInt8.write(value.v, into: &buf)
|
|
3020
|
+
FfiConverterData.write(value.accountId, into: &buf)
|
|
3021
|
+
FfiConverterData.write(value.identityExport, into: &buf)
|
|
3022
|
+
FfiConverterData.write(value.deviceGroupSnapshot, into: &buf)
|
|
3023
|
+
FfiConverterUInt64.write(value.createdAtMs, into: &buf)
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
#if swift(>=5.8)
|
|
3028
|
+
@_documentation(visibility: private)
|
|
3029
|
+
#endif
|
|
3030
|
+
public func FfiConverterTypeRecoveryBackupView_lift(_ buf: RustBuffer) throws -> RecoveryBackupView {
|
|
3031
|
+
return try FfiConverterTypeRecoveryBackupView.lift(buf)
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
#if swift(>=5.8)
|
|
3035
|
+
@_documentation(visibility: private)
|
|
3036
|
+
#endif
|
|
3037
|
+
public func FfiConverterTypeRecoveryBackupView_lower(_ value: RecoveryBackupView) -> RustBuffer {
|
|
3038
|
+
return FfiConverterTypeRecoveryBackupView.lower(value)
|
|
3039
|
+
}
|
|
3040
|
+
|
|
2956
3041
|
public struct UserId {
|
|
2957
3042
|
public var value: Data
|
|
2958
3043
|
|
|
@@ -3736,12 +3821,47 @@ public func decodeCatchupSnapshot(snapshotBytes: Data) throws -> CatchupSnapshot
|
|
|
3736
3821
|
})
|
|
3737
3822
|
}
|
|
3738
3823
|
|
|
3824
|
+
public func decryptBackup(blob: Data, mnemonicPhrase: String) throws -> RecoveryBackupView {
|
|
3825
|
+
return try FfiConverterTypeRecoveryBackupView.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3826
|
+
uniffi_ping_ffi_fn_func_decrypt_backup(
|
|
3827
|
+
FfiConverterData.lower(blob),
|
|
3828
|
+
FfiConverterString.lower(mnemonicPhrase), $0
|
|
3829
|
+
)
|
|
3830
|
+
})
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
public func encryptBackup(mnemonicPhrase: String, accountId: Data, identityExport: Data, deviceGroupSnapshot: Data, createdAtMs: UInt64) throws -> Data {
|
|
3834
|
+
return try FfiConverterData.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3835
|
+
uniffi_ping_ffi_fn_func_encrypt_backup(
|
|
3836
|
+
FfiConverterString.lower(mnemonicPhrase),
|
|
3837
|
+
FfiConverterData.lower(accountId),
|
|
3838
|
+
FfiConverterData.lower(identityExport),
|
|
3839
|
+
FfiConverterData.lower(deviceGroupSnapshot),
|
|
3840
|
+
FfiConverterUInt64.lower(createdAtMs), $0
|
|
3841
|
+
)
|
|
3842
|
+
})
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3739
3845
|
public func generateIdentityExport() -> Data {
|
|
3740
3846
|
return try! FfiConverterData.lift(try! rustCall {
|
|
3741
3847
|
uniffi_ping_ffi_fn_func_generate_identity_export($0)
|
|
3742
3848
|
})
|
|
3743
3849
|
}
|
|
3744
3850
|
|
|
3851
|
+
public func generateMnemonicPhrase() throws -> String {
|
|
3852
|
+
return try FfiConverterString.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3853
|
+
uniffi_ping_ffi_fn_func_generate_mnemonic_phrase($0)
|
|
3854
|
+
})
|
|
3855
|
+
}
|
|
3856
|
+
|
|
3857
|
+
public func normalizeMnemonicPhrase(phrase: String) throws -> String {
|
|
3858
|
+
return try FfiConverterString.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3859
|
+
uniffi_ping_ffi_fn_func_normalize_mnemonic_phrase(
|
|
3860
|
+
FfiConverterString.lower(phrase), $0
|
|
3861
|
+
)
|
|
3862
|
+
})
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3745
3865
|
public func openLinkingTicket(sealed: Data, newDevicePriv: Data) throws -> LinkingTicket {
|
|
3746
3866
|
return try FfiConverterTypeLinkingTicket.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3747
3867
|
uniffi_ping_ffi_fn_func_open_linking_ticket(
|
|
@@ -3779,9 +3899,21 @@ private var initializationResult: InitializationResult = {
|
|
|
3779
3899
|
if uniffi_ping_ffi_checksum_func_decode_catchup_snapshot() != 40316 {
|
|
3780
3900
|
return InitializationResult.apiChecksumMismatch
|
|
3781
3901
|
}
|
|
3902
|
+
if uniffi_ping_ffi_checksum_func_decrypt_backup() != 58907 {
|
|
3903
|
+
return InitializationResult.apiChecksumMismatch
|
|
3904
|
+
}
|
|
3905
|
+
if uniffi_ping_ffi_checksum_func_encrypt_backup() != 7671 {
|
|
3906
|
+
return InitializationResult.apiChecksumMismatch
|
|
3907
|
+
}
|
|
3782
3908
|
if uniffi_ping_ffi_checksum_func_generate_identity_export() != 15026 {
|
|
3783
3909
|
return InitializationResult.apiChecksumMismatch
|
|
3784
3910
|
}
|
|
3911
|
+
if uniffi_ping_ffi_checksum_func_generate_mnemonic_phrase() != 9754 {
|
|
3912
|
+
return InitializationResult.apiChecksumMismatch
|
|
3913
|
+
}
|
|
3914
|
+
if uniffi_ping_ffi_checksum_func_normalize_mnemonic_phrase() != 55353 {
|
|
3915
|
+
return InitializationResult.apiChecksumMismatch
|
|
3916
|
+
}
|
|
3785
3917
|
if uniffi_ping_ffi_checksum_func_open_linking_ticket() != 64091 {
|
|
3786
3918
|
return InitializationResult.apiChecksumMismatch
|
|
3787
3919
|
}
|
package/ios/pingFFI.h
CHANGED
|
@@ -552,10 +552,31 @@ uint64_t uniffi_ping_ffi_fn_method_transport_send(void*_Nonnull ptr, RustBuffer
|
|
|
552
552
|
RustBuffer uniffi_ping_ffi_fn_func_decode_catchup_snapshot(RustBuffer snapshot_bytes, RustCallStatus *_Nonnull out_status
|
|
553
553
|
);
|
|
554
554
|
#endif
|
|
555
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_DECRYPT_BACKUP
|
|
556
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_DECRYPT_BACKUP
|
|
557
|
+
RustBuffer uniffi_ping_ffi_fn_func_decrypt_backup(RustBuffer blob, RustBuffer mnemonic_phrase, RustCallStatus *_Nonnull out_status
|
|
558
|
+
);
|
|
559
|
+
#endif
|
|
560
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_ENCRYPT_BACKUP
|
|
561
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_ENCRYPT_BACKUP
|
|
562
|
+
RustBuffer uniffi_ping_ffi_fn_func_encrypt_backup(RustBuffer mnemonic_phrase, RustBuffer account_id, RustBuffer identity_export, RustBuffer device_group_snapshot, uint64_t created_at_ms, RustCallStatus *_Nonnull out_status
|
|
563
|
+
);
|
|
564
|
+
#endif
|
|
555
565
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_GENERATE_IDENTITY_EXPORT
|
|
556
566
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_GENERATE_IDENTITY_EXPORT
|
|
557
567
|
RustBuffer uniffi_ping_ffi_fn_func_generate_identity_export(RustCallStatus *_Nonnull out_status
|
|
558
568
|
|
|
569
|
+
);
|
|
570
|
+
#endif
|
|
571
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_GENERATE_MNEMONIC_PHRASE
|
|
572
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_GENERATE_MNEMONIC_PHRASE
|
|
573
|
+
RustBuffer uniffi_ping_ffi_fn_func_generate_mnemonic_phrase(RustCallStatus *_Nonnull out_status
|
|
574
|
+
|
|
575
|
+
);
|
|
576
|
+
#endif
|
|
577
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_NORMALIZE_MNEMONIC_PHRASE
|
|
578
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_NORMALIZE_MNEMONIC_PHRASE
|
|
579
|
+
RustBuffer uniffi_ping_ffi_fn_func_normalize_mnemonic_phrase(RustBuffer phrase, RustCallStatus *_Nonnull out_status
|
|
559
580
|
);
|
|
560
581
|
#endif
|
|
561
582
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_OPEN_LINKING_TICKET
|
|
@@ -852,12 +873,36 @@ void ffi_ping_ffi_rust_future_complete_void(uint64_t handle, RustCallStatus *_No
|
|
|
852
873
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_DECODE_CATCHUP_SNAPSHOT
|
|
853
874
|
uint16_t uniffi_ping_ffi_checksum_func_decode_catchup_snapshot(void
|
|
854
875
|
|
|
876
|
+
);
|
|
877
|
+
#endif
|
|
878
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_DECRYPT_BACKUP
|
|
879
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_DECRYPT_BACKUP
|
|
880
|
+
uint16_t uniffi_ping_ffi_checksum_func_decrypt_backup(void
|
|
881
|
+
|
|
882
|
+
);
|
|
883
|
+
#endif
|
|
884
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_ENCRYPT_BACKUP
|
|
885
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_ENCRYPT_BACKUP
|
|
886
|
+
uint16_t uniffi_ping_ffi_checksum_func_encrypt_backup(void
|
|
887
|
+
|
|
855
888
|
);
|
|
856
889
|
#endif
|
|
857
890
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_GENERATE_IDENTITY_EXPORT
|
|
858
891
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_GENERATE_IDENTITY_EXPORT
|
|
859
892
|
uint16_t uniffi_ping_ffi_checksum_func_generate_identity_export(void
|
|
860
893
|
|
|
894
|
+
);
|
|
895
|
+
#endif
|
|
896
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_GENERATE_MNEMONIC_PHRASE
|
|
897
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_GENERATE_MNEMONIC_PHRASE
|
|
898
|
+
uint16_t uniffi_ping_ffi_checksum_func_generate_mnemonic_phrase(void
|
|
899
|
+
|
|
900
|
+
);
|
|
901
|
+
#endif
|
|
902
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_NORMALIZE_MNEMONIC_PHRASE
|
|
903
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_NORMALIZE_MNEMONIC_PHRASE
|
|
904
|
+
uint16_t uniffi_ping_ffi_checksum_func_normalize_mnemonic_phrase(void
|
|
905
|
+
|
|
861
906
|
);
|
|
862
907
|
#endif
|
|
863
908
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_OPEN_LINKING_TICKET
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ping-openmls-sdk-react-native-macos",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Real MLS for React Native macOS apps — wraps the ping-openmls-sdk Rust core via UniFFI.",
|
|
5
5
|
"homepage": "https://github.com/AMP-Media-Development/ping-openmls-sdk",
|
|
6
6
|
"license": "Apache-2.0",
|