diff --git a/atlas.lock b/atlas.lock index f672e7f..4de1841 100644 --- a/atlas.lock +++ b/atlas.lock @@ -1,67 +1,57 @@ { "items": { - "nimbus-build-system": { - "dir": "vendor/nimbus-build-system", - "url": "https://github.com/status-im/nimbus-build-system", - "commit": "239c3a7fbb88fd241da0ade3246fd2e5fcff4f25" - }, - "nim-nat-traversal": { - "dir": "vendor/nim-nat-traversal", - "url": "https://github.com/status-im/nim-nat-traversal", - "commit": "802d75edcc656e616120fb27f950ff1285ddcbba" - }, - "nim-zlib": { - "dir": "vendor/nim-zlib", + "zlib": { + "dir": "vendor/zlib", "url": "https://github.com/status-im/nim-zlib", - "commit": "f34ca261efd90f118dc1647beefd2f7a69b05d93" + "commit": "74cdeb54b21bededb5a515d36f608bc1850555a2" }, - "nim-stew": { - "dir": "vendor/nim-stew", + "stew": { + "dir": "vendor/stew", "url": "https://github.com/status-im/nim-stew.git", "commit": "e18f5a62af2ade7a1fd1d39635d4e04d944def08" }, - "nim-http-utils": { - "dir": "vendor/nim-http-utils", + "httputils": { + "dir": "vendor/httputils", "url": "https://github.com/status-im/nim-http-utils.git", - "commit": "3b491a40c60aad9e8d3407443f46f62511e63b18" + "commit": "e88e231dfcef4585fe3b2fbd9b664dbd28a88040" }, - "nim-chronos": { - "dir": "vendor/nim-chronos", + "chronos": { + "dir": "vendor/chronos", "url": "https://github.com/status-im/nim-chronos.git", "commit": "6525f4ce1d1a7eba146e5f1a53f6f105077ae686" }, "upraises": { "dir": "vendor/upraises", "url": "https://github.com/markspanbroek/upraises.git", - "commit": "bc2628989b63854d980e92dadbd58f83e34b6f25" + "commit": "ff4f8108e44fba9b35cac535ab63d3927e8fd3c2" }, - "nim-sqlite3-abi": { - "dir": "vendor/nim-sqlite3-abi", - "url": "https://github.com/arnetheduck/nim-sqlite3-abi.git", + "sqlite3_abi": { + "dir": "vendor/sqlite3_abi", + "url": "https://github.com/arnetheduck/nim-sqlite3-abi", "commit": "362e1bd9f689ad9f5380d9d27f0705b3d4dfc7d3" }, "questionable": { "dir": "vendor/questionable", "url": "https://github.com/status-im/questionable.git", - "commit": "0d7ce8efdedaf184680cb7268721fca0af947a74" + "commit": "30e4184a99c8c1ba329925912d2c5d4b09acf8cc" }, - "nim-websock": { - "dir": "vendor/nim-websock", + "websock": { + "dir": "vendor/websock", "url": "https://github.com/status-im/nim-websock.git", - "commit": "2c3ae3137f3c9cb48134285bd4a47186fa51f0e8" + "commit": "7b2ed397d6e4c37ea4df08ae82aeac7ff04cd180" }, - "nim-secp256k1": { - "dir": "vendor/nim-secp256k1", + "secp256k1": { + "dir": "vendor/secp256k1", "url": "https://github.com/status-im/nim-secp256k1.git", - "commit": "5340cf188168d6afcafc8023770d880f067c0b2f" + "commit": "2acbbdcc0e63002a013fff49f015708522875832" }, - "nim-bearssl": { - "dir": "vendor/nim-bearssl", + "bearssl": { + "dir": "vendor/bearssl", "url": "https://github.com/status-im/nim-bearssl.git", "commit": "f4c4233de453cb7eac0ce3f3ffad6496295f83ab" }, - "dnsclient.nim": { - "dir": "vendor/dnsclient.nim", + "dnsclient": { + "dir": "vendor/dnsclient", "url": "https://github.com/ba0f3/dnsclient.nim", "commit": "23214235d4784d24aceed99bbfe153379ea557c8" }, @@ -70,74 +60,80 @@ "url": "https://github.com/status-im/nimcrypto.git", "commit": "a5742a9a214ac33f91615f3862c7b099aec43b00" }, - "nim-json-serialization": { - "dir": "vendor/nim-json-serialization", + "json_serialization": { + "dir": "vendor/json_serialization", "url": "https://github.com/status-im/nim-json-serialization.git", "commit": "e5b18fb710c3d0167ec79f3b892f5a7a1bc6d1a4" }, - "nim-testutils": { - "dir": "vendor/nim-testutils", + "testutils": { + "dir": "vendor/testutils", "url": "https://github.com/status-im/nim-testutils", - "commit": "b56a5953e37fc5117bd6ea6dfa18418c5e112815" + "commit": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34" }, - "nim-unittest2": { - "dir": "vendor/nim-unittest2", + "unittest2": { + "dir": "vendor/unittest2", "url": "https://github.com/status-im/nim-unittest2.git", "commit": "b178f47527074964f76c395ad0dfc81cf118f379" }, - "npeg": { - "dir": "vendor/npeg", - "url": "https://github.com/zevv/npeg", - "commit": "b15a10e388b91b898c581dbbcb6a718d46b27d2f" + "combparser": { + "dir": "vendor/combparser", + "url": "https://github.com/PMunch/combparser.git", + "commit": "ba4464c005d7617c008e2ed2ebc1ba52feb469c6" }, - "nim-serialization": { - "dir": "vendor/nim-serialization", + "serialization": { + "dir": "vendor/serialization", "url": "https://github.com/status-im/nim-serialization.git", "commit": "493d18b8292fc03aa4f835fd825dea1183f97466" }, - "nim-faststreams": { - "dir": "vendor/nim-faststreams", + "faststreams": { + "dir": "vendor/faststreams", "url": "https://github.com/status-im/nim-faststreams.git", "commit": "1b561a9e71b6bdad1c1cdff753418906037e9d09" }, "nim-datastore": { "dir": "vendor/nim-datastore", - "url": "https://github.com/codex-storage/nim-datastore.git", + "url": "https://github.com/codex-storage/nim-datastore", "commit": "0cde8aeb67c59fd0ac95496dc6b5e1168d6632aa" }, "asynctest": { "dir": "vendor/asynctest", - "url": "https://github.com/markspanbroek/asynctest", + "url": "https://github.com/codex-storage/asynctest.git", "commit": "a236a5f0f3031573ac2cb082b63dbf6e170e06e7" }, - "nim-stint": { - "dir": "vendor/nim-stint", - "url": "https://github.com/status-im/nim-stint.git", - "commit": "036c71d06a6b22f8f967ba9d54afd2189c3872ca" + "stint": { + "dir": "vendor/stint", + "url": "https://github.com/status-im/nim-stint", + "commit": "86621eced1dcfb5e25903019ebcfc76ed9128ec5" }, - "nim-metrics": { - "dir": "vendor/nim-metrics", + "metrics": { + "dir": "vendor/metrics", "url": "https://github.com/status-im/nim-metrics.git", "commit": "743f81d4f6c6ebf0ac02389f2392ff8b4235bee5" }, - "nim-libp2p": { - "dir": "vendor/nim-libp2p", + "libp2p": { + "dir": "vendor/libp2p", "url": "https://github.com/status-im/nim-libp2p.git", "commit": "a3e9d1ed80c048cd5abc839cbe0863cefcedc702" }, - "nim-chronicles": { - "dir": "vendor/nim-chronicles", + "chronicles": { + "dir": "vendor/chronicles", "url": "https://github.com/status-im/nim-chronicles.git", "commit": "7631f7b2ee03398cb1512a79923264e8f9410af6" }, - "nim-protobuf-serialization": { - "dir": "vendor/nim-protobuf-serialization", + "protobuf_serialization": { + "dir": "vendor/protobuf_serialization", "url": "https://github.com/status-im/nim-protobuf-serialization", - "commit": "28214b3e40c755a9886d2ec8f261ec48fbb6bec6" + "commit": "27b400fdf3bd8ce7120ca66fc1de39d3f1a5804a" } }, - "nimcfg": "############# begin Atlas config section ##########\n--noNimblePath\n--path:\"vendor/nim-secp256k1\"\n--path:\"vendor/nim-protobuf-serialization\"\n--path:\"vendor/nimcrypto\"\n--path:\"vendor/nim-bearssl\"\n--path:\"vendor/nim-chronicles\"\n--path:\"vendor/nim-chronos\"\n--path:\"vendor/nim-libp2p\"\n--path:\"vendor/nim-metrics\"\n--path:\"vendor/nim-stew\"\n--path:\"vendor/nim-stint\"\n--path:\"vendor/asynctest\"\n--path:\"vendor/nim-datastore\"\n--path:\"vendor/questionable\"\n--path:\"vendor/nim-faststreams\"\n--path:\"vendor/nim-serialization\"\n--path:\"vendor/npeg/src\"\n--path:\"vendor/nim-unittest2\"\n--path:\"vendor/nim-testutils\"\n--path:\"vendor/nim-json-serialization\"\n--path:\"vendor/nim-http-utils\"\n--path:\"vendor/dnsclient.nim/src\"\n--path:\"vendor/nim-websock\"\n--path:\"vendor/nim-sqlite3-abi\"\n--path:\"vendor/upraises\"\n--path:\"vendor/nim-zlib\"\n############# end Atlas config section ##########\n", + "nimcfg": "############# begin Atlas config section ##########\n--noNimblePath\n--path:\"vendor/secp256k1\"\n--path:\"vendor/protobuf_serialization\"\n--path:\"vendor/nimcrypto\"\n--path:\"vendor/bearssl\"\n--path:\"vendor/chronicles\"\n--path:\"vendor/chronos\"\n--path:\"vendor/libp2p\"\n--path:\"vendor/metrics\"\n--path:\"vendor/stew\"\n--path:\"vendor/stint\"\n--path:\"vendor/asynctest\"\n--path:\"vendor/nim-datastore\"\n--path:\"vendor/questionable\"\n--path:\"vendor/faststreams\"\n--path:\"vendor/serialization\"\n--path:\"vendor/combparser/src\"\n--path:\"vendor/unittest2\"\n--path:\"vendor/testutils\"\n--path:\"vendor/json_serialization\"\n--path:\"vendor/httputils\"\n--path:\"vendor/dnsclient/src\"\n--path:\"vendor/websock\"\n--path:\"vendor/sqlite3_abi\"\n--path:\"vendor/upraises\"\n--path:\"vendor/zlib\"\n############# end Atlas config section ##########\n", + "nimbleFile": { + "filename": "nim-codex-dht.nimble", + "content": "# Package\n\nversion = \"0.3.2\"\nauthor = \"Status Research & Development GmbH\"\ndescription = \"DHT based on the libp2p Kademlia spec\"\nlicense = \"MIT\"\nskipDirs = @[\"tests\"]\n\n\n# Dependencies\nrequires \"nim >= 1.2.0\"\nrequires \"secp256k1#b3f38e2795e805743b299dc5d96d332db375b520\" # >= 0.5.2 & < 0.6.0\nrequires \"protobuf_serialization#27b400fdf3bd8ce7120ca66fc1de39d3f1a5804a\" # >= 0.2.0 & < 0.3.0\nrequires \"nimcrypto == 0.5.4\"\nrequires \"bearssl#head\"\nrequires \"chronicles >= 0.10.2 & < 0.11.0\"\nrequires \"chronos#1394c9e04957928afc1db33d2e0965cfb677a1e0\" # >= 3.0.11 & < 3.1.0\nrequires \"libp2p#unstable\"\nrequires \"metrics\"\nrequires \"stew#head\"\nrequires \"stint\"\nrequires \"asynctest >= 0.3.1 & < 0.4.0\"\nrequires \"https://github.com/status-im/nim-datastore#head\"\nrequires \"questionable\"\n\ninclude \"build.nims\"\n\n\n" + }, + "hostOS": "macosx", + "hostCPU": "arm64", "nimVersion": "1.6.14", "gccVersion": "", "clangVersion": "" -} +} \ No newline at end of file diff --git a/codexdht/private/eth/p2p/discoveryv5/crypto.nim b/codexdht/private/eth/p2p/discoveryv5/crypto.nim index f0bc7ba..2ba3939 100644 --- a/codexdht/private/eth/p2p/discoveryv5/crypto.nim +++ b/codexdht/private/eth/p2p/discoveryv5/crypto.nim @@ -1,8 +1,28 @@ import std/sugar, - libp2p/crypto/[crypto, secp] + libp2p/crypto/[crypto, secp], + stew/[byteutils, objects, results, ptrops] -from secp256k1 import ecdhRaw, SkEcdhRawSecret, toRaw +# from secp256k1 import ecdh, SkEcdhSecretSize, toRaw, SkSecretKey, SkPublicKey +import secp256k1 + +const + KeyLength* = SkEcdhSecretSize + ## Ecdh shared secret key length without leading byte + ## (publicKey * privateKey).x, where length of x is 32 bytes + + FullKeyLength* = KeyLength + 1 + ## Ecdh shared secret with leading byte 0x02 or 0x03 + +type + SharedSecret* = object + ## Representation of ECDH shared secret, without leading `y` byte + data*: array[KeyLength, byte] + + SharedSecretFull* = object + ## Representation of ECDH shared secret, with leading `y` byte + ## (`y` is 0x02 when (publicKey * privateKey).y is even or 0x03 when odd) + data*: array[FullKeyLength, byte] proc fromHex*(T: type PrivateKey, data: string): Result[PrivateKey, cstring] = let skKey = ? SkPrivateKey.init(data).mapErr(e => @@ -14,17 +34,68 @@ proc fromHex*(T: type PublicKey, data: string): Result[PublicKey, cstring] = ("Failed to init public key from hex string: " & $e).cstring) ok PublicKey.init(skKey) -func ecdhRaw*(seckey: SkPrivateKey, pubkey: SkPublicKey): SkEcdhRawSecret {.borrow.} + +proc ecdhSharedSecretHash(output: ptr byte, x32, y32: ptr byte, data: pointer): cint + {.cdecl, raises: [].} = + ## Hash function used by `ecdhSharedSecret` below + ## + ## `x32` and `y32` are result of scalar multiplication of publicKey * privateKey. + ## Both `x32` and `y32` are 32 bytes length. + ## + ## Take the `x32` part as ecdh shared secret. + ## output length is derived from x32 length and taken from ecdh + ## generic parameter `KeyLength` + copyMem(output, x32, SkEcdhSecretSize) + return 1 + +func ecdhSharedSecret(seckey: SkPrivateKey, pubkey: secp.SkPublicKey): SharedSecret = + ## Compute ecdh agreed shared secret. + let res = ecdh[SkEcdhSecretSize](secp256k1.SkSecretKey(seckey), + secp256k1.SkPublicKey(pubkey), + ecdhSharedSecretHash, nil) + # This function only fail if the hash function return zero. + # Because our hash function always success, we can turn the error into defect + doAssert res.isOk, $res.error + SharedSecret(data: res.get) + +proc toRaw*(pubkey: PublicKey): seq[byte] = + secp256k1.SkPublicKey(pubkey.skkey).toRaw()[1..^1] + +proc ecdhSharedSecretFullHash(output: ptr byte, x32, y32: ptr byte, data: pointer): cint + {.cdecl, raises: [].} = + ## Hash function used by `ecdhSharedSecretFull` below + # `x32` and `y32` are result of scalar multiplication of publicKey * privateKey. + # Leading byte is 0x02 if `y32` is even and 0x03 if odd. Then concat with `x32`. + + # output length is derived from `x32` length + 1 and taken from ecdh + # generic parameter `FullKeyLength` + + # output[0] = 0x02 | (y32[31] & 1) + output[] = 0x02 or (y32.offset(31)[] and 0x01) + copyMem(output.offset(1), x32, KeyLength) + return 1 + +func ecdhSharedSecretFull*(seckey: PrivateKey, pubkey: PublicKey): SharedSecretFull = + ## Compute ecdh agreed shared secret with leading byte. + ## + let res = ecdh[FullKeyLength](secp256k1.SkSecretKey(seckey.skkey), + secp256k1.SkPublicKey(pubkey.skkey), + ecdhSharedSecretFullHash, nil) + # This function only fail if the hash function return zero. + # Because our hash function always success, we can turn the error into defect + doAssert res.isOk, $res.error + SharedSecretFull(data: res.get) proc ecdhRaw*( priv: PrivateKey, - pub: PublicKey): Result[SkEcdhRawSecret, cstring] = - + pub: PublicKey +): Result[SharedSecretFull, cstring] = + ## emulate old ecdhRaw style keys + ## + ## this includes a leading 0x02 or 0x03 + ## # TODO: Do we need to support non-secp256k1 schemes? if priv.scheme != Secp256k1 or pub.scheme != Secp256k1: return err "Must use secp256k1 scheme".cstring - ok ecdhRaw(priv.skkey, pub.skkey) - -proc toRaw*(pubkey: PublicKey): seq[byte] = - secp256k1.SkPublicKey(pubkey.skkey).toRaw()[1..^1] + ok ecdhSharedSecretFull(priv, pub) diff --git a/nimble.lock b/nimble.lock index 3ef8ef0..07d30c8 100644 --- a/nimble.lock +++ b/nimble.lock @@ -1,5 +1,4 @@ { - "version": 2, "packages": { "nim": { "version": "1.6.14", @@ -11,180 +10,6 @@ "sha1": "f9ce6fa986a4e75514fe26d4c773789b8897eb18" } }, - "unittest2": { - "version": "0.0.2", - "vcsRevision": "02c49b8a994dd3f9eddfaab45262f9b8fa507f8e", - "url": "https://github.com/status-im/nim-unittest2.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "a7f3331cabb5fad0d04c93be0aad1f020f9c8033" - } - }, - "stew": { - "version": "0.1.0", - "vcsRevision": "e18f5a62af2ade7a1fd1d39635d4e04d944def08", - "url": "https://github.com/status-im/nim-stew.git", - "downloadMethod": "git", - "dependencies": [ - "unittest2" - ], - "checksums": { - "sha1": "2a80972f66597bf87d820dca8164d89d3bb24c6d" - } - }, - "nimcrypto": { - "version": "0.5.4", - "vcsRevision": "a5742a9a214ac33f91615f3862c7b099aec43b00", - "url": "https://github.com/cheatfate/nimcrypto.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "f76c87707cd4e96355b8bb6ef27e7f8b0aac1e08" - } - }, - "secp256k1": { - "version": "0.5.2", - "vcsRevision": "5340cf188168d6afcafc8023770d880f067c0b2f", - "url": "https://github.com/status-im/nim-secp256k1.git", - "downloadMethod": "git", - "dependencies": [ - "stew", - "nimcrypto" - ], - "checksums": { - "sha1": "ae9cbea4487be94a06653ffee075a7f1bd1e231e" - } - }, - "bearssl": { - "version": "0.1.5", - "vcsRevision": "f4c4233de453cb7eac0ce3f3ffad6496295f83ab", - "url": "https://github.com/status-im/nim-bearssl.git", - "downloadMethod": "git", - "dependencies": [ - "unittest2" - ], - "checksums": { - "sha1": "dabf4aaac8969fb10281ebd9ff51875d37eeaaa9" - } - }, - "httputils": { - "version": "0.3.0", - "vcsRevision": "e88e231dfcef4585fe3b2fbd9b664dbd28a88040", - "url": "https://github.com/status-im/nim-http-utils.git", - "downloadMethod": "git", - "dependencies": [ - "stew", - "unittest2" - ], - "checksums": { - "sha1": "dd0dcef76616ad35922944671c49222c8a17fb1f" - } - }, - "chronos": { - "version": "3.0.11", - "vcsRevision": "6525f4ce1d1a7eba146e5f1a53f6f105077ae686", - "url": "https://github.com/status-im/nim-chronos.git", - "downloadMethod": "git", - "dependencies": [ - "stew", - "bearssl", - "httputils", - "unittest2" - ], - "checksums": { - "sha1": "8cdf821ecc76fb91fdfb5191cad31f813822fcb2" - } - }, - "metrics": { - "version": "0.0.1", - "vcsRevision": "743f81d4f6c6ebf0ac02389f2392ff8b4235bee5", - "url": "https://github.com/status-im/nim-metrics.git", - "downloadMethod": "git", - "dependencies": [ - "chronos" - ], - "checksums": { - "sha1": "6274c7ae424b871bc21ca3a6b6713971ff6a8095" - } - }, - "testutils": { - "version": "0.5.0", - "vcsRevision": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", - "url": "https://github.com/status-im/nim-testutils", - "downloadMethod": "git", - "dependencies": [ - "unittest2" - ], - "checksums": { - "sha1": "756d0757c4dd06a068f9d38c7f238576ba5ee897" - } - }, - "faststreams": { - "version": "0.3.0", - "vcsRevision": "1b561a9e71b6bdad1c1cdff753418906037e9d09", - "url": "https://github.com/status-im/nim-faststreams.git", - "downloadMethod": "git", - "dependencies": [ - "stew", - "testutils", - "chronos", - "unittest2" - ], - "checksums": { - "sha1": "97edf9797924af48566a0af8267203dc21d80c77" - } - }, - "serialization": { - "version": "0.1.0", - "vcsRevision": "493d18b8292fc03aa4f835fd825dea1183f97466", - "url": "https://github.com/status-im/nim-serialization.git", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "unittest2", - "stew" - ], - "checksums": { - "sha1": "893921d41eb4e90a635442f02dd17b5f90bcbb00" - } - }, - "json_serialization": { - "version": "0.1.0", - "vcsRevision": "e5b18fb710c3d0167ec79f3b892f5a7a1bc6d1a4", - "url": "https://github.com/status-im/nim-json-serialization.git", - "downloadMethod": "git", - "dependencies": [ - "serialization", - "stew" - ], - "checksums": { - "sha1": "bdcdeefca4e2b31710a23cc817aa6abfa0d041e2" - } - }, - "chronicles": { - "version": "0.10.3", - "vcsRevision": "7631f7b2ee03398cb1512a79923264e8f9410af6", - "url": "https://github.com/status-im/nim-chronicles.git", - "downloadMethod": "git", - "dependencies": [ - "testutils", - "json_serialization" - ], - "checksums": { - "sha1": "2b6795cc40a687d3716b617e70d96e5af361c4af" - } - }, - "dnsclient": { - "version": "0.3.4", - "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", - "url": "https://github.com/ba0f3/dnsclient.nim", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" - } - }, "zlib": { "version": "0.1.0", "vcsRevision": "74cdeb54b21bededb5a515d36f608bc1850555a2", @@ -197,72 +22,40 @@ "sha1": "01d330dc4c1924e56b1559ee73bc760e526f635c" } }, - "websock": { + "stew": { "version": "0.1.0", - "vcsRevision": "7b2ed397d6e4c37ea4df08ae82aeac7ff04cd180", - "url": "https://github.com/status-im/nim-websock.git", + "vcsRevision": "e18f5a62af2ade7a1fd1d39635d4e04d944def08", + "url": "https://github.com/status-im/nim-stew.git", "downloadMethod": "git", "dependencies": [ - "chronos", - "httputils", - "chronicles", - "stew", - "nimcrypto", - "bearssl", - "zlib" + "unittest2" ], "checksums": { - "sha1": "d27f126527be59f5a0dc35303cb37b82d4e2770b" + "sha1": "2a80972f66597bf87d820dca8164d89d3bb24c6d" } }, - "libp2p": { - "version": "1.0.0", - "vcsRevision": "a3e9d1ed80c048cd5abc839cbe0863cefcedc702", - "url": "https://github.com/status-im/nim-libp2p.git", + "httputils": { + "version": "0.3.0", + "vcsRevision": "e88e231dfcef4585fe3b2fbd9b664dbd28a88040", + "url": "https://github.com/status-im/nim-http-utils.git", "downloadMethod": "git", "dependencies": [ - "nimcrypto", - "dnsclient", - "bearssl", - "chronicles", - "chronos", - "metrics", - "secp256k1", - "stew", - "websock" + "unittest2" ], "checksums": { - "sha1": "65e473566f19f7f9a3529745e7181fb58d30b5ef" + "sha1": "dd0dcef76616ad35922944671c49222c8a17fb1f" } }, - "combparser": { - "version": "0.2.0", - "vcsRevision": "ba4464c005d7617c008e2ed2ebc1ba52feb469c6", - "url": "https://github.com/PMunch/combparser.git", + "chronos": { + "version": "3.0.11", + "vcsRevision": "6525f4ce1d1a7eba146e5f1a53f6f105077ae686", + "url": "https://github.com/status-im/nim-chronos.git", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "unittest2" + ], "checksums": { - "sha1": "a3635260961a893b88f69aac19f1b24e032a7e97" - } - }, - "asynctest": { - "version": "0.3.2", - "vcsRevision": "a236a5f0f3031573ac2cb082b63dbf6e170e06e7", - "url": "https://github.com/status-im/asynctest.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "0ef50d086659835b0a23a4beb77cb11747695448" - } - }, - "questionable": { - "version": "0.10.6", - "vcsRevision": "30e4184a99c8c1ba329925912d2c5d4b09acf8cc", - "url": "https://github.com/status-im/questionable.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "ca2d1e2e0be6566b4bf13261b29645721d01673d" + "sha1": "8cdf821ecc76fb91fdfb5191cad31f813822fcb2" } }, "upraises": { @@ -285,13 +78,227 @@ "sha1": "8e91db8156a82383d9c48f53b33e48f4e93077b1" } }, + "questionable": { + "version": "0.10.6", + "vcsRevision": "30e4184a99c8c1ba329925912d2c5d4b09acf8cc", + "url": "https://github.com/status-im/questionable.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "ca2d1e2e0be6566b4bf13261b29645721d01673d" + } + }, + "websock": { + "version": "0.1.0", + "vcsRevision": "7b2ed397d6e4c37ea4df08ae82aeac7ff04cd180", + "url": "https://github.com/status-im/nim-websock.git", + "downloadMethod": "git", + "dependencies": [ + "httputils", + "stew", + "chronos", + "chronicles", + "zlib" + ], + "checksums": { + "sha1": "d27f126527be59f5a0dc35303cb37b82d4e2770b" + } + }, + "secp256k1": { + "version": "0.6.0.3.1", + "vcsRevision": "2acbbdcc0e63002a013fff49f015708522875832", + "url": "https://github.com/status-im/nim-secp256k1.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "146818431dec16ededb951f42fc36832949bcc8f" + } + }, + "bearssl": { + "version": "0.1.5", + "vcsRevision": "f4c4233de453cb7eac0ce3f3ffad6496295f83ab", + "url": "https://github.com/status-im/nim-bearssl.git", + "downloadMethod": "git", + "dependencies": [ + "unittest2" + ], + "checksums": { + "sha1": "dabf4aaac8969fb10281ebd9ff51875d37eeaaa9" + } + }, + "dnsclient": { + "version": "0.3.4", + "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", + "url": "https://github.com/ba0f3/dnsclient.nim", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" + } + }, + "nimcrypto": { + "version": "0.5.4", + "vcsRevision": "a5742a9a214ac33f91615f3862c7b099aec43b00", + "url": "https://github.com/status-im/nimcrypto.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "f76c87707cd4e96355b8bb6ef27e7f8b0aac1e08" + } + }, + "json_serialization": { + "version": "0.1.0", + "vcsRevision": "e5b18fb710c3d0167ec79f3b892f5a7a1bc6d1a4", + "url": "https://github.com/status-im/nim-json-serialization.git", + "downloadMethod": "git", + "dependencies": [ + "serialization" + ], + "checksums": { + "sha1": "bdcdeefca4e2b31710a23cc817aa6abfa0d041e2" + } + }, + "testutils": { + "version": "0.5.0", + "vcsRevision": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", + "url": "https://github.com/status-im/nim-testutils", + "downloadMethod": "git", + "dependencies": [ + "unittest2" + ], + "checksums": { + "sha1": "756d0757c4dd06a068f9d38c7f238576ba5ee897" + } + }, + "unittest2": { + "version": "0.0.7", + "vcsRevision": "b178f47527074964f76c395ad0dfc81cf118f379", + "url": "https://github.com/status-im/nim-unittest2.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "b6d4a5cbe28b43c166d6442ba6804aafd4abe368" + } + }, + "combparser": { + "version": "0.2.0", + "vcsRevision": "ba4464c005d7617c008e2ed2ebc1ba52feb469c6", + "url": "https://github.com/PMunch/combparser.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "a3635260961a893b88f69aac19f1b24e032a7e97" + } + }, + "serialization": { + "version": "0.1.0", + "vcsRevision": "493d18b8292fc03aa4f835fd825dea1183f97466", + "url": "https://github.com/status-im/nim-serialization.git", + "downloadMethod": "git", + "dependencies": [ + "unittest2", + "faststreams" + ], + "checksums": { + "sha1": "893921d41eb4e90a635442f02dd17b5f90bcbb00" + } + }, + "faststreams": { + "version": "0.3.0", + "vcsRevision": "1b561a9e71b6bdad1c1cdff753418906037e9d09", + "url": "https://github.com/status-im/nim-faststreams.git", + "downloadMethod": "git", + "dependencies": [ + "unittest2", + "testutils" + ], + "checksums": { + "sha1": "97edf9797924af48566a0af8267203dc21d80c77" + } + }, + "datastore": { + "version": "0.0.1", + "vcsRevision": "0cde8aeb67c59fd0ac95496dc6b5e1168d6632aa", + "url": "https://github.com/codex-storage/nim-datastore", + "downloadMethod": "git", + "dependencies": [ + "unittest2", + "questionable", + "asynctest", + "upraises", + "sqlite3_abi" + ], + "checksums": { + "sha1": "2c03bb47de97962d2a64be1ed0a8161cd9d65159" + } + }, + "asynctest": { + "version": "0.3.2", + "vcsRevision": "a236a5f0f3031573ac2cb082b63dbf6e170e06e7", + "url": "https://github.com/codex-storage/asynctest.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "0ef50d086659835b0a23a4beb77cb11747695448" + } + }, + "stint": { + "version": "0.0.1", + "vcsRevision": "86621eced1dcfb5e25903019ebcfc76ed9128ec5", + "url": "https://github.com/status-im/nim-stint", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "6b4a6fdd317202b7c092dc32b74a6573f81cca62" + } + }, + "metrics": { + "version": "0.0.1", + "vcsRevision": "743f81d4f6c6ebf0ac02389f2392ff8b4235bee5", + "url": "https://github.com/status-im/nim-metrics.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "6274c7ae424b871bc21ca3a6b6713971ff6a8095" + } + }, + "libp2p": { + "version": "1.0.0", + "vcsRevision": "a3e9d1ed80c048cd5abc839cbe0863cefcedc702", + "url": "https://github.com/status-im/nim-libp2p.git", + "downloadMethod": "git", + "dependencies": [ + "metrics", + "nimcrypto", + "bearssl", + "websock", + "dnsclient", + "secp256k1", + "chronicles" + ], + "checksums": { + "sha1": "65e473566f19f7f9a3529745e7181fb58d30b5ef" + } + }, + "chronicles": { + "version": "0.10.3", + "vcsRevision": "7631f7b2ee03398cb1512a79923264e8f9410af6", + "url": "https://github.com/status-im/nim-chronicles.git", + "downloadMethod": "git", + "dependencies": [ + "testutils", + "json_serialization" + ], + "checksums": { + "sha1": "2b6795cc40a687d3716b617e70d96e5af361c4af" + } + }, "protobuf_serialization": { "version": "0.2.0", "vcsRevision": "27b400fdf3bd8ce7120ca66fc1de39d3f1a5804a", "url": "https://github.com/status-im/nim-protobuf-serialization", "downloadMethod": "git", "dependencies": [ - "stew", "faststreams", "serialization", "combparser" @@ -299,37 +306,7 @@ "checksums": { "sha1": "9c30c45b92900b425b147aeceae87bee6295dd80" } - }, - "datastore": { - "version": "0.0.1", - "vcsRevision": "0cde8aeb67c59fd0ac95496dc6b5e1168d6632aa", - "url": "https://github.com/status-im/nim-datastore", - "downloadMethod": "git", - "dependencies": [ - "asynctest", - "chronos", - "questionable", - "sqlite3_abi", - "stew", - "unittest2", - "upraises" - ], - "checksums": { - "sha1": "2c03bb47de97962d2a64be1ed0a8161cd9d65159" - } - }, - "stint": { - "version": "0.0.1", - "vcsRevision": "036c71d06a6b22f8f967ba9d54afd2189c3872ca", - "url": "https://github.com/status-im/nim-stint", - "downloadMethod": "git", - "dependencies": [ - "stew" - ], - "checksums": { - "sha1": "0f187a2115315ca898e5f9a30c5e506cf6057062" - } } }, - "tasks": {} -} + "version": 1 +} \ No newline at end of file