web3p / web3.php

A php interface for interacting with the Ethereum blockchain and ecosystem. Native ABI parsing and smart contract interactions.
MIT License
1.16k stars 543 forks source link

error the method personal_newAccount does not exist/is not available #303

Open XiaomiYe opened 1 year ago

XiaomiYe commented 1 year ago
    $web3 = new Web3(new HttpProvider(new HttpRequestManager('https://chain.xxxxx.io', 3))); 

    $eth = $web3->eth;

    $personal = $web3->personal;

    $personal->newAccount('123456', function ($err, $account) use (&$newAccount) {
        if ($err !== null) {
            echo 'Error: ' . $err->getMessage();
            return;
        }
        $newAccount = $account;

        echo 'New account: ' . $account . PHP_EOL;
    });

result error the method personal_newAccount does not exist/is not available,why?