commit a97839b747cc0d85decfeef4761a6dbf57983dae Author: E M <5089238+emizzle@users.noreply.github.com> Date: Wed Jan 14 19:12:43 2026 +1100 Initial nimble pkg commit diff --git a/merkletree.nimble b/merkletree.nimble new file mode 100644 index 0000000..dc02e2f --- /dev/null +++ b/merkletree.nimble @@ -0,0 +1,12 @@ +# Package + +version = "0.1.0" +author = "Logos Storage team" +description = "Merkle tree implementation used for Logos Storage" +license = "MIT" +srcDir = "src" + + +# Dependencies + +requires "nim >= 2.2.6" diff --git a/src/merkletree.nim b/src/merkletree.nim new file mode 100644 index 0000000..b7a2480 --- /dev/null +++ b/src/merkletree.nim @@ -0,0 +1,7 @@ +# This is just an example to get you started. A typical library package +# exports the main API in this file. Note that you cannot rename this file +# but you can remove it if you wish. + +proc add*(x, y: int): int = + ## Adds two numbers together. + return x + y diff --git a/src/merkletree/submodule.nim b/src/merkletree/submodule.nim new file mode 100644 index 0000000..a70ab64 --- /dev/null +++ b/src/merkletree/submodule.nim @@ -0,0 +1,12 @@ +# This is just an example to get you started. Users of your library will +# import this file by writing ``import merkletree/submodule``. Feel free to rename or +# remove this file altogether. You may create additional modules alongside +# this file as required. + +type + Submodule* = object + name*: string + +proc initSubmodule*(): Submodule = + ## Initialises a new ``Submodule`` object. + Submodule(name: "Anonymous") diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 0000000..3bb69f8 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1 @@ +switch("path", "$projectDir/../src") \ No newline at end of file diff --git a/tests/test1.nim b/tests/test1.nim new file mode 100644 index 0000000..4bf04d6 --- /dev/null +++ b/tests/test1.nim @@ -0,0 +1,12 @@ +# This is just an example to get you started. You may wish to put all of your +# tests into a single file, or separate them into multiple `test1`, `test2` +# etc. files (better names are recommended, just make sure the name starts with +# the letter 't'). +# +# To run these tests, simply execute `nimble test`. + +import unittest + +import merkletree +test "can add": + check add(5, 5) == 10