Нормализовать ключ free-блокчейна в Base64

This commit is contained in:
AidarKC
2026-10-29 13:11:52 +03:00
parent 395aa62bda
commit f507bdb343
4 changed files with 58 additions and 5 deletions
@@ -8,6 +8,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Base64;
/** Только верифицированный сертификат. Локальная БД — проекция Arweave/Solana. */
public final class VerifiedFreeRegistrationImporter {
@@ -113,7 +114,9 @@ public final class VerifiedFreeRegistrationImporter {
VALUES (?, 1, ?, 100000, 0, -1, ?, ?)
""")) {
insert.setString(1, login);
insert.setString(2, Base58Util.encode(cert.blockchainKey()));
// blockchain_state — runtime-слой: его ключ всегда Base64(32),
// как и у пользователей, импортированных из Solana PDA.
insert.setString(2, Base64.getEncoder().encodeToString(cert.blockchainKey()));
insert.setBytes(3, new byte[32]);
insert.setLong(4, now);
insert.executeUpdate();