Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update lock file for Juvix 0.6.9 #72

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: jaxxstorm/[email protected]
with:
repo: anoma/juvix
tag: v0.6.8
tag: v0.6.9
cache: enable
- name: Clean
run: juvix clean --global && juvix dependencies update
Expand Down
16 changes: 8 additions & 8 deletions Anoma/Resource/Types.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ type NullifierKeyCommitment :=
open NullifierKeyCommitment public;

module Nonce;
--- 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 ByteArray;
--- 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 ByteArray;

size : Nat := 32;
size : Nat := 32;

fromNat : Nat -> Nonce := fromAnomaContents size >> mkNonce;
fromNat : Nat -> Nonce := fromAnomaContents size >> mkNonce;

from32SizedByteArray : ByteArray -> Nonce := mkNonce;
from32SizedByteArray : ByteArray -> Nonce := mkNonce;

toNat : Nonce -> Nat
| (mkNonce nonce) := toAnomaContents nonce;
toNat : Nonce -> Nat
| (mkNonce nonce) := toAnomaContents nonce;

end;

Expand Down
6 changes: 4 additions & 2 deletions Applib/Helpers.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ import BaseLayer.ResourceMachine as BaseLayer;
findResourceByNullifier
(nf : Nat) (privateInputs : BaseLayer.Witness) : Maybe Resource :=
let
hasNullifier (nf : Nat) (r : Resource) : Bool := BaseLayer.nullifier r == nf;
hasNullifier (nf : Nat) (r : Resource) : Bool :=
BaseLayer.nullifier r == nf;
getConsumed (nf : Nat) : Maybe Resource :=
find (hasNullifier nf) (BaseLayer.Witness.consumed privateInputs);
in getConsumed nf;

findResourceByCommitment
(cm : Nat) (privateInputs : BaseLayer.Witness) : Maybe Resource :=
let
hasCommitment (cm : Nat) (r : Resource) : Bool := BaseLayer.commitment r == cm;
hasCommitment (cm : Nat) (r : Resource) : Bool :=
BaseLayer.commitment r == cm;
getCreated (cm : Nat) : Maybe Resource :=
find (hasCommitment cm) (BaseLayer.Witness.created privateInputs);
in getCreated cm;
Expand Down
2 changes: 1 addition & 1 deletion Package.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ package : Package :=
defaultPackage@{
name := "anoma-applib";
version := mkVersion 0 6 0;
dependencies := [defaultStdlib];
dependencies := [github "anoma" "juvix-stdlib" "v0.9.0"];
};
9 changes: 6 additions & 3 deletions juvix.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# This file was autogenerated by Juvix version 0.6.8.
# This file was autogenerated by Juvix version 0.6.9.
# Do not edit this file manually.

version: 2
checksum: e9d510f29d070badc15f3b0009e471b4c9f433d8bc0f82324c011d00b5d21d11
checksum: e2a4860cbb63c726e1c85e7734bb7dc653905f2be37229bd4fe4b78d90082a22
dependencies:
- path: .juvix-build/0.6.8/stdlib/
- git:
name: anoma_juvix-stdlib
ref: 01ff19f1135048be3402e094f2fc89406a44a995
url: https://github.com/anoma/juvix-stdlib
dependencies: []
Loading