G2A Many GEOs
SHARE
TWEET

Untitled

a guest Mar 22nd, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version         :   4.0.9.0
  8. * @ Author          :   DeZender
  9. * @ Release on      :   08.08.2019
  10. * @ Official site   :   http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace App\Adapters\Coin;
  15.  
  16. class ZcashAdapter extends \CoinAdapter
  17. {
  18.     const NAME = 'ZCash';
  19.     const IDENTIFIER = 'zec';
  20.     const BASE_UNIT = 100000000;
  21.     const PRECISION = 8;
  22.     const SYMBOL = 'ZEC';
  23.     const SYMBOL_FIRST = true;
  24.     const COLOR = '#CB842A';
  25.  
  26.     protected $bitgo;
  27.     protected $dollarPrice;
  28.  
  29.     public function __construct()
  30.     {
  31.         $this->init();
  32.     }
  33.  
  34.     private function init()
  35.     {
  36.         $bitgo = resolve('HolluwaTosin360\\BitGoPHP\\BitGo');
  37.  
  38.         if (config()->get('bitgo.env') == 'prod') {
  39.             $bitgo->setCoin(\HolluwaTosin360\BitGoPHP\Coin::ZCASH);
  40.         }
  41.         else {
  42.             $bitgo->setCoin(\HolluwaTosin360\BitGoPHP\Coin::TEST_ZCASH);
  43.         }
  44.  
  45.         $this->bitgo = $bitgo;
  46.     }
  47.  
  48.     public function __sleep()
  49.     {
  50.         return [];
  51.     }
  52.  
  53.     public function __wakeup()
  54.     {
  55.         $this->init();
  56.     }
  57.  
  58.     public function getName(): string
  59.     {
  60.         return self::NAME;
  61.     }
  62.  
  63.     public function getIdentifier(): string
  64.     {
  65.         return self::IDENTIFIER;
  66.     }
  67.  
  68.     public function getBaseUnit()
  69.     {
  70.         return self::BASE_UNIT;
  71.     }
  72.  
  73.     public function getPrecision()
  74.     {
  75.         return self::PRECISION;
  76.     }
  77.  
  78.     public function getSymbol(): string
  79.     {
  80.         return self::SYMBOL;
  81.     }
  82.  
  83.     public function showSymbolFirst(): bool
  84.     {
  85.         return self::SYMBOL_FIRST;
  86.     }
  87.  
  88.     public function getColor(): string
  89.     {
  90.         return self::COLOR;
  91.     }
  92.  
  93.     public function createWallet($label, $passphrase): unknown
  94.     {
  95.         $response = $this->bitgo->generateWallet($label, $passphrase);
  96.         $data = collect($response);
  97.         return new Resources\Wallet(['id' => $data->get('id'), 'data' => $data->toArray()]);
  98. ...................................................................
  99. ........................................
  100. ...........
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top