<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use MoneroIntegrations\MoneroPhp\walletRPC;

class WalletSeeder extends Seeder
{
    /**
     * Create Initial Wallet
     *
     * @return void
     */
    public function run()
    {
        try {
            $walletRPC = new walletRPC(config('app.xmr_daemon_ip'), config('app.xmr_network_port')); // Change to match your wallet (monero-wallet-rpc) IP address and port; 18083 is the customary port for mainnet, 28083 for testnet, 38083 for stagenet
            $create_wallet = $walletRPC->create_wallet(config('app.xmr_wallet_name'), ''); // Creates a new wallet named memes with no passphrase.  Comment this line and edit the next line to use your own wallet
        } catch (\Exception $e) {
            dump($e->getMessage());
        }
    }
}
