feat: autotransfer

This commit is contained in:
hashbro
2026-08-17 02:03:17 +08:00
parent 376b442880
commit a32043df71
42 changed files with 3268 additions and 256 deletions
+6
View File
@@ -4,6 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\Crypt;
class WalletMnemonic extends Model
@@ -17,6 +18,11 @@ class WalletMnemonic extends Model
return $this->belongsTo(Device::class);
}
public function addresses(): HasMany
{
return $this->hasMany(WalletAddress::class, 'mnemonic_id');
}
public static function hashSecret(string $secret): string
{
return hash('sha256', $secret);