6060$response->getVersion();
6161```
6262
63+ ## Create new wallet
64+
65+ Create default wallet:
66+ ``` php
67+ $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
68+ $wallet = new \Electrum\Request\Method\Wallet\CreateWallet($client);
69+ $response = $wallet->execute();
70+ ```
71+
72+ This code is similar to the command:
73+ ``` bash
74+ $ electrum create
75+ ```
76+
77+ You can also create more wallets with custom names specifying flag of the new wallet.
78+ ``` php
79+ $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
80+ $wallet = new \Electrum\Request\Method\Wallet\CreateWallet($client);
81+ $response = $wallet->execute(['wallet_path' => '~/.electrum/wallets/your_wallet']);
82+ ```
83+
84+ This code is similar to the command:
85+ ``` bash
86+ $ electrum create -w ~ /.electrum/wallets/your_wallet
87+ ```
88+
89+ Response will be:
90+ ``` php
91+ [
92+ 'seed' => 'wallet seed',
93+ 'path' => 'path where wallet file is stored',
94+ 'msg' => 'Please keep your seed in a safe place; if you lose it, you will not be able to restore your wallet.',
95+ ];
96+ ```
97+
98+ ## Load wallet
99+
100+ ``` php
101+ $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
102+ $load_wallet = new \Electrum\Request\Method\Wallet\LoadWallet($client);
103+ $load_wallet->execute(['wallet_path' => '~/.electrum/wallets/your_wallet']);
104+ ````
105+
106+ ## List wallets
107+
108+ Get list of all loaded wallets:
109+ ```php
110+ $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
111+ $list_wallets = new \Electrum\Request\Method\Wallet\ListWallets($client);
112+ $list_wallets->execute();
113+ ```
114+
63115## Get new address
64116``` php
65117 $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
@@ -68,6 +120,15 @@ $response->getVersion();
68120 echo $tx->getAddress();
69121```
70122
123+ ## Create new address for wallet
124+
125+ ``` php
126+ $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
127+ $newAddress = new \Electrum\Request\Method\Address\CreateNewAddress($client);
128+ $newAddress->execute(['wallet' => '~/.electrum/wallets/your_wallet']);
129+ ```
130+
131+
71132## Make a new Payment
72133``` php
73134 $client = new \Electrum\Client('http://127.0.0.1', 7777, 0, 'user', 'password');
0 commit comments