Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Sequence.EcosystemWallet.Primitives;
using Sequence.EcosystemWallet.Primitives.Common;
using Sequence.Utils;
using UnityEngine;

namespace Sequence.EcosystemWallet.UnitTests
{
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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<EcosystemConfig> GetEcosystemConfig()
{
var walletUrl= SequenceConfig.GetConfig().WalletAppUrl;
var client = new HttpClient(walletUrl);
return await client.SendGetRequest<EcosystemConfig>("api/wallet-configuration");
}

public async Task<IWallet> SignInWithEmail(string email, IPermissions permissions)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public async Task<TResponse> SendGetRequest<TResponse>(string path, Dictionary<s
var request = UnityWebRequest.Get(url);
request.method = UnityWebRequest.kHttpVerbGET;
SetHeaders(request, headers);

SequenceLog.Info($">> {url}");

try
{
Expand Down
2 changes: 1 addition & 1 deletion Packages/Sequence-Unity/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down