2017 © Pedro Peláez
 

library substation-client

Makes request to the Substation API

image

tokenly/substation-client

Makes request to the Substation API

  • Wednesday, July 4, 2018
  • by dweller
  • Repository
  • 3 Watchers
  • 0 Stars
  • 101 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Substation Client

Makes request to the Substation API, (*1)

Installation

Add the package via composer

composer require tokenly/substation-client

Usage with Laravel

The service provider will automatically be registered in a Laravel 5.5+ application., (*2)

Set the environment variables

SUBSTATION_CONNECT=https://substation.tokenly.com

Use it

// init the client
$substation_client = app(\Tokenly\SubstationClient\SubstationClient::class);

// create a wallet
$response = $substation_client->createServerManagedWallet('bitcoin', 'My App Wallet');
$wallet_uuid = $response['uuid'];
echo "Wallet ID is " . $wallet_uuid . "\n";

// allocate an address
$response = $substation_client->allocateAddress($wallet_uuid);
$address_uuid = $response['uuid'];
$address_hash = $response['address']; // An address hash like 1AAAA1111xxxxxxxxxxxxxxxxxxy43CZ9j

Client methods are documented inline in the SubstationClient class., (*3)

For details of the API calls, see https://app.swaggerhub.com/apis/tokenly/Substation/1.0.0., (*4)

The Versions

25/01 2018