From 6c532b465a84b853b3d9196331901fe9ff74fb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Gr=C3=BCning?= Date: Thu, 18 Dec 2025 06:40:16 +0100 Subject: [PATCH 1/3] added function to get ecosystem config --- .../UnitTests/AuthenticationTests.cs | 12 ++++++++++++ .../Authentication/Requests/EcosystemConfig.cs | 18 ++++++++++++++++++ .../Requests/EcosystemConfig.cs.meta | 3 +++ .../Authentication/SequenceConnect.cs | 9 +++++++++ .../SequenceSDK/Utils/Networking/HttpClient.cs | 2 ++ 5 files changed, 44 insertions(+) create mode 100644 Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs create mode 100644 Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs.meta 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..db248971 --- /dev/null +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs @@ -0,0 +1,18 @@ +namespace Sequence.EcosystemWallet +{ + public enum EcosystemAuthProvider + { + Email, + Google, + Apple, + Passkey, + Mnemonic, + Unknown + } + + public struct EcosystemConfig + { + public string name; + 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 { From ce1f45e57f0dbb6c6b240361d3f86589c54514e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Gr=C3=BCning?= Date: Thu, 18 Dec 2025 06:41:50 +0100 Subject: [PATCH 2/3] added more values to the ecosystem config --- .../Authentication/Requests/EcosystemConfig.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs index db248971..0795b466 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/EcosystemWallet/Authentication/Requests/EcosystemConfig.cs @@ -1,3 +1,5 @@ +using System.Numerics; + namespace Sequence.EcosystemWallet { public enum EcosystemAuthProvider @@ -13,6 +15,9 @@ public enum EcosystemAuthProvider public struct EcosystemConfig { public string name; + public string description; + public string url; + public BigInteger[] supportedChains; public EcosystemAuthProvider[] enabledProviders; } } \ No newline at end of file From 253819c09f940ad79c184d1c16b118bbf03edb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Gr=C3=BCning?= Date: Thu, 18 Dec 2025 06:42:15 +0100 Subject: [PATCH 3/3] version bump --- Packages/Sequence-Unity/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/Sequence-Unity/package.json b/Packages/Sequence-Unity/package.json index 72d3e1a4..1679a959 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 Embedded Wallet SDK", "description": "A Unity SDK for Sequence APIs", "unity": "2021.3",