-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from WalletConnect/chore/pairing-topic-in-con…
…necteddata chore: include pairing topic in ConnectedData and connection optimisation
- Loading branch information
Showing
3 changed files
with
76 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
using System.Threading.Tasks; | ||
namespace WalletConnectSharp.Sign.Models.Engine; | ||
|
||
namespace WalletConnectSharp.Sign.Models.Engine | ||
/// <summary> | ||
/// A class that representing a pending session proposal. Includes a URI that can be given to a | ||
/// wallet app out-of-band and an Approval Task that can be awaited. | ||
/// </summary> | ||
public class ConnectedData(string uri, string pairingTopic, Task<SessionStruct> approval) | ||
{ | ||
/// <summary> | ||
/// A class that representing a pending session proposal. Includes a URI that can be given to a | ||
/// wallet app out-of-band and an Approval Task that can be awaited. | ||
/// The URI that can be used to retrieve the submitted session proposal. This should be shared | ||
/// SECURELY out-of-band to a wallet supporting the SDK. | ||
/// </summary> | ||
public class ConnectedData | ||
{ | ||
/// <summary> | ||
/// The URI that can be used to retrieve the submitted session proposal. This should be shared | ||
/// SECURELY out-of-band to a wallet supporting the SDK | ||
/// </summary> | ||
public string Uri; | ||
public string Uri { get; private set; } = uri; | ||
|
||
/// <summary> | ||
/// A task that will resolve to an approved session. If the session proposal is rejected, then this | ||
/// task will throw an exception. | ||
/// </summary> | ||
public Task<SessionStruct> Approval; | ||
} | ||
/// <summary> | ||
/// Pairing is a topic encrypted by a symmetric key shared through a URI between two clients with | ||
/// the sole purpose of communicating session proposals. | ||
/// </summary> | ||
public string PairingTopic { get; private set; } = pairingTopic; | ||
|
||
/// <summary> | ||
/// A task that will resolve to an approved session. If the session proposal is rejected, then this | ||
/// task will throw an exception. | ||
/// </summary> | ||
public Task<SessionStruct> Approval { get; private set; } = approval; | ||
} |