anagramik / crypto-wallet-manager
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.
This is a simple Crypto Wallet Manager wrapper class
dev-master
2018-11-19 23:12 UTC
Requires
This package is not auto-updated.
Last update: 2021-07-10 11:54:28 UTC
README
You need to pass URL and Token to CMS class constructor
Methods
- Display all Accounts
- Get Account by ID
- Create an Account
- Delete an Account
- Activates 2FA for a given Account
- Creates a new Address for a given Account
- Creates a new Transaction for a given Account
- Moves an amount from one Account to another
Display all Accounts
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display all clients * * @return mixed */ public function getItAll() { return (new CWM($this->url, $this->token))->getAccounts(); } }
Display Account by ID
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * * @return mixed */ public function get($accountId) { return (new CWM($this->url, $this->token))->getById($accountId); } }
Create an Account
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $data * * @return mixed */ public function create($data) { return (new CWM($this->url, $this->token))->create($data); } }
Delete an Account
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * * @return mixed */ public function delete($accountId) { return (new CWM($this->url, $this->token))->delete($accountId); } }
Activates 2FA for a given Account
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * @param $data * * @return mixed */ public function activate2FA($accountId, $data) { return (new CWM($this->url, $this->token))->activate2FA($accountId, $data); } }
Creates a new Address for a given Account
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * @param $data * * @return mixed */ public function newAddress($accountId, $data) { return (new CWM($this->url, $this->token))->newAddress($accountId, $data); } }
Creates a new Transaction for a given Account
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * @param $addressId * @param $data * * @return mixed */ public function sendToAddress($accountId, $addressId, $data) { return (new CWM($this->url, $this->token))->sendToAddress($accountId, $addressId, $data); } }
Moves an amount from one Account to another
<?php use DogeDev\CryptoWalletManager\CWM; class Example { protected $url; protected $token; public function __construct($url, $token) { $this->url = $url; $this->token = $token; } /** * Display specific Account * * @param $accountId * @param $addressId * @param $data * * @return mixed */ public function move($accountId, $destinationId, $data) { return (new CWM($this->url, $this->token))->move($accountId, $destinationId, $data); } }