Created
January 15, 2016 21:50
-
-
Save jfm-so/d3e148deb5969c0e4b60 to your computer and use it in GitHub Desktop.
PiWallet Developer Mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!defined("IN_WALLET")) { die("Auth Error!"); } ?> | |
<?php | |
class Client { | |
private $uri; | |
private $jsonrpc; | |
function __construct($host, $port, $user, $pass) | |
{ | |
$this->uri = "http://" . $user . ":" . $pass . "@" . $host . ":" . $port . "/"; | |
$this->jsonrpc = new jsonRPCClient($this->uri); | |
} | |
function getBalance($user_session) | |
{ | |
//return $this->jsonrpc->getbalance("zelles(" . $user_session . ")", 6); | |
return 21; | |
} | |
function getAddress($user_session) | |
{ | |
// return $this->jsonrpc->getaccountaddress("zelles(" . $user_session . ")"); | |
} | |
function getAddressList($user_session) | |
{ | |
//return $this->jsonrpc->getaddressesbyaccount("zelles(" . $user_session . ")"); | |
return array("1test", "1test"); | |
} | |
function getTransactionList($user_session) | |
{ | |
// return $this->jsonrpc->listtransactions("zelles(" . $user_session . ")", 10); | |
} | |
function getNewAddress($user_session) | |
{ | |
//return $this->jsonrpc->getnewaddress("zelles(" . $user_session . ")"); | |
return "1test"; | |
} | |
function withdraw($user_session, $address, $amount) | |
{ | |
// return $this->jsonrpc->sendfrom("zelles(" . $user_session . ")", $address, (float)$amount, 6); | |
return "ok wow"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can i develop a pi agitator for may mobile app