cs-codex-dist-tests/Tools/KeyMaker/Controllers/KeyController.cs

24 lines
560 B
C#

using GethPlugin;
using Microsoft.AspNetCore.Mvc;
namespace KeyMaker.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class KeyController : ControllerBase
{
[HttpGet]
public KeyResponse Get()
{
var account = EthAccount.GenerateNew();
return new KeyResponse
{
Public = account.EthAddress.Address,
Private = account.PrivateKey,
Secure = "Not Secure! For demo/development purposes only!"
};
}
}
}