Bitcoin

Electrum load_wallet via json-rpcs does not accept the “wallet” parameter.

It seems that the “load_wallet” method does not recognize the “wallet” parameter in the context of the JSON-RPC call you are making.

One solution is to pass the wallet path as a command line argument when starting the JSON-RPC server. For example, if you are using Electrum, you can start the server with the following command:

electrum --testnet --rpcuser=<username> --rpcpassword=<password> --rpchost=localhost --rpcport=8000 /electrum/testnet/wallets/orders001

This command starts the Electrum server in testnet mode and specifies the wallet path as the last argument.

Once the server is running, you can make JSON-RPC requests without including the “wallet” parameter in the payload. The server should automatically load the wallet specified in the command line arguments.

Alternatively, you can try using the “load_wallet_file” method instead of “load_wallet”. According to Electrum documentation, “load_wallet_file” takes a single argument, which is the path to the wallet file. Here is an example payload:

"jsonrpc":"2.0","id":"test","method":"load_wallet_file","params":("/electrum/testnet/wallets/orders001")

The wallet path is passed as an array element in the “params” field rather than as a separate “wallet” parameter.

Related Articles

Back to top button