These are chat archives for Nethereum/Nethereum

29th
Jun 2018
RevVivek
@RevVivek
Jun 29 2018 02:47
@juanfranblanco Do we have the functionality in Nethereum to call some costume contract function other than ICO or Token contract.
Juan Blanco
@juanfranblanco
Jun 29 2018 03:53
@tmyngu11 no :)
@RevVivek yes that is what Nethereum does :)
RevVivek
@RevVivek
Jun 29 2018 03:54
@juanfranblanco Can you please share some link or tutorial for this
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:01

When we create an account Geth creates a file in Key store, whose name is something like "UTC--2018-06-27T12-44-30.347800900Z--37dfe826706323e01292b002cf09113f85377b7f"

here "UTC--2018-06-27T12-44-30" is the time of creation,
"347800900Z" whats that?
"37dfe826706323e01292b002cf09113f85377b7f" is the address after 0x,

is there any simple method to access the file from keystore? i want to create a method to which i'll pass an address, and that method will return me private key by ready the file generated against that address from keystore folder.

Juan Blanco
@juanfranblanco
Jun 29 2018 06:03
the keystore is not
always on the same place
also there are other clients like parity
so if you know your path
if you want to understand the web3 storage definition format
check this
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:04
In GETH it creates always in the keystore folder.
Juan Blanco
@juanfranblanco
Jun 29 2018 06:05
of what geth
you can have it in many places
you can configure it have your data in a specific place
like here
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:07
i configured the file at a specific place, now the question is how to access the file later for an address?
how'll i know the name of file that is generated?
Juan Blanco
@juanfranblanco
Jun 29 2018 06:07
File.OpenText ?
you don't know it
the whole path
the whole name
as it includes the utc
that explains it
also you can create it with Nethereumt oo
the file I mean
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:09
how?
can i set the name of file on my own?
Juan Blanco
@juanfranblanco
Jun 29 2018 06:10
again it won't be the standard
you can call it whaever
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:12
here you hardcoded the name
i want to get it dynamically
Juan Blanco
@juanfranblanco
Jun 29 2018 06:13
sure
just do it
please run the program
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:19
on line 31 you passed the key param
which you got from line 23
Juan Blanco
@juanfranblanco
Jun 29 2018 06:19
yes sure
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:20
and on line 23 you got json from hardcoded file
Juan Blanco
@juanfranblanco
Jun 29 2018 06:20
it is a sample
so you can read and create your own files
including the naming standard
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:21
GenerateUTCFileName will generate a new file that will give me private key after decryption?
Juan Blanco
@juanfranblanco
Jun 29 2018 06:21
No that is the filename
like the one you were asking before
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:22
okay
Juan Blanco
@juanfranblanco
Jun 29 2018 06:22
in simple terms:
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:22
let me try this
Juan Blanco
@juanfranblanco
Jun 29 2018 06:22
(1) There is a standard to store the private keys
as per the link I sent before
(2) These are encrypted using different formats and configurations
(3) The file name is also a standard, as you have pointed out "GenerateUTCFileName" does that
(4) You can decrypt the files too
(5) you have seen already the standard uses UTC and the Address
(6) you also know your path of where you are installing geth and the keystore
(7) you can save the files there or you can pick them from there
You can use the sample creates, loads and saves
Nethereum will not know where the files are for geth or parity as these can be installed in different places
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:28
i'm having difficulties in picking the file from the path
Geth created a file as per UTC FileName standard
now that name is unknown to me.
Juan Blanco
@juanfranblanco
Jun 29 2018 06:30
i would love to help you with that but I got up at 4 to get some work done
maybe later
Zeshan Virk
@zeshanvirk
Jun 29 2018 06:30
sure.
no problem at all
efootstep
@efootstep
Jun 29 2018 18:48
When I am trying to unlock my wallet in IOS device, my keystore is not decrypting and I am getting some error regarding newtonsoft.
The same code is working
for windows
I am using Unity
I found one different the Keystore json value on windows is different than IOS
anyone can help me?
this is the key for windows
{"crypto":{"ciphertext":"c0712216103659b8aad7613c95db6d01b140137e986d3c2a05baa74ad35ed67b","cipherparams":{"iv":"48146c85584a53208d018dd494999272"},"kdf":"scrypt","mac":"a69f6311a67cbfed184e04e72b308aa63307ecec37bd5af1cdc00cb11808703e","kdfparams":{"n":262144,"r":1,"p":8,"dklen":32,"salt":"ca53d28df0db1637abf66b17c363fa22deb900f9cb2a73bb4c47071b0167b8a9"}},"id":"0e32b3a9-d392-4743b1bc-f86801f8694e"}
and this is the keystore for
{"crypto":{"ciphertext":"c0712216103659b8aad7613c95db6d01b140137e986d3c2a05baa74ad35ed67b","cipherparams":{"iv":"48146c85584a53208d018dd494999272"},"kdf":"scrypt","mac":"a69f6311a67cbfed184e04e72b308aa63307ecec37bd5af1cdc00cb11808703e","kdfparams":{"n":262144,"r":1,"p":8,"dklen":32,"salt":"ca53d28df0db1637abf66b17c363fa22deb900f9cb2a73bb4c47071b0167b8a9"}}}
So here ID is missing, I am new with etehreum so please pardon me If I ask any silly question