How to use code to generate wallet addresses for website without constant connection to OneKey Pro? #6105
Replies: 1 comment
|
Hi, I understand what you’re trying to accomplish. You’re essentially looking for a watch-only Bitcoin payment setup where your website can generate receiving addresses from the public key of your OneKey Pro, while the private keys remain safely offline on the hardware wallet. In principle, the OneKey Pro does not need to stay connected or powered on just to receive Bitcoin. The important part is that the addresses generated by your code must use the exact same Bitcoin account, network, derivation path, script/address type, and address-index scheme used by the OneKey wallet. Otherwise, you can generate a valid BTC address that isn’t recognized as belonging to your OneKey account. Regarding the $5 test transaction, don’t assume that it is lost. If the transaction was confirmed, the BTC is almost certainly still sitting at the address you sent it to. The first thing to do is identify the exact address you generated and check it on a Bitcoin block explorer. Then compare that address with the receiving addresses generated by the OneKey account. I would also avoid using exported logs or any private/secret material for this. You only need the appropriate extended public key (xpub/ypub/zpub, depending on the account type) for address derivation. The private key/seed should remain on the OneKey device. Since OneKey support specifically directed you to GitHub, this is a good issue to raise with them. Include the wallet/account type, Bitcoin network, the public-key type you exported, derivation path, address type you generated, and the test address/transaction ID. Do not post your seed phrase or private key. OneKey’s official developer portal has documentation for hardware integration, and the official GitHub repositories include the app and hardware SDK, so the developers should be able to confirm the exact derivation parameters for the OneKey Pro. If you provide the public address you generated, the transaction ID, and the exact public-key type/path you used (with all private information removed), the derivation problem can be diagnosed without exposing your wallet’s private keys. OneKey official GitHub repository One caution: I would not tell this person that the $5 is definitely recoverable until the destination address and transaction are checked. If the address was derived from the wrong account/key, the funds may still be recoverable if the corresponding private key is actually controlled by the user, but that needs to be established first. |
Uh oh!
There was an error while loading. Please reload this page.
I am trying to use code to generate wallet addresses that lead to my one key pro without needing the device to be turned on or connected. I tried using the YPUB key from exported logs in conjunction with pycoin library to generate a btc address but when I sent 5$ in test coins to it I never received it in my one key app.
Is the 5$ lost forever? If so, what is the correct way to accomplish generating addresses with code that will correctly lead the funds to my one key pro wallet app. I want to use this integration to collect payments for my website to my one key cold storage wallet without needing the physical wallet to be constantly connected or turned on.
Was advised by OneKey support to make a ticket on the official GitHub.
All reactions