ping-openmls-sdk-react-native-macos 0.7.10 → 0.7.12
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 +229 -0
- package/ios/pingFFI.h +22 -0
- package/package.json +1 -1
package/Frameworks/libping_ffi.a
CHANGED
|
Binary file
|
package/ios/Generated.swift
CHANGED
|
@@ -2520,6 +2520,184 @@ public func FfiConverterTypeDiscoveredDevice_lower(_ value: DiscoveredDevice) ->
|
|
|
2520
2520
|
return FfiConverterTypeDiscoveredDevice.lower(value)
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
2523
|
+
public struct HistoryAppEvent {
|
|
2524
|
+
public var eventId: Data
|
|
2525
|
+
public var wallMs: UInt64
|
|
2526
|
+
public var payload: Data
|
|
2527
|
+
public var author: String
|
|
2528
|
+
|
|
2529
|
+
/// Default memberwise initializers are never public by default, so we
|
|
2530
|
+
/// declare one manually.
|
|
2531
|
+
public init(eventId: Data, wallMs: UInt64, payload: Data, author: String) {
|
|
2532
|
+
self.eventId = eventId
|
|
2533
|
+
self.wallMs = wallMs
|
|
2534
|
+
self.payload = payload
|
|
2535
|
+
self.author = author
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
extension HistoryAppEvent: Equatable, Hashable {
|
|
2540
|
+
public static func == (lhs: HistoryAppEvent, rhs: HistoryAppEvent) -> Bool {
|
|
2541
|
+
if lhs.eventId != rhs.eventId {
|
|
2542
|
+
return false
|
|
2543
|
+
}
|
|
2544
|
+
if lhs.wallMs != rhs.wallMs {
|
|
2545
|
+
return false
|
|
2546
|
+
}
|
|
2547
|
+
if lhs.payload != rhs.payload {
|
|
2548
|
+
return false
|
|
2549
|
+
}
|
|
2550
|
+
if lhs.author != rhs.author {
|
|
2551
|
+
return false
|
|
2552
|
+
}
|
|
2553
|
+
return true
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
public func hash(into hasher: inout Hasher) {
|
|
2557
|
+
hasher.combine(eventId)
|
|
2558
|
+
hasher.combine(wallMs)
|
|
2559
|
+
hasher.combine(payload)
|
|
2560
|
+
hasher.combine(author)
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
#if swift(>=5.8)
|
|
2565
|
+
@_documentation(visibility: private)
|
|
2566
|
+
#endif
|
|
2567
|
+
public struct FfiConverterTypeHistoryAppEvent: FfiConverterRustBuffer {
|
|
2568
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HistoryAppEvent {
|
|
2569
|
+
return
|
|
2570
|
+
try HistoryAppEvent(
|
|
2571
|
+
eventId: FfiConverterData.read(from: &buf),
|
|
2572
|
+
wallMs: FfiConverterUInt64.read(from: &buf),
|
|
2573
|
+
payload: FfiConverterData.read(from: &buf),
|
|
2574
|
+
author: FfiConverterString.read(from: &buf)
|
|
2575
|
+
)
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
public static func write(_ value: HistoryAppEvent, into buf: inout [UInt8]) {
|
|
2579
|
+
FfiConverterData.write(value.eventId, into: &buf)
|
|
2580
|
+
FfiConverterUInt64.write(value.wallMs, into: &buf)
|
|
2581
|
+
FfiConverterData.write(value.payload, into: &buf)
|
|
2582
|
+
FfiConverterString.write(value.author, into: &buf)
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
#if swift(>=5.8)
|
|
2587
|
+
@_documentation(visibility: private)
|
|
2588
|
+
#endif
|
|
2589
|
+
public func FfiConverterTypeHistoryAppEvent_lift(_ buf: RustBuffer) throws -> HistoryAppEvent {
|
|
2590
|
+
return try FfiConverterTypeHistoryAppEvent.lift(buf)
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
#if swift(>=5.8)
|
|
2594
|
+
@_documentation(visibility: private)
|
|
2595
|
+
#endif
|
|
2596
|
+
public func FfiConverterTypeHistoryAppEvent_lower(_ value: HistoryAppEvent) -> RustBuffer {
|
|
2597
|
+
return FfiConverterTypeHistoryAppEvent.lower(value)
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
public struct HistoryBundleView {
|
|
2601
|
+
public var v: UInt8
|
|
2602
|
+
public var senderDeviceId: Data
|
|
2603
|
+
public var recipientDeviceId: Data
|
|
2604
|
+
public var conversationId: Data
|
|
2605
|
+
public var windowStartMs: UInt64
|
|
2606
|
+
public var windowEndMs: UInt64
|
|
2607
|
+
public var events: [HistoryAppEvent]
|
|
2608
|
+
|
|
2609
|
+
/// Default memberwise initializers are never public by default, so we
|
|
2610
|
+
/// declare one manually.
|
|
2611
|
+
public init(v: UInt8, senderDeviceId: Data, recipientDeviceId: Data, conversationId: Data, windowStartMs: UInt64, windowEndMs: UInt64, events: [HistoryAppEvent]) {
|
|
2612
|
+
self.v = v
|
|
2613
|
+
self.senderDeviceId = senderDeviceId
|
|
2614
|
+
self.recipientDeviceId = recipientDeviceId
|
|
2615
|
+
self.conversationId = conversationId
|
|
2616
|
+
self.windowStartMs = windowStartMs
|
|
2617
|
+
self.windowEndMs = windowEndMs
|
|
2618
|
+
self.events = events
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
extension HistoryBundleView: Equatable, Hashable {
|
|
2623
|
+
public static func == (lhs: HistoryBundleView, rhs: HistoryBundleView) -> Bool {
|
|
2624
|
+
if lhs.v != rhs.v {
|
|
2625
|
+
return false
|
|
2626
|
+
}
|
|
2627
|
+
if lhs.senderDeviceId != rhs.senderDeviceId {
|
|
2628
|
+
return false
|
|
2629
|
+
}
|
|
2630
|
+
if lhs.recipientDeviceId != rhs.recipientDeviceId {
|
|
2631
|
+
return false
|
|
2632
|
+
}
|
|
2633
|
+
if lhs.conversationId != rhs.conversationId {
|
|
2634
|
+
return false
|
|
2635
|
+
}
|
|
2636
|
+
if lhs.windowStartMs != rhs.windowStartMs {
|
|
2637
|
+
return false
|
|
2638
|
+
}
|
|
2639
|
+
if lhs.windowEndMs != rhs.windowEndMs {
|
|
2640
|
+
return false
|
|
2641
|
+
}
|
|
2642
|
+
if lhs.events != rhs.events {
|
|
2643
|
+
return false
|
|
2644
|
+
}
|
|
2645
|
+
return true
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
public func hash(into hasher: inout Hasher) {
|
|
2649
|
+
hasher.combine(v)
|
|
2650
|
+
hasher.combine(senderDeviceId)
|
|
2651
|
+
hasher.combine(recipientDeviceId)
|
|
2652
|
+
hasher.combine(conversationId)
|
|
2653
|
+
hasher.combine(windowStartMs)
|
|
2654
|
+
hasher.combine(windowEndMs)
|
|
2655
|
+
hasher.combine(events)
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
#if swift(>=5.8)
|
|
2660
|
+
@_documentation(visibility: private)
|
|
2661
|
+
#endif
|
|
2662
|
+
public struct FfiConverterTypeHistoryBundleView: FfiConverterRustBuffer {
|
|
2663
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HistoryBundleView {
|
|
2664
|
+
return
|
|
2665
|
+
try HistoryBundleView(
|
|
2666
|
+
v: FfiConverterUInt8.read(from: &buf),
|
|
2667
|
+
senderDeviceId: FfiConverterData.read(from: &buf),
|
|
2668
|
+
recipientDeviceId: FfiConverterData.read(from: &buf),
|
|
2669
|
+
conversationId: FfiConverterData.read(from: &buf),
|
|
2670
|
+
windowStartMs: FfiConverterUInt64.read(from: &buf),
|
|
2671
|
+
windowEndMs: FfiConverterUInt64.read(from: &buf),
|
|
2672
|
+
events: FfiConverterSequenceTypeHistoryAppEvent.read(from: &buf)
|
|
2673
|
+
)
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
public static func write(_ value: HistoryBundleView, into buf: inout [UInt8]) {
|
|
2677
|
+
FfiConverterUInt8.write(value.v, into: &buf)
|
|
2678
|
+
FfiConverterData.write(value.senderDeviceId, into: &buf)
|
|
2679
|
+
FfiConverterData.write(value.recipientDeviceId, into: &buf)
|
|
2680
|
+
FfiConverterData.write(value.conversationId, into: &buf)
|
|
2681
|
+
FfiConverterUInt64.write(value.windowStartMs, into: &buf)
|
|
2682
|
+
FfiConverterUInt64.write(value.windowEndMs, into: &buf)
|
|
2683
|
+
FfiConverterSequenceTypeHistoryAppEvent.write(value.events, into: &buf)
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
#if swift(>=5.8)
|
|
2688
|
+
@_documentation(visibility: private)
|
|
2689
|
+
#endif
|
|
2690
|
+
public func FfiConverterTypeHistoryBundleView_lift(_ buf: RustBuffer) throws -> HistoryBundleView {
|
|
2691
|
+
return try FfiConverterTypeHistoryBundleView.lift(buf)
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
#if swift(>=5.8)
|
|
2695
|
+
@_documentation(visibility: private)
|
|
2696
|
+
#endif
|
|
2697
|
+
public func FfiConverterTypeHistoryBundleView_lower(_ value: HistoryBundleView) -> RustBuffer {
|
|
2698
|
+
return FfiConverterTypeHistoryBundleView.lower(value)
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2523
2701
|
public struct Hlc {
|
|
2524
2702
|
public var wallMs: UInt64
|
|
2525
2703
|
public var logical: UInt32
|
|
@@ -3694,6 +3872,31 @@ private struct FfiConverterSequenceTypeDiscoveredDevice: FfiConverterRustBuffer
|
|
|
3694
3872
|
}
|
|
3695
3873
|
}
|
|
3696
3874
|
|
|
3875
|
+
#if swift(>=5.8)
|
|
3876
|
+
@_documentation(visibility: private)
|
|
3877
|
+
#endif
|
|
3878
|
+
private struct FfiConverterSequenceTypeHistoryAppEvent: FfiConverterRustBuffer {
|
|
3879
|
+
typealias SwiftType = [HistoryAppEvent]
|
|
3880
|
+
|
|
3881
|
+
static func write(_ value: [HistoryAppEvent], into buf: inout [UInt8]) {
|
|
3882
|
+
let len = Int32(value.count)
|
|
3883
|
+
writeInt(&buf, len)
|
|
3884
|
+
for item in value {
|
|
3885
|
+
FfiConverterTypeHistoryAppEvent.write(item, into: &buf)
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
|
|
3889
|
+
static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [HistoryAppEvent] {
|
|
3890
|
+
let len: Int32 = try readInt(&buf)
|
|
3891
|
+
var seq = [HistoryAppEvent]()
|
|
3892
|
+
seq.reserveCapacity(Int(len))
|
|
3893
|
+
for _ in 0 ..< len {
|
|
3894
|
+
try seq.append(FfiConverterTypeHistoryAppEvent.read(from: &buf))
|
|
3895
|
+
}
|
|
3896
|
+
return seq
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3697
3900
|
#if swift(>=5.8)
|
|
3698
3901
|
@_documentation(visibility: private)
|
|
3699
3902
|
#endif
|
|
@@ -3957,6 +4160,16 @@ public func normalizeMnemonicPhrase(phrase: String) throws -> String {
|
|
|
3957
4160
|
})
|
|
3958
4161
|
}
|
|
3959
4162
|
|
|
4163
|
+
public func openHistoryBundle(sealed: Data, recipientPriv: Data, senderIdentityPub: Data) throws -> HistoryBundleView {
|
|
4164
|
+
return try FfiConverterTypeHistoryBundleView.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
4165
|
+
uniffi_ping_ffi_fn_func_open_history_bundle(
|
|
4166
|
+
FfiConverterData.lower(sealed),
|
|
4167
|
+
FfiConverterData.lower(recipientPriv),
|
|
4168
|
+
FfiConverterData.lower(senderIdentityPub), $0
|
|
4169
|
+
)
|
|
4170
|
+
})
|
|
4171
|
+
}
|
|
4172
|
+
|
|
3960
4173
|
public func openLinkingTicket(sealed: Data, newDevicePriv: Data) throws -> LinkingTicket {
|
|
3961
4174
|
return try FfiConverterTypeLinkingTicket.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3962
4175
|
uniffi_ping_ffi_fn_func_open_linking_ticket(
|
|
@@ -3966,6 +4179,16 @@ public func openLinkingTicket(sealed: Data, newDevicePriv: Data) throws -> Linki
|
|
|
3966
4179
|
})
|
|
3967
4180
|
}
|
|
3968
4181
|
|
|
4182
|
+
public func sealHistoryBundle(bundle: HistoryBundleView, recipientPub: Data, senderIdentitySecret: Data) throws -> Data {
|
|
4183
|
+
return try FfiConverterData.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
4184
|
+
uniffi_ping_ffi_fn_func_seal_history_bundle(
|
|
4185
|
+
FfiConverterTypeHistoryBundleView.lower(bundle),
|
|
4186
|
+
FfiConverterData.lower(recipientPub),
|
|
4187
|
+
FfiConverterData.lower(senderIdentitySecret), $0
|
|
4188
|
+
)
|
|
4189
|
+
})
|
|
4190
|
+
}
|
|
4191
|
+
|
|
3969
4192
|
public func sealLinkingTicket(ticket: LinkingTicket, newDevicePub: Data) throws -> Data {
|
|
3970
4193
|
return try FfiConverterData.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3971
4194
|
uniffi_ping_ffi_fn_func_seal_linking_ticket(
|
|
@@ -4009,9 +4232,15 @@ private var initializationResult: InitializationResult = {
|
|
|
4009
4232
|
if uniffi_ping_ffi_checksum_func_normalize_mnemonic_phrase() != 55353 {
|
|
4010
4233
|
return InitializationResult.apiChecksumMismatch
|
|
4011
4234
|
}
|
|
4235
|
+
if uniffi_ping_ffi_checksum_func_open_history_bundle() != 29021 {
|
|
4236
|
+
return InitializationResult.apiChecksumMismatch
|
|
4237
|
+
}
|
|
4012
4238
|
if uniffi_ping_ffi_checksum_func_open_linking_ticket() != 64091 {
|
|
4013
4239
|
return InitializationResult.apiChecksumMismatch
|
|
4014
4240
|
}
|
|
4241
|
+
if uniffi_ping_ffi_checksum_func_seal_history_bundle() != 21178 {
|
|
4242
|
+
return InitializationResult.apiChecksumMismatch
|
|
4243
|
+
}
|
|
4015
4244
|
if uniffi_ping_ffi_checksum_func_seal_linking_ticket() != 37263 {
|
|
4016
4245
|
return InitializationResult.apiChecksumMismatch
|
|
4017
4246
|
}
|
package/ios/pingFFI.h
CHANGED
|
@@ -579,11 +579,21 @@ RustBuffer uniffi_ping_ffi_fn_func_generate_mnemonic_phrase(RustCallStatus *_Non
|
|
|
579
579
|
RustBuffer uniffi_ping_ffi_fn_func_normalize_mnemonic_phrase(RustBuffer phrase, RustCallStatus *_Nonnull out_status
|
|
580
580
|
);
|
|
581
581
|
#endif
|
|
582
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_OPEN_HISTORY_BUNDLE
|
|
583
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_OPEN_HISTORY_BUNDLE
|
|
584
|
+
RustBuffer uniffi_ping_ffi_fn_func_open_history_bundle(RustBuffer sealed, RustBuffer recipient_priv, RustBuffer sender_identity_pub, RustCallStatus *_Nonnull out_status
|
|
585
|
+
);
|
|
586
|
+
#endif
|
|
582
587
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_OPEN_LINKING_TICKET
|
|
583
588
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_OPEN_LINKING_TICKET
|
|
584
589
|
RustBuffer uniffi_ping_ffi_fn_func_open_linking_ticket(RustBuffer sealed, RustBuffer new_device_priv, RustCallStatus *_Nonnull out_status
|
|
585
590
|
);
|
|
586
591
|
#endif
|
|
592
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_SEAL_HISTORY_BUNDLE
|
|
593
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_SEAL_HISTORY_BUNDLE
|
|
594
|
+
RustBuffer uniffi_ping_ffi_fn_func_seal_history_bundle(RustBuffer bundle, RustBuffer recipient_pub, RustBuffer sender_identity_secret, RustCallStatus *_Nonnull out_status
|
|
595
|
+
);
|
|
596
|
+
#endif
|
|
587
597
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_SEAL_LINKING_TICKET
|
|
588
598
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_FN_FUNC_SEAL_LINKING_TICKET
|
|
589
599
|
RustBuffer uniffi_ping_ffi_fn_func_seal_linking_ticket(RustBuffer ticket, RustBuffer new_device_pub, RustCallStatus *_Nonnull out_status
|
|
@@ -903,12 +913,24 @@ uint16_t uniffi_ping_ffi_checksum_func_generate_mnemonic_phrase(void
|
|
|
903
913
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_NORMALIZE_MNEMONIC_PHRASE
|
|
904
914
|
uint16_t uniffi_ping_ffi_checksum_func_normalize_mnemonic_phrase(void
|
|
905
915
|
|
|
916
|
+
);
|
|
917
|
+
#endif
|
|
918
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_OPEN_HISTORY_BUNDLE
|
|
919
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_OPEN_HISTORY_BUNDLE
|
|
920
|
+
uint16_t uniffi_ping_ffi_checksum_func_open_history_bundle(void
|
|
921
|
+
|
|
906
922
|
);
|
|
907
923
|
#endif
|
|
908
924
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_OPEN_LINKING_TICKET
|
|
909
925
|
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_OPEN_LINKING_TICKET
|
|
910
926
|
uint16_t uniffi_ping_ffi_checksum_func_open_linking_ticket(void
|
|
911
927
|
|
|
928
|
+
);
|
|
929
|
+
#endif
|
|
930
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_SEAL_HISTORY_BUNDLE
|
|
931
|
+
#define UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_SEAL_HISTORY_BUNDLE
|
|
932
|
+
uint16_t uniffi_ping_ffi_checksum_func_seal_history_bundle(void
|
|
933
|
+
|
|
912
934
|
);
|
|
913
935
|
#endif
|
|
914
936
|
#ifndef UNIFFI_FFIDEF_UNIFFI_PING_FFI_CHECKSUM_FUNC_SEAL_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.12",
|
|
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",
|