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

Make WalletConnectURI public #53

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Sources/WalletConnect/Types/WalletConnectURI.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Foundation

struct WalletConnectURI: Equatable {
public struct WalletConnectURI: Equatable {

let topic: String
let version: String
let publicKey: String
let isController: Bool
public let topic: String
public let version: String
public let publicKey: String
public let isController: Bool
let relay: RelayProtocolOptions

init(topic: String, publicKey: String, isController: Bool, relay: RelayProtocolOptions) {
Expand All @@ -16,7 +16,7 @@ struct WalletConnectURI: Equatable {
self.relay = relay
}

init?(string: String) {
public init?(string: String) {
guard string.hasPrefix("wc:") else {
return nil
}
Expand All @@ -41,7 +41,7 @@ struct WalletConnectURI: Equatable {
self.relay = relay
}

var absoluteString: String {
public var absoluteString: String {
return "wc:\(topic)@\(version)?controller=\(isController)&publicKey=\(publicKey)&relay=\(relay.asPercentEncodedString())"
}
}
4 changes: 2 additions & 2 deletions Sources/WalletConnect/WalletConnectClientDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public protocol WalletConnectClientDelegate: AnyObject {
/// Function is executed on controller and non-controller client when both communicating peers have successfully upgraded permissions.
func didUpgrade(sessionTopic: String, permissions: Session.Permissions)

/// Tells the delegate that extra eccounts has been included in session sequence
/// Tells the delegate that extra accounts has been included in session sequence
///
/// Function is executed on controller and non-controller client when both communicating peers have successfully included new accounts requested by the controller client.
func didUpdate(sessionTopic: String, accounts: Set<String>)
Expand All @@ -41,7 +41,7 @@ public protocol WalletConnectClientDelegate: AnyObject {
/// Function is executed on proposer and responder client when both communicating peers have successfully established a pairing.
func didSettle(pairing: Pairing)

/// Tells the delegate that sotification has been received.
/// Tells the delegate that notification has been received.
func didReceive(notification: Session.Notification, sessionTopic : String)

/// Tells the delegate that peer client has rejected a session proposal.
Expand Down