Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
d5d352d1
Commit
d5d352d1
authored
Dec 13, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加解锁钱包功能
parent
f9ba70e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
Chain33Business.php
common/business/Chain33Business.php
+11
-0
Chain33Service.php
common/service/chain33/Chain33Service.php
+15
-0
LotteryController.php
console/controllers/LotteryController.php
+8
-0
No files found.
common/business/Chain33Business.php
View file @
d5d352d1
...
@@ -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
);
}
}
}
common/service/chain33/Chain33Service.php
View file @
d5d352d1
...
@@ -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'
);
}
}
}
console/controllers/LotteryController.php
View file @
d5d352d1
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment