Socket
Book a DemoInstallSign in
Socket

blockcypher-pending-transaction-checker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockcypher-pending-transaction-checker

Blockcypher pending transaction checker

1.0.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

Blockcypher Pending Transaction Checker

Install

yarn add blockcypher-pending-transaction-checker

Usage

// in satoshi's, 0.00715387 BTC = 715387
const amountToRecieve = 715387;

// Refresh every 10 seconds
const refreshInMilliseconds = 10000;
new BlockcypherPendingTransactionChecker({
  ticker: "btc",
  address: "3Nuuc2fcDoHx2uMR9f3Bpe5mdM267MmbTR",
  amountToRecieve,
  refreshInMilliseconds,
  callback: data => {
    console.log(JSON.stringify(data, null, 2));
  }
})

Unconfirmed Response

{
  "finished": false,
  "data": {
    "wallet": {
      "address": "3Nuuc2fcDoHx2uMR9f3Bpe5mdM267MmbTR",
      "total_received": 0,
      "total_sent": 0,
      "balance": 0,
      "unconfirmed_balance": 715387,
      "final_balance": 715387,
      "n_tx": 0,
      "unconfirmed_transaction_count": 1
    },
    "pending_transaction": {
      "value": 715387,
      "received": "2018-07-07T09:16:50.923Z",
      "txHash": "efcc03f156e208488d5fe7f549c6a7113e975293f65697b9d07d3e5279d9dcd2",
      "preference": "low",
      "confirmations": 0
    }
  }
}

Confirmed Response

{
  "finished": true,
  "data": {
    "wallet": {
      "address": "3Nuuc2fcDoHx2uMR9f3Bpe5mdM267MmbTR",
      "total_received": 715387,
      "total_sent": 0,
      "balance": 715387,
      "unconfirmed_balance": 0,
      "final_balance": 715387,
      "n_tx": 1,
      "unconfirmed_transaction_count": 0
    },
    "confirmed_transactions": [
      {
        "tx_hash": "efcc03f156e208488d5fe7f549c6a7113e975293f65697b9d07d3e5279d9dcd2",
        "block_height": 530862,
        "tx_input_n": -1,
        "tx_output_n": 0,
        "value": 715387,
        "ref_balance": 715387,
        "spent": false,
        "confirmations": 1,
        "confirmed": "2018-07-07T09:41:40Z",
        "double_spend": false
      }
    ]
  }
}

Keywords

blockcypher

FAQs

Package last updated on 07 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.