Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.73 KB

File metadata and controls

43 lines (33 loc) · 1.73 KB

Create Wallet Documetation

Create a new Blockchain wallet from this API endpoint. Offical documentation here.

Basic Usage

Make calls on the Create member object within the Blockchain object. Please note than an api_code is required with Create Wallet permissions. You may request an API code here.

$Blockchain = new Blockchain($api_code);
$Blockchain->Create->function(...)

Create Wallets

There are two ways to create wallets: provide an existing private key or let Blockchain generate a private key for you. Both methods allow you to specify an email address to be associated with the wallet and a label for the first address in the wallet. You must provide a password for the new wallet.

Please read the offical documentation for important details.

###Create with Key Create a new wallet with a known private key. Returns a WalletResponse object.

$wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);

###Create without Key Create a new wallet, letting Blockchain generate a new private key. Returns a WalletResponse object.

$wallet = $Blockchain->Create->create($password, $email=null, $label=null);

###WalletResponse The WalletResponse object contains fields for the wallet identifier (guid), the address for receiving Bitcoin, and a link to log into the wallet on the Blockchain website.

class WalletResponse {
    public $guid;                       // string
    public $address;                    // string
    public $link;                       // string
}