Ejemplo n.º 1
0
// -----------------------------------------
# Use the low-level API to see how many server contracts
# are in the user's wallet.
$count = OTAPI_Wrap_GetServerCount();
echo "Server count: " . $count . "<br>";
for ($i = 0; $i < $count; $i++) {
    //$srvID = OTAPI_Wrap_GetServer_ID($i);
    $srvID = OTAPI_Wrap_GetServer_ID($i);
    echo "Server Id : " . $srvID . '&nbsp;&nbsp;&nbsp;';
    $server_name = OTAPI_Wrap_GetServer_Name($srvID);
    echo $server_name . '<br>';
}
$nym_cnt = OTAPI_Wrap_GetNymCount();
echo 'nym count = ' . $nym_cnt . '<br>';
for ($i = 0; $i < $nym_cnt; $i++) {
    $nymID = OTAPI_Wrap_GetNym_ID($i);
    echo "Nym Id : " . $nymID . '&nbsp;&nbsp;&nbsp;&nbsp;';
    $nym_name = OTAPI_Wrap_GetNym_Name($nymID);
    echo $nym_name . '<br>';
}
// -----------------------------------------
# OT MADE EASY  (high-level API)
#
# This object handles all the request/response going on with
# any servers, plus all the retries and synchronization. It's
# the 'High-level API'. See OT_ME.hpp for the complete set of
# high-level API functions.
$objEasy = new OT_ME();
// -----------------------------------------
#
# Use the High-level API to download a user's public key from
Ejemplo n.º 2
0
 static function GetNym_ID($nIndex)
 {
     return OTAPI_Wrap_GetNym_ID($nIndex);
 }