feat: autotransfer
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user