Skip to content
This repository was archived by the owner on Jul 9, 2021. It is now read-only.

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SetUp

You need to pass URL and Token to CMS class constructor

Methods

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);        
    }   
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages