Posted 24 June 2016 - 03:15 PM
Hello guys,
I heard of Krist last wednesday, and decided to check it out, and I really got interested in it.
While I'm not sure if its wasted time or power, I've been mining for 5 hours and already got a little capital of 10 000 Krist.
After looking into the API I created some testing programs and I really enjoyed doing that.
So I'm going to (I actually already am) programming my own wallet program, in C#. (For Windows only, outside Minecraft)
It will be the most advanced wallet of all wallets I've seen yet. I will try to implement every feature the web API gives us.
I am skilled with C#, and a little with lua, but not very much.
I looked into the reference wallet code to see all the algorithms, and I understand a lot, but the address generation algorithm is kinda fragmented so I couldn't exactly figure that out.
Could anybody tell me (prefferably in psuedo-code) how this is done?
Thank you!
Part of the address generation code:
Full reference wallet: https://krist.ceriat.net/kristwallet
Fun facts I calculated:
The richest account has % 18.96 of all the money.
The 5 richest accounts have % 60.49 of all the money.
The 10 richest accounts have % 74.35 of all the money.
And since everybody seems to be posting this along with their post: donate your too much KST to
I heard of Krist last wednesday, and decided to check it out, and I really got interested in it.
While I'm not sure if its wasted time or power, I've been mining for 5 hours and already got a little capital of 10 000 Krist.
After looking into the API I created some testing programs and I really enjoyed doing that.
So I'm going to (I actually already am) programming my own wallet program, in C#. (For Windows only, outside Minecraft)
It will be the most advanced wallet of all wallets I've seen yet. I will try to implement every feature the web API gives us.
I am skilled with C#, and a little with lua, but not very much.
I looked into the reference wallet code to see all the algorithms, and I understand a lot, but the address generation algorithm is kinda fragmented so I couldn't exactly figure that out.
Could anybody tell me (prefferably in psuedo-code) how this is done?
Thank you!
Part of the address generation code:
Spoiler
function makev2address(key)
local protein = {}
local stick = sha256(sha256(key))
local n = 0
local link = 0
local v2 = "k"
repeat
if n < 9 then protein[n] = string.sub(stick,0,2)
stick = sha256(sha256(stick)) end
n = n + 1
until n == 9
n = 0
repeat
link = tonumber(string.sub(stick,1+(2*n),2+(2*n)),16) % 9
if string.len(protein[link]) ~= 0 then
v2 = v2 .. makeaddressbyte(tonumber(protein[link],16))
protein[link] = ''
n = n + 1
else
stick = sha256(stick)
end
until n == 9
return v2
end
Full reference wallet: https://krist.ceriat.net/kristwallet
Fun facts I calculated:
The richest account has % 18.96 of all the money.
The 5 richest accounts have % 60.49 of all the money.
The 10 richest accounts have % 74.35 of all the money.
And since everybody seems to be posting this along with their post: donate your too much KST to
GoogleTech.kst
;)/> :P/>Edited on 24 June 2016 - 02:06 PM