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

24 lines
560 B
C#
Raw Permalink Normal View History

2024-06-19 12:04:27 +00:00
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!"
};
}
}
}