FritzPeterAlbrecht / IotaPay_v0.0.1

IOTAPay PoC
3 stars 3 forks source link

How is it possible to see the complete transaction? #4

Open basicvisual opened 4 years ago

basicvisual commented 4 years ago

Hi , good work on the proof of concept for IOTA application. I was wondering how can one see the complete transaction of iota debited and credited. Do i need to download a trinity wallet application o nthe other side ?

FritzPeterAlbrecht commented 4 years ago

Hi, thanks for your request. The amount credited is shown in the app itself. When you sent funds to the app, a message is shown on the GUI that amount X is received. As soon the TX is confirmed you get another message and the timer gets loaded. In the config you can set the amount per second. If you have more questions just ask me ;-)

basicvisual commented 4 years ago

Sorry i misunderstood your answer.

  1. To send fund to the Gui , is there a program to send funds . To simulate that ? Suppose i send 2 IOTAS . As you mentioned the exact amount is credited in the app itself right ?

  2. Since i just want to , see a basic fund transfer , i guess i will not need the config file ?

  3. Which file is to be used to simulate the send funds. Is it possible to use dummy iotasto simulate the whole chain ?

FritzPeterAlbrecht commented 4 years ago
  1. You have to send via Trinity or copy the shown address to the wallet or code you are using to send your funds. Since Trinity can use QR Codes, you can use it to scan the address shown from the app. It always generates a new RX address after funds are received and the timer reached 0.

  2. To not send any funds which you can not touch anymore, you should change the settings in the config.json. Create a seed and copy it to the config.json and delete the usedAddresses.json The App recognizes that the usedAddresses file is missing and creates a new one. If you don't mind to send IOTAs to my address / testing seed, you can just do so ;-)

  3. For more questions just ask ;-)

FritzPeterAlbrecht commented 4 years ago

Furthermore: I build in a fund sending function. If one uses this app on some more devices, one can easily receive the funds collected by the app to a "Device Owner" address. Let's imagine you are using 20 devices /w IOTAPay it could be automated to send all funds to your wallet. But for that you have to activate it in the code ;-)

FritzPeterAlbrecht commented 4 years ago

If you use a fresh seed and delete the usedAddresses.json you have to uncomment this line in main.py

ic.generate_new_address() # uncomment for startup / or deleted usedAddresses json

After the first run, switch it off again

basicvisual commented 4 years ago

thanks for the quick replies , trying to comprehend what you said and let me know if i am wrong

  1. I can install a trinity wallet in phone or PC . I guess to use the QR functionality , its better to use the wallet ? So presently the IOTA has been sent to the following fixed address right ? or ? where is the address defined ? I am using this workshop tutoral : https://github.com/iota-community/python-iota-workshop/blob/master/code/e06_send_tokens.py , to see if i can send the tokens. I guess it should work with your implementation right ? (recieving the iota )

  2. Sorry i didnt quite understand this part.

FritzPeterAlbrecht commented 4 years ago
  1. The Address is generated from the seed (defined in the config) in connection with the usedAddresses.json What you did write down is the seed, not an address!!! The code is reading out the usedAddresses.json and uses the result to generate a new address from the seed which is fixed in the config. Just open the config.json and have a look. This is happening in the IotaControl.py
basicvisual commented 4 years ago

oh !! sorry , I am a bit confused by seed )analgous to account) and addresses. Thanks for the pointers to look in the configuration file and found the Falseflag . I used the address as you mentioned in the config file and changed the address for 1 miota

https://github.com/iota-community/python-iota-workshop/blob/28ec9b6ec1e0c3c1832b5d92443c8edd40e5a08a/code/e06_send_tokens.py#L16

tx = ProposedTransaction(
    address=Address(address),
    message=TryteString.from_unicode('This transaction should include 1i!'),
    tag=Tag('VALUETX'),
    value=1
)

I use the dev network and the output suggested a suucessful upload to the tangle

Transaction sent to the tangle! https://devnet.thetangle.org/address/GVEOX9ZEELJSCJRRCKPYU9KW9XXOHOWFJE9JVNPNBZLRUNTHOTV9DLZIONQJFAX9BSRSPK9CEPAZVRFDWEWETSLMUD

I also changed the config file for the node to use "Node": "https://nodes.devnet.iota.org:443",

I have executed the main.py but have got no ndication of recived tokens . Is it because it is on the devnet ?

FritzPeterAlbrecht commented 4 years ago

Is IOTAPay running correctly? Do you see the UI? Normaly that should run on the devnet, I used devnet while coding too