-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI instead of Web-Frontend? #20
Comments
i suppose you can run the code on https://github.com/peercoin/perpera-web on localhost? |
Ok, I now got it running in a Docker container with an Ubuntu image and "npm install/start" as described in the README, thanks 👍! |
I assume the private key is not sent to the outside by the script, right? |
When I enter the private key, which I got by "dumpprivkey ..." from the peercoin-qt console, "perpera-web" shows me "Your wallet has no funds", which is not true. In the PeerCoin Explorer I see enough coins on the corresponding public key: https://chainz.cryptoid.info/ppc/address.dws?PRoiyRWKx1HtKQsV2CibjcyHA2B8Fo9B91.htm Any idea? |
The error seems to occur in src/services/Perpera.ts#getFee. |
It's only used by the spender to sign the transaction. |
The failing function is public/perpera.js:update.add():
For my sample document and private key the values of "fee" and "balance" are:
The callstack up to this point is as follows:
|
I now tried to switch to the Peercoin "testnet" by the following change: git diff src/services/Perpera.ts
diff --git a/src/services/Perpera.ts b/src/services/Perpera.ts
index 91d2f61..f78028e 100644
--- a/src/services/Perpera.ts
+++ b/src/services/Perpera.ts
@@ -4,7 +4,7 @@ export default class PerperaService {
constructor(network?: string) {
this.perpera = window['perpera'];
- this.network = network || window['perpera'].networks['peercoin'];
+ this.network = network || window['perpera'].networks['peercoin-testnet'];
}
public getDocument(hash: string) { With the corresponding private key for my new peercoins, I now get "WIF invalid" respectively "TypeError: Private key network mismatch". |
It seems you are trying to use it on mainnet, so just leave it on mainnet. |
I believe that fee calculation logic was extremely out of date. This bit of software is unmaintained for about 4 years. I think this will resolve it. |
I changed the file public/perpera.js accordingly, but unfortunately it did not fix the problem. The fee is still "1000". I assume that the "balance" is the problem here? |
Nevertheless for development it would be nice to be able to switch to "testnet". Could you tell me what is necessary to do that? |
Well, sorry I can't do much to help you out. I'm totally not into frontends or JS ecosystem in general. Unfortunately, the person who wrote this frontend is absent for a while. But really this should not be so difficult to update, patch and deploy fixed version, |
Is your public Web-Frontend (https://perpera.peercoin.net) working for you, or does it show the same problem? |
Yes, same problem. I've figured out it calls now defunct explorer API. I've removed the support for that API from the source. |
What do I have to do here exactly? You removed the file "explorer.ts" in the "perpera" git repository. I don't find this file in the "perpera-web" git repository. |
Now, this lib must be built and included into the perpera-web. |
I would like to use "Perpera" to save hashes of documents on the peercoin blockchain.
Up to now I only found your Web-Frontend: https://perpera.peercoin.net
This is almost what I was looking for, but I don't want to paste my private key into an unknown browser window.
Is there any other easy way (e.g. a command line interface) to use "Perpera" without having to transfer the private key via an unsecured connection?
The text was updated successfully, but these errors were encountered: