Skip to content

Commit

Permalink
Fix for return types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tate Peñaranda committed Sep 17, 2018
1 parent 73c9902 commit 4922f36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/BCoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function getAllTransactions()
})->flatten();
}

public function backupWallets(string $destination_folder)
public function backupWallets(string $destination_folder): object
{
$destination_folder = str_finish($destination_folder, '/');
$path = "{$destination_folder}walletdb-backup-" . now()->format('YmdHis') . '.ldb';
Expand Down Expand Up @@ -201,17 +201,17 @@ public function getMempool(): Collection
return collect(json_decode(static::getFromServerAPI('/mempool')) ?? []);
}

public static function broadcastTransaction(string $transaction_tx): bool
public static function broadcastTransaction(string $transaction_tx): object
{
return json_decode(static::postToServerAPI('/broadcast', ['tx' => $transaction_tx]));
}

public function broadcastAll(): bool
public function broadcastAll(): object
{
return json_decode(static::postToWalletAPI('/resend'));
}

public function zapWalletTransaction(string $wallet_id, string $transaction_hash): bool
public function zapWalletTransaction(string $wallet_id, string $transaction_hash): object
{
try {
return json_decode(static::deleteFromWalletAPI("/wallet/{$wallet_id}/tx/{$transaction_hash}"));
Expand All @@ -220,7 +220,7 @@ public function zapWalletTransaction(string $wallet_id, string $transaction_hash
}
}

public function zapWalletTransactions(string $wallet_id, int $seconds = 259200): bool
public function zapWalletTransactions(string $wallet_id, int $seconds = 259200): object
{
return json_decode(static::postToWalletAPI("/wallet/{$wallet_id}/zap", ['age' => $seconds]));
}
Expand Down

0 comments on commit 4922f36

Please sign in to comment.