diff --git a/Anoma/Builtin/System.juvix b/Anoma/Builtin/System.juvix index 97a0f6a..a30c813 100644 --- a/Anoma/Builtin/System.juvix +++ b/Anoma/Builtin/System.juvix @@ -78,8 +78,9 @@ syntax alias PRNG := PseudoRandomNumberGenerator; --- Creates and initializes a pure PRNG with a seed. --- @param The seed. --- @return The initialized PRNG. -builtin anoma-random-generator-init -axiom pseudoRandomNumberGeneratorInit : Nat -> PRNG; +-- TODO Conversion should be handled on the base layer. +-- builtin anoma-random-generator-init +axiom pseudoRandomNumberGeneratorInit : ByteArray -> PRNG; --- Returns two distinct PRNGs. --- @param The generator to split. diff --git a/Anoma/Resource/Types.juvix b/Anoma/Resource/Types.juvix index 4bb085f..5e839f6 100644 --- a/Anoma/Resource/Types.juvix +++ b/Anoma/Resource/Types.juvix @@ -3,6 +3,7 @@ module Anoma.Resource.Types; import Stdlib.Prelude open; import Stdlib.Trait.Ord.Eq open using {fromOrdToEq}; import Anoma.Primitives.FixedSize open; +import Anoma.Builtin.ByteArray open; import Anoma.Utils open; --- A fixed-size data type encoding the reference to the resource logic function. @@ -26,11 +27,11 @@ type NullifierKeyCommitment := --- A fixed-size data type encoding a number to be used once ensuring that the resource commitment is unique. --- NOTE: This should be a number having an at most negligible chance of repeating is sufficient, e.g., a pseudo-random number. -type Nonce := mkNonce@{unNonce : MISSING_DEFINITION}; +type Nonce := mkNonce@{unNonce : ByteArray}; --- A fixed-size data type encoding a randomness seed. --- NOTE: This seed provides pseudo randomness and cannot be expected to provide true randomness. -type RandSeed := mkRandSeed@{unRandSeed : MISSING_DEFINITION}; +type RandSeed := mkRandSeed@{unRandSeed : ByteArray}; --- The resource label type. type Label := mkLabel@{unLabel : MISSING_DEFINITION}; diff --git a/juvix.lock.yaml b/juvix.lock.yaml index d721670..e5a94fb 100644 --- a/juvix.lock.yaml +++ b/juvix.lock.yaml @@ -2,7 +2,7 @@ # Do not edit this file manually. version: 2 -checksum: aee7ca6999521d60319bcb414911575aab7ff59e369c9c4677da9563a6299942 +checksum: 2b4ceed787050a25e74294448dc1bcdd9683916bc5bed83bbcbf6e652897308d dependencies: - git: name: anoma_juvix-stdlib