Skip to content

Commit

Permalink
Added method to return the number of confirmations of a TXID
Browse files Browse the repository at this point in the history
  • Loading branch information
jeankassio committed Oct 23, 2024
1 parent 6eb1620 commit 5ee5209
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ElectrumPHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,20 @@ public function getTransaction($txid){

}

/*
* $txid: Your TXID;
*/
public function getConfirmations($txid){

$params = [
'txid' => $txid,
'wallet' => $this->wallet
];
$tr = $this->call("get_tx_status", $params);
return ($tr['confirmations'] ?? false);

}

public function checkSyncronization(){

$params = [
Expand Down

0 comments on commit 5ee5209

Please sign in to comment.