-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,553 additions
and
171 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,2 +1,3 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=caip/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=reown/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
15 changes: 15 additions & 0 deletions
15
src/Reown.Core.Common/Runtime/Utils/LowerCaseNamingStrategy.cs
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Reown.Core.Common.Utils | ||
{ | ||
/// <summary> | ||
/// Newtonsoft.Json naming strategy that converts property names to lower case | ||
/// </summary> | ||
public class LowerCaseNamingStrategy : NamingStrategy | ||
{ | ||
protected override string ResolvePropertyName(string name) | ||
{ | ||
return name.ToLowerInvariant(); | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Reown.Sign.Constants | ||
{ | ||
public static class AuthConstants | ||
{ | ||
public const string AuthProtocol = "wc"; | ||
public const double AuthVersion = 1.5; | ||
public const string AuthContext = "auth"; | ||
public const string AuthKeysContext = "authKeys"; | ||
public const string AuthPairingTopicContext = "pairingTopics"; | ||
public const string AuthPendingRequestContext = "requests"; | ||
|
||
public static readonly string AuthStoragePrefix = $"{AuthProtocol}@{AuthVersion}:{AuthContext}:"; | ||
public static readonly string AuthPublicKeyName = $"{AuthStoragePrefix}:PUB_KEY"; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Threading.Tasks; | ||
using Reown.Core.Interfaces; | ||
using Reown.Sign.Interfaces; | ||
using Reown.Sign.Models; | ||
|
||
namespace Reown.Sign.Controllers | ||
{ | ||
public class Auth : IAuth | ||
{ | ||
public Auth(ICoreClient coreClient) | ||
{ | ||
Keys = new AuthKeyStore(coreClient); | ||
Pairings = new AuthPairingTopics(coreClient); | ||
PendingRequests = new AuthPendingRequests(coreClient); | ||
} | ||
|
||
public Task Init() | ||
{ | ||
return Task.WhenAll( | ||
Keys.Init(), | ||
Pairings.Init(), | ||
PendingRequests.Init() | ||
); | ||
} | ||
|
||
public IStore<string, AuthKey> Keys { get; } | ||
public IStore<string, AuthPairing> Pairings { get; } | ||
public IStore<long, AuthPendingRequest> PendingRequests { get; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Reown.Core.Controllers; | ||
using Reown.Core.Interfaces; | ||
using Reown.Sign.Constants; | ||
using Reown.Sign.Models; | ||
|
||
namespace Reown.Sign.Controllers | ||
{ | ||
public class AuthKeyStore : Store<string, AuthKey> | ||
{ | ||
public AuthKeyStore(ICoreClient coreClient) : base(coreClient, AuthConstants.AuthKeysContext, AuthConstants.AuthStoragePrefix) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Reown.Core.Controllers; | ||
using Reown.Core.Interfaces; | ||
using Reown.Sign.Constants; | ||
using Reown.Sign.Models; | ||
|
||
namespace Reown.Sign.Controllers | ||
{ | ||
public class AuthPairingTopics : Store<string, AuthPairing> | ||
{ | ||
public AuthPairingTopics(ICoreClient coreClient) : base(coreClient, AuthConstants.AuthPairingTopicContext, AuthConstants.AuthStoragePrefix) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Reown.Core.Controllers; | ||
using Reown.Core.Interfaces; | ||
using Reown.Sign.Constants; | ||
using Reown.Sign.Models; | ||
|
||
namespace Reown.Sign.Controllers | ||
{ | ||
public class AuthPendingRequests : Store<long, AuthPendingRequest> | ||
{ | ||
public AuthPendingRequests(ICoreClient coreClient) : base(coreClient, AuthConstants.AuthPendingRequestContext, AuthConstants.AuthStoragePrefix) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.