Idea for a project but missing certain api's

So I was thinking of an application where people could would publish a prediction in the form of a hash and commit cycles to that prediction. You would only get the cycles back if you then published the text of your prediction and the hash of that text matches the hash that you published. For this Idea I’m missing two things. The first is that I would also like to publish the date that the prediction was made. Obviously I wouldn’t want people to upload that date themselves to prevent tomfoolery, but there is no api for the current time or block number. The second is the api for transmitting and locking cycles.

I can’t imagine I’m the only one who needs these api’s and they seem pretty important for all sorts of applications. Are there any timelines on this functionality?

Edit: I would also need to know the hashing algorithm that motoko uses so I can use the same one in the client


Hash Sha256

1 Like

And cycles… Managing cycles :: Internet Computer


oh oops this is embarrassing thank you for your reply

Oh, dear.
I assume you’re talking about making an APP for the lottery? The one who guessed the right number would be rewarded. Oh, Yeah?

1 Like