Giter VIP home page Giter VIP logo

pet4l's Introduction

PET4L

PET4L [PIVX Emergency Tool For Ledger] is a tool to spend PIVs that are "trapped inside" the Ledger Nano (either S or X) when Ledger Live acts crazy.

How does it work?

  1. it fetches addresses from the device
  2. asks to the block explorer the UTXOs related to each address
  3. it creates the raw TX and signs the new inputs on the Nano S device
  4. finally uses the sendrawtransaction RPC call of the Core wallet to broadcast the TX.

Installation

If you are using a binary version:

  • Linux - Mac OsX: no installation required. Simply extract the tar.gz archive and run the executable.
  • Windows: double-click the installer file and follow the instructions.

If you are running PET4L from the source-code instead, you will need Python3 and several libraries installed.
Needed libraries are listed in requirements.txt.
From the PET4L directory, launch the tool with:

python3 pet4l.py

To make binary versions from source, PyInstaller can be used with the specPet4l.spec file provided.

Setup

Setting up the RPC server

In order to interact with the PIVX blockchain, PET4L needs a local PIVX wallet running alongside (any empty pivx-cli wallet will do). Edit your local pivx.conf inserting rpcuser, rpcpassword, rpcport and rpcallowip. Example:

server=1
rpcuser=myUsername
rpcpassword=myPassword
rpcport=45458
rpcallowip=127.0.0.1

Configure the RPC server by clicking on the menu

and inserting the same data. You can leave ip 127.0.0.1 if the wallet is on the same machine as the pet4l.
Otherwise set the IP address of the machine running the Core PIVX wallet.

Connections

If the IP and the credentials of the PIVX wallet are correct, it should connect with pet4l instantly.
Otherwise use the Connect button next to "PIVX server: Local Wallet".
Connect the hardware device to USB and open the PIVX-App on it.
Click the button Connect next to "HW device: Ledger Nano S" to connect to the hardware device.

Once successfully connected, it gives a confirmation message and the led turns purple.

Usage

Loading Addresses And UTXOs

Adjust the fields as needed:

  • Account HW : insert the account number you wish to recover funds from (default: 0)
  • spath from : insert the n. of the first address to search (default: 0)
  • spath to : insert the n. of the last address to search (default: 10)
  • internal/external : insert 0 for normal addresses and 1 for change addresses (default: 0)

Click on Scan Ledger Device to retrieve the addresses and load the UTXOs


Open the menu to select an address and check related UTXOs

Spending UTXOs

Once loaded, select those UTXOs you wish to spend.
Insert the destination address.
Check the suggested fee and adjust as preferred.
Then click on Send


Verify the details of the TX both on screen and on the display of the Nano S. If everything checks out, click "yes" (right button) on the device.


The transaction is now assembled and signed.
Pet4l asks one more time to check the details before broadcasting the transaction (thus spending the selected UTXOs).


Click Yes to finally broadcast the transaction to the PIVX network.
Click Show Details to get the TX-id that identify the transaction.


It should appear on the Block Explorers after a few minutes.

pet4l's People

Contributors

fuzzbawls avatar gpdionisio avatar random-zebra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pet4l's Issues

Ledger cannot spend outputs of de-shield (z->t) transactions

Hello Everyone. That PIVX is one of the best cryptos, I do not need to tell you. Because of it, i bought many of them and stored them in my Ledger. Because of aiming to try cold staking I downloaded Pivx Wallet 5.3.1. Afterwards i sended my PIVs to that wallet. A little to fast, because I did not prepair anythink, so i sended them back to my Ledger on other account after shielding them. The transactions have been confirmed by the blockchain. On the day i did it, the coins have been shown on Ledger Live, as well,too. But after this I was unable to send the coins again. Everytime Ledger sended another error (example 25). Because of thinking on usb connectivity problems, i used my other computer. Synced everything: The coins had been back in the old account. Trying to send them is not possible. (every trial is an unconfirmed transaction - no wonder: the wallet is empty.). I synced ledger live many times with blockchain again, but they are not in the "new account". This one is not even found anymore. I updated pivx app from ledger live as well,too.

In the end I researched on the net and found PET4L. I connected to Los Angeles from Randomzebra and the ledger, searched for adressess of the coins: they were found... (correct number, not like displayed on ledger). So i wanted to send them to another pivx wallet, to get them back... But everytime i click on send (after entering adress) the following happens:

Time : Preparing transaction. Please wait...
Time: HW: Preparing transfer TX
Time: Error while communicating with Ledger hardware wallet.
EXCEPTION
caller : process_ledger_exceptions_int
function : prepare_transfer_tx_bulk
err: ('unsupported varint',)
===> Error while communicating with Ledger hardware wallet.
Time: Closing LEDGER client
EXCEPTION
caller : func_int
function : prepare_transfer_tx_bulk
err: Error while communicating with Ledger hardware wallet.
===> Ledger - generic exception
Time: Closing LEDGER client

PET4L does not ask to sign transaction - the ledger nano does not display anything . Nothing happens, only this bug report is displayed in the console log. I hope there is someone who has an idea in how to save my coins.

Kind regards
StarFlowerStar

This Windows version (6.0.6000) does not support the required Bluetooth API

I am happy to have successfully launched my stacking with my ledger. now i need to correct this error :

This Windows version (6.0.6000) does not support the required Bluetooth API. Consider updating to a more recent Windows (10.0.10586 or above).

it's when i launch PET4L
i use windows server 2012 RC2

how can i fix this
thank you so much

Support sending PIVX balance from TREZOR Model T

I understand this tool is intended for Ledger however currently it already also supports connecting, scanning & sending PIV rewards and displaying PIVX balance from TREZOR Model T.

Now Zephyr wallet has been abandoned and servers are offline TREZOR users PIVX balances are stuck without a working compatible Trezor / Pivx client.

Please add support for sending entire PIVX balance from TREZOR (and Ledger) to an external destination address.

Cant see my balance after an error

Hi
I was moving my PIVs from stake to create a masternode but in the last transaction I get a -25 error on "send raw transaction" from pivx explorer and now I cant se my PIVs in PET4L, the stake still running in allnodes and I can see using pivx explorer, but I cant use PET4L to move 50% of my PIVs
What can I do?
Thanks

Transparent (De-Shield Tx in Nano-S) to Transparent Tx Error in PET4L

Send Pivx Transparent (De-Shield Tx in Nano-S) to Transparent Address Error in PET4L
Please check this issue.

2021-09-27 13:33:56 : Preparing transaction. Please wait...
2021-09-27 13:33:56 : HW: Preparing transfer TX
EXCEPTION
caller : process_ledger_exceptions_int
function : prepare_transfer_tx_bulk
err: bytearray index out of range
===> Ledger - generic exception
2021-09-27 13:33:56 : Closing LEDGER client
EXCEPTION
caller : func_int
function : prepare_transfer_tx_bulk
err: Ledger - generic exception
===> Ledger - generic exception
2021-09-27 13:34:02 : Closing LEDGER client

RPC connection issue with sending TX

Hello PET4L team, I am encountering an RPC connection issue within PET4L after approving a transaction on my Ledger Nano.
I am connected to the losangeles.randomzebra.party PIVX Server, but the error message I get...
"err: (unable to send TX - connection to RPC server lost.)"

I also tried the amsterdam.randomzebra.party server and I get the same results. I was unable to connect to the Singapore.randomzebra.party server.

I presume this issue may be associated with the recent PIVX protocol upgrade due to the recent attack, hence you code may need to be upgraded along with the PIVX-SPMT see PIVX-Project/PIVX-SPMT#39 (this may help perhaps?)

Can someone please fix this issue soon as I'd like to move some of my PIV coins off my Ledger Nano? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.