We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb02a12 commit 03744a4Copy full SHA for 03744a4
BaseLayer/ResourceMachine.juvix
@@ -207,9 +207,14 @@ with
207
208
size : Nat := 32;
209
210
- fromAnomaAtom : AnomaAtom -> Nonce := fromAnomaContents size >> privateMk;
+ fromAnomaAtom : AnomaAtom -> Nonce := fromAnomaContents size >> fromByteArray;
211
212
- from32SizedByteArray : ByteArray -> Nonce := privateMk;
+ fromByteArray (b : ByteArray) : Nonce :=
213
+ if
214
+ | ByteArray.size b == size := privateMk b
215
+ | else := failwith "Nonce.fromByteArray incorrect size";
216
+
217
+ from32SizedByteArray : ByteArray -> Nonce := fromByteArray;
218
219
toAnomaAtom : Nonce -> AnomaAtom
220
| (privateMk nonce) := toAnomaContents nonce;
0 commit comments