Example of Resolving a PBTC Peg-In

Example flow of how to check on status of pNetwork request and troubleshoot.

To check on pNetwork transaction status, there are 2 endpoints:

  • PBTC - needs tx hash from Bitcoin or Libre chain:

    • https://pnetwork-node-1a.eu.ngrok.io/pbtc-on-libre/incoming-tx-hash/

  • PUSDT - needs tx hash from Ethereum or Libre chain:

    • https://pnetwork-node-1a.eu.ngrok.io/pusdt-on-libre/incoming-tx-hash/

Since this is Bitcoin-related, we use this "pbtc-on-libre" endpoint:

https://pnetwork-node-1a.eu.ngrok.io/pbtc-on-libre/incoming-tx-hash/

Take Bitcoin txid:

94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d

Add to pNetwork URL to get this:

https://pnetwork-node-1a.eu.ngrok.io/pbtc-on-libre/incoming-tx-hash/94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d

Browser returns this JSON:

{ "broadcast": true, "host_tx_amount": "0.009500234 PBTC", "host_tx_recipient": "lolololol", "witnessed_timestamp": 1707191458, "host_token_address": "btc.ptokens", "originating_tx_hash": "94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d", "originating_address": "396fEc9sDnTXWucUA6WM3ZZzHTpv3gkQhq", "any_sender_nonce": null, "host_account_nonce": 1876, "host_latest_block_number": 100388582, "broadcast_tx_hash": null, "broadcast_timestamp": 1707191554, "any_sender_tx": null }

Explanation of JSON:

This is a peg in request to lolololol which came from 396fEc9sDnTXWucUA6WM3ZZzHTpv3gkQhq and had Bitcoin tx id 94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d but there is no “broadcast_tx_hash” so the transaction was not sent on Libre for some reason - it’s stuck on the pNetwork bridge

Mempool shows 122 confirmations - which in this case is more than one day:

https://mempool.space/tx/94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d

LibreBlocks lolololol account shows no issuance of PBTC

https://www.libreblocks.io/address/lolololol

Next step - reach out to pNetwork and report delay in tx broadcast. They will fix it.

Join this Telegram and only send them transactionID - Do not send your private key or seed phrase EVER. -> https://t.me/pNetworkDefi

Once they do, you will see the issue action and the amount of pBTC issued on the block explorer:

And on the pNetwork Status API we will see the broadcast_tx_hash:

https://pnetwork-node-1a.eu.ngrok.io/pbtc-on-libre/incoming-tx-hash/94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d

{ "broadcast": true, "host_tx_amount": "0.009500234 PBTC", "host_tx_recipient": "lolololol", "witnessed_timestamp": 1707191458, "host_token_address": "btc.ptokens", "originating_tx_hash": "94eef9dbfb3fe3ce1bcf4ed4584640fd35036771155399383978c9294485829d", "originating_address": "396fEc9sDnTXWucUA6WM3ZZzHTpv3gkQhq", "any_sender_nonce": null, "host_account_nonce": 1879, "host_latest_block_number": 100503457, "broadcast_tx_hash": "9e7e02a3532797d982a78a3f3b885192b2d5e8167581ec5c37475e50ba423acc", "broadcast_timestamp": 1707249326, "any_sender_tx": null }

Now the transaction is complete.

If the originating_tx_hash is on Libre and then the broadcast_tx_hash would be on Bitcoin (if it’s BTC) or on Ethereum (if it’s USDT).

Last updated