Skip to content

Commit

Permalink
Update Nostr SDK 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 dde66c9 commit d0b8fc0
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: "nostr_sdkFFI", url: "https://github.com/rust-nostr/nostr-sdk-swift/releases/download/0.32.0/nostr_sdkFFI.xcframework.zip", checksum: "15da569c03b6b6bee25d46ebaddccf820060c22379e710cde63447b9b0eb2e26"),
.binaryTarget(name: "nostr_sdkFFI", url: "https://github.com/rust-nostr/nostr-sdk-swift/releases/download/0.32.1/nostr_sdkFFI.xcframework.zip", checksum: "666800bd59dd1a61991a3bd636bbb4b9f336206e6ee595d633b43918aa8167bd"),
.target(name: "NostrSDK", dependencies: ["nostr_sdkFFI"]),
]
)
35 changes: 17 additions & 18 deletions Sources/NostrSDK/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 d0b8fc0

Please sign in to comment.