diff --git a/Assets/SequenceSDK/EcosystemWallet/UnitTests/AuthenticationTests.cs b/Assets/SequenceSDK/EcosystemWallet/UnitTests/AuthenticationTests.cs index 5548cbaa..59fe4bbf 100644 --- a/Assets/SequenceSDK/EcosystemWallet/UnitTests/AuthenticationTests.cs +++ b/Assets/SequenceSDK/EcosystemWallet/UnitTests/AuthenticationTests.cs @@ -5,6 +5,7 @@ using Sequence.EcosystemWallet.Primitives; using Sequence.EcosystemWallet.Primitives.Common; using Sequence.Utils; +using UnityEngine; namespace Sequence.EcosystemWallet.UnitTests { @@ -18,6 +19,17 @@ public void Disconnect() SequenceWallet.RecoverFromStorage().Disconnect(); } + [Test] + public async Task TestGetEcosystemConfig() + { + var config = await new SequenceConnect().GetEcosystemConfig(); + + Debug.Log($"Ecosystem Name: {config.name}"); + + foreach (var provider in config.enabledProviders) + Debug.Log($"Provider: {provider}"); + } + [Test] public async Task CreateSessionForExplicitEmit() { diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs new file mode 100644 index 00000000..0795b466 --- /dev/null +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs @@ -0,0 +1,23 @@ +using System.Numerics; + +namespace Sequence.EcosystemWallet +{ + public enum EcosystemAuthProvider + { + Email, + Google, + Apple, + Passkey, + Mnemonic, + Unknown + } + + public struct EcosystemConfig + { + public string name; + public string description; + public string url; + public BigInteger[] supportedChains; + public EcosystemAuthProvider[] enabledProviders; + } +} \ No newline at end of file diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs.meta b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs.meta new file mode 100644 index 00000000..1347dc8b --- /dev/null +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4b462618f8b34a03987b73d4b52a5d76 +timeCreated: 1766035506 \ No newline at end of file diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/SequenceConnect.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/SequenceConnect.cs index 895757e2..290f236b 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/SequenceConnect.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/SequenceConnect.cs @@ -1,10 +1,19 @@ using System.Threading.Tasks; +using Sequence.Config; +using Sequence.Utils; namespace Sequence.EcosystemWallet { public class SequenceConnect : IConnect { private readonly EcosystemClient _client = new(); + + public async Task GetEcosystemConfig() + { + var walletUrl= SequenceConfig.GetConfig().WalletAppUrl; + var client = new HttpClient(walletUrl); + return await client.SendGetRequest("api/wallet-configuration"); + } public async Task SignInWithEmail(string email, IPermissions permissions) { diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/Networking/HttpClient.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/Networking/HttpClient.cs index b26e8be2..de11ce53 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/Networking/HttpClient.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/Networking/HttpClient.cs @@ -118,6 +118,8 @@ public async Task SendGetRequest(string path, Dictionary> {url}"); try { diff --git a/Packages/Sequence-Unity/package.json b/Packages/Sequence-Unity/package.json index 0bd8e795..fece17ca 100644 --- a/Packages/Sequence-Unity/package.json +++ b/Packages/Sequence-Unity/package.json @@ -1,6 +1,6 @@ { "name": "xyz.0xsequence.waas-unity", - "version": "5.0.7", + "version": "5.0.8", "displayName": "Sequence SDK", "description": "A Unity SDK for Sequence APIs", "unity": "2021.3",