Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay Requests Encoding and Tests #17

Merged
merged 6 commits into from
May 28, 2023
Merged

Relay Requests Encoding and Tests #17

merged 6 commits into from
May 28, 2023

Conversation

joelklabo
Copy link
Collaborator

@joelklabo joelklabo commented May 26, 2023

#15

@joelklabo joelklabo changed the title Relay Requests Encoding and Tests [WIP] Relay Requests Encoding and Tests May 26, 2023
@joelklabo joelklabo force-pushed the joel/relay-requests branch 2 times, most recently from 8491c97 to be1221e Compare May 26, 2023 20:04
@joelklabo joelklabo changed the title [WIP] Relay Requests Encoding and Tests Relay Requests Encoding and Tests May 26, 2023
Sources/NostrSDK/EventTag.swift Outdated Show resolved Hide resolved
Sources/NostrSDK/EventTag.swift Outdated Show resolved Hide resolved
Sources/NostrSDK/Filter.swift Outdated Show resolved Hide resolved
Sources/NostrSDK/RelayRequest.swift Outdated Show resolved Hide resolved
Tests/NostrSDKTests/Helpers/JSONEquality.swift Outdated Show resolved Hide resolved
Tests/NostrSDKTests/RelayRequestEncodingTests.swift Outdated Show resolved Hide resolved
Tests/NostrSDKTests/RelayRequestEncodingTests.swift Outdated Show resolved Hide resolved

import Foundation

struct Filter {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping that we might be able to have this raw filter private to the library, and expose a filter type to the client app that uses native types, such as a NostrKind enum for the kinds part of the filter and Keypair types for the pubkeys. It could be converted the raw type when making requests, but that can come later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think we should for this right now? I think when we start setting up the public API we should definitely do that but not sure if we need to now. What do you think?

@bryanmontz bryanmontz merged commit f5186b4 into main May 28, 2023
@bryanmontz bryanmontz deleted the joel/relay-requests branch May 28, 2023 11:31
RandyMcMillan pushed a commit to RandyMcMillan/nostr-sdk-ios that referenced this pull request Sep 1, 2024
* Implement RelayRequest with Tests

* remove self. and use new if let syntax

* remove unnecessary codable implementation

* use full request for name

* use XCTUnwrap

* test JSON equality protocol extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants