voting system with nostr added

This commit is contained in:
fsociety
2024-09-29 01:02:04 +02:00
parent a0ef037b2d
commit 354680f702
43 changed files with 3017 additions and 20688 deletions

View File

@@ -17,6 +17,14 @@ trait NostrFetcherTrait
{
$hex = collect([]);
foreach ($npubs as $item) {
// check if $item is already a hex string
if (preg_match('/^[0-9a-fA-F]+$/', $item)) {
$hex->push([
'hex' => $item,
'npub' => (new Key)->convertPublicKeyToBech32($item),
]);
continue;
}
$hex->push([
'hex' => (new Key)->convertToHex($item),
'npub' => $item,