You can install the package via composer:
composer require khomerikik/laravel-bitgo-wallet
You can publish the config file with:
php artisan vendor:publish --provider="Khomeriki\BitgoWallet\BitgoServiceProvider"
This is the contents of the published config file:
use Khomeriki\BitgoWallet\Facades\Wallet;
$wallet = Wallet::init(coin: 'tbtc')
->generate(label: 'wallet label', passphrase: 'password')
->addWebhook(numConfirmations: 0)
->addWebhook(numConfirmations: 1);
return $wallet;
use Khomeriki\BitgoWallet\Facades\Wallet;
$wallet = Wallet::init(coin: 'tbtc', id: 'wallet-id')
->addWebhook(
numConfirmations: 3,
callbackUrl: 'https://your-domain.com/api/callback'
);
return $wallet;
use Khomeriki\BitgoWallet\Facades\Wallet;
$wallet = Wallet::init(coin: 'tbtc', id: 'your-wallet-id')
->generateAddress(label: 'address label');
return $wallet->address;
use Khomeriki\BitgoWallet\Facades\Wallet;
$maxSpendable = Wallet::init(coin: 'tbtc', id: 'your-wallet-id')
->getMaximumSpendable();
return $maxSpendable;
use Khomeriki\BitgoWallet\Facades\Wallet;
$transfers = Wallet::init(coin: 'tbtc', id: 'your-wallet-id')
->getTransfers();
return $transfers;
use Khomeriki\BitgoWallet\Facades\Wallet;
$transfer = Wallet::init(coin: 'tbtc', id: 'your-wallet-id')
->getTransfer(transferId: 'transferId');
return $transfer;
use Khomeriki\BitgoWallet\Data\Requests\TransferData;use Khomeriki\BitgoWallet\Data\Requests\TransferRecipientData;use Khomeriki\BitgoWallet\Facades\Wallet;
//you can add as many recipients as you need :)
$recipient = TransferRecipientData::fromArray([
'amount' => 4934,
'address' => 'address'
]);
$recipientOne = TransferRecipientData::fromArray([
'amount' => 4934,
'address' => 'address'
]);
$transferData = TransferData::fromArray([
'walletPassphrase' => 'test',
'recipients' => [$recipient, $recipientOne]
]);
$result = Wallet::init('tbtc', 'wallet-id')->sendTransfer($transferData);
return $result;
composer test
The MIT License (MIT). Please see License File for more information.