2025-01-16 13:51:29 +01:00
|
|
|
using GethPlugin;
|
2024-06-19 14:04:27 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace KeyMaker.Controllers
|
|
|
|
|
{
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
[ApiController]
|
|
|
|
|
public class KeyController : ControllerBase
|
|
|
|
|
{
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public KeyResponse Get()
|
|
|
|
|
{
|
2025-01-16 13:51:29 +01:00
|
|
|
var account = EthAccountGenerator.GenerateNew();
|
2024-06-19 14:04:27 +02:00
|
|
|
|
|
|
|
|
return new KeyResponse
|
|
|
|
|
{
|
|
|
|
|
Public = account.EthAddress.Address,
|
|
|
|
|
Private = account.PrivateKey,
|
|
|
|
|
Secure = "Not Secure! For demo/development purposes only!"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|