Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Update Nostr Swift bindings to version 0.32.1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 7, 2024
1 parent e4434e9 commit 0f940d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
],
dependencies: [],
targets: [
.binaryTarget(name: "nostrFFI", url: "https://github.com/rust-nostr/nostr-swift/releases/download/0.32.0/nostrFFI.xcframework.zip", checksum: "75f9849a6771e488557ed280c221374fe785853e494d42ce323238e8845c0375"),
.binaryTarget(name: "nostrFFI", url: "https://github.com/rust-nostr/nostr-swift/releases/download/0.32.1/nostrFFI.xcframework.zip", checksum: "440c9bb42ef42f6f73bc8c4131917cd48de424d000a43c196aba9c1a3e29f43a"),
.target(name: "Nostr", dependencies: ["nostrFFI"]),
]
)
35 changes: 17 additions & 18 deletions Sources/Nostr/Nostr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6546,21 +6546,6 @@ public convenience init() {
}


public static func get(url: String, proxy: String? = nil)async throws -> RelayInformationDocument {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_nostr_ffi_fn_constructor_relayinformationdocument_get(FfiConverterString.lower(url),FfiConverterOptionString.lower(proxy)
)
},
pollFunc: ffi_nostr_ffi_rust_future_poll_pointer,
completeFunc: ffi_nostr_ffi_rust_future_complete_pointer,
freeFunc: ffi_nostr_ffi_rust_future_free_pointer,
liftFunc: FfiConverterTypeRelayInformationDocument.lift,
errorHandler: FfiConverterTypeNostrError.lift
)
}



open func contact() -> String? {
Expand Down Expand Up @@ -18720,6 +18705,20 @@ public func nip04Encrypt(secretKey: SecretKey, publicKey: PublicKey, content: St
)
})
}
public func nip11GetInformationDocument(url: String, proxy: String? = nil)async throws -> RelayInformationDocument {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_nostr_ffi_fn_func_nip11_get_information_document(FfiConverterString.lower(url),FfiConverterOptionString.lower(proxy)
)
},
pollFunc: ffi_nostr_ffi_rust_future_poll_pointer,
completeFunc: ffi_nostr_ffi_rust_future_complete_pointer,
freeFunc: ffi_nostr_ffi_rust_future_free_pointer,
liftFunc: FfiConverterTypeRelayInformationDocument.lift,
errorHandler: FfiConverterTypeNostrError.lift
)
}
public func nip44Decrypt(secretKey: SecretKey, publicKey: PublicKey, payload: String)throws -> String {
return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeNostrError.lift) {
uniffi_nostr_ffi_fn_func_nip44_decrypt(
Expand Down Expand Up @@ -18865,6 +18864,9 @@ private var initializationResult: InitializationResult {
if (uniffi_nostr_ffi_checksum_func_nip04_encrypt() != 24648) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_nostr_ffi_checksum_func_nip11_get_information_document() != 42127) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_nostr_ffi_checksum_func_nip44_decrypt() != 37647) {
return InitializationResult.apiChecksumMismatch
}
Expand Down Expand Up @@ -19864,9 +19866,6 @@ private var initializationResult: InitializationResult {
if (uniffi_nostr_ffi_checksum_constructor_rawevent_from_record() != 51955) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_nostr_ffi_checksum_constructor_relayinformationdocument_get() != 5909) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_nostr_ffi_checksum_constructor_relayinformationdocument_new() != 46265) {
return InitializationResult.apiChecksumMismatch
}
Expand Down

0 comments on commit 0f940d4

Please sign in to comment.