Skip to content

Commit

Permalink
Merge pull request #44 from cryptochangements34/subaddresses
Browse files Browse the repository at this point in the history
Subaddresses
  • Loading branch information
cryptochangements34 authored Mar 28, 2018
2 parents 8413490 + 89cc8a7 commit 3add00f
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions src/walletRPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,73 @@ public function sign($data) {
return $sign_method;
}

/**
*
* Create a new subaddress
*
* @param unsigned int The subaddress account index
* @param string The label to use
*
*/
public function create_address($account_index, $label)
{
$create_account_parameters = array('account_index' => $account_index ,'label' => $label);
return $this->_run('create_address', $create_account_parameters);
}

/**
*
* Label a subaddress
*
* @param unsigned int The subaddress index to label
* @param string The label to use
*
*/
public function label_address($index, $label)
{
$label_address_parameters('index' => $index ,'label' => $label);
return $this->_run('label_address', $label_address_parameters);
}

/**
*
* Get current accounts from wallet
*
* @param none
*
*/
public function get_accounts()
{
return $this->_run('get_accounts');
}

/**
*
* Create a new sub-account from your wallet
*
* @param string A label for the account
*
*/
public function create_account($label)
{
$create_account_parameters('label' => $label);
return $this->_run('create_account', $create_account_parameters);
}

/**
*
* Label a sub-account
*
* @param unsigned int The subaddress account index to label
* @param string The label to use
*
*/
public function label_account($index, $label)
{
$label_account_parameters('index' => $index ,'label' => $label);
return $this->_run('label_account', $label_account_parameters);
}

}

?>

0 comments on commit 3add00f

Please sign in to comment.