@synonymdev/react-native-pubky 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +17 -13
- package/android/src/main/java/com/pubky/PubkyModule.kt +1 -1
- package/android/src/main/java/uniffi/{pubkymobile/pubkymobile.kt → pubkycore/pubkycore.kt} +185 -150
- package/android/src/main/jniLibs/arm64-v8a/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libpubkycore.so +0 -0
- package/android/src/main/jniLibs/x86/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/android/src/main/jniLibs/x86_64/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/Info.plist +8 -8
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64/libpubkymobile.a → PubkyCore.xcframework/ios-arm64/libpubkycore.a} +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64-simulator/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64-simulator/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64-simulator/libpubkymobile.a → PubkyCore.xcframework/ios-arm64-simulator/libpubkycore.a} +0 -0
- package/ios/{pubkymobile.swift → pubkycore.swift} +81 -48
- package/lib/typescript/commonjs/src/index.d.ts +9 -10
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +9 -10
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +12 -7
- package/react-native-pubky.podspec +1 -1
- package/src/index.tsx +9 -9
- package/android/src/main/jniLibs/armeabi-v7a/libpubkymobile.so +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/pubkymobileFFI.h +0 -292
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/libmobile.a +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/pubkymobileFFI.h +0 -292
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/libmobile.a +0 -0
@@ -5,8 +5,8 @@ import Foundation
|
|
5
5
|
// Depending on the consumer's build setup, the low-level FFI code
|
6
6
|
// might be in a separate module, or it might be compiled inline into
|
7
7
|
// this module. This is a bit of light hackery to work with both.
|
8
|
-
#if canImport(
|
9
|
-
import
|
8
|
+
#if canImport(pubkycoreFFI)
|
9
|
+
import pubkycoreFFI
|
10
10
|
#endif
|
11
11
|
|
12
12
|
fileprivate extension RustBuffer {
|
@@ -19,13 +19,13 @@ fileprivate extension RustBuffer {
|
|
19
19
|
}
|
20
20
|
|
21
21
|
static func from(_ ptr: UnsafeBufferPointer<UInt8>) -> RustBuffer {
|
22
|
-
try! rustCall {
|
22
|
+
try! rustCall { ffi_pubkycore_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) }
|
23
23
|
}
|
24
24
|
|
25
25
|
// Frees the buffer in place.
|
26
26
|
// The buffer must not be used after this is called.
|
27
27
|
func deallocate() {
|
28
|
-
try! rustCall {
|
28
|
+
try! rustCall { ffi_pubkycore_rustbuffer_free(self, $0) }
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
@@ -297,6 +297,27 @@ private func uniffiCheckCallStatus(
|
|
297
297
|
// Public interface members begin here.
|
298
298
|
|
299
299
|
|
300
|
+
fileprivate struct FfiConverterBool : FfiConverter {
|
301
|
+
typealias FfiType = Int8
|
302
|
+
typealias SwiftType = Bool
|
303
|
+
|
304
|
+
public static func lift(_ value: Int8) throws -> Bool {
|
305
|
+
return value != 0
|
306
|
+
}
|
307
|
+
|
308
|
+
public static func lower(_ value: Bool) -> Int8 {
|
309
|
+
return value ? 1 : 0
|
310
|
+
}
|
311
|
+
|
312
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Bool {
|
313
|
+
return try lift(readInt(&buf))
|
314
|
+
}
|
315
|
+
|
316
|
+
public static func write(_ value: Bool, into buf: inout [UInt8]) {
|
317
|
+
writeInt(&buf, lower(value))
|
318
|
+
}
|
319
|
+
}
|
320
|
+
|
300
321
|
fileprivate struct FfiConverterString: FfiConverter {
|
301
322
|
typealias SwiftType = String
|
302
323
|
typealias FfiType = RustBuffer
|
@@ -351,7 +372,7 @@ public class EventNotifier: EventNotifierProtocol {
|
|
351
372
|
}
|
352
373
|
|
353
374
|
deinit {
|
354
|
-
try! rustCall {
|
375
|
+
try! rustCall { uniffi_pubkycore_fn_free_eventnotifier(pointer, $0) }
|
355
376
|
}
|
356
377
|
|
357
378
|
|
@@ -524,7 +545,7 @@ fileprivate struct FfiConverterCallbackInterfaceEventListener {
|
|
524
545
|
private static let initCallbackOnce: () = {
|
525
546
|
// Swift ensures this initializer code will once run once, even when accessed by multiple threads.
|
526
547
|
try! rustCall { (err: UnsafeMutablePointer<RustCallStatus>) in
|
527
|
-
|
548
|
+
uniffi_pubkycore_fn_init_callback_eventlistener(foreignCallbackCallbackInterfaceEventListener, err)
|
528
549
|
}
|
529
550
|
}()
|
530
551
|
|
@@ -594,7 +615,7 @@ fileprivate struct FfiConverterSequenceString: FfiConverterRustBuffer {
|
|
594
615
|
public func auth(url: String, secretKey: String) -> [String] {
|
595
616
|
return try! FfiConverterSequenceString.lift(
|
596
617
|
try! rustCall() {
|
597
|
-
|
618
|
+
uniffi_pubkycore_fn_func_auth(
|
598
619
|
FfiConverterString.lower(url),
|
599
620
|
FfiConverterString.lower(secretKey),$0)
|
600
621
|
}
|
@@ -604,7 +625,7 @@ public func auth(url: String, secretKey: String) -> [String] {
|
|
604
625
|
public func createRecoveryFile(secretKey: String, passphrase: String) -> [String] {
|
605
626
|
return try! FfiConverterSequenceString.lift(
|
606
627
|
try! rustCall() {
|
607
|
-
|
628
|
+
uniffi_pubkycore_fn_func_create_recovery_file(
|
608
629
|
FfiConverterString.lower(secretKey),
|
609
630
|
FfiConverterString.lower(passphrase),$0)
|
610
631
|
}
|
@@ -614,7 +635,7 @@ public func createRecoveryFile(secretKey: String, passphrase: String) -> [Strin
|
|
614
635
|
public func decryptRecoveryFile(recoveryFile: String, passphrase: String) -> [String] {
|
615
636
|
return try! FfiConverterSequenceString.lift(
|
616
637
|
try! rustCall() {
|
617
|
-
|
638
|
+
uniffi_pubkycore_fn_func_decrypt_recovery_file(
|
618
639
|
FfiConverterString.lower(recoveryFile),
|
619
640
|
FfiConverterString.lower(passphrase),$0)
|
620
641
|
}
|
@@ -624,7 +645,7 @@ public func decryptRecoveryFile(recoveryFile: String, passphrase: String) -> [S
|
|
624
645
|
public func deleteFile(url: String) -> [String] {
|
625
646
|
return try! FfiConverterSequenceString.lift(
|
626
647
|
try! rustCall() {
|
627
|
-
|
648
|
+
uniffi_pubkycore_fn_func_delete_file(
|
628
649
|
FfiConverterString.lower(url),$0)
|
629
650
|
}
|
630
651
|
)
|
@@ -633,7 +654,7 @@ public func deleteFile(url: String) -> [String] {
|
|
633
654
|
public func generateSecretKey() -> [String] {
|
634
655
|
return try! FfiConverterSequenceString.lift(
|
635
656
|
try! rustCall() {
|
636
|
-
|
657
|
+
uniffi_pubkycore_fn_func_generate_secret_key($0)
|
637
658
|
}
|
638
659
|
)
|
639
660
|
}
|
@@ -641,7 +662,7 @@ public func generateSecretKey() -> [String] {
|
|
641
662
|
public func get(url: String) -> [String] {
|
642
663
|
return try! FfiConverterSequenceString.lift(
|
643
664
|
try! rustCall() {
|
644
|
-
|
665
|
+
uniffi_pubkycore_fn_func_get(
|
645
666
|
FfiConverterString.lower(url),$0)
|
646
667
|
}
|
647
668
|
)
|
@@ -650,7 +671,7 @@ public func get(url: String) -> [String] {
|
|
650
671
|
public func getPublicKeyFromSecretKey(secretKey: String) -> [String] {
|
651
672
|
return try! FfiConverterSequenceString.lift(
|
652
673
|
try! rustCall() {
|
653
|
-
|
674
|
+
uniffi_pubkycore_fn_func_get_public_key_from_secret_key(
|
654
675
|
FfiConverterString.lower(secretKey),$0)
|
655
676
|
}
|
656
677
|
)
|
@@ -659,7 +680,7 @@ public func getPublicKeyFromSecretKey(secretKey: String) -> [String] {
|
|
659
680
|
public func list(url: String) -> [String] {
|
660
681
|
return try! FfiConverterSequenceString.lift(
|
661
682
|
try! rustCall() {
|
662
|
-
|
683
|
+
uniffi_pubkycore_fn_func_list(
|
663
684
|
FfiConverterString.lower(url),$0)
|
664
685
|
}
|
665
686
|
)
|
@@ -668,7 +689,7 @@ public func list(url: String) -> [String] {
|
|
668
689
|
public func parseAuthUrl(url: String) -> [String] {
|
669
690
|
return try! FfiConverterSequenceString.lift(
|
670
691
|
try! rustCall() {
|
671
|
-
|
692
|
+
uniffi_pubkycore_fn_func_parse_auth_url(
|
672
693
|
FfiConverterString.lower(url),$0)
|
673
694
|
}
|
674
695
|
)
|
@@ -677,7 +698,7 @@ public func parseAuthUrl(url: String) -> [String] {
|
|
677
698
|
public func publish(recordName: String, recordContent: String, secretKey: String) -> [String] {
|
678
699
|
return try! FfiConverterSequenceString.lift(
|
679
700
|
try! rustCall() {
|
680
|
-
|
701
|
+
uniffi_pubkycore_fn_func_publish(
|
681
702
|
FfiConverterString.lower(recordName),
|
682
703
|
FfiConverterString.lower(recordContent),
|
683
704
|
FfiConverterString.lower(secretKey),$0)
|
@@ -688,7 +709,7 @@ public func publish(recordName: String, recordContent: String, secretKey: String
|
|
688
709
|
public func publishHttps(recordName: String, target: String, secretKey: String) -> [String] {
|
689
710
|
return try! FfiConverterSequenceString.lift(
|
690
711
|
try! rustCall() {
|
691
|
-
|
712
|
+
uniffi_pubkycore_fn_func_publish_https(
|
692
713
|
FfiConverterString.lower(recordName),
|
693
714
|
FfiConverterString.lower(target),
|
694
715
|
FfiConverterString.lower(secretKey),$0)
|
@@ -699,7 +720,7 @@ public func publishHttps(recordName: String, target: String, secretKey: String)
|
|
699
720
|
public func put(url: String, content: String) -> [String] {
|
700
721
|
return try! FfiConverterSequenceString.lift(
|
701
722
|
try! rustCall() {
|
702
|
-
|
723
|
+
uniffi_pubkycore_fn_func_put(
|
703
724
|
FfiConverterString.lower(url),
|
704
725
|
FfiConverterString.lower(content),$0)
|
705
726
|
}
|
@@ -708,7 +729,7 @@ public func put(url: String, content: String) -> [String] {
|
|
708
729
|
|
709
730
|
public func removeEventListener() {
|
710
731
|
try! rustCall() {
|
711
|
-
|
732
|
+
uniffi_pubkycore_fn_func_remove_event_listener($0)
|
712
733
|
}
|
713
734
|
}
|
714
735
|
|
@@ -717,7 +738,7 @@ public func removeEventListener() {
|
|
717
738
|
public func resolve(publicKey: String) -> [String] {
|
718
739
|
return try! FfiConverterSequenceString.lift(
|
719
740
|
try! rustCall() {
|
720
|
-
|
741
|
+
uniffi_pubkycore_fn_func_resolve(
|
721
742
|
FfiConverterString.lower(publicKey),$0)
|
722
743
|
}
|
723
744
|
)
|
@@ -726,7 +747,7 @@ public func resolve(publicKey: String) -> [String] {
|
|
726
747
|
public func resolveHttps(publicKey: String) -> [String] {
|
727
748
|
return try! FfiConverterSequenceString.lift(
|
728
749
|
try! rustCall() {
|
729
|
-
|
750
|
+
uniffi_pubkycore_fn_func_resolve_https(
|
730
751
|
FfiConverterString.lower(publicKey),$0)
|
731
752
|
}
|
732
753
|
)
|
@@ -735,7 +756,7 @@ public func resolveHttps(publicKey: String) -> [String] {
|
|
735
756
|
public func session(pubky: String) -> [String] {
|
736
757
|
return try! FfiConverterSequenceString.lift(
|
737
758
|
try! rustCall() {
|
738
|
-
|
759
|
+
uniffi_pubkycore_fn_func_session(
|
739
760
|
FfiConverterString.lower(pubky),$0)
|
740
761
|
}
|
741
762
|
)
|
@@ -743,7 +764,7 @@ public func session(pubky: String) -> [String] {
|
|
743
764
|
|
744
765
|
public func setEventListener(listener: EventListener) {
|
745
766
|
try! rustCall() {
|
746
|
-
|
767
|
+
uniffi_pubkycore_fn_func_set_event_listener(
|
747
768
|
FfiConverterCallbackInterfaceEventListener.lower(listener),$0)
|
748
769
|
}
|
749
770
|
}
|
@@ -753,7 +774,7 @@ public func setEventListener(listener: EventListener) {
|
|
753
774
|
public func signIn(secretKey: String) -> [String] {
|
754
775
|
return try! FfiConverterSequenceString.lift(
|
755
776
|
try! rustCall() {
|
756
|
-
|
777
|
+
uniffi_pubkycore_fn_func_sign_in(
|
757
778
|
FfiConverterString.lower(secretKey),$0)
|
758
779
|
}
|
759
780
|
)
|
@@ -762,7 +783,7 @@ public func signIn(secretKey: String) -> [String] {
|
|
762
783
|
public func signOut(secretKey: String) -> [String] {
|
763
784
|
return try! FfiConverterSequenceString.lift(
|
764
785
|
try! rustCall() {
|
765
|
-
|
786
|
+
uniffi_pubkycore_fn_func_sign_out(
|
766
787
|
FfiConverterString.lower(secretKey),$0)
|
767
788
|
}
|
768
789
|
)
|
@@ -771,13 +792,22 @@ public func signOut(secretKey: String) -> [String] {
|
|
771
792
|
public func signUp(secretKey: String, homeserver: String) -> [String] {
|
772
793
|
return try! FfiConverterSequenceString.lift(
|
773
794
|
try! rustCall() {
|
774
|
-
|
795
|
+
uniffi_pubkycore_fn_func_sign_up(
|
775
796
|
FfiConverterString.lower(secretKey),
|
776
797
|
FfiConverterString.lower(homeserver),$0)
|
777
798
|
}
|
778
799
|
)
|
779
800
|
}
|
780
801
|
|
802
|
+
public func switchNetwork(useTestnet: Bool) -> [String] {
|
803
|
+
return try! FfiConverterSequenceString.lift(
|
804
|
+
try! rustCall() {
|
805
|
+
uniffi_pubkycore_fn_func_switch_network(
|
806
|
+
FfiConverterBool.lower(useTestnet),$0)
|
807
|
+
}
|
808
|
+
)
|
809
|
+
}
|
810
|
+
|
781
811
|
private enum InitializationResult {
|
782
812
|
case ok
|
783
813
|
case contractVersionMismatch
|
@@ -789,71 +819,74 @@ private var initializationResult: InitializationResult {
|
|
789
819
|
// Get the bindings contract version from our ComponentInterface
|
790
820
|
let bindings_contract_version = 24
|
791
821
|
// Get the scaffolding contract version by calling the into the dylib
|
792
|
-
let scaffolding_contract_version =
|
822
|
+
let scaffolding_contract_version = ffi_pubkycore_uniffi_contract_version()
|
793
823
|
if bindings_contract_version != scaffolding_contract_version {
|
794
824
|
return InitializationResult.contractVersionMismatch
|
795
825
|
}
|
796
|
-
if (
|
826
|
+
if (uniffi_pubkycore_checksum_func_auth() != 51826) {
|
827
|
+
return InitializationResult.apiChecksumMismatch
|
828
|
+
}
|
829
|
+
if (uniffi_pubkycore_checksum_func_create_recovery_file() != 48846) {
|
797
830
|
return InitializationResult.apiChecksumMismatch
|
798
831
|
}
|
799
|
-
if (
|
832
|
+
if (uniffi_pubkycore_checksum_func_decrypt_recovery_file() != 26407) {
|
800
833
|
return InitializationResult.apiChecksumMismatch
|
801
834
|
}
|
802
|
-
if (
|
835
|
+
if (uniffi_pubkycore_checksum_func_delete_file() != 9063) {
|
803
836
|
return InitializationResult.apiChecksumMismatch
|
804
837
|
}
|
805
|
-
if (
|
838
|
+
if (uniffi_pubkycore_checksum_func_generate_secret_key() != 12800) {
|
806
839
|
return InitializationResult.apiChecksumMismatch
|
807
840
|
}
|
808
|
-
if (
|
841
|
+
if (uniffi_pubkycore_checksum_func_get() != 6591) {
|
809
842
|
return InitializationResult.apiChecksumMismatch
|
810
843
|
}
|
811
|
-
if (
|
844
|
+
if (uniffi_pubkycore_checksum_func_get_public_key_from_secret_key() != 40316) {
|
812
845
|
return InitializationResult.apiChecksumMismatch
|
813
846
|
}
|
814
|
-
if (
|
847
|
+
if (uniffi_pubkycore_checksum_func_list() != 43198) {
|
815
848
|
return InitializationResult.apiChecksumMismatch
|
816
849
|
}
|
817
|
-
if (
|
850
|
+
if (uniffi_pubkycore_checksum_func_parse_auth_url() != 27379) {
|
818
851
|
return InitializationResult.apiChecksumMismatch
|
819
852
|
}
|
820
|
-
if (
|
853
|
+
if (uniffi_pubkycore_checksum_func_publish() != 48989) {
|
821
854
|
return InitializationResult.apiChecksumMismatch
|
822
855
|
}
|
823
|
-
if (
|
856
|
+
if (uniffi_pubkycore_checksum_func_publish_https() != 5614) {
|
824
857
|
return InitializationResult.apiChecksumMismatch
|
825
858
|
}
|
826
|
-
if (
|
859
|
+
if (uniffi_pubkycore_checksum_func_put() != 48150) {
|
827
860
|
return InitializationResult.apiChecksumMismatch
|
828
861
|
}
|
829
|
-
if (
|
862
|
+
if (uniffi_pubkycore_checksum_func_remove_event_listener() != 23534) {
|
830
863
|
return InitializationResult.apiChecksumMismatch
|
831
864
|
}
|
832
|
-
if (
|
865
|
+
if (uniffi_pubkycore_checksum_func_resolve() != 34317) {
|
833
866
|
return InitializationResult.apiChecksumMismatch
|
834
867
|
}
|
835
|
-
if (
|
868
|
+
if (uniffi_pubkycore_checksum_func_resolve_https() != 17266) {
|
836
869
|
return InitializationResult.apiChecksumMismatch
|
837
870
|
}
|
838
|
-
if (
|
871
|
+
if (uniffi_pubkycore_checksum_func_session() != 59795) {
|
839
872
|
return InitializationResult.apiChecksumMismatch
|
840
873
|
}
|
841
|
-
if (
|
874
|
+
if (uniffi_pubkycore_checksum_func_set_event_listener() != 60071) {
|
842
875
|
return InitializationResult.apiChecksumMismatch
|
843
876
|
}
|
844
|
-
if (
|
877
|
+
if (uniffi_pubkycore_checksum_func_sign_in() != 21584) {
|
845
878
|
return InitializationResult.apiChecksumMismatch
|
846
879
|
}
|
847
|
-
if (
|
880
|
+
if (uniffi_pubkycore_checksum_func_sign_out() != 34903) {
|
848
881
|
return InitializationResult.apiChecksumMismatch
|
849
882
|
}
|
850
|
-
if (
|
883
|
+
if (uniffi_pubkycore_checksum_func_sign_up() != 37999) {
|
851
884
|
return InitializationResult.apiChecksumMismatch
|
852
885
|
}
|
853
|
-
if (
|
886
|
+
if (uniffi_pubkycore_checksum_func_switch_network() != 64215) {
|
854
887
|
return InitializationResult.apiChecksumMismatch
|
855
888
|
}
|
856
|
-
if (
|
889
|
+
if (uniffi_pubkycore_checksum_method_eventlistener_on_event_occurred() != 11531) {
|
857
890
|
return InitializationResult.apiChecksumMismatch
|
858
891
|
}
|
859
892
|
|
@@ -2,18 +2,18 @@ import { type Result } from '@synonymdev/result';
|
|
2
2
|
export declare function setEventListener(callback: (eventData: string) => void): Promise<Result<void>>;
|
3
3
|
export declare function removeEventListener(): Promise<Result<void>>;
|
4
4
|
export declare function auth(url: string, secretKey: string): Promise<Result<string[]>>;
|
5
|
-
type Capability = {
|
5
|
+
export type Capability = {
|
6
6
|
path: string;
|
7
7
|
permission: string;
|
8
8
|
};
|
9
|
-
type PubkyAuthDetails = {
|
9
|
+
export type PubkyAuthDetails = {
|
10
10
|
relay: string;
|
11
11
|
capabilities: Capability[];
|
12
12
|
secret: string;
|
13
13
|
};
|
14
14
|
export declare function parseAuthUrl(url: string): Promise<Result<PubkyAuthDetails>>;
|
15
15
|
export declare function publish(recordName: string, recordContent: string, secretKey: string): Promise<Result<string[]>>;
|
16
|
-
interface ITxt {
|
16
|
+
export interface ITxt {
|
17
17
|
cache_flush: boolean;
|
18
18
|
class: string;
|
19
19
|
name: string;
|
@@ -23,7 +23,7 @@ interface ITxt {
|
|
23
23
|
};
|
24
24
|
ttl: number;
|
25
25
|
}
|
26
|
-
interface IDNSPacket {
|
26
|
+
export interface IDNSPacket {
|
27
27
|
signed_packet: string;
|
28
28
|
public_key: string;
|
29
29
|
signature: string;
|
@@ -39,7 +39,7 @@ export declare function signOut(secretKey: string): Promise<Result<string[]>>;
|
|
39
39
|
export declare function get(url: string): Promise<Result<string[]>>;
|
40
40
|
export declare function put(url: string, content: Object): Promise<Result<string[]>>;
|
41
41
|
export declare function publishHttps(recordName: string, target: string, secretKey: string): Promise<Result<string[]>>;
|
42
|
-
interface IHttpsRecord {
|
42
|
+
export interface IHttpsRecord {
|
43
43
|
name: string;
|
44
44
|
class: string;
|
45
45
|
ttl: number;
|
@@ -48,28 +48,27 @@ interface IHttpsRecord {
|
|
48
48
|
port?: number;
|
49
49
|
alpn?: string[];
|
50
50
|
}
|
51
|
-
interface IHttpsResolveResult {
|
51
|
+
export interface IHttpsResolveResult {
|
52
52
|
public_key: string;
|
53
53
|
https_records: IHttpsRecord[];
|
54
54
|
}
|
55
55
|
export declare function resolveHttps(publicKey: string): Promise<Result<IHttpsResolveResult>>;
|
56
56
|
export declare function list(url: string): Promise<Result<string[]>>;
|
57
57
|
export declare function deleteFile(url: string): Promise<Result<string[]>>;
|
58
|
-
interface SessionInfo {
|
58
|
+
export interface SessionInfo {
|
59
59
|
pubky: string;
|
60
60
|
capabilities: string[];
|
61
61
|
}
|
62
62
|
export declare function session(pubky: string): Promise<Result<SessionInfo>>;
|
63
|
-
interface IPublicKeyInfo {
|
63
|
+
export interface IPublicKeyInfo {
|
64
64
|
public_key: string;
|
65
65
|
uri: string;
|
66
66
|
}
|
67
|
-
interface IGenerateSecretKey extends IPublicKeyInfo {
|
67
|
+
export interface IGenerateSecretKey extends IPublicKeyInfo {
|
68
68
|
secret_key: string;
|
69
69
|
}
|
70
70
|
export declare function generateSecretKey(): Promise<Result<IGenerateSecretKey>>;
|
71
71
|
export declare function getPublicKeyFromSecretKey(secretKey: string): Promise<Result<IPublicKeyInfo>>;
|
72
72
|
export declare function createRecoveryFile(secretKey: string, passphrase: string): Promise<Result<string>>;
|
73
73
|
export declare function decryptRecoveryFile(recoveryFile: string, passphrase: string): Promise<Result<string>>;
|
74
|
-
export {};
|
75
74
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAqB1D,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GACpC,OAAO,CAAC,MAAM,CA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AAC,CAAC,CAUjC;AAED,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAUzB;AAED,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAUzB"}
|
@@ -2,18 +2,18 @@ import { type Result } from '@synonymdev/result';
|
|
2
2
|
export declare function setEventListener(callback: (eventData: string) => void): Promise<Result<void>>;
|
3
3
|
export declare function removeEventListener(): Promise<Result<void>>;
|
4
4
|
export declare function auth(url: string, secretKey: string): Promise<Result<string[]>>;
|
5
|
-
type Capability = {
|
5
|
+
export type Capability = {
|
6
6
|
path: string;
|
7
7
|
permission: string;
|
8
8
|
};
|
9
|
-
type PubkyAuthDetails = {
|
9
|
+
export type PubkyAuthDetails = {
|
10
10
|
relay: string;
|
11
11
|
capabilities: Capability[];
|
12
12
|
secret: string;
|
13
13
|
};
|
14
14
|
export declare function parseAuthUrl(url: string): Promise<Result<PubkyAuthDetails>>;
|
15
15
|
export declare function publish(recordName: string, recordContent: string, secretKey: string): Promise<Result<string[]>>;
|
16
|
-
interface ITxt {
|
16
|
+
export interface ITxt {
|
17
17
|
cache_flush: boolean;
|
18
18
|
class: string;
|
19
19
|
name: string;
|
@@ -23,7 +23,7 @@ interface ITxt {
|
|
23
23
|
};
|
24
24
|
ttl: number;
|
25
25
|
}
|
26
|
-
interface IDNSPacket {
|
26
|
+
export interface IDNSPacket {
|
27
27
|
signed_packet: string;
|
28
28
|
public_key: string;
|
29
29
|
signature: string;
|
@@ -39,7 +39,7 @@ export declare function signOut(secretKey: string): Promise<Result<string[]>>;
|
|
39
39
|
export declare function get(url: string): Promise<Result<string[]>>;
|
40
40
|
export declare function put(url: string, content: Object): Promise<Result<string[]>>;
|
41
41
|
export declare function publishHttps(recordName: string, target: string, secretKey: string): Promise<Result<string[]>>;
|
42
|
-
interface IHttpsRecord {
|
42
|
+
export interface IHttpsRecord {
|
43
43
|
name: string;
|
44
44
|
class: string;
|
45
45
|
ttl: number;
|
@@ -48,28 +48,27 @@ interface IHttpsRecord {
|
|
48
48
|
port?: number;
|
49
49
|
alpn?: string[];
|
50
50
|
}
|
51
|
-
interface IHttpsResolveResult {
|
51
|
+
export interface IHttpsResolveResult {
|
52
52
|
public_key: string;
|
53
53
|
https_records: IHttpsRecord[];
|
54
54
|
}
|
55
55
|
export declare function resolveHttps(publicKey: string): Promise<Result<IHttpsResolveResult>>;
|
56
56
|
export declare function list(url: string): Promise<Result<string[]>>;
|
57
57
|
export declare function deleteFile(url: string): Promise<Result<string[]>>;
|
58
|
-
interface SessionInfo {
|
58
|
+
export interface SessionInfo {
|
59
59
|
pubky: string;
|
60
60
|
capabilities: string[];
|
61
61
|
}
|
62
62
|
export declare function session(pubky: string): Promise<Result<SessionInfo>>;
|
63
|
-
interface IPublicKeyInfo {
|
63
|
+
export interface IPublicKeyInfo {
|
64
64
|
public_key: string;
|
65
65
|
uri: string;
|
66
66
|
}
|
67
|
-
interface IGenerateSecretKey extends IPublicKeyInfo {
|
67
|
+
export interface IGenerateSecretKey extends IPublicKeyInfo {
|
68
68
|
secret_key: string;
|
69
69
|
}
|
70
70
|
export declare function generateSecretKey(): Promise<Result<IGenerateSecretKey>>;
|
71
71
|
export declare function getPublicKeyFromSecretKey(secretKey: string): Promise<Result<IPublicKeyInfo>>;
|
72
72
|
export declare function createRecoveryFile(secretKey: string, passphrase: string): Promise<Result<string>>;
|
73
73
|
export declare function decryptRecoveryFile(recoveryFile: string, passphrase: string): Promise<Result<string>>;
|
74
|
-
export {};
|
75
74
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,oBAAoB,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,kBAAkB,CAAC,CAAC,CAU7E;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAUjC;AAED,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAUzB;AAED,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAUzB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@synonymdev/react-native-pubky",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.1",
|
4
4
|
"description": "React Native Implementation of Pubky",
|
5
5
|
"source": "./src/index.tsx",
|
6
6
|
"main": "./lib/commonjs/index.js",
|
@@ -46,11 +46,15 @@
|
|
46
46
|
"example:ios": "cd example && cd ios && rm -rf Pods && cd ../ && npm i && bundle install && npm run build:ios && npm run ios",
|
47
47
|
"example:android": "cd example && npm i && npm run build:android && npm run android",
|
48
48
|
"reinstall": "yarn install && npm run clean && npm run prepare",
|
49
|
-
"cargo-build": "cd rust && cargo build && cd pubky && cargo build && cd pubky && cargo build && cd ../ && cd pubky-common && cargo build && cd ../ && cd pubky-homeserver && cargo build && cd ../../../",
|
50
|
-
"update-bindings:ios": "npm run cargo-build && node setup-ios-bindings.js && npm run reinstall",
|
51
|
-
"update-bindings:android": "npm run cargo-build && node setup-android-bindings.js && npm run reinstall",
|
52
|
-
"update-bindings": "npm run reinstall && npm run cargo-build && npm run update-bindings:ios && npm run update-bindings:android",
|
53
|
-
"rebuild": "rm -rf node_modules && cd example && rm -rf node_modules && cd ios && rm -rf Pods Podfile.lock build && cd ../../ && npm run cargo-build && yarn install && npm run update-bindings && cd example && yarn install && bundle install && cd ios && pod install && cd ../ && yarn build:ios && yarn ios"
|
49
|
+
"cargo-build": "yarn install && node setup-rust.js && cd rust && cargo build && cd pubky && cargo build && cd pubky && cargo build && cd ../ && cd pubky-common && cargo build && cd ../ && cd pubky-homeserver && cargo build && cd ../../../",
|
50
|
+
"update-local-bindings:ios": "npm run cargo-build && cd rust && ./build.sh ios && cd ../ && node setup-local-ios-bindings.js && npm run reinstall",
|
51
|
+
"update-local-bindings:android": "npm run cargo-build && cd rust && ./build.sh android && cd ../ && node setup-local-android-bindings.js && npm run reinstall",
|
52
|
+
"update-local-bindings": "npm run reinstall && npm run cargo-build && npm run update-local-bindings:ios && npm run update-local-bindings:android",
|
53
|
+
"rebuild-local": "rm -rf node_modules && cd example && rm -rf node_modules && cd ios && rm -rf Pods Podfile.lock build && cd ../../ && npm run cargo-build && yarn install && npm run update-local-bindings && cd example && yarn install && bundle install && cd ios && pod install && cd ../ && yarn build:ios && yarn ios",
|
54
|
+
"update-remote-bindings:ios": "npm run reinstall && node setup-remote-ios-bindings.js && npm run reinstall",
|
55
|
+
"update-remote-bindings:android": "npm run reinstall && node setup-remote-android-bindings.js && npm run reinstall",
|
56
|
+
"update-remote-bindings": "npm run reinstall && npm run update-remote-bindings:ios && npm run update-remote-bindings:android",
|
57
|
+
"rebuild-remote": "rm -rf node_modules && cd example && rm -rf node_modules && cd ios && rm -rf Pods Podfile.lock build && cd ../../ && yarn install && npm run update-remote-bindings && cd example && yarn install && bundle install && cd ios && pod install && cd ../ && yarn build:ios && yarn ios"
|
54
58
|
},
|
55
59
|
"keywords": [
|
56
60
|
"pubky",
|
@@ -69,7 +73,7 @@
|
|
69
73
|
},
|
70
74
|
"homepage": "https://github.com/pubky/react-native-pubky#readme",
|
71
75
|
"publishConfig": {
|
72
|
-
"access": "
|
76
|
+
"access": "public",
|
73
77
|
"registry": "https://registry.npmjs.org/"
|
74
78
|
},
|
75
79
|
"dependencies": {
|
@@ -93,6 +97,7 @@
|
|
93
97
|
"react-native": "0.75.3",
|
94
98
|
"react-native-builder-bob": "^0.30.2",
|
95
99
|
"release-it": "^15.0.0",
|
100
|
+
"simple-git": "^3.27.0",
|
96
101
|
"turbo": "^1.10.7",
|
97
102
|
"typescript": "^5.2.2"
|
98
103
|
},
|
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
|
|
19
19
|
|
20
20
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
21
21
|
s.ios.source_files = "ios/**/*.{h,m,mm,swift}"
|
22
|
-
s.ios.vendored_frameworks = "ios/Frameworks/
|
22
|
+
s.ios.vendored_frameworks = "ios/Frameworks/PubkyCore.xcframework"
|
23
23
|
|
24
24
|
s.pod_target_xcconfig = {
|
25
25
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" => "x86_64"
|