Add NIP-05 handle management: Introduce migration, API route, and Livewire updates to support NIP-05 handle verification.

 Enhance Nostr fetcher: Refactor profile data merging logic for improved efficiency and accuracy.
🛠
This commit is contained in:
HolgerHatGarKeineNode
2026-01-20 13:56:50 +01:00
parent a857e54d61
commit 34f8d949d5
11 changed files with 669 additions and 106 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PaymentEvent>
*/
class PaymentEventFactory extends Factory
{
public function definition(): array
{
return [
'einundzwanzig_pleb_id' => \App\Models\EinundzwanzigPleb::factory(),
'year' => fake()->year(),
'event_id' => fake()->uuid(),
'amount' => 21000,
'paid' => false,
'btc_pay_invoice' => null,
];
}
public function paid(): self
{
return $this->state(fn (array $attributes) => [
'paid' => true,
]);
}
public function withYear(int $year): self
{
return $this->state(fn (array $attributes) => [
'year' => $year,
]);
}
}

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('einundzwanzig_plebs', function (Blueprint $table) {
$table->string('nip05_handle')->nullable()->unique();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('einundzwanzig_plebs', function (Blueprint $table) {
$table->dropUnique(['nip05_handle']);
$table->dropColumn('nip05_handle');
});
}
};