Giter Site home page Giter Site logo

blockchain-wallet-apiv2-php-library's Introduction

Blockchain.info PHP Library for NodeJS Wallet Service

Simple PHP library that allows simple communication to the localhost nodeJS wallet service.

BTC: 1NPrfWgJfkANmd1jt88A141PjhiarT8d9U

Usage

  1. Requirements
  1. Download or clone the main project and extract files.

  2. Include or require the wallet-lib.php file

     require_once("wallet-lib.php");
    
  3. Initiate the login to your nodeJS wallet service

     $bci = new blockchain("your_api_key", "your_wallet_id_guid", "your_password", "your_nodejs_wallet_service_port");
     $login = $bci->login();
     print_r($login);
    
  • If your receive an error at this point, check your email. You may need to whitelist your nodeJS service with blockchain.info
  1. Start making calls

Check wallet balance

    $balance = $bci->balance();
	print_r($balance);

Create a new receiving address (label is optional)

	$new = $bci->new_address("my_label");
	print_r($new);

Basic send payment

	$pmt = $bci->send("1J9ikqFuwrzPbczsDkquA9uVYeq6dEehsj", 100000);
	print_r($pmt);

Advanced send payment with From, Custom Fee and Note options

	$pmt = $bci->send("1J9ikqFuwrzPbczsDkquA9uVYeq6dEehsj", 100000, "1FromThisSpecifAddressab324", 10000, "Thanks for using mysite.com");
	print_r($pmt);

Send Many

	$array = array(
		"1someAddress" => 20000,
		"1someAddress2" => 150000,
		"1someAddress3" => 314159
	); 
	$send = $bci->send_many($array);
	print_r($send);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.