enables marketplace access for codex node used in autoclient

This commit is contained in:
ThatBen 2025-02-22 14:41:05 +01:00
parent 92a5a1e361
commit 804423ec81
No known key found for this signature in database
GPG Key ID: 62C543548433D43E
2 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ namespace CodexClient
public EthAccount? EthAccount { get; }
public Address? MetricsEndpoint { get; }
public static ICodexInstance CreateFromApiEndpoint(string name, Address apiEndpoint)
public static ICodexInstance CreateFromApiEndpoint(string name, Address apiEndpoint, EthAccount? ethAccount = null)
{
return new CodexInstance(
name,
@ -46,7 +46,7 @@ namespace CodexClient
discoveryEndpoint: Address.Empty(),
apiEndpoint: apiEndpoint,
listenEndpoint: Address.Empty(),
ethAccount: null,
ethAccount: ethAccount,
metricsEndpoint: null
);
}

View File

@ -3,6 +3,7 @@ using AutoClient;
using AutoClient.Modes;
using AutoClient.Modes.FolderStore;
using CodexClient;
using GethPlugin;
using Utils;
public class Program
@ -100,7 +101,7 @@ public class Program
port: port
);
var instance = CodexInstance.CreateFromApiEndpoint("ac", address);
var instance = CodexInstance.CreateFromApiEndpoint("ac", address, EthAccountGenerator.GenerateNew());
var node = app.CodexNodeFactory.CreateCodexNode(instance);
return new CodexWrapper(app, node);
}