-
slade991[m]
Hey guys not sure where to ask that. Sorry if this is a stupid question. I'm working on adding XMR support to bitcartcc
-
slade991[m]
however, it is a non custodial payment gateway. I working with
github.com/monero-ecosystem/monero-python
-
slade991[m]
but, correct me if i'm wrong, it seems i cannot retrieve balance or incoming transaction of a wallet if that wallet have not been directly created by me
-
slade991[m]
is there a way i'm missing where i could collect wallet address + public key of user and access balance and incoming transaction ?
-
rbrunner
Not sure what you mean, but if you have a Monero wallet, and there are incoming transactions, you never see where they come from, quite in general, from the transaction alone: It does not carry an origin address
-
slade991[m]
i mean, i need to check balance and incoming transaction of a random wallet. How would i do that ?
-
rbrunner
With wallet, do you mean wallet file, or do you mean address?
-
slade991[m]
i mean address
-
slade991[m]
i don't have the wallet file
-
slade991[m]
my issue is i don't have a wallet rpc to connect to
-
rbrunner
Well, if you don't have the secret keys that belong to the wallet, in Monero it's impossible to see the balance. That's the whole point of being a privacy coin :)
-
slade991[m]
ok, so the only i can do that is by being custodial ?
-
slade991[m]
creating the wallet, on the server ?
-
DataHoarder
You can ask for view keys
-
DataHoarder
not spend ones, just view wallet
-
slade991[m]
with the view key i can see the balance ? and the incoming transation ?
-
DataHoarder
the address has view public key, spend public key
-
DataHoarder
the private view key allows you to see incoming transactions and balance
-
DataHoarder
but not spend or view of transactions have been spent
-
DataHoarder
so you do not know the real balance, aka, if they have spent outputs, just that they have gotten X
-
slade991[m]
ok
-
slade991[m]
in that key i would connect to a local wallet rpc ?
-
rbrunner
But I don't understand your use case yet. You say you want to implement something like bitcartcc, but for XMR, or extend bitcartcc to be able to use XMR, right?
-
DataHoarder
-
DataHoarder
Read documentation otherwise :)
-
rbrunner
So if *I* want to accept Monero payments on *my* website, with the payments going into *my* wallet, I would use your software. Correct?
-
DataHoarder
-
slade991[m]
yeah that's the idea
-
slade991[m]
but api wise i seem to need to connect to wallet rpc in order to view balance
-
rbrunner
So where is the problem? Of course *I* have the file for my own wallet, and the password for it, so with monero-rpc your software can correctly log into that wallet and do everything.
-
slade991[m]
i would not ask for the file or password. Only the view key and address.
-
rbrunner
Why?
-
slade991[m]
i can't seem to find in the documentation how to view the balance / incoming without connection to a wallet
-
slade991[m]
rbrunner: because it's private information and also it's the way bitcartcc is built
-
slade991[m]
i'm just trying to add xmr support following the existing structure
-
rbrunner
That's why I asked so stupidly, to make sure we don't misunderstand and don't talk past each other. *My* own wallet is *not* problematic private info.
-
slade991[m]
if you give it to me ?
-
rbrunner
Why to you? Where is that bitcartcc hosted then? I assumed self-hosting.
-
slade991[m]
yeah it is self hosted. But it can provide support as a payment gateway for different store and user.
-
slade991[m]
you can use it as a payment gateway for multiple merchants. It's not self hosted anymore
-
DataHoarder
If I wanted you to see my incoming transactions and incoming balance, I could give you a view-only wallet file
-
DataHoarder
(or address and view keys, it is the same)
-
DataHoarder
You can build a wallet file from address and view keys
-
DataHoarder
this has other privacy implications like being able to generate subaddresses
-
slade991[m]
that's more what i'm trying to work with
-
DataHoarder
(btcpayserver for example asks for a view-only wallet in a similar way, for self hosting)
-
slade991[m]
how would i go api wise to see the balance with that information ?
-
rbrunner
I agree. View keys is everything there is in Monero as a feature of the coin in this general direction. If you can't get it to work using those, the problem has no solution, I would say.
-
slade991[m]
i'm checking the documentation but cannot seem to find it
-
rbrunner
You can't realiably check the *balance* with view keys. But you can see all incoming transactions. Maybe that's enough for your use case?
-
slade991[m]
let's start with that :)
-
slade991[m]
i'll run a wallet rpc locally correct ?
-
rbrunner
Think so, yes.
-
rbrunner
As part of the bitcartcc installation, so to say.
-
rbrunner
You could present a "sum of all incoming transactions" to make clear that it's *not* the balance of the wallet, but still a useful number, and maybe all that is needed for the merchant.
-
slade991[m]
yeah
-
slade991[m]
with my local rpc wallet running, how do i import the view key and address ?
-
slade991[m]
i can't seem to find a method for that
-
rbrunner
You mean in those Python bindings?
-
slade991[m]
or even in the doc
-
slade991[m]
-
DataHoarder
Viewing the “balance received of all time” slade991 requires you finding and viewing *all transactions received of all time*
-
rbrunner
Yes, that's the call.
-
DataHoarder
that is how balance works as well, no direct lookup call
-
slade991[m]
yeah but that method assume i'm connected to a wallet with monero-wallet-rpc with a wallet file and password
-
slade991[m]
but i would only have view key and address
-
slade991[m]
so i cannot connect to the wallet rpc with that information or am i missing something ?
-
rbrunner
If somebody hands the private view key to you, you have to restore, you have to build a view-only wallet file first, using that view key
-
rbrunner
And of course you then have full control over *that* file, because you created it yourself
-
slade991[m]
how would i create a view-only wallet with that key ?
-
rbrunner
I am just now clicking through the documentation, did not yet find it ...
-
slade991[m]
-
rbrunner
Hmmm, can't find it, maybe that's not implemented as part of those bindings. Could be you have to do it yourself. It's not too difficult to talk directly to the monero-wallet-rpc wallet binary using Python
-
slade991[m]
that's what i was checking but i cannot see in the monero-wallet-rpc how to create a view-only wallet either
-
slade991[m]
-
rbrunner
-
rbrunner
(I personally always consult the source in addition. The RPC documentation is sometimes outdated, or does not list all possible parameters.)
-
rbrunner
Yup, that's your call. I found the following message in the implementation that pretty much confirms that this call is able to create view-only wallets:
-
rbrunner
"Watch-only wallet has been generated successfully."
-
slade991[m]
ok great. Things are clearer now :)
-
slade991[m]
Thank a lot for the infomation i'll work on that !
-
rbrunner
Welcome. And you know what would be really great and turn you into an instant hero: You implementing this call as part of monero-python and contribute it in the form of a PR :)
-
slade991[m]
yeah i was thinking about that. if i'm heading that direction i'll probably do that
-
rbrunner
Splendid. Good luck for your project anyway!
-
slade991[m]
thanks :)
-
plowsof
thank you for kindly helping as always rbrunner, reg the outdated docs on -site, i have a PR that 2083 but still would recommend using the src files
-
jadeydi[m]
hi, I got some errors for monero failed to deserialize Bad signature Type 6... (full message at <
libera.ems.host/_matrix/media/v3/do…20b0abdfa4a2654201db8d5b47f23f0f8c1>)
-
selsta
you have to post more information on what you are trying to do
-
jadeydi[m]
selsta: ok
-
jadeydi[m]
> <@jadeydi:matrix.org> hi, I got some errors for monero failed to deserialize Bad signature Type 6... (full message at <
libera.ems.host/_matrix/media/v3/do…fc00796ee0d6d1f8f7ea3b2c777182c56a5>)
-
jadeydi[m]
create_tx__retVals.tx_hash_string 35659e2cdc652b11e041024ac04201960265e62dc9712e99f59b4f874a166ae5
-
jadeydi[m]
create_tx__retVals.tx_key_string d29d6a8d56436c267195b1383f992db765fbdfcaed81d8a7624568db2686a902
-
jadeydi[m]
create_tx__retVals.tx_pub_key_string 2c8a1558cd0072564d72bebe3d8d2a59b8bfdcc1f90cdf7607f498a75b0c4f02
-
jadeydi[m]
here is others fields
-
jadeydi[m]
I'm trying to build a transaction from multiple address with multiple utxo, and it success signed the transaction
-
selsta
which version of mymonero-core-cpp are you using?
-
jadeydi[m]
selsta: I'm using master, updated several minutes ago
-
selsta
ok, does a basic transaction work with one address?
-
endogenic
what do you mean by "from multiple addresses"
-
jadeydi[m]
endogenic: A transaction with 3 outputs from A, B, C
-
endogenic
3 inputs to the tx from different sources you mean?
-
jadeydi[m]
selsta: I didn't try it, I hacked many code, I can upload it first
-
selsta
try that first, don't start with some complex thing
-
jadeydi[m]
endogenic: yeah
-
endogenic
jadeydi[m]: you shouldnt have any issues with that afaik
-
endogenic
(i wrote the code btw)
-
endogenic
though whatever is there now is not under my control
-
endogenic
i have a new lib that is private for now
-
endogenic
original API
-
endogenic
I will release it soon (tm). this summer i had some setbacks and had to rep monero at sbc :)
-
jadeydi[m]
endogenic: Thanks you works bro
-
endogenic
works now?
-
jadeydi[m]
-
jadeydi[m]
I didn't write c++ before
-
endogenic
hm looks like you are duplicating a lot of code which you can just import instead
-
endogenic
i might suggest adding monero-core-cpp as a git submodule
-
jadeydi[m]
endogenic: Will do it, maybe should make it works first
-
endogenic
well, just so long as you didnt accidentally modify some of the code you've copied as that can introduce other unknowns into your experiment
-
jadeydi[m]
endogenic: not duplicating, since we need sign transaction from utxos from A, B and C, so there needs some changes.
-
endogenic
i dont believe so
-
endogenic
if you can point out what changes you think you need, i can help verify but .. that code should be able to select any number of outputs to use as inputs to a tx
-
endogenic
maybe you are trying to use outputs owned by multiple wallets in a single tx
-
endogenic
i believe that is illegal in monero
-
moneromooo
I don't think it is. I had a PoC at some point, and I don't think I modified verification.
-
endogenic
i guess one just needs to sign them all properly?
-
endogenic
that's kinda neat
-
jadeydi[m]
endogenic: yeah, that's we're working on, even it's illegal lol
-
endogenic
jadeydi[m]: i'd be interested in collaborating with you on enhancing the monero core cpp code if you do that
-
endogenic
hah i meant illegal as in not possible
-
endogenic
watch out, the monero police are gonna get ya
-
endogenic
*censors jadeydi[m] *
-
jadeydi[m]
endogenic: I don't quite understand what you mean, just some afraid , lol
-
endogenic
monero core cpp just feeds into the monero "cryptonote" code itself so in theory whatever mooo got working should work too
-
endogenic
jadeydi[m]: ok well i'm interested in helping. feel free to contact me
-
moneromooo
Rings are signed independently. Or were when I did it. Was a while back.
-
jadeydi[m]
Thanks, I'm asking help right now, what we're doing is, spending outputs (SpendableOutput) from A, B, C or more, in one transactions, with a right signature, I think monero don't care inputs from whom, so it might be works.
-
jadeydi[m]
And I have the signature, tx hash etc right now, but has some error `monero failed to deserialize Bad signature Type 6`
-
jadeydi[m]
moneromooo: Yeah, I'm sure it works before
-
moneromooo
Might be because it's using an old consensus ruleset. Make sure you're using the most recent one (well, the one you used to create that tx anyway).
-
jadeydi[m]
> <@jadeydi:matrix.org> Thanks, I'm asking help right now, what we're doing is, spending outputs (SpendableOutput) from A, B, C or more, in one transactions, with a right signature, I think monero don't care inputs from whom, so it might be works.
-
jadeydi[m]
>
-
jadeydi[m]
> And I have the signature, tx hash etc right now, but has some error `monero failed to deserialize Bad signature Type 6`
-
jadeydi[m]
I'm not sure it's best (or legal), but I have to do like this. I'm not the boss.
-
jadeydi[m]
moneromooo: Will check it
-
endogenic
you are the boss though jadeydi[m]
-
endogenic
can you tell where that error is originating from?
-
endogenic
looks like you're getting it from simplewallet
-
jadeydi[m]
<endogenic> "can you tell where that error is..." <- Thanks endogenic, I found the error from. It's internal, I'll fix first
-
jeffro256[m]
moneromooo would you be able to review
monero-project/monero #8627 if you have time?
-
jadeydi[m]
monero.fail this list is cool
-
mrnaif
Hello! I want to add Monero support to my opensource payment processor. The official library for python is monero-python, right?
github.com/monero-ecosystem/monero-python... (full message at <
libera.ems.host/_matrix/media/v3/do…716c489b998f1afc76ca0b240eaca905f2b>)
-
selsta
we don't have an official python library
-
selsta
at least
github.com/monero-ecosystem/monero-python isn't official, it's a community maintained library
-
elucidator
I did something similar for personal wallet management, easy to implement with wallet RPC daemon with python RPC libraries or just straight up requests library with json constructed by yourself mrnaif
-
charuto
huh
-
charuto
did anyone hear anything about openssl
-
endogenic
yes
-
charuto
i just read this, not sure how legitimate it is
-
one-horse-wagon[
What happened.
-
charuto
> OpenSSL 3.x has a huge vulnerability, probably something as large as Heartbleed... (full message at <
libera.ems.host/_matrix/media/v3/do…55270ba9260892d2cef6b8f629791099e82>)
-
endogenic
yup
-
selsta
we use openssl 1.1.1 for release binaries so should not be relevant for us
-
charuto
good to know, worth keeping our eyes open regardless
-
charuto
-
charuto
-
hyc
yeah, stay current but not quite on the bleeding edge...