ping-openmls-sdk-react-native-macos 0.7.9 → 0.7.11
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 +221 -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,176 @@ 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
|
+
|
|
2528
|
+
/// Default memberwise initializers are never public by default, so we
|
|
2529
|
+
/// declare one manually.
|
|
2530
|
+
public init(eventId: Data, wallMs: UInt64, payload: Data) {
|
|
2531
|
+
self.eventId = eventId
|
|
2532
|
+
self.wallMs = wallMs
|
|
2533
|
+
self.payload = payload
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
extension HistoryAppEvent: Equatable, Hashable {
|
|
2538
|
+
public static func == (lhs: HistoryAppEvent, rhs: HistoryAppEvent) -> Bool {
|
|
2539
|
+
if lhs.eventId != rhs.eventId {
|
|
2540
|
+
return false
|
|
2541
|
+
}
|
|
2542
|
+
if lhs.wallMs != rhs.wallMs {
|
|
2543
|
+
return false
|
|
2544
|
+
}
|
|
2545
|
+
if lhs.payload != rhs.payload {
|
|
2546
|
+
return false
|
|
2547
|
+
}
|
|
2548
|
+
return true
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
public func hash(into hasher: inout Hasher) {
|
|
2552
|
+
hasher.combine(eventId)
|
|
2553
|
+
hasher.combine(wallMs)
|
|
2554
|
+
hasher.combine(payload)
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
#if swift(>=5.8)
|
|
2559
|
+
@_documentation(visibility: private)
|
|
2560
|
+
#endif
|
|
2561
|
+
public struct FfiConverterTypeHistoryAppEvent: FfiConverterRustBuffer {
|
|
2562
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HistoryAppEvent {
|
|
2563
|
+
return
|
|
2564
|
+
try HistoryAppEvent(
|
|
2565
|
+
eventId: FfiConverterData.read(from: &buf),
|
|
2566
|
+
wallMs: FfiConverterUInt64.read(from: &buf),
|
|
2567
|
+
payload: FfiConverterData.read(from: &buf)
|
|
2568
|
+
)
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
public static func write(_ value: HistoryAppEvent, into buf: inout [UInt8]) {
|
|
2572
|
+
FfiConverterData.write(value.eventId, into: &buf)
|
|
2573
|
+
FfiConverterUInt64.write(value.wallMs, into: &buf)
|
|
2574
|
+
FfiConverterData.write(value.payload, into: &buf)
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
#if swift(>=5.8)
|
|
2579
|
+
@_documentation(visibility: private)
|
|
2580
|
+
#endif
|
|
2581
|
+
public func FfiConverterTypeHistoryAppEvent_lift(_ buf: RustBuffer) throws -> HistoryAppEvent {
|
|
2582
|
+
return try FfiConverterTypeHistoryAppEvent.lift(buf)
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
#if swift(>=5.8)
|
|
2586
|
+
@_documentation(visibility: private)
|
|
2587
|
+
#endif
|
|
2588
|
+
public func FfiConverterTypeHistoryAppEvent_lower(_ value: HistoryAppEvent) -> RustBuffer {
|
|
2589
|
+
return FfiConverterTypeHistoryAppEvent.lower(value)
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
public struct HistoryBundleView {
|
|
2593
|
+
public var v: UInt8
|
|
2594
|
+
public var senderDeviceId: Data
|
|
2595
|
+
public var recipientDeviceId: Data
|
|
2596
|
+
public var conversationId: Data
|
|
2597
|
+
public var windowStartMs: UInt64
|
|
2598
|
+
public var windowEndMs: UInt64
|
|
2599
|
+
public var events: [HistoryAppEvent]
|
|
2600
|
+
|
|
2601
|
+
/// Default memberwise initializers are never public by default, so we
|
|
2602
|
+
/// declare one manually.
|
|
2603
|
+
public init(v: UInt8, senderDeviceId: Data, recipientDeviceId: Data, conversationId: Data, windowStartMs: UInt64, windowEndMs: UInt64, events: [HistoryAppEvent]) {
|
|
2604
|
+
self.v = v
|
|
2605
|
+
self.senderDeviceId = senderDeviceId
|
|
2606
|
+
self.recipientDeviceId = recipientDeviceId
|
|
2607
|
+
self.conversationId = conversationId
|
|
2608
|
+
self.windowStartMs = windowStartMs
|
|
2609
|
+
self.windowEndMs = windowEndMs
|
|
2610
|
+
self.events = events
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
extension HistoryBundleView: Equatable, Hashable {
|
|
2615
|
+
public static func == (lhs: HistoryBundleView, rhs: HistoryBundleView) -> Bool {
|
|
2616
|
+
if lhs.v != rhs.v {
|
|
2617
|
+
return false
|
|
2618
|
+
}
|
|
2619
|
+
if lhs.senderDeviceId != rhs.senderDeviceId {
|
|
2620
|
+
return false
|
|
2621
|
+
}
|
|
2622
|
+
if lhs.recipientDeviceId != rhs.recipientDeviceId {
|
|
2623
|
+
return false
|
|
2624
|
+
}
|
|
2625
|
+
if lhs.conversationId != rhs.conversationId {
|
|
2626
|
+
return false
|
|
2627
|
+
}
|
|
2628
|
+
if lhs.windowStartMs != rhs.windowStartMs {
|
|
2629
|
+
return false
|
|
2630
|
+
}
|
|
2631
|
+
if lhs.windowEndMs != rhs.windowEndMs {
|
|
2632
|
+
return false
|
|
2633
|
+
}
|
|
2634
|
+
if lhs.events != rhs.events {
|
|
2635
|
+
return false
|
|
2636
|
+
}
|
|
2637
|
+
return true
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
public func hash(into hasher: inout Hasher) {
|
|
2641
|
+
hasher.combine(v)
|
|
2642
|
+
hasher.combine(senderDeviceId)
|
|
2643
|
+
hasher.combine(recipientDeviceId)
|
|
2644
|
+
hasher.combine(conversationId)
|
|
2645
|
+
hasher.combine(windowStartMs)
|
|
2646
|
+
hasher.combine(windowEndMs)
|
|
2647
|
+
hasher.combine(events)
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
#if swift(>=5.8)
|
|
2652
|
+
@_documentation(visibility: private)
|
|
2653
|
+
#endif
|
|
2654
|
+
public struct FfiConverterTypeHistoryBundleView: FfiConverterRustBuffer {
|
|
2655
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HistoryBundleView {
|
|
2656
|
+
return
|
|
2657
|
+
try HistoryBundleView(
|
|
2658
|
+
v: FfiConverterUInt8.read(from: &buf),
|
|
2659
|
+
senderDeviceId: FfiConverterData.read(from: &buf),
|
|
2660
|
+
recipientDeviceId: FfiConverterData.read(from: &buf),
|
|
2661
|
+
conversationId: FfiConverterData.read(from: &buf),
|
|
2662
|
+
windowStartMs: FfiConverterUInt64.read(from: &buf),
|
|
2663
|
+
windowEndMs: FfiConverterUInt64.read(from: &buf),
|
|
2664
|
+
events: FfiConverterSequenceTypeHistoryAppEvent.read(from: &buf)
|
|
2665
|
+
)
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
|
+
public static func write(_ value: HistoryBundleView, into buf: inout [UInt8]) {
|
|
2669
|
+
FfiConverterUInt8.write(value.v, into: &buf)
|
|
2670
|
+
FfiConverterData.write(value.senderDeviceId, into: &buf)
|
|
2671
|
+
FfiConverterData.write(value.recipientDeviceId, into: &buf)
|
|
2672
|
+
FfiConverterData.write(value.conversationId, into: &buf)
|
|
2673
|
+
FfiConverterUInt64.write(value.windowStartMs, into: &buf)
|
|
2674
|
+
FfiConverterUInt64.write(value.windowEndMs, into: &buf)
|
|
2675
|
+
FfiConverterSequenceTypeHistoryAppEvent.write(value.events, into: &buf)
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
#if swift(>=5.8)
|
|
2680
|
+
@_documentation(visibility: private)
|
|
2681
|
+
#endif
|
|
2682
|
+
public func FfiConverterTypeHistoryBundleView_lift(_ buf: RustBuffer) throws -> HistoryBundleView {
|
|
2683
|
+
return try FfiConverterTypeHistoryBundleView.lift(buf)
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
#if swift(>=5.8)
|
|
2687
|
+
@_documentation(visibility: private)
|
|
2688
|
+
#endif
|
|
2689
|
+
public func FfiConverterTypeHistoryBundleView_lower(_ value: HistoryBundleView) -> RustBuffer {
|
|
2690
|
+
return FfiConverterTypeHistoryBundleView.lower(value)
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2523
2693
|
public struct Hlc {
|
|
2524
2694
|
public var wallMs: UInt64
|
|
2525
2695
|
public var logical: UInt32
|
|
@@ -3694,6 +3864,31 @@ private struct FfiConverterSequenceTypeDiscoveredDevice: FfiConverterRustBuffer
|
|
|
3694
3864
|
}
|
|
3695
3865
|
}
|
|
3696
3866
|
|
|
3867
|
+
#if swift(>=5.8)
|
|
3868
|
+
@_documentation(visibility: private)
|
|
3869
|
+
#endif
|
|
3870
|
+
private struct FfiConverterSequenceTypeHistoryAppEvent: FfiConverterRustBuffer {
|
|
3871
|
+
typealias SwiftType = [HistoryAppEvent]
|
|
3872
|
+
|
|
3873
|
+
static func write(_ value: [HistoryAppEvent], into buf: inout [UInt8]) {
|
|
3874
|
+
let len = Int32(value.count)
|
|
3875
|
+
writeInt(&buf, len)
|
|
3876
|
+
for item in value {
|
|
3877
|
+
FfiConverterTypeHistoryAppEvent.write(item, into: &buf)
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3880
|
+
|
|
3881
|
+
static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [HistoryAppEvent] {
|
|
3882
|
+
let len: Int32 = try readInt(&buf)
|
|
3883
|
+
var seq = [HistoryAppEvent]()
|
|
3884
|
+
seq.reserveCapacity(Int(len))
|
|
3885
|
+
for _ in 0 ..< len {
|
|
3886
|
+
try seq.append(FfiConverterTypeHistoryAppEvent.read(from: &buf))
|
|
3887
|
+
}
|
|
3888
|
+
return seq
|
|
3889
|
+
}
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3697
3892
|
#if swift(>=5.8)
|
|
3698
3893
|
@_documentation(visibility: private)
|
|
3699
3894
|
#endif
|
|
@@ -3957,6 +4152,16 @@ public func normalizeMnemonicPhrase(phrase: String) throws -> String {
|
|
|
3957
4152
|
})
|
|
3958
4153
|
}
|
|
3959
4154
|
|
|
4155
|
+
public func openHistoryBundle(sealed: Data, recipientPriv: Data, senderIdentityPub: Data) throws -> HistoryBundleView {
|
|
4156
|
+
return try FfiConverterTypeHistoryBundleView.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
4157
|
+
uniffi_ping_ffi_fn_func_open_history_bundle(
|
|
4158
|
+
FfiConverterData.lower(sealed),
|
|
4159
|
+
FfiConverterData.lower(recipientPriv),
|
|
4160
|
+
FfiConverterData.lower(senderIdentityPub), $0
|
|
4161
|
+
)
|
|
4162
|
+
})
|
|
4163
|
+
}
|
|
4164
|
+
|
|
3960
4165
|
public func openLinkingTicket(sealed: Data, newDevicePriv: Data) throws -> LinkingTicket {
|
|
3961
4166
|
return try FfiConverterTypeLinkingTicket.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3962
4167
|
uniffi_ping_ffi_fn_func_open_linking_ticket(
|
|
@@ -3966,6 +4171,16 @@ public func openLinkingTicket(sealed: Data, newDevicePriv: Data) throws -> Linki
|
|
|
3966
4171
|
})
|
|
3967
4172
|
}
|
|
3968
4173
|
|
|
4174
|
+
public func sealHistoryBundle(bundle: HistoryBundleView, recipientPub: Data, senderIdentitySecret: Data) throws -> Data {
|
|
4175
|
+
return try FfiConverterData.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
4176
|
+
uniffi_ping_ffi_fn_func_seal_history_bundle(
|
|
4177
|
+
FfiConverterTypeHistoryBundleView.lower(bundle),
|
|
4178
|
+
FfiConverterData.lower(recipientPub),
|
|
4179
|
+
FfiConverterData.lower(senderIdentitySecret), $0
|
|
4180
|
+
)
|
|
4181
|
+
})
|
|
4182
|
+
}
|
|
4183
|
+
|
|
3969
4184
|
public func sealLinkingTicket(ticket: LinkingTicket, newDevicePub: Data) throws -> Data {
|
|
3970
4185
|
return try FfiConverterData.lift(rustCallWithError(FfiConverterTypePingError.lift) {
|
|
3971
4186
|
uniffi_ping_ffi_fn_func_seal_linking_ticket(
|
|
@@ -4009,9 +4224,15 @@ private var initializationResult: InitializationResult = {
|
|
|
4009
4224
|
if uniffi_ping_ffi_checksum_func_normalize_mnemonic_phrase() != 55353 {
|
|
4010
4225
|
return InitializationResult.apiChecksumMismatch
|
|
4011
4226
|
}
|
|
4227
|
+
if uniffi_ping_ffi_checksum_func_open_history_bundle() != 29021 {
|
|
4228
|
+
return InitializationResult.apiChecksumMismatch
|
|
4229
|
+
}
|
|
4012
4230
|
if uniffi_ping_ffi_checksum_func_open_linking_ticket() != 64091 {
|
|
4013
4231
|
return InitializationResult.apiChecksumMismatch
|
|
4014
4232
|
}
|
|
4233
|
+
if uniffi_ping_ffi_checksum_func_seal_history_bundle() != 21178 {
|
|
4234
|
+
return InitializationResult.apiChecksumMismatch
|
|
4235
|
+
}
|
|
4015
4236
|
if uniffi_ping_ffi_checksum_func_seal_linking_ticket() != 37263 {
|
|
4016
4237
|
return InitializationResult.apiChecksumMismatch
|
|
4017
4238
|
}
|
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.11",
|
|
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",
|