Commit d5d352d1 authored by ZhuChunYang's avatar ZhuChunYang

添加解锁钱包功能

parent f9ba70e6
...@@ -240,4 +240,15 @@ class Chain33Business ...@@ -240,4 +240,15 @@ class Chain33Business
$service = new Chain33Service(); $service = new Chain33Service();
return $service->getTxByHashes($hashes); return $service->getTxByHashes($hashes);
} }
/**
* @param $password
* 解锁钱包
*/
public static function unLockWallet($password)
{
$service = new Chain33Service();
return $service->unLockWallet($password);
}
} }
...@@ -173,4 +173,19 @@ class Chain33Service ...@@ -173,4 +173,19 @@ class Chain33Service
]; ];
return $this->send($params, 'Chain33.GetTxByHashes'); return $this->send($params, 'Chain33.GetTxByHashes');
} }
/**
* @param $password
* @return array|mixed
* 解锁钱包
*/
public function unLockWallet($password)
{
$params = [
'passwd' => $password,
'walletorticket' => false,
'timeout' => 30
];
return $this->send($params, 'Chain33.UnLock');
}
} }
...@@ -153,4 +153,11 @@ class LotteryController extends Controller ...@@ -153,4 +153,11 @@ class LotteryController extends Controller
var_dump($res); var_dump($res);
} }
public function actionUnLock()
{
$res = Chain33Business::unLockWallet("beanwalletGD666");
var_dump($res);die;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment