psychiccat / monero-nodejs Goto Github PK
View Code? Open in Web Editor NEWMonero wallet management via JSON-RPC
License: MIT License
Monero wallet management via JSON-RPC
License: MIT License
I am trying to make my monero wallet instance in my web app. When I make the command
var Wallet = new moneroWallet();
I get the following error.
Error: connect ECONNREFUSED 127.0.0.1:18082
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 18082
}
Anyone please help how can I remove this?
After creating wallet how to get address of wallet?
This useful call is missing.
When we split integrated address, we get encrypted paymentId. If we check payements (using getPayments), we get empty object.
If we could a method to decrypt the encrypted payment Id in case of integrated addresses then we can fetch transactions using that payment Id.
Why is wallet.height()
asynchronous, but the rest of the API functions are synchronous?
Is the underlying daemon function asynchronous?
Hello
Thanks for the awesome script.You made our life easier.
I got up in one problem i.e when i am running
Wallet.integratedAddress().then(function(address) {
console.log(address);
});
connect ECONNREFUSED 127.0.0.1:18082 is returning as a response.
Although I have already started the ./monerod and ./monero-wallet-rpc --wallet-file MyMoneroWallet --disable-rpc-login --password "*******" --rpc-bind-port 1808
Still it is saying connection refused.
Please check where I am missing.
Thanks in Advance.
I'm not sure if I'm doing this right:
var paymentID = "'Q5hrGvB07Evi7lcBDVfi1Q7rkvTM0U1IYsRB1hQfqZpVJlxXsSbzbqtNq90lvpqB'";
Wallet.getPayments(paymentID).then(function(result){
console.log(result);
});
I get back 'Payment ID has invalid format'.
It looks like there's not a way to authenticate to the new monero-wallet-rpc, am I just missing it?
I am using this on a 100 second timer (code is here: https://github.com/ShenNoether/MiniNodo/blob/master/MiniNodo.js#L40 ), and it frequently crashes at between 30-100 function calls of the incoming transfers function. I am not sure if this is an an error in my code, or whether it stems from the library. Error output:
undefined:663
"tx_hash": "<770e99dd1d13731ca7cca8ab8aa2716f740a58c817d712
SyntaxError: Unexpected end of input
at Object.parse (native)
at IncomingMessage. (/home/user/MiniNodo/node_modules/monero-nodejs/lib/wallet.js:33:33)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at IncomingMessage.Readable.push (_stream_readable.js:110:10)
at HTTPParser.parserOnBody (_http_common.js:109:22)
at Socket.socketOnData (_http_client.js:311:20)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
In nodejs, While creating an instance of monero-wallet using following code and my own server details where the program is running:
var moneroWallet = require('/home/server/auth/monero-nodejs/lib/wallet.js');
var mWallet = new moneroWallet( hostName, port);
I am getting the following error:
Unhandled rejection RequestError: Error: getaddrinfo ENOTFOUND http http:80
at new RequestError (/home/server/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/home/server/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/home/server/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/home/server/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.onRequestError (/home/server/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:401:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Anyone knows the problem?
var moneroWallet = require('monero-nodejs');
var Wallet = new moneroWallet('127.0.0.1', 18083);
console.log(Wallet.open_wallet);
returns undefined
I have the dameon and simplewallet running on my Ubuntu server.
git clone https://github.com/PsychicCat/monero-nodejs.git
cd monero-nodejs
sudo npm install
sudo npm test
And I get back:
moneroWallet
constructor
✓ should have default host set to127.0.0.1
✓ should have default port set to 18082
methods
balance()
1) should retrieve the account balance
address()
✓ should return the account address
transfer()
✓ should return a tx hash, or an error message4 passing (2s)
1 failing
- moneroWallet methods balance() should retrieve the account balance:
Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
Hi, I’m connecting to my monerod cli wallet via
var Wallet = new moneroWallet('localhost', '18081');
which seem to work.
But when doing:
Wallet.address().then(function(a) { console.log(a) });
I get following error:
{
"code": -32601,
"message": "Method not found"
}
I tried different methods, also Wallet.balance()
. Give me the same answer..
This is weird, what’s the issue?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.