diff --git a/.github/examples/config.yaml b/.github/examples/config.yaml deleted file mode 100644 index 2c95c05..0000000 --- a/.github/examples/config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -distributed-wallets: - path: DISTRIBUTED_WALLETS - passphrases: ./passphrases.txt - threshold: 2 - peers: - 10: old1:9091 - 20: old2:9091 - 30: old3:9091 -nd-wallets: - path: ND_WALLETS - passphrases: ./passphrases.txt -log-level: debug diff --git a/.github/examples/distributed-to-nd.yaml b/.github/examples/distributed-to-nd.yaml new file mode 100644 index 0000000..ebb1ced --- /dev/null +++ b/.github/examples/distributed-to-nd.yaml @@ -0,0 +1,28 @@ +input: + store: + path: ./distributed-to-nd/distributed + wallet: + type: distributed + threshold: 2 + peers: + 10: + name: test1:9091 + passphrases: + path: ./distributed-to-nd/pass.txt + 20: + name: test2:9091 + passphrases: + path: ./distributed-to-nd/pass.txt + 30: + name: test3:9091 + passphrases: + path: ./distributed-to-nd/pass.txt +output: + store: + path: ./distributed-to-nd/nd + wallet: + type: non-deterministic + passphrases: + path: ./distributed-to-nd/pass.txt + +log-level: debug diff --git a/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/00614f29-849b-4c7b-8e16-64cd70f7c868 b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/00614f29-849b-4c7b-8e16-64cd70f7c868 new file mode 100644 index 0000000..778e32b --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/00614f29-849b-4c7b-8e16-64cd70f7c868 @@ -0,0 +1 @@ +{"name":"Wallet2","type":"distributed","uuid":"00614f29-849b-4c7b-8e16-64cd70f7c868","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/104e9d2a-efde-418d-8705-1646438b80eb b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/104e9d2a-efde-418d-8705-1646438b80eb new file mode 100644 index 0000000..257a4d5 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/104e9d2a-efde-418d-8705-1646438b80eb @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"1f3999740ccf731ec004d4a14d97e6b33f01a10688fe93a5fc9f5f5f0982d908","params":{}},"cipher":{"function":"aes-128-ctr","message":"6abfd1f9f6c555135122f53bc8f7788b7236d9c7a43396495020fd3a7e9765a0","params":{"iv":"6849e888127f1f5bde269fdd8f513944"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"3f4aab3380afd3531738760a57992a8ef59f06d03894a5bfd91def59c1be0041"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"8609785feb32d420adf4d09eba2fbd2a1656ae3d7c551ba4746c47d2e373c7573c98018ccd2f72c533c2e09e485b90b3","signing_threshold":2,"uuid":"104e9d2a-efde-418d-8705-1646438b80eb","verificationvector":["95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","99c7733d1ae119ed3d12595101fd1d87645c478e42a7425bca9c8ee82ebc54962bcc5504d996e0cc46feb6334d596ff0"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/16092726-d128-4494-baae-331e92e5d90f b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/16092726-d128-4494-baae-331e92e5d90f new file mode 100644 index 0000000..7734e0b --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/16092726-d128-4494-baae-331e92e5d90f @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"2408a71a6422bf05e0c71bc6ab61ef66bc76d2f4e4c82260b8f4831e7e89fc85","params":{}},"cipher":{"function":"aes-128-ctr","message":"8dda2621a9b2055eb0955d4141b29e85b079800a9a87ad92742166ba35f5333d","params":{"iv":"3da1b26f29106bd49008802d3eb2c8b0"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"3e6a5065c8fcadbc96ee09fbc870c1497fe3596cb646179dd3fdbc181ae361cf"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"8d220223d67a91c23d2079a06ad091955348b0d9c5d0a633172ba45209be5e8bfc233415c7937d0ff2c992a53f5509e3","signing_threshold":2,"uuid":"16092726-d128-4494-baae-331e92e5d90f","verificationvector":["938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","84441b1262f5a352fc85c5d2c9768bb00f2e20029dfeda97704127401e919e5ba89e391637dc1f4cb23065dd73954a74"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/a05c6ac2-1da6-496d-b906-704f604b59f7 b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/a05c6ac2-1da6-496d-b906-704f604b59f7 new file mode 100644 index 0000000..6d9015f --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/a05c6ac2-1da6-496d-b906-704f604b59f7 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"21cb4edbe98d9f72049a496e03e32444e9d77ded23442fe31b1e078d24d09859","params":{}},"cipher":{"function":"aes-128-ctr","message":"86316aafa0bdce2b968588f4c0f28fc6d3262fdda99b1e226969ee3e17f621e7","params":{"iv":"412cbfd4c12f3ad9bd021520dfbf7d3f"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9e5be214c5af875131b3e8faf7d9828938ff877ddd62252d0de0e6190648f610"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"86a63c162aff2b07f1b45fe8d2b7515a6b6dd38451ad8c4d0e84dfb2b41c005156ce9332707c5858396cf67289e8ce6f","signing_threshold":2,"uuid":"a05c6ac2-1da6-496d-b906-704f604b59f7","verificationvector":["916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","841a6a94cd28b4bd263ceba89d1d5d5dc285ec7084fa54694bb9538447b1b1d751318379863a8d05f1732962113aabc5"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/index b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/index new file mode 100644 index 0000000..30086ad --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/00614f29-849b-4c7b-8e16-64cd70f7c868/index @@ -0,0 +1 @@ +[{"uuid":"104e9d2a-efde-418d-8705-1646438b80eb","name":"Account3"},{"uuid":"16092726-d128-4494-baae-331e92e5d90f","name":"Account1"},{"uuid":"a05c6ac2-1da6-496d-b906-704f604b59f7","name":"Account2"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/4e868d81-1b66-4228-99a4-12aac671b3c4 b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/4e868d81-1b66-4228-99a4-12aac671b3c4 new file mode 100644 index 0000000..46c0b47 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/4e868d81-1b66-4228-99a4-12aac671b3c4 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"0f06bfa6cdd51a212c269db13cd87dead22a255833a6f405810f3904ba6fed4e","params":{}},"cipher":{"function":"aes-128-ctr","message":"c7e1466fbc74d8b4ce5a5c187f82cf2a9b38eac617ed72370e9bf95017039048","params":{"iv":"1164acd3b0f707a45e90720c26f5aff7"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"73718c213945145bc9fb95cfc43e1d91288fcb03d2df3196cdbddb36b7e3f70a"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"8e211ef39fdb68a3b28abb22ebdd09f5fd52ff2e11215e9f1ba4e3502a7cfc89b11d56b448b2d291d8127ff0120c91e9","signing_threshold":2,"uuid":"4e868d81-1b66-4228-99a4-12aac671b3c4","verificationvector":["a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","9485039a74000abc5b18d383c3492ebe1a665f9fb2c2543e7cc48c4e93f5286fa03a175e20de54aa46aeb01518f0fa4a"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/8c45cbc6-0779-4a06-8d82-1199ed49912f b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/8c45cbc6-0779-4a06-8d82-1199ed49912f new file mode 100644 index 0000000..2d9b31d --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/8c45cbc6-0779-4a06-8d82-1199ed49912f @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"d0fa0bca3b6d5d7a1fc4ce5ba1450fc51a67c1d2a4e5596a30c2c64f4a24d051","params":{}},"cipher":{"function":"aes-128-ctr","message":"d676324f5ceedd177eda27f947a63d5310d9661891ce771d369e2207a8ae2557","params":{"iv":"31c9ba7c8ca34ca95e08bfb67ca293ed"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"d2c892e86fc8d6b0101995e901fa23b8710ef46757c041130c66e288096ac92d"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b9c6011166bc88f533297e082da3ade7ca06304c18d02d587762b08f72623ba1fc3834a5be563da8efb5170eca619d81","signing_threshold":2,"uuid":"8c45cbc6-0779-4a06-8d82-1199ed49912f","verificationvector":["973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","965fd06ebf50b912295063ff63c464ab3840b9b924356d5d42c4529bd4eafa5d8ba1444359b0b1484a19f1a3ac76321d"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/901c9d59-e952-43c2-aff0-deda8a535fde b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/901c9d59-e952-43c2-aff0-deda8a535fde new file mode 100644 index 0000000..ae84e74 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/901c9d59-e952-43c2-aff0-deda8a535fde @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"cc85120e47755418c5dbf039638e972a21cf37ad07b2569bce5a09038365d05d","params":{}},"cipher":{"function":"aes-128-ctr","message":"f627e13d4d60ee50e54acc2f38640a8c8b41f92119e34ee492a15e3efb5d26c0","params":{"iv":"989e62a67605e891e5be6770b3c7b7c8"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"1fd20ad91035bba0b94204578d205d2577d22e5046dc11d751219a3320e9b0ef"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b07c02b5bf89312b890e9fe9c8e261c58e6a2fc07962c96a9182d58254b095882e39c1a006a43d34e5a4ea1cf8ed6c7b","signing_threshold":2,"uuid":"901c9d59-e952-43c2-aff0-deda8a535fde","verificationvector":["b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","abf086ff6a59a10154b6a76a9636d6fd8cfeec3979ee0639a03bfecc2eece8080ffe8c2242e77e250cb68dbb5d61de84"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/e953b83a-0944-4391-85e6-14beb220952c b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/e953b83a-0944-4391-85e6-14beb220952c new file mode 100644 index 0000000..202aa81 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/e953b83a-0944-4391-85e6-14beb220952c @@ -0,0 +1 @@ +{"name":"Wallet3","type":"distributed","uuid":"e953b83a-0944-4391-85e6-14beb220952c","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/index b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/index new file mode 100644 index 0000000..4861e6e --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/e953b83a-0944-4391-85e6-14beb220952c/index @@ -0,0 +1 @@ +[{"uuid":"4e868d81-1b66-4228-99a4-12aac671b3c4","name":"Account3"},{"uuid":"8c45cbc6-0779-4a06-8d82-1199ed49912f","name":"Account2"},{"uuid":"901c9d59-e952-43c2-aff0-deda8a535fde","name":"Account1"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/693127c0-4525-4e85-8b98-b07d2dba3b7e b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/693127c0-4525-4e85-8b98-b07d2dba3b7e new file mode 100644 index 0000000..255a26c --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/693127c0-4525-4e85-8b98-b07d2dba3b7e @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"54bf3d5a67e91ad01edcbb4a1bebf5aa3ddfb5c11a06624dc34d81b006b2fa16","params":{}},"cipher":{"function":"aes-128-ctr","message":"0899020e8d3da68ffbd14c6183b7ab3b2b25e42ecc372e7bb735ddcfe20adae8","params":{"iv":"ad0ce575f52979b86c530a721322c4b5"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"3f7884132f21945b434cf2a04f3c0828f45cda6d16ff4251166377acbf1db7b2"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"ad7df53cbdf047e63284ddeddeb89f63f49977092a313e0082c9be18a22f516d175ccf30105aae5e9f2cb823976ea1f0","signing_threshold":2,"uuid":"693127c0-4525-4e85-8b98-b07d2dba3b7e","verificationvector":["b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","b44e4621d12ff6fe8233025be8f4bd1c89dda7ba02f75b4bd18611ae5126851758c4c896ddec8bba275dcb2226a12e5e"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/8c70a4dc-8911-4397-994e-347f1ec81b56 b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/8c70a4dc-8911-4397-994e-347f1ec81b56 new file mode 100644 index 0000000..beb8c19 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/8c70a4dc-8911-4397-994e-347f1ec81b56 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"4721d01995aa88ec4a4f82aa2c00fd3659338c63fc41cbf642ecee950dd01c6c","params":{}},"cipher":{"function":"aes-128-ctr","message":"e019b7b3e83c350cec68b5aca0edb06ab8447ed0ed066345ea9a6553bb5a05cd","params":{"iv":"589190d889a0b86cc839a0ba20ed20e1"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"952d418e6785aeaba78abefa8331ae6d316aaf971fec6767a53c520d35fafc88"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"8d636f99b0f9500c1a5ecb2ead0abecbcf49574b37237966e9bc14b01d3813e75f55a33d55d27ed131da95c427258a82","signing_threshold":2,"uuid":"8c70a4dc-8911-4397-994e-347f1ec81b56","verificationvector":["88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","870c053ea76ab41fd72069a9c74179f4a5d42ddff702a2967201329c054b0f42f558807f4c320ab30dc56812890b2e59"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/de401967-35ec-438f-8dbb-af5683c01d76 b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/de401967-35ec-438f-8dbb-af5683c01d76 new file mode 100644 index 0000000..4f65950 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/de401967-35ec-438f-8dbb-af5683c01d76 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"e06ae907191902d9560566160de9745e9e4b5dc9badd57c66576a0965d9fd5f9","params":{}},"cipher":{"function":"aes-128-ctr","message":"6b881621ae29af121ad1eda8556dd541202d0252e54de1cd2c7232633a746f9c","params":{"iv":"71ba5b15c621aaf63603ebf5d105718e"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"eb176e9b741d2ecce9dff0d9e47a2e6ccace8906480417345ddc5e4fd965fd3e"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b74e6c3fb06d88a562c88c3faa406990e1088a2e3ae284ff8c52a4534d5a793ffe0a7341de59ec9ababf168730ab0ab2","signing_threshold":2,"uuid":"de401967-35ec-438f-8dbb-af5683c01d76","verificationvector":["855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","880f3e97068f7990f9b95008dea90221d40d55747ebc4ec5241993d2f5e35160b1154f487a43a395fb87ff5c649be4bb"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/f91768b4-0551-43ba-b039-9bf40c6c765a b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/f91768b4-0551-43ba-b039-9bf40c6c765a new file mode 100644 index 0000000..29c6ff5 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/f91768b4-0551-43ba-b039-9bf40c6c765a @@ -0,0 +1 @@ +{"name":"Wallet1","type":"distributed","uuid":"f91768b4-0551-43ba-b039-9bf40c6c765a","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/index b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/index new file mode 100644 index 0000000..f8f5bc6 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test1/f91768b4-0551-43ba-b039-9bf40c6c765a/index @@ -0,0 +1 @@ +[{"uuid":"693127c0-4525-4e85-8b98-b07d2dba3b7e","name":"Account3"},{"uuid":"8c70a4dc-8911-4397-994e-347f1ec81b56","name":"Account2"},{"uuid":"de401967-35ec-438f-8dbb-af5683c01d76","name":"Account1"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/0e8276b0-8471-4039-80fd-f063b4de31db b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/0e8276b0-8471-4039-80fd-f063b4de31db new file mode 100644 index 0000000..4992aaa --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/0e8276b0-8471-4039-80fd-f063b4de31db @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"ed3916239be0289c354df7d71d088b0beb4a665ea9b6154bd0decd99b7228570","params":{}},"cipher":{"function":"aes-128-ctr","message":"7c0df8668d3a967e779169fa41ff3407bc0a84479be82ff4cfe0988f2612fc75","params":{"iv":"606f08529101880ac3e19dd017d63160"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"853505d8f96514c2d8da5297f11f54d8e7ff6af21dfd9e6c729f4ac14e568983"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"9584c5ddbed319ccd697b408281fa88b6f09d714a8d9df4944af57156a026b1270130dc1a1068360f0283f1adbb77eb4","signing_threshold":2,"uuid":"0e8276b0-8471-4039-80fd-f063b4de31db","verificationvector":["855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","880f3e97068f7990f9b95008dea90221d40d55747ebc4ec5241993d2f5e35160b1154f487a43a395fb87ff5c649be4bb"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/39513cf2-6b5f-46e2-902b-d55f457858b5 b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/39513cf2-6b5f-46e2-902b-d55f457858b5 new file mode 100644 index 0000000..5f12249 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/39513cf2-6b5f-46e2-902b-d55f457858b5 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"4bc9bab1e34a8cc28f2af76d9fd74b9a5911864225958b61fffce97971095cf5","params":{}},"cipher":{"function":"aes-128-ctr","message":"9ba61e3342bbf886ee1e6d06177272e0ac8ea1ad34898b5ab9953c85c616439a","params":{"iv":"f71a8073300b7317a14280a34bf9c2c1"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"47909c7ce325aade8260689e347fee0341ee955ec47ac1751e222b045e5d5b47"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"985f16a034c3c32f7be5359b318e8ddee5b62785d1d63a968d9000f328f85448387d5e222320abd0c1f25f9ab26713e6","signing_threshold":2,"uuid":"39513cf2-6b5f-46e2-902b-d55f457858b5","verificationvector":["b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","b44e4621d12ff6fe8233025be8f4bd1c89dda7ba02f75b4bd18611ae5126851758c4c896ddec8bba275dcb2226a12e5e"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/6030029a-4f20-426e-8912-8a143f0237d7 b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/6030029a-4f20-426e-8912-8a143f0237d7 new file mode 100644 index 0000000..c65cea2 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/6030029a-4f20-426e-8912-8a143f0237d7 @@ -0,0 +1 @@ +{"name":"Wallet1","type":"distributed","uuid":"6030029a-4f20-426e-8912-8a143f0237d7","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/ae922e4d-c8da-49ae-91af-2e1aa35444f5 b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/ae922e4d-c8da-49ae-91af-2e1aa35444f5 new file mode 100644 index 0000000..f2d79b8 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/ae922e4d-c8da-49ae-91af-2e1aa35444f5 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"57c22ff4ae2d0dca87f97c3125ff24b57f305c400c28c49f118bc02c5f3bc882","params":{}},"cipher":{"function":"aes-128-ctr","message":"b0a7af4d01c63eb3dbbfe14dc86c9d797854396d51d05237c635f0e3fdf69888","params":{"iv":"0910e9dfce66e13d1ae94dbbe42a5462"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"733f013ca23026ab460d4e4fcb5e061466d9a9a013505a621231c730bdb79b9e"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"96d2c3e0ba9fce2a1dbdb83717a4920884ed748d528c3d005c17193195d9a4ce7146302a7ea75c1f931f8237a18c4d50","signing_threshold":2,"uuid":"ae922e4d-c8da-49ae-91af-2e1aa35444f5","verificationvector":["88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","870c053ea76ab41fd72069a9c74179f4a5d42ddff702a2967201329c054b0f42f558807f4c320ab30dc56812890b2e59"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/index b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/index new file mode 100644 index 0000000..c229216 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/6030029a-4f20-426e-8912-8a143f0237d7/index @@ -0,0 +1 @@ +[{"uuid":"0e8276b0-8471-4039-80fd-f063b4de31db","name":"Account1"},{"uuid":"39513cf2-6b5f-46e2-902b-d55f457858b5","name":"Account3"},{"uuid":"ae922e4d-c8da-49ae-91af-2e1aa35444f5","name":"Account2"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/3118fc95-75fc-4780-a826-881b30bc9eff b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/3118fc95-75fc-4780-a826-881b30bc9eff new file mode 100644 index 0000000..4a216eb --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/3118fc95-75fc-4780-a826-881b30bc9eff @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"6937574636e11fa9f6e6b81db1b795a023681a790acebd4443cfb0f9d40c80e6","params":{}},"cipher":{"function":"aes-128-ctr","message":"6c1feb07f42145d7a736ceb78143339d529f869271e0abcefe2351ac92137ac2","params":{"iv":"3a32ad38865b68b97b1e4567e2b405c7"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"1c3e518e6fa06db50d2a682e8174c6d43f54d87683ca24ba7b2157f777693407"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b549fe6a1f48aacdf5bf8fc3d7f2ab311c8462a0f5b59e403b2771b20aa1f958fc81e65510532406a7e9187965fadf23","signing_threshold":2,"uuid":"3118fc95-75fc-4780-a826-881b30bc9eff","verificationvector":["95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","99c7733d1ae119ed3d12595101fd1d87645c478e42a7425bca9c8ee82ebc54962bcc5504d996e0cc46feb6334d596ff0"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/38235f30-94d6-49b3-8a5f-7cc7be20c860 b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/38235f30-94d6-49b3-8a5f-7cc7be20c860 new file mode 100644 index 0000000..36ef5ae --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/38235f30-94d6-49b3-8a5f-7cc7be20c860 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"546133c05b25ab1508df7353e6077736c4be879645f8da045edcc3a45d849c85","params":{}},"cipher":{"function":"aes-128-ctr","message":"5a81856b5b9a845191d3aac2d59eca029c101e5149b12cc07bcd2ea354d828d5","params":{"iv":"6f157f508f9df6ebd4b75bd91ad16f09"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"6c3aaa5f585d3feb13c1cc57c4435e9bc171e38f8f92b4f80b243a6e6b1cf5ad"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"a208d3bf0d6edb3014aaf5c58d0663fb1b2cb491730ee2d1e2e783ad21476e74647e8ba722476f78a34f0e3f1d99f248","signing_threshold":2,"uuid":"38235f30-94d6-49b3-8a5f-7cc7be20c860","verificationvector":["938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","84441b1262f5a352fc85c5d2c9768bb00f2e20029dfeda97704127401e919e5ba89e391637dc1f4cb23065dd73954a74"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/a399a9c9-f63d-4843-a701-79c49dcf808c b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/a399a9c9-f63d-4843-a701-79c49dcf808c new file mode 100644 index 0000000..24fd9ad --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/a399a9c9-f63d-4843-a701-79c49dcf808c @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"1c83cac5ee8620c9ba7451fab603fffd0820915cecee336644d62bb8fe5abb03","params":{}},"cipher":{"function":"aes-128-ctr","message":"6b618443cd7fe0fde97c9679a4bd6ba999150a4f12377687357158b1fa9c0247","params":{"iv":"6383d6ee697a32d12c8558ebf42623d0"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"e1ec3ed89008a8c7847e3fbfab0a95d1fd9b1147808310a102d2b4bbf1dfa134"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"990c747bda937cf9381ee21790d1f9edb5d174777d866e037f4e84bb80d367d6556baa8c3a0efc03c0937e53af9d5dee","signing_threshold":2,"uuid":"a399a9c9-f63d-4843-a701-79c49dcf808c","verificationvector":["916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","841a6a94cd28b4bd263ceba89d1d5d5dc285ec7084fa54694bb9538447b1b1d751318379863a8d05f1732962113aabc5"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/b7a6958a-c1af-4aac-90aa-5218d988dd0b b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/b7a6958a-c1af-4aac-90aa-5218d988dd0b new file mode 100644 index 0000000..f3d5bc7 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/b7a6958a-c1af-4aac-90aa-5218d988dd0b @@ -0,0 +1 @@ +{"name":"Wallet2","type":"distributed","uuid":"b7a6958a-c1af-4aac-90aa-5218d988dd0b","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/index b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/index new file mode 100644 index 0000000..1003013 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/b7a6958a-c1af-4aac-90aa-5218d988dd0b/index @@ -0,0 +1 @@ +[{"uuid":"3118fc95-75fc-4780-a826-881b30bc9eff","name":"Account3"},{"uuid":"a399a9c9-f63d-4843-a701-79c49dcf808c","name":"Account2"},{"uuid":"38235f30-94d6-49b3-8a5f-7cc7be20c860","name":"Account1"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/30f5618d-add5-4b1a-8b64-47fb8d10e25d b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/30f5618d-add5-4b1a-8b64-47fb8d10e25d new file mode 100644 index 0000000..78feb02 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/30f5618d-add5-4b1a-8b64-47fb8d10e25d @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"00116b639dc4f14553ca531b1e1015325e1c4ee850bf202fcdb6a25747cb9b94","params":{}},"cipher":{"function":"aes-128-ctr","message":"9427cf44fa0c968a57e94019f45f55e78112adff1509ae98c1ed724265a4556c","params":{"iv":"3c7839f2639e46f9f0c43b2fad6352d0"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"f0bc8bb7cfaf00b5221908cfd35112825842d9bb22719c3ae83eee26620a4d13"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"84aaa9d2e0f02c454eed99f623bc314107c95819e0ad531bbab1b3db1d5ee03feef86301714e175146ffb6e0b5822fbe","signing_threshold":2,"uuid":"30f5618d-add5-4b1a-8b64-47fb8d10e25d","verificationvector":["973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","965fd06ebf50b912295063ff63c464ab3840b9b924356d5d42c4529bd4eafa5d8ba1444359b0b1484a19f1a3ac76321d"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/9f61b745-3865-4361-9da2-f1b6c9ca5c91 b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/9f61b745-3865-4361-9da2-f1b6c9ca5c91 new file mode 100644 index 0000000..611a83d --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/9f61b745-3865-4361-9da2-f1b6c9ca5c91 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"c42c2942a5f0bca2a9a59eddbae4752e8a25783a4a99899ab2f7060d27a0b994","params":{}},"cipher":{"function":"aes-128-ctr","message":"24f834dc725ff3ae6034cfa96db988b31abb3da2852bbb66891afa65702d6d47","params":{"iv":"79210ff803f52774353dc43873e44d0d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9351e99f0c2e8b5db1c01d28714afa8b61b44047f9458a684698d4f242bb58db"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"935e5a6d6a9c11cd76513a8696c6e0b092f73ec67a28d229b26c455a2fa77eeb4f706ae1b5551b64b5f54159257bf8dc","signing_threshold":2,"uuid":"9f61b745-3865-4361-9da2-f1b6c9ca5c91","verificationvector":["b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","abf086ff6a59a10154b6a76a9636d6fd8cfeec3979ee0639a03bfecc2eece8080ffe8c2242e77e250cb68dbb5d61de84"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/bab9e4d9-7b11-439f-8a8c-177d19ee5be7 b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/bab9e4d9-7b11-439f-8a8c-177d19ee5be7 new file mode 100644 index 0000000..7df0de6 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/bab9e4d9-7b11-439f-8a8c-177d19ee5be7 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"4a96e5e01078eeee6df747b13cd0b11ca455b7440e185609ebe4e503c20d7be6","params":{}},"cipher":{"function":"aes-128-ctr","message":"a318b9dad5a8736e54d7dd923caa9da027410bcc1d13f9ddd346f17561b516cf","params":{"iv":"425313a3fc3c6f2df1d20313777f4382"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"05428e776708488d71de1eb4b978b77e40bcc90348fb00b722241743fa872f5e"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"a277b29c00632f04ccacb5f366fb3f0d836e3fdd3f7b0d242cc0437c59c9e5ae25fd05ff92b8c53aa1625100539416db","signing_threshold":2,"uuid":"bab9e4d9-7b11-439f-8a8c-177d19ee5be7","verificationvector":["a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","9485039a74000abc5b18d383c3492ebe1a665f9fb2c2543e7cc48c4e93f5286fa03a175e20de54aa46aeb01518f0fa4a"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/c2a77b80-9b56-483b-ba04-4c5785ac55b5 b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/c2a77b80-9b56-483b-ba04-4c5785ac55b5 new file mode 100644 index 0000000..ec9c410 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/c2a77b80-9b56-483b-ba04-4c5785ac55b5 @@ -0,0 +1 @@ +{"name":"Wallet3","type":"distributed","uuid":"c2a77b80-9b56-483b-ba04-4c5785ac55b5","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/index b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/index new file mode 100644 index 0000000..8a1bc20 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test2/c2a77b80-9b56-483b-ba04-4c5785ac55b5/index @@ -0,0 +1 @@ +[{"uuid":"30f5618d-add5-4b1a-8b64-47fb8d10e25d","name":"Account2"},{"uuid":"bab9e4d9-7b11-439f-8a8c-177d19ee5be7","name":"Account3"},{"uuid":"9f61b745-3865-4361-9da2-f1b6c9ca5c91","name":"Account1"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/428105ef-1dcb-48d0-bf3e-0ae7e008c847 b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/428105ef-1dcb-48d0-bf3e-0ae7e008c847 new file mode 100644 index 0000000..2f6ef9f --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/428105ef-1dcb-48d0-bf3e-0ae7e008c847 @@ -0,0 +1 @@ +{"name":"Wallet2","type":"distributed","uuid":"428105ef-1dcb-48d0-bf3e-0ae7e008c847","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/46b19a5c-6f52-4fcf-8de6-19a82c43b0ad b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/46b19a5c-6f52-4fcf-8de6-19a82c43b0ad new file mode 100644 index 0000000..5d99c6c --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/46b19a5c-6f52-4fcf-8de6-19a82c43b0ad @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"2956b1a6fb7c7b1189b5d49ab005252027465f364b1000e80d3fee3eb22c7d94","params":{}},"cipher":{"function":"aes-128-ctr","message":"fc4b2db0e79f3d2b767d40cb487de6b1cb18c0db3b0bb93d2dc7e91c1705a071","params":{"iv":"668345e34945abab077b980747c856fb"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"f2f0dd5dd22165f378828be6ea8e25cf2c6f0d861803b62ee810a066f5bcd3aa"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b066b734315051491333b7160b03bd6e0e2b41090d7841fa24b9863be135a6a19d1210b68f23460497d403209769c6fb","signing_threshold":2,"uuid":"46b19a5c-6f52-4fcf-8de6-19a82c43b0ad","verificationvector":["938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","84441b1262f5a352fc85c5d2c9768bb00f2e20029dfeda97704127401e919e5ba89e391637dc1f4cb23065dd73954a74"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/755c2937-5144-4a2b-80f4-2429ae81ac86 b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/755c2937-5144-4a2b-80f4-2429ae81ac86 new file mode 100644 index 0000000..9175412 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/755c2937-5144-4a2b-80f4-2429ae81ac86 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"7fa64eb1b315b3ec73eff71f6ea6530b7f070ce23bd1996fd42bb27425d580af","params":{}},"cipher":{"function":"aes-128-ctr","message":"5d54351732cd2a976a4408f4b7215704985aa3366540c23778dc5b784019a20d","params":{"iv":"e42134b44157303032a7d4bcc8d850cd"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"f700d05b53bea537b22530a6a0168a208fdd2282d0fd60ad22a86722518697a6"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"91284867fa17a119d1634be3237f7078dd058e9c3d785a167ea600515523aab77f62113e8a7ef1e2099dfcc7cb04590a","signing_threshold":2,"uuid":"755c2937-5144-4a2b-80f4-2429ae81ac86","verificationvector":["95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","99c7733d1ae119ed3d12595101fd1d87645c478e42a7425bca9c8ee82ebc54962bcc5504d996e0cc46feb6334d596ff0"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/e8516d1e-b5c1-499f-8187-ecbff024ef6c b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/e8516d1e-b5c1-499f-8187-ecbff024ef6c new file mode 100644 index 0000000..b5d4f83 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/e8516d1e-b5c1-499f-8187-ecbff024ef6c @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"4b29f93c90e687b80204a2fce3b837f6b11fc5c923646cfb264b6ebfcd006d0d","params":{}},"cipher":{"function":"aes-128-ctr","message":"8879fe95de5eb3aba2e25e8a679dbab913ddb2c7cfde81836ed85b7bfab4bfb9","params":{"iv":"bc786711b057d9f1476ece6e71a1147f"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"c158d1a6d8c0e4ee48ebb1458902d12a5c2057bfc1d691387434812883eb0b24"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"9562e6b72fc4c3c8cf4403e86ede2185a30ad2f45622d15a3b66fbd9f3d2c9131a0c1724082a05a73ed4250f67c35da3","signing_threshold":2,"uuid":"e8516d1e-b5c1-499f-8187-ecbff024ef6c","verificationvector":["916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","841a6a94cd28b4bd263ceba89d1d5d5dc285ec7084fa54694bb9538447b1b1d751318379863a8d05f1732962113aabc5"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/index b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/index new file mode 100644 index 0000000..fac23db --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/428105ef-1dcb-48d0-bf3e-0ae7e008c847/index @@ -0,0 +1 @@ +[{"uuid":"46b19a5c-6f52-4fcf-8de6-19a82c43b0ad","name":"Account1"},{"uuid":"755c2937-5144-4a2b-80f4-2429ae81ac86","name":"Account3"},{"uuid":"e8516d1e-b5c1-499f-8187-ecbff024ef6c","name":"Account2"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/69d5367b-2d42-43b9-9981-ffbf1bdc0894 b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/69d5367b-2d42-43b9-9981-ffbf1bdc0894 new file mode 100644 index 0000000..a5fda3c --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/69d5367b-2d42-43b9-9981-ffbf1bdc0894 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"975329842f139e7e3f8a5c13d60334d02b9b2d98e427e5fdb02ad1b4c5504d1d","params":{}},"cipher":{"function":"aes-128-ctr","message":"c148632ccc1c9e44338dd30f38791e2b614b952f22486e04a88b77bc6f708fe7","params":{"iv":"810f1084fb9405402d352dae2a36f7b9"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"da53c8bc9e6ba1e5c7cbf7a3c7d69e817af4265a605ded4bd8035d5f3769d007"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"b2577d1c82b81ad1a553a12d7f7efd561d4e7578f6c39fa7a1e9998e65a9524dbab687e2106e9947d9b3441c36760868","signing_threshold":2,"uuid":"69d5367b-2d42-43b9-9981-ffbf1bdc0894","verificationvector":["973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","965fd06ebf50b912295063ff63c464ab3840b9b924356d5d42c4529bd4eafa5d8ba1444359b0b1484a19f1a3ac76321d"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/725fe921-f642-4277-a728-1cc29f2e30fa b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/725fe921-f642-4277-a728-1cc29f2e30fa new file mode 100644 index 0000000..ee7960d --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/725fe921-f642-4277-a728-1cc29f2e30fa @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"e3722f119966dfecbbf6ad3c61204add5bdc54173ad693e5faa3d44325735bdc","params":{}},"cipher":{"function":"aes-128-ctr","message":"bec04d9e224e5149a67e1821f6b25ae2b052e257d20ff88a8389d79ef5ad329e","params":{"iv":"0c92a547535fb3e2f56cc7eef6c47ecd"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"1de3230151c273ccd80c13e034ac1fb559ad3cac3ca95a727f057f9039d006b1"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"a9cd893cfe26460187d3ea49f0d5e4ab7a8a689436d0a4d3c71772bac3de85903ab0ac28967bb521f0c2620c6a4aef81","signing_threshold":2,"uuid":"725fe921-f642-4277-a728-1cc29f2e30fa","verificationvector":["a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","9485039a74000abc5b18d383c3492ebe1a665f9fb2c2543e7cc48c4e93f5286fa03a175e20de54aa46aeb01518f0fa4a"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/9c1cad69-3675-4ee9-b61f-f20b027ae9bc b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/9c1cad69-3675-4ee9-b61f-f20b027ae9bc new file mode 100644 index 0000000..d0322fa --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/9c1cad69-3675-4ee9-b61f-f20b027ae9bc @@ -0,0 +1 @@ +{"name":"Wallet3","type":"distributed","uuid":"9c1cad69-3675-4ee9-b61f-f20b027ae9bc","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/a8e4a063-ed7b-42ed-a5f8-8f44c4f20ff9 b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/a8e4a063-ed7b-42ed-a5f8-8f44c4f20ff9 new file mode 100644 index 0000000..ea21e3f --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/a8e4a063-ed7b-42ed-a5f8-8f44c4f20ff9 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"e32cad2389870ae5b61babf01c474994437c2a98c01837d4e0f9fb9747427252","params":{}},"cipher":{"function":"aes-128-ctr","message":"16a1555e266b862ae56e0a5dbe077ba13b9cad060067d68d361641d93048dbc9","params":{"iv":"2c8284f4615a5ffdf9ad50ca78ea05fe"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"e95e4b0a437808e70c66704d5a425626210ed62ae57d41ff75e396e0449136b2"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"8583185aeb41dc78ca0e82ce56456809a67d94fe045b2c9910f364a131a0eac42311bc83896abd6b55d7f0cb689dc7a0","signing_threshold":2,"uuid":"a8e4a063-ed7b-42ed-a5f8-8f44c4f20ff9","verificationvector":["b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","abf086ff6a59a10154b6a76a9636d6fd8cfeec3979ee0639a03bfecc2eece8080ffe8c2242e77e250cb68dbb5d61de84"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/index b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/index new file mode 100644 index 0000000..e3c67e0 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/9c1cad69-3675-4ee9-b61f-f20b027ae9bc/index @@ -0,0 +1 @@ +[{"uuid":"725fe921-f642-4277-a728-1cc29f2e30fa","name":"Account3"},{"uuid":"a8e4a063-ed7b-42ed-a5f8-8f44c4f20ff9","name":"Account1"},{"uuid":"69d5367b-2d42-43b9-9981-ffbf1bdc0894","name":"Account2"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/98d36097-4939-48e7-b64b-64bba8734cc1 b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/98d36097-4939-48e7-b64b-64bba8734cc1 new file mode 100644 index 0000000..11c6593 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/98d36097-4939-48e7-b64b-64bba8734cc1 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"5802ece2cde5cc7b18ce3bd16166840f3e5a55f97f9a75f07dc197f9ee88ae35","params":{}},"cipher":{"function":"aes-128-ctr","message":"327e044e484c5664cf81ce37236f6de410826290e20c5016a162e8aa2e6b820a","params":{"iv":"a146ada25e5a73787708dc90bdb8dcff"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"70d922aebc9e5e949b5504c7eca5af5fd55976a4e3dd8e3e73b98dd4d4c71602"}}},"encryptor":"keystore","name":"Account1","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"965db210eefb6c6e66f880130b7d4f1fc1e2592ca35995faa8061839bb8fae380b848e5237ba8e59de6c98603a3e8500","signing_threshold":2,"uuid":"98d36097-4939-48e7-b64b-64bba8734cc1","verificationvector":["855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","880f3e97068f7990f9b95008dea90221d40d55747ebc4ec5241993d2f5e35160b1154f487a43a395fb87ff5c649be4bb"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/a1ccd846-8c03-472f-912a-9b2e28a138e8 b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/a1ccd846-8c03-472f-912a-9b2e28a138e8 new file mode 100644 index 0000000..8089e2c --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/a1ccd846-8c03-472f-912a-9b2e28a138e8 @@ -0,0 +1 @@ +{"name":"Wallet1","type":"distributed","uuid":"a1ccd846-8c03-472f-912a-9b2e28a138e8","version":1} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/bc4e4a57-7c93-4ea4-98ec-d068234e546f b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/bc4e4a57-7c93-4ea4-98ec-d068234e546f new file mode 100644 index 0000000..4b59743 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/bc4e4a57-7c93-4ea4-98ec-d068234e546f @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"651935e99cf8444d62a12fe9907e470967712a27f3d4d8bb36ecd6aebf40fc49","params":{}},"cipher":{"function":"aes-128-ctr","message":"1779694b4312bdc9265a6a14f23b9698107bdb89b0f6b3de2f194a8346fe2d23","params":{"iv":"216272efaf1fb27d13a84541e23c2b78"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"b9b2beb154fff880d3a8cc27eb1ca6aed35d0307493ff7cc9bffe56a2b242edc"}}},"encryptor":"keystore","name":"Account2","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"883c81568aa55a00d2c546f00f3623d3abb25cdb7ea88fd4a666fa96cb853ac89183cd6b603bf848b934f75bbcaadd96","signing_threshold":2,"uuid":"bc4e4a57-7c93-4ea4-98ec-d068234e546f","verificationvector":["88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","870c053ea76ab41fd72069a9c74179f4a5d42ddff702a2967201329c054b0f42f558807f4c320ab30dc56812890b2e59"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/c0856503-5fab-4fa0-abb6-c4fe0420bc7a b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/c0856503-5fab-4fa0-abb6-c4fe0420bc7a new file mode 100644 index 0000000..ee6ff48 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/c0856503-5fab-4fa0-abb6-c4fe0420bc7a @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"59e588fa65dcd8a73ebf3a744c3e9cf69c8a8de0a35d5aefe00b401c46254561","params":{}},"cipher":{"function":"aes-128-ctr","message":"2a49f1f1cb6c7f3be57a6c19f55b0bbe75168b8b1820f0a85a473aba384e4bfd","params":{"iv":"0b3f1d119d0c38dc5ced4e27889e0f3d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"4c8797f7b3ed3d6b6d300036af0a6d7a6550225768702d73f15fd3f2c68bc51d"}}},"encryptor":"keystore","name":"Account3","participants":{"10":"test1:9091","20":"test2:9091","30":"test3:9091"},"pubkey":"a8d86afde0aa92ee004320b1c2d2f8780baee7119d999599e22ff6dbc70c7d92781314010f9bf80b7d402a713c239e40","signing_threshold":2,"uuid":"c0856503-5fab-4fa0-abb6-c4fe0420bc7a","verificationvector":["b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","b44e4621d12ff6fe8233025be8f4bd1c89dda7ba02f75b4bd18611ae5126851758c4c896ddec8bba275dcb2226a12e5e"],"version":4} \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/index b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/index new file mode 100644 index 0000000..510f396 --- /dev/null +++ b/.github/examples/distributed-to-nd/distributed/test3/a1ccd846-8c03-472f-912a-9b2e28a138e8/index @@ -0,0 +1 @@ +[{"uuid":"c0856503-5fab-4fa0-abb6-c4fe0420bc7a","name":"Account3"},{"uuid":"98d36097-4939-48e7-b64b-64bba8734cc1","name":"Account1"},{"uuid":"bc4e4a57-7c93-4ea4-98ec-d068234e546f","name":"Account2"}] \ No newline at end of file diff --git a/.github/examples/distributed-to-nd/pass.txt b/.github/examples/distributed-to-nd/pass.txt new file mode 100644 index 0000000..af383f7 --- /dev/null +++ b/.github/examples/distributed-to-nd/pass.txt @@ -0,0 +1,6 @@ +hdpass1 +hdaccountpass1 +hdpass2 +hdaccountpass2 +hdpass3 +hdaccountpass3 diff --git a/.github/examples/hd-to-distributed.yaml b/.github/examples/hd-to-distributed.yaml new file mode 100644 index 0000000..e077658 --- /dev/null +++ b/.github/examples/hd-to-distributed.yaml @@ -0,0 +1,28 @@ +input: + store: + path: ./hd-to-distributed/hd + wallet: + type: hierarchical deterministic + passphrases: + path: ./hd-to-distributed/pass.txt + +output: + store: + path: ./hd-to-distributed/distributed + wallet: + type: distributed + threshold: 2 + peers: + 10: + name: test1:9091 + passphrases: + path: ./hd-to-distributed/pass.txt + 20: + name: test2:9091 + passphrases: + path: ./hd-to-distributed/pass.txt + 30: + name: test3:9091 + passphrases: + path: ./hd-to-distributed/pass.txt +log-level: debug diff --git a/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda new file mode 100644 index 0000000..3c75338 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"d33c20da7965b1ca526240fb72a0e4961928551e00a57c49d52db0b4e6b33936","params":{}},"cipher":{"function":"aes-128-ctr","message":"39d9a5d598cc02af22cad0fdf6bead64beb8d65097ac496b5134cca3ef06665f6851121f9da5b1a95f137c3fd1159cabc7495ecf4d9dc844816c4a6e64f1f6a1","params":{"iv":"cb3aad746d723384888278b4b1de6b2b"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"182739abc563c7ee2b2c74d1ca902a85f3ea346242065c2c5bb82583b671e040"}}},"name":"Wallet1","nextaccount":0,"type":"hierarchical deterministic","uuid":"0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd new file mode 100644 index 0000000..56239f7 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"de1c97b3d86e9af62700b31b884762f93ff7055a10fffc1b546c0f5903c9fca7","params":{}},"cipher":{"function":"aes-128-ctr","message":"5784d133bb5790593057d95a84815d221af87dee4ccbec39c3e401584f74aecd","params":{"iv":"fde6dec653d6ddf95bfa814a4aa0db73"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"b08135980f1c9813e09e5f285e91ac4c20b8f6dde31162938a03d0603872f28c"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","uuid":"2af07507-2b65-4b0c-b0bc-cfde784888dd","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c new file mode 100644 index 0000000..df05b13 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"0daeb49df9870c36c5e1daa20f23eec53c30fa0e0263105ec851468b95a9a9c9","params":{}},"cipher":{"function":"aes-128-ctr","message":"c8bf1dd2920dc52f572130bde8c3617f3cb22e152956f9d110b72055ceef2965","params":{"iv":"9b746846caf560caacca6f5c1e1c8d1c"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9e461f623ad15fa2ded6c60c81cf6d32f239b4120caab0cdf869e0f84d885d6e"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","uuid":"79837bd0-b840-4ad9-8df6-e0cabb0c448c","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 new file mode 100644 index 0000000..a816124 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"20ef473579eeecec0df7a6b8af406c0caf153f2739999237a56e002aa5825e7e","params":{}},"cipher":{"function":"aes-128-ctr","message":"bda50299de0905c3e6cd97fb2b80292d5245da8ea31c5ea92ce4d776efd04f3a","params":{"iv":"42b6362a907a43db2fcc59658c0319b8"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"204a5f2b15e4663e510fce242f31bf8f24d457bfbc36d41d3acc5e5e26f59b6b"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","uuid":"e6fabc62-a73f-4a9e-b703-7745c3451d81","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index new file mode 100644 index 0000000..fe941e0 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index @@ -0,0 +1 @@ +[{"uuid":"79837bd0-b840-4ad9-8df6-e0cabb0c448c","name":"Account1"},{"uuid":"2af07507-2b65-4b0c-b0bc-cfde784888dd","name":"Account2"},{"uuid":"e6fabc62-a73f-4a9e-b703-7745c3451d81","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 new file mode 100644 index 0000000..6aba81b --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"187131417af48bdceb75bc1a33823da0d1afcf702055e77dd41ca1ef551a4ed7","params":{}},"cipher":{"function":"aes-128-ctr","message":"e11c0a97773753cbaa0e6c40dbcc699aaa0cc991800985b785c5592ed8a8e750","params":{"iv":"8dd6d3edf11532263b5fc9f25b889661"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"ed40a0dd27e800d651cc1b573e057de399cadfbf619a0fe4d32ec31c39b9f442"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","uuid":"1a38517f-1a15-41b2-a191-84b71a252143","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 new file mode 100644 index 0000000..9bdec6b --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"90896498bc644504ca8782f8f56902828a6c7e2a98836358119bef67d6cd3d66","params":{}},"cipher":{"function":"aes-128-ctr","message":"7713fa621490c2f7198863acfdf35a6a76bc585a9648600e077aa144d66ffe7703323a99d04176a5ec378e0ade91d237604d3e304e10a20623b48a0261d5a986","params":{"iv":"dd261ffd55ccf36cfabde5d13cb14d8d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"59e5adafcd5cf72327aafcdab4d3d7da9afdf439e4da8c0cf195c2bf8b62a391"}}},"name":"Wallet3","nextaccount":0,"type":"hierarchical deterministic","uuid":"343705ee-be98-4e35-8697-8061bd663443","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 new file mode 100644 index 0000000..44c6bef --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"9d9d5ee8e4db233bf41ec5247457fe40d7ef52382068435211e7173b66a82fb6","params":{}},"cipher":{"function":"aes-128-ctr","message":"3ecaaa91567ac91ffbaf6b850afdae96a5a9edafc0b2c25c8870cad3ede2d44c","params":{"iv":"79d9ae3d17b8f8cee0f378bb6243f8ae"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"c257f1a9507c8ddf570c4f863a40cd19914fba3e8ebe17dcebf51390d671b3ff"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","uuid":"7782cbf4-2c2a-42d8-b0be-c65895cfcc72","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f new file mode 100644 index 0000000..6fb8db3 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"68559ab280ebeac0a2041d22a3dbc1c1ff62b8506b6595ca1d64efc4caef7006","params":{}},"cipher":{"function":"aes-128-ctr","message":"0ace9a12522fa77f59f5887b5db594da15ad7957d105910167baccccb146503d","params":{"iv":"9cde5da31e1ab5eff0f5a98118dd1bcd"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"befef2d7ee696074826db86ef670ba919ffaa59a1c5709125c3c0439454bbfa3"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","uuid":"8e780096-1464-4be5-8230-9b80d6a8210f","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/index b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/index new file mode 100644 index 0000000..f1f03d8 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/343705ee-be98-4e35-8697-8061bd663443/index @@ -0,0 +1 @@ +[{"uuid":"8e780096-1464-4be5-8230-9b80d6a8210f","name":"Account2"},{"uuid":"1a38517f-1a15-41b2-a191-84b71a252143","name":"Account1"},{"uuid":"7782cbf4-2c2a-42d8-b0be-c65895cfcc72","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 new file mode 100644 index 0000000..1d4f594 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"057ad7a2795688b8bc22fe2c1ef22a56dab7499259bcf22f6a99b7756db5c890","params":{}},"cipher":{"function":"aes-128-ctr","message":"aba3df8c8e6b82cbfcb7fde05cdb50ff409af99fdc3a019ee39cdbc39aff4fb7","params":{"iv":"dcc45819721e723aa77a93e3b5bc5cab"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9f89ccece835a4fbcd41f64158a3059dc6bdf94b31ee7ce1c23b6e51b1049a42"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","uuid":"1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e new file mode 100644 index 0000000..29cccf1 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"f82307d861c1c9597a62ee0adcc3a31a75ff4dca0928c7e73f3229e2145226cf","params":{}},"cipher":{"function":"aes-128-ctr","message":"e523c49b3091060d438f3441a77a1a59991a8e767baafd77043dc79ee8fc6d58","params":{"iv":"edc376bfc4be96604c5bcec6ec7bb496"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9fbdfa529a9b830d8b197253f62a6c9c4f5d2b3cf5a441f02172da0f02cc1d89"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","uuid":"9888859f-9a0e-48d2-a6ee-480402c6308e","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 new file mode 100644 index 0000000..1adf1b8 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"695f7e254740b23c657bd80ff5b2e459d975a63de4b264c4983025cd636ed471","params":{}},"cipher":{"function":"aes-128-ctr","message":"d307bab56ac62a9b81154184741bc06a90d7e3897c03c304b864403e66792cf7","params":{"iv":"e9002811e9b43fc3e5aa41d2bbcbee27"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"53839eb1196fae088bd380ecf426b26d24846e16646f6d469e9325fe0d7bd34b"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","uuid":"9abadb7a-1b32-4f91-95ef-a400930a04a0","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a new file mode 100644 index 0000000..5eda2e1 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"b1400864c806a26c65500c9b5929fbc876e09ec33963a611505530bde5727b85","params":{}},"cipher":{"function":"aes-128-ctr","message":"edc113161548ce753868d33a6baf64844356f2dad4cb3d1a83b81c62b09a74cbebb676a025bc9de1b842f6fdd5fb3a82e167ab53b7d80248fa5ae83515064446","params":{"iv":"4f5b5d138a305c40da3c1a04815d3388"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"06d21a7f697092e21d6a31105f73d56bf3262f21544bcf9644d049e87016852a"}}},"name":"Wallet2","nextaccount":0,"type":"hierarchical deterministic","uuid":"c4a5bc91-49e9-4099-91ea-748c670dd35a","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index new file mode 100644 index 0000000..38b916c --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index @@ -0,0 +1 @@ +[{"uuid":"9abadb7a-1b32-4f91-95ef-a400930a04a0","name":"Account1"},{"uuid":"9888859f-9a0e-48d2-a6ee-480402c6308e","name":"Account2"},{"uuid":"1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-distributed/hd/generate.sh b/.github/examples/hd-to-distributed/hd/generate.sh new file mode 100755 index 0000000..dd56367 --- /dev/null +++ b/.github/examples/hd-to-distributed/hd/generate.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Generate wallets +ethdo wallet create --base-dir . --wallet="Wallet1" --type="hd" --wallet-passphrase="hdpass1" --allow-weak-passphrases +ethdo wallet create --base-dir . --wallet="Wallet2" --type="hd" --wallet-passphrase="hdpass2" --allow-weak-passphrases +ethdo wallet create --base-dir . --wallet="Wallet3" --type="hd" --wallet-passphrase="hdpass3" --allow-weak-passphrases + + +# Generate accounts +ethdo account create --base-dir . --account="Wallet1/Account1" --passphrase "hdaccountpass1" --allow-weak-passphrases --path="m/12381/3600/0/0" --wallet-passphrase "hdpass1" +ethdo account create --base-dir . --account="Wallet1/Account2" --passphrase "hdaccountpass1" --allow-weak-passphrases --path="m/12381/3600/0/1" --wallet-passphrase "hdpass1" +ethdo account create --base-dir . --account="Wallet1/Account3" --passphrase "hdaccountpass1" --allow-weak-passphrases --path="m/12381/3600/0/2" --wallet-passphrase "hdpass1" +ethdo account create --base-dir . --account="Wallet2/Account1" --passphrase "hdaccountpass2" --allow-weak-passphrases --path="m/12381/3600/0/0" --wallet-passphrase "hdpass2" +ethdo account create --base-dir . --account="Wallet2/Account2" --passphrase "hdaccountpass2" --allow-weak-passphrases --path="m/12381/3600/0/1" --wallet-passphrase "hdpass2" +ethdo account create --base-dir . --account="Wallet2/Account3" --passphrase "hdaccountpass2" --allow-weak-passphrases --path="m/12381/3600/0/2" --wallet-passphrase "hdpass2" +ethdo account create --base-dir . --account="Wallet3/Account1" --passphrase "hdaccountpass3" --allow-weak-passphrases --path="m/12381/3600/0/0" --wallet-passphrase "hdpass3" +ethdo account create --base-dir . --account="Wallet3/Account2" --passphrase "hdaccountpass3" --allow-weak-passphrases --path="m/12381/3600/0/1" --wallet-passphrase "hdpass3" +ethdo account create --base-dir . --account="Wallet3/Account3" --passphrase "hdaccountpass3" --allow-weak-passphrases --path="m/12381/3600/0/2" --wallet-passphrase "hdpass3" diff --git a/.github/examples/hd-to-distributed/pass.txt b/.github/examples/hd-to-distributed/pass.txt new file mode 100644 index 0000000..af383f7 --- /dev/null +++ b/.github/examples/hd-to-distributed/pass.txt @@ -0,0 +1,6 @@ +hdpass1 +hdaccountpass1 +hdpass2 +hdaccountpass2 +hdpass3 +hdaccountpass3 diff --git a/.github/examples/hd-to-nd.yaml b/.github/examples/hd-to-nd.yaml new file mode 100644 index 0000000..f3a7baf --- /dev/null +++ b/.github/examples/hd-to-nd.yaml @@ -0,0 +1,17 @@ +input: + store: + path: ./hd-to-nd/hd + wallet: + type: hierarchical deterministic + passphrases: + path: ./hd-to-nd/pass.txt + +output: + store: + path: ./hd-to-nd/nd + wallet: + type: non-deterministic + passphrases: + path: ./hd-to-nd/pass.txt + +log-level: debug diff --git a/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda new file mode 100644 index 0000000..3c75338 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"d33c20da7965b1ca526240fb72a0e4961928551e00a57c49d52db0b4e6b33936","params":{}},"cipher":{"function":"aes-128-ctr","message":"39d9a5d598cc02af22cad0fdf6bead64beb8d65097ac496b5134cca3ef06665f6851121f9da5b1a95f137c3fd1159cabc7495ecf4d9dc844816c4a6e64f1f6a1","params":{"iv":"cb3aad746d723384888278b4b1de6b2b"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"182739abc563c7ee2b2c74d1ca902a85f3ea346242065c2c5bb82583b671e040"}}},"name":"Wallet1","nextaccount":0,"type":"hierarchical deterministic","uuid":"0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd new file mode 100644 index 0000000..56239f7 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/2af07507-2b65-4b0c-b0bc-cfde784888dd @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"de1c97b3d86e9af62700b31b884762f93ff7055a10fffc1b546c0f5903c9fca7","params":{}},"cipher":{"function":"aes-128-ctr","message":"5784d133bb5790593057d95a84815d221af87dee4ccbec39c3e401584f74aecd","params":{"iv":"fde6dec653d6ddf95bfa814a4aa0db73"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"b08135980f1c9813e09e5f285e91ac4c20b8f6dde31162938a03d0603872f28c"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","uuid":"2af07507-2b65-4b0c-b0bc-cfde784888dd","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c new file mode 100644 index 0000000..df05b13 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/79837bd0-b840-4ad9-8df6-e0cabb0c448c @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"0daeb49df9870c36c5e1daa20f23eec53c30fa0e0263105ec851468b95a9a9c9","params":{}},"cipher":{"function":"aes-128-ctr","message":"c8bf1dd2920dc52f572130bde8c3617f3cb22e152956f9d110b72055ceef2965","params":{"iv":"9b746846caf560caacca6f5c1e1c8d1c"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9e461f623ad15fa2ded6c60c81cf6d32f239b4120caab0cdf869e0f84d885d6e"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","uuid":"79837bd0-b840-4ad9-8df6-e0cabb0c448c","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 new file mode 100644 index 0000000..a816124 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/e6fabc62-a73f-4a9e-b703-7745c3451d81 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"20ef473579eeecec0df7a6b8af406c0caf153f2739999237a56e002aa5825e7e","params":{}},"cipher":{"function":"aes-128-ctr","message":"bda50299de0905c3e6cd97fb2b80292d5245da8ea31c5ea92ce4d776efd04f3a","params":{"iv":"42b6362a907a43db2fcc59658c0319b8"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"204a5f2b15e4663e510fce242f31bf8f24d457bfbc36d41d3acc5e5e26f59b6b"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","uuid":"e6fabc62-a73f-4a9e-b703-7745c3451d81","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index new file mode 100644 index 0000000..fe941e0 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/0dd9223b-e6ae-45f2-ad49-60c6dc8f5cda/index @@ -0,0 +1 @@ +[{"uuid":"79837bd0-b840-4ad9-8df6-e0cabb0c448c","name":"Account1"},{"uuid":"2af07507-2b65-4b0c-b0bc-cfde784888dd","name":"Account2"},{"uuid":"e6fabc62-a73f-4a9e-b703-7745c3451d81","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 new file mode 100644 index 0000000..6aba81b --- /dev/null +++ b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/1a38517f-1a15-41b2-a191-84b71a252143 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"187131417af48bdceb75bc1a33823da0d1afcf702055e77dd41ca1ef551a4ed7","params":{}},"cipher":{"function":"aes-128-ctr","message":"e11c0a97773753cbaa0e6c40dbcc699aaa0cc991800985b785c5592ed8a8e750","params":{"iv":"8dd6d3edf11532263b5fc9f25b889661"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"ed40a0dd27e800d651cc1b573e057de399cadfbf619a0fe4d32ec31c39b9f442"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","uuid":"1a38517f-1a15-41b2-a191-84b71a252143","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 new file mode 100644 index 0000000..9bdec6b --- /dev/null +++ b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/343705ee-be98-4e35-8697-8061bd663443 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"90896498bc644504ca8782f8f56902828a6c7e2a98836358119bef67d6cd3d66","params":{}},"cipher":{"function":"aes-128-ctr","message":"7713fa621490c2f7198863acfdf35a6a76bc585a9648600e077aa144d66ffe7703323a99d04176a5ec378e0ade91d237604d3e304e10a20623b48a0261d5a986","params":{"iv":"dd261ffd55ccf36cfabde5d13cb14d8d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"59e5adafcd5cf72327aafcdab4d3d7da9afdf439e4da8c0cf195c2bf8b62a391"}}},"name":"Wallet3","nextaccount":0,"type":"hierarchical deterministic","uuid":"343705ee-be98-4e35-8697-8061bd663443","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 new file mode 100644 index 0000000..44c6bef --- /dev/null +++ b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/7782cbf4-2c2a-42d8-b0be-c65895cfcc72 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"9d9d5ee8e4db233bf41ec5247457fe40d7ef52382068435211e7173b66a82fb6","params":{}},"cipher":{"function":"aes-128-ctr","message":"3ecaaa91567ac91ffbaf6b850afdae96a5a9edafc0b2c25c8870cad3ede2d44c","params":{"iv":"79d9ae3d17b8f8cee0f378bb6243f8ae"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"c257f1a9507c8ddf570c4f863a40cd19914fba3e8ebe17dcebf51390d671b3ff"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","uuid":"7782cbf4-2c2a-42d8-b0be-c65895cfcc72","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f new file mode 100644 index 0000000..6fb8db3 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/8e780096-1464-4be5-8230-9b80d6a8210f @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"68559ab280ebeac0a2041d22a3dbc1c1ff62b8506b6595ca1d64efc4caef7006","params":{}},"cipher":{"function":"aes-128-ctr","message":"0ace9a12522fa77f59f5887b5db594da15ad7957d105910167baccccb146503d","params":{"iv":"9cde5da31e1ab5eff0f5a98118dd1bcd"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"befef2d7ee696074826db86ef670ba919ffaa59a1c5709125c3c0439454bbfa3"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","uuid":"8e780096-1464-4be5-8230-9b80d6a8210f","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/index b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/index new file mode 100644 index 0000000..f1f03d8 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/343705ee-be98-4e35-8697-8061bd663443/index @@ -0,0 +1 @@ +[{"uuid":"8e780096-1464-4be5-8230-9b80d6a8210f","name":"Account2"},{"uuid":"1a38517f-1a15-41b2-a191-84b71a252143","name":"Account1"},{"uuid":"7782cbf4-2c2a-42d8-b0be-c65895cfcc72","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 new file mode 100644 index 0000000..1d4f594 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"057ad7a2795688b8bc22fe2c1ef22a56dab7499259bcf22f6a99b7756db5c890","params":{}},"cipher":{"function":"aes-128-ctr","message":"aba3df8c8e6b82cbfcb7fde05cdb50ff409af99fdc3a019ee39cdbc39aff4fb7","params":{"iv":"dcc45819721e723aa77a93e3b5bc5cab"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9f89ccece835a4fbcd41f64158a3059dc6bdf94b31ee7ce1c23b6e51b1049a42"}}},"name":"Account3","path":"m/12381/3600/0/2","pubkey":"95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","uuid":"1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e new file mode 100644 index 0000000..29cccf1 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9888859f-9a0e-48d2-a6ee-480402c6308e @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"f82307d861c1c9597a62ee0adcc3a31a75ff4dca0928c7e73f3229e2145226cf","params":{}},"cipher":{"function":"aes-128-ctr","message":"e523c49b3091060d438f3441a77a1a59991a8e767baafd77043dc79ee8fc6d58","params":{"iv":"edc376bfc4be96604c5bcec6ec7bb496"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9fbdfa529a9b830d8b197253f62a6c9c4f5d2b3cf5a441f02172da0f02cc1d89"}}},"name":"Account2","path":"m/12381/3600/0/1","pubkey":"916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","uuid":"9888859f-9a0e-48d2-a6ee-480402c6308e","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 new file mode 100644 index 0000000..1adf1b8 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/9abadb7a-1b32-4f91-95ef-a400930a04a0 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"695f7e254740b23c657bd80ff5b2e459d975a63de4b264c4983025cd636ed471","params":{}},"cipher":{"function":"aes-128-ctr","message":"d307bab56ac62a9b81154184741bc06a90d7e3897c03c304b864403e66792cf7","params":{"iv":"e9002811e9b43fc3e5aa41d2bbcbee27"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"53839eb1196fae088bd380ecf426b26d24846e16646f6d469e9325fe0d7bd34b"}}},"name":"Account1","path":"m/12381/3600/0/0","pubkey":"938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","uuid":"9abadb7a-1b32-4f91-95ef-a400930a04a0","version":4} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a new file mode 100644 index 0000000..5eda2e1 --- /dev/null +++ b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/c4a5bc91-49e9-4099-91ea-748c670dd35a @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"b1400864c806a26c65500c9b5929fbc876e09ec33963a611505530bde5727b85","params":{}},"cipher":{"function":"aes-128-ctr","message":"edc113161548ce753868d33a6baf64844356f2dad4cb3d1a83b81c62b09a74cbebb676a025bc9de1b842f6fdd5fb3a82e167ab53b7d80248fa5ae83515064446","params":{"iv":"4f5b5d138a305c40da3c1a04815d3388"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"06d21a7f697092e21d6a31105f73d56bf3262f21544bcf9644d049e87016852a"}}},"name":"Wallet2","nextaccount":0,"type":"hierarchical deterministic","uuid":"c4a5bc91-49e9-4099-91ea-748c670dd35a","version":1} \ No newline at end of file diff --git a/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index new file mode 100644 index 0000000..38b916c --- /dev/null +++ b/.github/examples/hd-to-nd/hd/c4a5bc91-49e9-4099-91ea-748c670dd35a/index @@ -0,0 +1 @@ +[{"uuid":"9abadb7a-1b32-4f91-95ef-a400930a04a0","name":"Account1"},{"uuid":"9888859f-9a0e-48d2-a6ee-480402c6308e","name":"Account2"},{"uuid":"1bf9bc32-44d3-4f1c-9fb9-cbc816bc3bb3","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/hd-to-nd/pass.txt b/.github/examples/hd-to-nd/pass.txt new file mode 100644 index 0000000..af383f7 --- /dev/null +++ b/.github/examples/hd-to-nd/pass.txt @@ -0,0 +1,6 @@ +hdpass1 +hdaccountpass1 +hdpass2 +hdaccountpass2 +hdpass3 +hdaccountpass3 diff --git a/.github/examples/nd-to-distributed.yaml b/.github/examples/nd-to-distributed.yaml new file mode 100644 index 0000000..fcc291f --- /dev/null +++ b/.github/examples/nd-to-distributed.yaml @@ -0,0 +1,28 @@ +input: + store: + path: ./nd-to-distributed/nd + wallet: + type: non-deterministic + passphrases: + path: ./nd-to-distributed/pass.txt + +output: + store: + path: ./nd-to-distributed/distributed + wallet: + type: distributed + threshold: 2 + peers: + 10: + name: test1:9091 + passphrases: + path: ./nd-to-distributed/pass.txt + 20: + name: test2:9091 + passphrases: + path: ./nd-to-distributed/pass.txt + 30: + name: test3:9091 + passphrases: + path: ./nd-to-distributed/pass.txt +log-level: debug diff --git a/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/0f548279-b8c6-40f1-a26d-ce347d939c91 b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/0f548279-b8c6-40f1-a26d-ce347d939c91 new file mode 100644 index 0000000..4bc7999 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/0f548279-b8c6-40f1-a26d-ce347d939c91 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"714e06fcbcf376b9511180d912f9c745af9d6d147816f182819e1a39f9320ded","params":{}},"cipher":{"function":"aes-128-ctr","message":"efb28530e61131d291fac4e7d31ad2e901f660a3f30afcd3e9126ac85dea6ff0","params":{"iv":"ed6fe6eef5907375bb886da46c0dd731"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"04c7ec6f96d9b4680d3cdcf4f00d0edda468efb0447fa7395745d566c104d8dc"}}},"encryptor":"keystorev4","name":"Account1","pubkey":"855a01d2ca3be7a6583b0404e12be29858387c8a5e9fb642aa2032db942c4e9a10da39c49bf0f8d3c6b6c6fd364bb4f8","uuid":"0f548279-b8c6-40f1-a26d-ce347d939c91","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/251727e9-a46a-4d7b-871c-dc490c7adaf4 b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/251727e9-a46a-4d7b-871c-dc490c7adaf4 new file mode 100644 index 0000000..320954a --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/251727e9-a46a-4d7b-871c-dc490c7adaf4 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"1f6dc361592e0e9b9afc0e41d0caca2161d7080374aa8d9357eff70a6fc80662","params":{}},"cipher":{"function":"aes-128-ctr","message":"94ba167ffec7f87658613812a38f3d4ed3eda7c54022c98594beeae72fb89597","params":{"iv":"fa16bccdc49c9eae60f192a61635acf4"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"40615e6b421946cbc34eb58f8dd1c0177f94784c8d52e040ad2444208bce0edf"}}},"encryptor":"keystorev4","name":"Account3","pubkey":"b57c097594614a7362efb643cac25e09d351cd43887069024e58b52985a9f3c22ae7eccfd22e6cf63fcfeaa3142c025c","uuid":"251727e9-a46a-4d7b-871c-dc490c7adaf4","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/269f3469-8fb7-4443-a13d-a7ff659b4590 b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/269f3469-8fb7-4443-a13d-a7ff659b4590 new file mode 100644 index 0000000..c1e8d9b --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/269f3469-8fb7-4443-a13d-a7ff659b4590 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"43244b04fab538e8eef2cc68c257607b5e2b7931a7bb2eba2116541de2db5568","params":{}},"cipher":{"function":"aes-128-ctr","message":"a822d57ef530aa0a5c318a9aa5d79a848eef21ebeadfb41d10925887cfc8b686","params":{"iv":"0bb41838421f3011040d893931bed5d9"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"c1ff459ee7c1ea9f56604da5445637906e550c1a4d056f9bbe81ba1f25b72a27"}}},"encryptor":"keystorev4","name":"Account2","pubkey":"88479e8c691ea8cef507f5d7fdab42ead813329f91d7016b466e1ec37a918fc1e8de2cd217511096e1f9e7f0cee85e8e","uuid":"269f3469-8fb7-4443-a13d-a7ff659b4590","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/42d0c16c-67af-436b-be93-d4d0ee47b3cc b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/42d0c16c-67af-436b-be93-d4d0ee47b3cc new file mode 100644 index 0000000..8d9d4f9 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/42d0c16c-67af-436b-be93-d4d0ee47b3cc @@ -0,0 +1 @@ +{"name":"Wallet1","type":"non-deterministic","uuid":"42d0c16c-67af-436b-be93-d4d0ee47b3cc","version":1} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/index b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/index new file mode 100644 index 0000000..5b6779b --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/42d0c16c-67af-436b-be93-d4d0ee47b3cc/index @@ -0,0 +1 @@ +[{"uuid":"269f3469-8fb7-4443-a13d-a7ff659b4590","name":"Account2"},{"uuid":"0f548279-b8c6-40f1-a26d-ce347d939c91","name":"Account1"},{"uuid":"251727e9-a46a-4d7b-871c-dc490c7adaf4","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff new file mode 100644 index 0000000..7e713ee --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff @@ -0,0 +1 @@ +{"name":"Wallet3","type":"non-deterministic","uuid":"4f5accdb-3774-43d7-b1ca-4ae42abfe4ff","version":1} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/51965d91-14d2-4645-b278-1c470e1a3034 b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/51965d91-14d2-4645-b278-1c470e1a3034 new file mode 100644 index 0000000..88d5c2e --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/51965d91-14d2-4645-b278-1c470e1a3034 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"a35df25063f00321c6826644b86243dfed6d761046046ebec40e77b071468e8e","params":{}},"cipher":{"function":"aes-128-ctr","message":"746387ccd34c347f466be7e81a806f9285692e48e1aa2de0ff0c49834d065bd6","params":{"iv":"4f4d909a988c55a7c735d5fe60a9ea4d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"1bdb4495c05a733968aa2515d7ffacbab9bd67cbf4ae44aad7648f6f8aa4c567"}}},"encryptor":"keystorev4","name":"Account2","pubkey":"973ffa08f44c9de45f47fd42a8354f0d863f27069c0b8d1d1008b346750dbcf094522616c372cb5a80ea5d5ff154c25d","uuid":"51965d91-14d2-4645-b278-1c470e1a3034","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/722f4580-6d90-4248-b9b6-372c81635df1 b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/722f4580-6d90-4248-b9b6-372c81635df1 new file mode 100644 index 0000000..2eba5e0 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/722f4580-6d90-4248-b9b6-372c81635df1 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"3bbde0ec2e65d6a4b5316ef329e08ebcf5d3f8ef855ff46e607573f714ed03a2","params":{}},"cipher":{"function":"aes-128-ctr","message":"a34951f1ded500b331ec8a42fdf9405fce59a2cfa9ecaacfaffc9efeabfdfbfd","params":{"iv":"bf5c462866cd5d13d2ebcb42278382f6"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"d9864cf3a8ff8381c718b9140717688afe0a250138b1be4dc904b441e159a331"}}},"encryptor":"keystorev4","name":"Account3","pubkey":"a0de95f533fce572ea32b108d3e73fa63f31d57df3d1cac2386db67bc68c20065d372f44b3f2ee50409132bd60fd5b38","uuid":"722f4580-6d90-4248-b9b6-372c81635df1","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/ff05c82a-ffaa-4c7d-8a96-7b9238766812 b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/ff05c82a-ffaa-4c7d-8a96-7b9238766812 new file mode 100644 index 0000000..a0e413c --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/ff05c82a-ffaa-4c7d-8a96-7b9238766812 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"b4c2d64f3412e37f2a66fa26218d1e92ff86927706a25f68db4f7d4d02fa0c02","params":{}},"cipher":{"function":"aes-128-ctr","message":"89929d5053c7be5c8e477b438296a7c5575e4fe0c4b112906aae496ff7560592","params":{"iv":"27f660810103af55baa8fa872737c34b"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"96fcdb18a085c0744c4114af7ffb6c3a6801a551da40e256ae4fafa233bcc33a"}}},"encryptor":"keystorev4","name":"Account1","pubkey":"b53410efbc1447163bc66a2adb532b3ee7ba53eea819111ae203b8eb44b7387a5c5c351a4c4a85d9264a5d803b28e0d6","uuid":"ff05c82a-ffaa-4c7d-8a96-7b9238766812","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/index b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/index new file mode 100644 index 0000000..5b77f28 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/4f5accdb-3774-43d7-b1ca-4ae42abfe4ff/index @@ -0,0 +1 @@ +[{"uuid":"51965d91-14d2-4645-b278-1c470e1a3034","name":"Account2"},{"uuid":"ff05c82a-ffaa-4c7d-8a96-7b9238766812","name":"Account1"},{"uuid":"722f4580-6d90-4248-b9b6-372c81635df1","name":"Account3"}] \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/577e9ecf-0b3c-4d1f-b1c8-e19333d8e614 b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/577e9ecf-0b3c-4d1f-b1c8-e19333d8e614 new file mode 100644 index 0000000..1a81531 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/577e9ecf-0b3c-4d1f-b1c8-e19333d8e614 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"4d7e405cae40a69ba181166d6af5acfc84a7a1387949e49778c152d770683a55","params":{}},"cipher":{"function":"aes-128-ctr","message":"fd739b67c25788f5f650fe27e975324f9aea96e66798e7d7abd3540a03aef646","params":{"iv":"e6b48273b791d15e53ecd48984bb7d66"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"a2c9983ce1f4044fe0baa63131fedbd4cf4554ae5bf997340c11deb51d2294b6"}}},"encryptor":"keystorev4","name":"Account2","pubkey":"916fdc0f5b49e66e27ce4d06145c87ef55188166f8a6294f856c100f4500ad33611c92a1d540f3b921e23ae30e480f55","uuid":"577e9ecf-0b3c-4d1f-b1c8-e19333d8e614","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/a16c6f24-4d62-4196-8c67-9b8703780b79 b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/a16c6f24-4d62-4196-8c67-9b8703780b79 new file mode 100644 index 0000000..acc9a36 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/a16c6f24-4d62-4196-8c67-9b8703780b79 @@ -0,0 +1 @@ +{"name":"Wallet2","type":"non-deterministic","uuid":"a16c6f24-4d62-4196-8c67-9b8703780b79","version":1} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/b91990ba-ec38-4e9d-b407-ab85c7f132be b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/b91990ba-ec38-4e9d-b407-ab85c7f132be new file mode 100644 index 0000000..ba339f4 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/b91990ba-ec38-4e9d-b407-ab85c7f132be @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"abda5a43e1c237934ae97087b8044758ccd35d227f739b15dab0f78ecb67365b","params":{}},"cipher":{"function":"aes-128-ctr","message":"0b6b03c363ec34db0f05ca4db5badf7d553bcdbb658a3e2f48339d2fb2153919","params":{"iv":"694be85c3f806afe377c283084e0402e"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9064d59ebb7afbbb150e6e717c8b9c39add43deeda998343ac39bb78431c84e9"}}},"encryptor":"keystorev4","name":"Account3","pubkey":"95dbe6e6094e6809ed558f5dfe168cb52b8a282cd51bb131cb937226225a9d8a2117f3067c0e588c0996f081a2f77bd1","uuid":"b91990ba-ec38-4e9d-b407-ab85c7f132be","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/d81dd43a-3c47-4b56-a5ee-3babf995b518 b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/d81dd43a-3c47-4b56-a5ee-3babf995b518 new file mode 100644 index 0000000..84eb405 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/d81dd43a-3c47-4b56-a5ee-3babf995b518 @@ -0,0 +1 @@ +{"crypto":{"checksum":{"function":"sha256","message":"5c500e81110c11b7559dfaf2d636db64a07de9c5bd53a373795bcfa6e402b68b","params":{}},"cipher":{"function":"aes-128-ctr","message":"7129e79a92500c2e2b6a2aaaa21f8def027748855f8fcbd947d2eaa584060ac3","params":{"iv":"47835b01bb75ef5543b76cb8549eb5af"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"758f233a4b965e7843f449ab49723a9520d55090309a57ddce06e412357a38cf"}}},"encryptor":"keystorev4","name":"Account1","pubkey":"938e7987bbdb7041ad684caa140834f5efed1746cf02e907227e32cdfc4196fb42c3d4bf5e1c1a7f9ca52bc7bca39db7","uuid":"d81dd43a-3c47-4b56-a5ee-3babf995b518","version":4} \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/index b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/index new file mode 100644 index 0000000..eaf4d65 --- /dev/null +++ b/.github/examples/nd-to-distributed/nd/a16c6f24-4d62-4196-8c67-9b8703780b79/index @@ -0,0 +1 @@ +[{"uuid":"b91990ba-ec38-4e9d-b407-ab85c7f132be","name":"Account3"},{"uuid":"577e9ecf-0b3c-4d1f-b1c8-e19333d8e614","name":"Account2"},{"uuid":"d81dd43a-3c47-4b56-a5ee-3babf995b518","name":"Account1"}] \ No newline at end of file diff --git a/.github/examples/nd-to-distributed/pass.txt b/.github/examples/nd-to-distributed/pass.txt new file mode 100644 index 0000000..af383f7 --- /dev/null +++ b/.github/examples/nd-to-distributed/pass.txt @@ -0,0 +1,6 @@ +hdpass1 +hdaccountpass1 +hdpass2 +hdaccountpass2 +hdpass3 +hdaccountpass3 diff --git a/.github/examples/passphrases.txt b/.github/examples/passphrases.txt deleted file mode 100644 index 53c3942..0000000 --- a/.github/examples/passphrases.txt +++ /dev/null @@ -1,4 +0,0 @@ -old1pass -old2pass -old3pass -12345678 diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/69e976d2-3c78-44e3-b9a6-45149078723d b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/69e976d2-3c78-44e3-b9a6-45149078723d deleted file mode 100755 index 7a51214..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/69e976d2-3c78-44e3-b9a6-45149078723d +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"e7289efc11d9545fc0b8aaed0e121490d2d6d57923f69ef0575f1d845f87811b","params":{}},"cipher":{"function":"aes-128-ctr","message":"3e33033b2faee203fc95d62bb29f35b3c87284c95bd89d0212273d4a5207e29c","params":{"iv":"36333b44ce26d3e9de4834d60232e1ac"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"f5527587fc21f8784f2aa37dbbfc3e562bf72fd908782d38ea7a86327ccd183a"}}},"encryptor":"keystore","name":"1","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"b9883d85d68f80ad866169dbf5c2e026b7c89174a5de2365c89b5695bcabd0c204cecd60458e06c2aeacec92abab0354","signing_threshold":2,"uuid":"69e976d2-3c78-44e3-b9a6-45149078723d","verificationvector":["95afff751b1bfce1bb6a1e5260f77383739aed01e9a84d7cb36f80588df4d476a68b21bd955a05a893bb9b7b5083bcc8","81c78032e7f8fc2218cb329980c779ef0adaad7d716061e068b3ac5647530f728aa26af1088508a952de10e256a2b6e4"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/85587167-c356-4968-aa36-37464d05640c b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/85587167-c356-4968-aa36-37464d05640c deleted file mode 100755 index 332e87a..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/85587167-c356-4968-aa36-37464d05640c +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"adbeb2758b92414de7ae8a64bacae51c24463ca4a803c32a1a828dd180248e36","params":{}},"cipher":{"function":"aes-128-ctr","message":"d6a95ac398733df3dd2678259d5752c62fa02950c3808122070ffbe9ba91b229","params":{"iv":"1ae03871eb0820eb6039b6080a613649"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"0823518f8a3c84d7f92733c8f196a630f9786fa50e8db91fe96fb9bf629b2ff6"}}},"encryptor":"keystore","name":"2","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"80528452ccf756e30ae8d293ba5df6e93a38aab7be68efd8ee866f1eb31c77bf17038a999ec3b1cab984edb838fc7218","signing_threshold":2,"uuid":"85587167-c356-4968-aa36-37464d05640c","verificationvector":["a7fe49e636185c6fe96a25d6ce8fdbd707440d0553ae9d2e69a75179a0734cc291047892d20b7870c8c77c35ee1fd2ac","8b55938b0aa800ec2c1458ae2bc90e10385576801b8ceeb1a6a3003a1bb3a93ab26610290b1994f60b2426fe24062db7"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/9a76c4f3-aa46-4864-b7fd-55681f8afa3b b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/9a76c4f3-aa46-4864-b7fd-55681f8afa3b deleted file mode 100755 index f8319c2..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/9a76c4f3-aa46-4864-b7fd-55681f8afa3b +++ /dev/null @@ -1 +0,0 @@ -{"name":"DW","type":"distributed","uuid":"9a76c4f3-aa46-4864-b7fd-55681f8afa3b","version":1} \ No newline at end of file diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/a99d9d83-4afb-4870-8cce-a57c69c6bda2 b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/a99d9d83-4afb-4870-8cce-a57c69c6bda2 deleted file mode 100755 index a5df688..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/a99d9d83-4afb-4870-8cce-a57c69c6bda2 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"8e112965aa60f54bc3e257e9b43d913aef3acf32237c2b42d630f5aefafa3e5e","params":{}},"cipher":{"function":"aes-128-ctr","message":"e357497a610a534087dd64d580024b2262f60c594b50f9ca3e9fa3b71087043f","params":{"iv":"5e5f94e82e54bcdf58314107b825f369"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"2c4fa400066f3cc76fb8b0457d29e670de32224eb7f2ca2cf5eed575f8382b4b"}}},"encryptor":"keystore","name":"4","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"ad179ddf9b15e4ec2e21b152612386fc1aa551bb1fb253dd412798f7c3254168452ebeb7c710becbfe5a574aa41f5674","signing_threshold":2,"uuid":"a99d9d83-4afb-4870-8cce-a57c69c6bda2","verificationvector":["b4188c34e354ddc7f20d87bca744c0e0de5c379c63600f7756fbaedf90eeed07f1a5084b3214981496c22c5cf9ced707","a27325d0b305641adfd335589260b432e42760992653387b2ec20fb02572d2c1cf0a19dd0fd429f8d2454300cedf789a"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/fd83339a-d36e-4c7a-a30c-0999be075dcb b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/fd83339a-d36e-4c7a-a30c-0999be075dcb deleted file mode 100755 index c6a9494..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/fd83339a-d36e-4c7a-a30c-0999be075dcb +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"4fbd6b24fa4c28d826decca737468f76c56ba15ef98ec7755488eb9dfb41bce4","params":{}},"cipher":{"function":"aes-128-ctr","message":"fe0d29091df31eb982aef40b276bc907f7be36389b0daffa267bc6e94375835f","params":{"iv":"769abb32c750c5e19d65117b13f14c67"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"0f6cf878b2c6f94786f4382df427b21288a8a17bbf23a97cb8f2a5222cda2a11"}}},"encryptor":"keystore","name":"3","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"b114747810f4e463bdabdc3c04656c23545a5486c527aa489bf274e46d39bf655cca23171774dcffaff9c5de4381d7f3","signing_threshold":2,"uuid":"fd83339a-d36e-4c7a-a30c-0999be075dcb","verificationvector":["8ebf622bb6d007a7dfbe9cdfa4cdefa4fce6e68921152235015e37c6dbc0bb389684abf082cf0972d00aa8ccb0f8f89a","a411b90486577d22a6f4e8883b5908dfd9a9cac66e19efaa6700ce4e2020b007ac3560d149358784581379d4cccbf2c9"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/index b/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/index deleted file mode 100755 index 0b9bb72..0000000 --- a/.github/examples/wallets/old1/9a76c4f3-aa46-4864-b7fd-55681f8afa3b/index +++ /dev/null @@ -1 +0,0 @@ -[{"uuid":"fd83339a-d36e-4c7a-a30c-0999be075dcb","name":"3"},{"uuid":"69e976d2-3c78-44e3-b9a6-45149078723d","name":"1"},{"uuid":"85587167-c356-4968-aa36-37464d05640c","name":"2"},{"uuid":"a99d9d83-4afb-4870-8cce-a57c69c6bda2","name":"4"}] \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/026b1c48-9a1a-49f8-b289-792d79378090 b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/026b1c48-9a1a-49f8-b289-792d79378090 deleted file mode 100755 index f5aae2d..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/026b1c48-9a1a-49f8-b289-792d79378090 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"46d068092219d9a315757c84859f6099ceeadd9103d0712794105597280b8a19","params":{}},"cipher":{"function":"aes-128-ctr","message":"c74e3db0fa42f6812cd3e5f4d78bed77b5c2d93c8023dc9e9c0a3a04867d0acd","params":{"iv":"d1b668859a935072baed48f831ad96e3"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"7c49b3ff26cb0a9acae23dc999e5aed480baac2865ae91f6391f94b483a5a339"}}},"encryptor":"keystore","name":"4","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"82090b2fb91d9a554a569bbb5cb6b7426b756e0bfeb1411d940d80c09028c23ab0e7a97ce0c49ef232b35cd209526da0","signing_threshold":2,"uuid":"026b1c48-9a1a-49f8-b289-792d79378090","verificationvector":["b4188c34e354ddc7f20d87bca744c0e0de5c379c63600f7756fbaedf90eeed07f1a5084b3214981496c22c5cf9ced707","a27325d0b305641adfd335589260b432e42760992653387b2ec20fb02572d2c1cf0a19dd0fd429f8d2454300cedf789a"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/32b277e3-b71a-45ed-b47d-5b6c155b8cf9 b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/32b277e3-b71a-45ed-b47d-5b6c155b8cf9 deleted file mode 100755 index d79c842..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/32b277e3-b71a-45ed-b47d-5b6c155b8cf9 +++ /dev/null @@ -1 +0,0 @@ -{"name":"DW","type":"distributed","uuid":"32b277e3-b71a-45ed-b47d-5b6c155b8cf9","version":1} \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/6880aa1f-e490-4508-868f-f2af3b7f34f7 b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/6880aa1f-e490-4508-868f-f2af3b7f34f7 deleted file mode 100755 index c5a6eeb..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/6880aa1f-e490-4508-868f-f2af3b7f34f7 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"6eb17b1f9215ebe336f90a869033fc67ade48255951c2b68e47782bfc2df1e74","params":{}},"cipher":{"function":"aes-128-ctr","message":"359f768b80d59de504fc7a28c04e3343dd89a8a405c244acaabba464988d72a2","params":{"iv":"2621b90ccba4644e5d4fe59833862e05"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"a02906961a0d8af6fea939a3ab726ae932f27d02f16cb00cf51d0536d238961d"}}},"encryptor":"keystore","name":"1","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"85be144f1cda4a12f51afbe58e5f649e58ab148d1ad9a878d55e0e8726d3fc27c7193930a4f9e5621706ac93692bd000","signing_threshold":2,"uuid":"6880aa1f-e490-4508-868f-f2af3b7f34f7","verificationvector":["95afff751b1bfce1bb6a1e5260f77383739aed01e9a84d7cb36f80588df4d476a68b21bd955a05a893bb9b7b5083bcc8","81c78032e7f8fc2218cb329980c779ef0adaad7d716061e068b3ac5647530f728aa26af1088508a952de10e256a2b6e4"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/ab1cc0d8-5447-41bd-b3b5-0c100ae9747a b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/ab1cc0d8-5447-41bd-b3b5-0c100ae9747a deleted file mode 100755 index 438396e..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/ab1cc0d8-5447-41bd-b3b5-0c100ae9747a +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"3150e175405733fb497c44b23056f919c89c259593ca15d4f657fde7032d654b","params":{}},"cipher":{"function":"aes-128-ctr","message":"29dd437dd27a07deefb9c7bb03c485e100f4e5a200a034eb8bc0eae36d4622d4","params":{"iv":"9100cde6be95877a5a9499b0335a0258"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"813351c6efbde1262f8c25ff6771fa5d9b545f296770c1a48b508d1127ba2c2f"}}},"encryptor":"keystore","name":"2","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"912f38d5703381a851a9410889c8091502ecb68a24f6af6c3aaf634cd3d922b4566647f04ad600ab66d5ca381422a2c3","signing_threshold":2,"uuid":"ab1cc0d8-5447-41bd-b3b5-0c100ae9747a","verificationvector":["a7fe49e636185c6fe96a25d6ce8fdbd707440d0553ae9d2e69a75179a0734cc291047892d20b7870c8c77c35ee1fd2ac","8b55938b0aa800ec2c1458ae2bc90e10385576801b8ceeb1a6a3003a1bb3a93ab26610290b1994f60b2426fe24062db7"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/f282e1ff-0364-48e6-a674-26ea18184bf3 b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/f282e1ff-0364-48e6-a674-26ea18184bf3 deleted file mode 100755 index f0fadb1..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/f282e1ff-0364-48e6-a674-26ea18184bf3 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"7179ccab644c8e521a7a63697ca92af8bbfddb8c24c2ba9f3e391a202dcefd27","params":{}},"cipher":{"function":"aes-128-ctr","message":"791b162b3a39ca43e536b8a2431d0aaebeb15de9f336e95ecc89214bce564711","params":{"iv":"25da73432f04204d62b4cab397c5062a"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"34ed73f7048ff1e8e9f2997141a87778aa802beabb61c70cecd51fade7ef53f3"}}},"encryptor":"keystore","name":"3","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"a2e82d98d20dba91a92f63bbe3d76f6063101ac0572803b9645dec49c9f8639388efa37c0ad5bb1f3cb5e9fdcfa8ea00","signing_threshold":2,"uuid":"f282e1ff-0364-48e6-a674-26ea18184bf3","verificationvector":["8ebf622bb6d007a7dfbe9cdfa4cdefa4fce6e68921152235015e37c6dbc0bb389684abf082cf0972d00aa8ccb0f8f89a","a411b90486577d22a6f4e8883b5908dfd9a9cac66e19efaa6700ce4e2020b007ac3560d149358784581379d4cccbf2c9"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/index b/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/index deleted file mode 100755 index 86afe63..0000000 --- a/.github/examples/wallets/old2/32b277e3-b71a-45ed-b47d-5b6c155b8cf9/index +++ /dev/null @@ -1 +0,0 @@ -[{"uuid":"f282e1ff-0364-48e6-a674-26ea18184bf3","name":"3"},{"uuid":"026b1c48-9a1a-49f8-b289-792d79378090","name":"4"},{"uuid":"6880aa1f-e490-4508-868f-f2af3b7f34f7","name":"1"},{"uuid":"ab1cc0d8-5447-41bd-b3b5-0c100ae9747a","name":"2"}] \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5613693b-1b36-4bac-9b85-d96deeeb8d7c b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5613693b-1b36-4bac-9b85-d96deeeb8d7c deleted file mode 100755 index fe58e79..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5613693b-1b36-4bac-9b85-d96deeeb8d7c +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"903ba3799fd2246e667a22ac069dfea62dd602326ffd7eecb96c9c510b851fcd","params":{}},"cipher":{"function":"aes-128-ctr","message":"483f832bb06c3ae3823ffb15c119c463618d93d303923473589e749a21b03e44","params":{"iv":"8da0e2ddf3c6ec06fe6fdddc8601aebc"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"9970c7519181415997e6d80189394caf5be1a899f562e241963514dd7f98ce36"}}},"encryptor":"keystore","name":"3","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"8ed12b0020f4bac774da5df91c26657ba205fcf27cacb3cc5f81cd2a8f39e17a5d9951819f8376950fe44889c88270c0","signing_threshold":2,"uuid":"5613693b-1b36-4bac-9b85-d96deeeb8d7c","verificationvector":["8ebf622bb6d007a7dfbe9cdfa4cdefa4fce6e68921152235015e37c6dbc0bb389684abf082cf0972d00aa8ccb0f8f89a","a411b90486577d22a6f4e8883b5908dfd9a9cac66e19efaa6700ce4e2020b007ac3560d149358784581379d4cccbf2c9"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5a8c805d-9056-4ded-b9a2-611cdaa99427 b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5a8c805d-9056-4ded-b9a2-611cdaa99427 deleted file mode 100755 index a83bfe5..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5a8c805d-9056-4ded-b9a2-611cdaa99427 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"166455eeb2d5f6cb2d65535c25c3633f6e29f4f06cdaacf21bdf98fd64f8f974","params":{}},"cipher":{"function":"aes-128-ctr","message":"4a2fced731603b009d9d895f0761794233b8241d8ed248b77a4169d62654e11b","params":{"iv":"256f459d18e97827b5d50acc0ba7b0c7"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"a86efa145ac7b3def2a884cc1e6b93d544a3f2dd80e35b3743dd60f86ca92a34"}}},"encryptor":"keystore","name":"4","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"888f8141388983d8f7cc31a7138e342ecb162ec89af0ec5c109de566e49f42aece6e21fb969c82471791f2c8405ca1f8","signing_threshold":2,"uuid":"5a8c805d-9056-4ded-b9a2-611cdaa99427","verificationvector":["b4188c34e354ddc7f20d87bca744c0e0de5c379c63600f7756fbaedf90eeed07f1a5084b3214981496c22c5cf9ced707","a27325d0b305641adfd335589260b432e42760992653387b2ec20fb02572d2c1cf0a19dd0fd429f8d2454300cedf789a"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5ee08d46-70d0-430a-b4ef-f461567c344c b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5ee08d46-70d0-430a-b4ef-f461567c344c deleted file mode 100755 index 00f164b..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/5ee08d46-70d0-430a-b4ef-f461567c344c +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"e823e7645a2295f90460dcab49fea1f3d3acc0ef145d88958dc2a5cea82c1f0b","params":{}},"cipher":{"function":"aes-128-ctr","message":"5725d672eb9dfd23541f764294bba76353d998e0f074ae7b12b6a8c6c349cbf7","params":{"iv":"86f124d7a252f8e8b8149e713fc7e05d"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"46e10a33c03bb751221d6785cf98b90207c78e0e2bdc51939ae0dd5785f49ed7"}}},"encryptor":"keystore","name":"1","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"8191edea589b4ca5f4feca5a234d791ff3770ffb183e567e889600bc77d97f8d10f193ef745238649cc3d859685f601c","signing_threshold":2,"uuid":"5ee08d46-70d0-430a-b4ef-f461567c344c","verificationvector":["95afff751b1bfce1bb6a1e5260f77383739aed01e9a84d7cb36f80588df4d476a68b21bd955a05a893bb9b7b5083bcc8","81c78032e7f8fc2218cb329980c779ef0adaad7d716061e068b3ac5647530f728aa26af1088508a952de10e256a2b6e4"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/68f2bf6c-4266-49e2-915a-be9946c0882b b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/68f2bf6c-4266-49e2-915a-be9946c0882b deleted file mode 100755 index e016e95..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/68f2bf6c-4266-49e2-915a-be9946c0882b +++ /dev/null @@ -1 +0,0 @@ -{"name":"DW","type":"distributed","uuid":"68f2bf6c-4266-49e2-915a-be9946c0882b","version":1} \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/e177e6d7-195a-44a0-b350-7bcf73642253 b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/e177e6d7-195a-44a0-b350-7bcf73642253 deleted file mode 100755 index 1e28b26..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/e177e6d7-195a-44a0-b350-7bcf73642253 +++ /dev/null @@ -1 +0,0 @@ -{"crypto":{"checksum":{"function":"sha256","message":"9409302f79e959693267bbc0a0ab528d3b3fa296f17f3792083e81226688e2d9","params":{}},"cipher":{"function":"aes-128-ctr","message":"622babdffea2546f61ab00cf1e67cdd898775a5777405cab1dab5393e53c014d","params":{"iv":"52ba098849fa8958f05732314563a552"}},"kdf":{"function":"pbkdf2","message":"","params":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"fc583372bd0766fd12868fd550fa4975b43e852b095488e4c09665210a441b34"}}},"encryptor":"keystore","name":"2","participants":{"10":"old1:9091","20":"old2:9091","30":"old3:9091"},"pubkey":"8dd4b5b789731d26e8322df117a616b87785f72913292da3d610b25ca985ba2bea431a2919e9de85696b9713283add6a","signing_threshold":2,"uuid":"e177e6d7-195a-44a0-b350-7bcf73642253","verificationvector":["a7fe49e636185c6fe96a25d6ce8fdbd707440d0553ae9d2e69a75179a0734cc291047892d20b7870c8c77c35ee1fd2ac","8b55938b0aa800ec2c1458ae2bc90e10385576801b8ceeb1a6a3003a1bb3a93ab26610290b1994f60b2426fe24062db7"],"version":4} \ No newline at end of file diff --git a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/index b/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/index deleted file mode 100755 index a4292b3..0000000 --- a/.github/examples/wallets/old3/68f2bf6c-4266-49e2-915a-be9946c0882b/index +++ /dev/null @@ -1 +0,0 @@ -[{"uuid":"5a8c805d-9056-4ded-b9a2-611cdaa99427","name":"4"},{"uuid":"5ee08d46-70d0-430a-b4ef-f461567c344c","name":"1"},{"uuid":"e177e6d7-195a-44a0-b350-7bcf73642253","name":"2"},{"uuid":"5613693b-1b36-4bac-9b85-d96deeeb8d7c","name":"3"}] \ No newline at end of file diff --git a/.github/workflows/func-tests.yaml b/.github/workflows/func-tests.yaml index 8907e6a..1d71c14 100644 --- a/.github/workflows/func-tests.yaml +++ b/.github/workflows/func-tests.yaml @@ -9,6 +9,14 @@ on: jobs: functional-tests: + strategy: + matrix: + type: [ + "distributed-to-nd", + "nd-to-distributed", + "hd-to-distributed", + "hd-to-nd", + ] defaults: run: working-directory: './.github/examples/' @@ -27,81 +35,54 @@ jobs: go install "github.com/wealdtech/ethdo@$ethdo_version" env: ethdo_version: 'v1.28.5' - - name: 'Get Original Wallets' + - name: 'Converting ${{matrix.type}}' run: | #FIXME set -e is the default bash flag(this is not obvious btw need to fix) - account_pubkey_map='{}' - accounts_list=$(ethdo wallet --base-dir "${input_distributed_wallets_path}/old1" accounts --wallet="$wallet_name" | tr '\n' ' ') - echo -e "# Original Keys" - for i in $(echo $accounts_list); do - original_key=$(ethdo account --base-dir "${input_distributed_wallets_path}/old1/" info --account "$wallet_name/$i" | grep -i "Composite public key:" | awk '{print $NF}') - if [[ -z "$original_key" ]]; then - echo -e "Account [$i]: ${red}Fail${nc} (len($original_key) == 0)" - exit 1 - fi - #Tricky way to create hashmap(bash declare is not working here) - account_pubkey_map=$(echo ${account_pubkey_map} | jq -c --arg account $i --arg key $original_key '. + { ($account): $key }') + echo -e "# Running DKC" + ./dkc convert --config ${{matrix.type}}.yaml - echo -e "Account [$i]: $original_key" - done; - echo "account_pubkey_map=${account_pubkey_map}" >> $GITHUB_ENV + echo -e "# Comparing Accounts Public Keys" - - name: 'Prepare configs' - run: | - #FIXME set -e is the default bash flag(this is not obvious btw need to fix) - cp config.yaml config-combine.yaml - cp config.yaml config-split.yaml - #Split Config - sed -i "s,DISTRIBUTED_WALLETS,$input_distributed_wallets_path,g" config-combine.yaml - sed -i "s,ND_WALLETS,$output_nd_wallets_path,g" config-combine.yaml - #Combine Config - sed -i "s,DISTRIBUTED_WALLETS,$output_distributed_wallets_path,g" config-split.yaml - sed -i "s,ND_WALLETS,$output_nd_wallets_path,g" config-split.yaml + input_type=$(echo ${{ matrix.type }} | awk -F'-' '{print $1}') + input_path="./${{ matrix.type }}/$input_type" - - name: 'COMBINE Function Test' - run: | - #FIXME set -e is the default bash flag(this is not obvious btw need to fix) - #Combine - ./dkc combine --config=config-combine.yaml - #Compare Composite Pubkey from original accounts to newly created accounts - restored_wallet=$(ethdo wallet --base-dir "${output_nd_wallets_path}" list |head -n 1) - echo -e "# Combine Tests" - for account in $(echo "${account_pubkey_map}" | jq -r 'keys []'); do - original_key=$(echo "${account_pubkey_map}" | jq -r --arg account $account '.[$account]') - restored_key=$(ethdo account --base-dir "${output_nd_wallets_path}" info --account "$restored_wallet/$account" | grep -i "Public key:" | awk '{print $NF}') + output_type=$(echo ${{ matrix.type }} | awk -F'-' '{print $3}') + output_path="./${{ matrix.type }}/$output_type" + echo -e "Generating Input And Output Paths: ${green}OK${nc}" - if [[ "$original_key" != "$restored_key" ]]; then - echo -e "Account [$account]: ${red}Fail${nc} ($original_key != $restored_key)" - exit 1 - fi + input_grep="Public key:" + ouput_grep="Public key:" + echo -e "Generating Input Grep Command: ${green}OK${nc}" - echo -e "Account [$account]: ${green}OK${nc}" - done; - - - name: 'Split Function Test' - run: | - #FIXME set -e is the default bash flag(this is not obvious btw need to fix) - #Split - ./dkc split --config=config-split.yaml - #Compare Composite Pubkey from original accounts to newly created accounts - splited_wallet=$(ethdo wallet --base-dir "${output_distributed_wallets_path}/old1/" list |head -n 1) - echo -e "# Split Tests" - for account in $(echo "${account_pubkey_map}" | jq -r 'keys []'); do - original_key=$(echo "${account_pubkey_map}" | jq -r --arg account $account '.[$account]') - splited_key=$(ethdo account --base-dir "${output_distributed_wallets_path}/old1/" info --account "$splited_wallet/$account" | grep -i "Composite public key:" | awk '{print $NF}') + if echo "${input_type}" | grep -q "distributed"; then + input_path="$input_path/test1" + input_grep="Composite public key:" + fi + if echo "${output_type}" | grep -q "distributed"; then + output_path="$output_path/test1" + output_grep="Composite public key:" + fi + echo -e "Updating Paths And Grep Command If Wallet Is Distributed: ${green}OK${nc}" - if [[ "$original_key" != "$splited_key" ]]; then - echo -e "Account [$account]: ${red}Fail${nc} ($original_key != $splited_key)" - exit 1 - fi + echo -e "${green}Input Path | Input Grep:${nc} [$input_path] [$input_grep]" + echo -e "${green}Output Path | Output Grep:${nc} [$output_path] [$output_grep]" - echo -e "Account [$account]: ${green}OK${nc}" + wallets_list=$(ethdo wallet list --base-dir "$input_path" | tr '\n' ' ') + echo -e "Getting Wallets: ${green}OK${nc}" + for w in $wallets_list; do + accounts=$(ethdo wallet --base-dir "$input_path" accounts --wallet="$w" | tr '\n' ' ') + for a in $accounts; do + input_key=$(ethdo account --base-dir "$input_path" info --account "$w/$a" | grep -i "$input_grep" | awk '{print $NF}') + output_key=$(ethdo account --base-dir "$output_path" info --account "$w/$a" | grep -i "$output_grep" | awk '{print $NF}') + if [[ $input_key != $output_key ]]; then + echo -e "Account [$w/$a]: ${red}Fail${nc} ($input_key != $output_key)" + exit 1 + fi + echo -e "Checking Account [$w/$a]: ${green}OK${nc}" + done; done; env: - wallet_name: 'DW' - input_distributed_wallets_path: './wallets' - output_nd_wallets_path: './nd_wallets' - output_distributed_wallets_path: './distributed_wallets' red: '\033[0;31m' green: '\033[0;32m' + yellow: '\033[0;33m' nc: '\033[0m' diff --git a/.gitignore b/.gitignore index f968043..13bf68f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ dkc podman-data keystores .key + +#Mac +.DS_Store diff --git a/README.MD b/README.MD index 7339069..cf699c7 100644 --- a/README.MD +++ b/README.MD @@ -1,8 +1,17 @@ # Dirk Key Converter (dkc) +![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/p2p-org/dkc/func-tests.yaml) [![Go Report Card](https://goreportcard.com/badge/github.com/p2p-org/dkc)](https://goreportcard.com/report/github.com/p2p-org/dkc) -Transform wallets between [distributed type](https://github.com/wealdtech/go-eth2-wallet-distributed) and [non-deterministic type](https://github.com/wealdtech/go-eth2-wallet-nd). +A command-line tool for converting Ethereum wallets from: +- [distributed](https://github.com/wealdtech/go-eth2-wallet-distributed) +- [non-deterministic](https://github.com/wealdtech/go-eth2-wallet-nd) +- [hierarchical deterministic](https://github.com/wealdtech/go-eth2-wallet-hd) + +to: + +- [distributed](https://github.com/wealdtech/go-eth2-wallet-distributed) +- [non-deterministic](https://github.com/wealdtech/go-eth2-wallet-nd) :bangbang: It is highly recommended to refrain from any operations on the validation keys and use the provided script only in critical situations to avoid any ponential risks of slashing. @@ -13,8 +22,8 @@ Transform wallets between [distributed type](https://github.com/wealdtech/go-eth - [Source](#source) - [Usage](#usage) - [Config](#config) - - [Combine](#combine) - - [Split](#split) + - [File Structure](#file-structure) + - [Convert](#convert) - [Maintainers](#maintainers) - [Contribute](#contribute) - [License](#license) @@ -38,197 +47,111 @@ go build . `dkc` uses [herumi/bls-eth-go-binary](https://github.com/herumi/bls-eth-go-binary). Some research code of using [herumi/bls-eth-go-binary](https://github.com/herumi/bls-eth-go-binary) in `dkc` is available [here](./research/research.go) -You can also test `dkc` on predefiened inputs [here](.github/workflows/func-tests.yml). +You can test `dkc` on predefiened inputs [here](.github/workflows/func-tests.yml). ### Config -An example config can be found [here](.github/examples/config.yaml) +An example configs for each pair could be found [here](.github/examples/) ```yaml -distributed-wallets: #Distributed-wallets section - path: ./wallet #Path to distributed wallet (Default: None) - passphrases: ./passphrases.txt #Path to file containing passphrases for unlocking/locking accounts (Default: None) - threshold: 2 #Threshlod value (Default: None) - walletname: myDKWallet - peers: #Peers dict, number of peers must be greater than threshold value (Default: None) - 10: old1:9091 - 20: old2:9091 - 30: old3:9091 -nd-wallets: #Non-determenistic-wallets section - path: nd_wallets #Path to non-determenistic wallet (Default: None) - passphrases: ./passphrases.txt #Path to file containing passphrases for unlocking/locking accounts (Default: None) +input: #Input section + store: #Store section + path: ./i_wallet #Location of input wallets + wallet: #Wallet section + type: distributed #Type for input wallet. Valid types are: distributed, non-deterministic,hierarchical deterministic + threshold: 2 #Threshold number. It must be len(peers)/2 < threshold < len(peers) + peers: #Peers section + 10: #Peer ID is used for generating bls participants + name: old1:9091 #Peer name is used for generating bls participants. All wallets for this peer are located in ./i_wallet/old1 + passphrases: #Passphrases section + path: ./peer1.txt #Path to passphrases file(you can use separate passphrases file for each peer) + index: 1 #Password index in passphrases file. If not provided will use all passwords for unlocking wallets and only first password for creating accounts (Default: Using all passwords provided in passphrases file) + 20: + name: old2:9091 + passphrases: + path: ./peer2.txt + index: 1 + 30: + name: old3:9091 + passphrases: + path: ./peer3.txt + index: 1 +output: #Output Wallet Section + store: + path: ./o_wallet + wallet: + type: hierarchical deterministic + passphrases: + path: ./o_passphrases.txt log-level: debug #Log-level (Default: INFO) ``` -### File structure +### File Structure -##### Combine +#### Distributed Wallet -The following is an [example](.github/examples/wallets) file structure if one were to combine threshold keys. `old1`, `old2`, `old3` are each the `base-dir` wallet directory from the dirk instance. `old1`, `old2`, `old3` are each their own wallet directory. +This wallet type can be used as input or output wallet. More information about this wallet type is provided [here](https://github.com/wealdtech/go-eth2-wallet-distributed) -`ethdo wallet list --base-dir ./wallet` should return nothing. +The following is an [example](.github/examples/distributed-to-nd/distributed) file structure if one were to combine threshold keys. `test1`, `test2`, `test3` are each the `base-dir` wallet directory from the dirk instance. `test1`, `test2`, `test3` are each their own wallet directory. -The subdirectories of `wallet` folder are the actual `ethdo` wallets: +`ethdo wallet list --base-dir ./distributed-to-nd/distributed` should return nothing. -``` -$ ethdo wallet list --base-dir wallets/old1 -9faf1408-839c-4b21-9d15-80d192c2bced -$ ethdo wallet list --base-dir wallets/old2 -ff3918f1-16ef-47bf-83d2-16b5a64c9aa1 -$ ethdo wallet list --base-dir wallets/old3 -dd428711-4681-41d1-ad47-746cc6cfea8f -``` - -It should look like this: +The subdirectories of `wallet` folder are the actual `ethdo` wallets: ``` -wallet -├── old1 -│ └── 9a76c4f3-aa46-4864-b7fd-55681f8afa3b -│ ├── 69e976d2-3c78-44e3-b9a6-45149078723d -│ ├── 85587167-c356-4968-aa36-37464d05640c -│ ├── 9a76c4f3-aa46-4864-b7fd-55681f8afa3b -│ ├── a99d9d83-4afb-4870-8cce-a57c69c6bda2 -│ ├── fd83339a-d36e-4c7a-a30c-0999be075dcb -│ └── index -├── old2 -│ └── 32b277e3-b71a-45ed-b47d-5b6c155b8cf9 -│ ├── 026b1c48-9a1a-49f8-b289-792d79378090 -│ ├── 32b277e3-b71a-45ed-b47d-5b6c155b8cf9 -│ ├── 6880aa1f-e490-4508-868f-f2af3b7f34f7 -│ ├── ab1cc0d8-5447-41bd-b3b5-0c100ae9747a -│ ├── f282e1ff-0364-48e6-a674-26ea18184bf3 -│ └── index -└── old3 - └── 68f2bf6c-4266-49e2-915a-be9946c0882b - ├── 5613693b-1b36-4bac-9b85-d96deeeb8d7c - ├── 5a8c805d-9056-4ded-b9a2-611cdaa99427 - ├── 5ee08d46-70d0-430a-b4ef-f461567c344c - ├── 68f2bf6c-4266-49e2-915a-be9946c0882b - ├── e177e6d7-195a-44a0-b350-7bcf73642253 - └── index +$ ethdo wallet list --base-dir distributed-to-nd/distributed/test1 +Wallet2 +Wallet3 +Wallet1 +$ ethdo wallet list --base-dir distributed-to-nd/distributed/test2 +Wallet2 +Wallet3 +Wallet1 +$ ethdo wallet list --base-dir distributed-to-nd/distributed/test3 +Wallet1 +Wallet2 +Wallet3 ``` -*Importantly, the names of each wallet folder must correspond with the values in `distributed-wallets.peers` defined in the config.* +*Importantly, the names of each wallet folder must correspond with the values in `*.wallet.peers` defined in the config.* The keys within each wallet must also have the same name -``` -cat wallets/old1/56f23183-85e7-4f65-863e-738975f137ad/index | jq -[ - { - "uuid": "37be3c86-5d24-47f3-99b8-83b6ac62e6b7", - "name": "3" - }, - { - "uuid": "54799fa9-3239-4df2-857b-50c5d725cbfe", - "name": "4" - }, - { - "uuid": "5676a9e5-e1de-4eef-9473-8c52c0810ce5", - "name": "1" - }, - { - "uuid": "c153e6f1-2ae2-44fd-9a4b-e91965c8a2a6", - "name": "2" - } -] - -cat wallets/old3/e5dc7bb0-9be2-45a5-b54b-768f4fd105df/index | jq -[ - { - "uuid": "d38d8796-5022-42ea-8495-cd5d67743afc", - "name": "3" - }, - { - "uuid": "0d69229d-cbcc-42eb-b29b-10ae91f28dff", - "name": "4" - }, - { - "uuid": "b043fbf2-f392-4c09-b8ff-319ed8345dc8", - "name": "1" - }, - { - "uuid": "c38ac2af-f5ee-4326-bd03-8572d2449623", - "name": "2" - } -] - -cat wallets/old3/e5dc7bb0-9be2-45a5-b54b-768f4fd105df/index | jq -[ - { - "uuid": "d38d8796-5022-42ea-8495-cd5d67743afc", - "name": "3" - }, - { - "uuid": "0d69229d-cbcc-42eb-b29b-10ae91f28dff", - "name": "4" - }, - { - "uuid": "b043fbf2-f392-4c09-b8ff-319ed8345dc8", - "name": "1" - }, - { - "uuid": "c38ac2af-f5ee-4326-bd03-8572d2449623", - "name": "2" - } -] -``` - All of the keys with corresponding names (ex: `name = 1`) should be the threshold keys corresponding to the same composite public key. -##### Split +#### Hierarchical Deterministic -The following is an example file structure if one were to want to split non-deterministic keys into threshold keys. +This wallet type can be used only ad input wallet. More information about this wallet type is provided [here](https://github.com/wealdtech/go-eth2-wallet-hd) -``` -nd_wallets -└── 20384d86-bc39-4ac4-a827-3cff41043cbd - ├── 20384d86-bc39-4ac4-a827-3cff41043cbd - ├── 2c2cd425-fa58-43b7-808b-d2ba32d692cc - ├── 5bee4007-73ba-452f-9e53-6d04110dbb7c - ├── 95b9898b-667f-49cd-9097-9da9bf760173 - ├── b9d79ea4-9e15-4f3c-9c63-b67e7965a060 - └── index -``` +The following is an [example](.github/examples/hd-to-distributed/hd) file structure. The `base-dir` wallet directory is `hd-to-distributed/hd` -In this instance, `nd_wallets` is the wallet `base-dir`. ``` -$ ethdo wallet list --base-dir nd_wallets -be7efee0-a219-4fb5-a0b7-a47662320755 +$ ethdo wallet --base-dir hd-to-distributed/hd list +Wallet1 +Wallet3 +Wallet2 ``` -To split up, non-deterministic keys, just put them into the wallet. -``` -nd_wallets -└── 20384d86-bc39-4ac4-a827-3cff41043cbd - ├── 20384d86-bc39-4ac4-a827-3cff41043cbd - ├── 2c2cd425-fa58-43b7-808b-d2ba32d692cc - ├── 5bee4007-73ba-452f-9e53-6d04110dbb7c - ├── 95b9898b-667f-49cd-9097-9da9bf760173 - ├── b9d79ea4-9e15-4f3c-9c63-b67e7965a060 - └── index -``` +#### Non-Deterministic -##### Output Formats +This wallet type can be used as input or output wallet. More information about this wallet type is provided [here](https://github.com/wealdtech/go-eth2-wallet-nd) -The output file hierarchy is the same as the opposite side's input hierarchy. For example, the format needed to split keys, will be the output format of combined keys. +The following is an [example](.github/examples/nd-to-distributed/nd) file structure. The `base-dir` wallet directory is `hd-to-distributed/nd` -### Combine - -Combine [distributed type](https://github.com/wealdtech/go-eth2-wallet-distributed) to [non-deterministic type](https://github.com/wealdtech/go-eth2-wallet-nd). - -```sh -./dkc combine --config=config.yaml +``` +$ ethdo wallet --base-dir nd-to-distributed/hd list +Wallet1 +Wallet3 +Wallet2 ``` -### Split +### Convert -Split [non-deterministic type](https://github.com/wealdtech/go-eth2-wallet-nd) to [distributed type](https://github.com/wealdtech/go-eth2-wallet-distributed) +After preparing config and backuping keys simply run: ```sh -./dkc split --config=config.yaml +./dkc convert --config=config.yaml ``` ## Maintainers diff --git a/cmd/combine/helpers.go b/cmd/combine/helpers.go deleted file mode 100644 index 6e5b1cc..0000000 --- a/cmd/combine/helpers.go +++ /dev/null @@ -1,206 +0,0 @@ -package combine - -import ( - "context" - "path/filepath" - "regexp" - - "github.com/p2p-org/dkc/utils" - "github.com/p2p-org/dkc/utils/crypto/bls" - "github.com/spf13/viper" - types "github.com/wealdtech/go-eth2-wallet-types/v2" -) - -type AccountExtends struct { - PubKey []byte - CompositePubKeys [][]byte - Accounts []utils.Account -} - -type CombineRuntime struct { - ctx context.Context - dWalletsPath string - ndWalletsPath string - passphrasesIn [][]byte - passphrasesOut [][]byte - accountDatas map[string]AccountExtends - stores []utils.DirkStore - peers utils.Peers - wallet utils.NDWallet - store types.Store -} - -func newCombineRuntime() (*CombineRuntime, error) { - cr := &CombineRuntime{} - var err error - - utils.LogCombine.Debug().Msg("validating nd-wallets field") - var ndWalletConfig utils.NDWalletConfig - err = viper.UnmarshalKey("nd-wallets", &ndWalletConfig) - if err != nil { - return nil, err - } - - err = ndWalletConfig.Validate() - if err != nil { - return nil, err - } - - utils.LogCombine.Debug().Msg("validating distributed-wallets field") - var dWalletConfig utils.DWalletConfig - err = viper.UnmarshalKey("distributed-wallets", &dWalletConfig) - if err != nil { - return nil, err - } - - err = dWalletConfig.Validate() - if err != nil { - return nil, err - } - - cr.ctx = context.Background() - cr.dWalletsPath = dWalletConfig.Path - cr.ndWalletsPath = ndWalletConfig.Path - utils.LogCombine.Debug().Msgf("getting input passwords form file %s", dWalletConfig.Passphrases) - cr.passphrasesIn, err = utils.GetAccountsPasswords(dWalletConfig.Passphrases) - if err != nil { - return nil, err - } - utils.LogCombine.Debug().Msgf("getting output passwords form file %s", ndWalletConfig.Passphrases) - cr.passphrasesOut, err = utils.GetAccountsPasswords(ndWalletConfig.Passphrases) - if err != nil { - return nil, err - } - cr.accountDatas = make(map[string]AccountExtends) - utils.LogCombine.Debug().Msgf("loading stores form %s", cr.dWalletsPath) - cr.stores, err = utils.LoadStores(cr.ctx, cr.dWalletsPath, cr.passphrasesIn) - if err != nil { - return nil, err - } - - cr.peers = dWalletConfig.Peers - - return cr, nil -} - -func (cr *CombineRuntime) validate() error { - if cr.dWalletsPath == cr.ndWalletsPath { - return utils.ErrorSameDirs - } - return nil -} - -func (cr *CombineRuntime) createWalletAndStore() error { - var err error - utils.LogCombine.Debug().Msgf("creating store %s", cr.ndWalletsPath) - cr.store, err = utils.CreateStore(cr.ndWalletsPath) - if err != nil { - return err - } - utils.LogCombine.Debug().Msg("creating ndwallet") - cr.wallet, err = utils.CreateNDWallet(cr.store) - if err != nil { - return err - } - return nil -} - -func (cr *CombineRuntime) checkSignature() error { - for accountName, account := range cr.accountDatas { - utils.LogCombine.Debug().Msgf("recover private key for account %s", accountName) - key, err := bls.Recover(cr.ctx, account.Accounts) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("bls sing for account %s", accountName) - initialSignature, err := bls.Sign(cr.ctx, account.Accounts) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("creating nd account for account %s", accountName) - finalAccount, err := utils.CreateNDAccount(cr.wallet, accountName, key, cr.passphrasesOut[0]) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("signing message for account %s", accountName) - finalSignature, err := utils.AccountSign(cr.ctx, finalAccount, cr.passphrasesOut) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("comapare signatures for account %s", accountName) - err = bls.SignatureCompare(finalSignature, initialSignature) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("get pub key for account %s", accountName) - pubkey, err := utils.GetAccountPubkey(finalAccount) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("get composite pub key for account %s", accountName) - for _, compositeKey := range account.CompositePubKeys { - err = bls.CompositeKeysCompare(compositeKey, pubkey) - if err != nil { - return err - } - - } - } - return nil -} - -func (cr *CombineRuntime) storeUpdater() error { - for _, store := range cr.stores { - var participantID uint64 - for id := range cr.peers { - peerExists, err := regexp.MatchString(filepath.Base(store.Location)+":.*", cr.peers[id]) - if err != nil { - return err - } - if !peerExists { - continue - } - participantID = id - - for _, wallet := range store.Wallets { - utils.LogCombine.Debug().Msgf("loading data for wallet %s", wallet.Name()) - for account := range wallet.Accounts(cr.ctx) { - utils.LogCombine.Debug().Msgf("get private key for account %s", account.Name()) - key, err := utils.GetAccountKey(cr.ctx, account, cr.passphrasesOut) - if err != nil { - return err - } - - utils.LogCombine.Debug().Msgf("sign message from account %s", account.Name()) - initialSignature, err := utils.AccountSign(cr.ctx, account, cr.passphrasesOut) - if err != nil { - return err - } - utils.LogCombine.Debug().Msgf("get composite pub key for account %s", account.Name()) - compositePubKey, err := utils.GetAccountCompositePubkey(account) - if err != nil { - return err - } - - cr.accountDatas[account.Name()] = AccountExtends{ - Accounts: append(cr.accountDatas[account.Name()].Accounts, - utils.Account{ - Key: key, - Signature: initialSignature, - ID: participantID, - }, - ), - CompositePubKeys: append(cr.accountDatas[account.Name()].CompositePubKeys, compositePubKey), - } - } - } - } - } - return nil -} diff --git a/cmd/combine/run.go b/cmd/combine/run.go deleted file mode 100644 index 6692bc0..0000000 --- a/cmd/combine/run.go +++ /dev/null @@ -1,41 +0,0 @@ -package combine - -import "github.com/p2p-org/dkc/utils" - -func Run() error { - utils.LogCombine.Info().Msg("validating config") - combineRuntime, err := newCombineRuntime() - if err != nil { - utils.LogCombine.Err(err).Send() - return err - } - - err = combineRuntime.validate() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - utils.LogCombine.Info().Msg("creating wallets") - err = combineRuntime.createWalletAndStore() - if err != nil { - utils.LogCombine.Err(err).Send() - return err - } - - utils.LogCombine.Info().Msg("updating stores") - err = combineRuntime.storeUpdater() - if err != nil { - utils.LogCombine.Err(err).Send() - return err - } - - utils.LogCombine.Info().Msg("checking signatures") - err = combineRuntime.checkSignature() - if err != nil { - utils.LogCombine.Err(err).Send() - return err - } - - return nil -} diff --git a/cmd/ convert.go b/cmd/convert.go similarity index 79% rename from cmd/ convert.go rename to cmd/convert.go index d01a6e1..c8ff0e5 100644 --- a/cmd/ convert.go +++ b/cmd/convert.go @@ -12,13 +12,15 @@ var convertCmd = &cobra.Command{ Short: "Convert from distributed|hd|nd wallet types to distributed or nd wallets types", Long: `Allow to convert wallets types between each other`, Run: func(cmd *cobra.Command, args []string) { + utils.InitLogging(string(cmd.Name())) utils.Log.Info().Msgf("starting DKC-%s", viper.Get("version")) utils.Log.Info().Msgf("using config file: %s", viper.ConfigFileUsed()) - utils.LogCombine.Info().Msg("starting convert function") + utils.Log.Info().Msg("starting convert function") err := convert.Run() if err != nil { - utils.LogCombine.Fatal().Err(nil).Send() + utils.Log.Fatal().Err(err).Send() } + utils.Log.Info().Msgf("done") }, } diff --git a/cmd/convert/input.go b/cmd/convert/input.go index 0be1eca..9b24572 100644 --- a/cmd/convert/input.go +++ b/cmd/convert/input.go @@ -3,23 +3,29 @@ package convert import ( "context" + store "github.com/p2p-org/dkc/store" "github.com/p2p-org/dkc/utils" "github.com/pkg/errors" + "github.com/spf13/viper" ) type dataIn struct { - ctx context.Context - InputW utils.W - OutputW utils.W + Ctx context.Context + InputS store.IStore + OutputS store.OStore } func (d *dataIn) validate() error { - if d.InputW.Path == d.OutputW.Path { - return errors.New("timeout is required") + utils.Log.Debug().Msgf("comparing input and output paths") + utils.Log.Debug().Msgf("input store: %s, output store: %s", d.InputS.GetPath(), d.OutputS.GetPath()) + if d.InputS.GetPath() == d.OutputS.GetPath() { + return errors.New("paths are the same") } - if d.InputW.Type == d.OutputW.Type { - return errors.New("timeout is required") + utils.Log.Debug().Msgf("comparing input and output types") + utils.Log.Debug().Msgf("input store: %s, output store: %s", d.InputS.GetType(), d.OutputS.GetType()) + if d.InputS.GetType() == d.OutputS.GetType() { + return errors.New("wallets types are the same") } return nil @@ -27,21 +33,21 @@ func (d *dataIn) validate() error { func input(ctx context.Context) (*dataIn, error) { var err error - data := &dataIn{ - InputW: utils.W{}, - OutputW: utils.W{}, - } + data := &dataIn{} + data.Ctx = ctx //Parse Input Config - data.InputW, err = utils.ParseCfg("input") + utils.Log.Debug().Msgf("init %s as input store", viper.GetString("input.wallet.type")) + data.InputS, err = store.InputStoreInit(ctx, viper.GetString("input.wallet.type")) if err != nil { - return nil, errors.New("timeout is required") + return nil, err } //Parse Output Config - data.OutputW, err = utils.ParseCfg("output") + utils.Log.Debug().Msgf("init %s as output store", viper.GetString("output.wallet.type")) + data.OutputS, err = store.OutputStoreInit(ctx, viper.GetString("output.wallet.type")) if err != nil { - return nil, errors.New("timeout is required") + return nil, err } return data, nil diff --git a/cmd/convert/process.go b/cmd/convert/process.go index f25499d..73c4307 100644 --- a/cmd/convert/process.go +++ b/cmd/convert/process.go @@ -1,52 +1,66 @@ package convert import ( - "context" + "fmt" "github.com/p2p-org/dkc/utils" + "github.com/pkg/errors" "golang.org/x/sync/errgroup" ) -func process(ctx context.Context, data *dataIn) error { +func process(data *dataIn) error { //Init Stores - iStore, err := utils.InputStoreInit(data.InputW.Type) - if err != nil { - return err - } + iStore := data.InputS - oStore, err := utils.OutputStoreInit(data.OutputW.Type) - if err != nil { - return err - } + oStore := data.OutputS - // Get Wallets List From Input Store - err = iStore.Load(data.ctx, data.InputW.Path, data.InputW.Passphrases, data.InputW.Peers) + // Create Output Store + utils.Log.Info().Msgf(fmt.Sprintf("creating output store %s", oStore.GetPath())) + err := oStore.Create() if err != nil { - return err + return errors.Wrap(err, "failed to create output store") } - // Create Output Store - err = oStore.Create(data.ctx, data.OutputW.Path) + // Get Accounts Wallets Map + utils.Log.Info().Msgf("getting AccountsWallets map for store %s", iStore.GetPath()) + walletsMap, err := iStore.GetWalletsAccountsMap() if err != nil { - return err + return errors.Wrap(err, "failed to get AccountsWallets map") } - // Convert Wallets - eg := errgroup.Group{} - - for _, wallet := range iStore.GetWallets() { + // Converting Wallets + utils.Log.Info().Msgf("converting accounts") + for wName, aNames := range walletsMap { + // Goroutines + eg := errgroup.Group{} eg.Go(func() error { - w, err := oStore.CreateWallet(wallet) + // Create Wallet In Output Store + utils.Log.Info().Msgf("creating wallet %s in %s", wName, oStore.GetPath()) + err := oStore.CreateWallet(wName) if err != nil { - return err + return errors.Wrap(err, "failed to create wallet") + } + for _, aName := range aNames { + // Get Private Key From Account + utils.Log.Info().Msgf("getting private key for account %s from wallet %s", aName, wName) + pk, err := iStore.GetPK(wName, aName) + if err != nil { + return errors.Wrap(err, "failed to get private key") + } + // Save Private Key To Output Store + utils.Log.Info().Msgf("converting and saving private key for account %s to output wallet %s", aName, wName) + err = oStore.SavePKToWallet(wName, pk, aName) + if err != nil { + return errors.Wrap(err, "failed to save private key to output wallet") + } } + return nil }) - } - - // Only First Error Will Be Displayed - err = eg.Wait() - if err != nil { - return err + // Only First Error Will Be Displayed + err = eg.Wait() + if err != nil { + return err + } } return nil diff --git a/cmd/convert/run.go b/cmd/convert/run.go index 2136ebd..cf5f3aa 100644 --- a/cmd/convert/run.go +++ b/cmd/convert/run.go @@ -3,22 +3,26 @@ package convert import ( "context" + "github.com/p2p-org/dkc/utils" "github.com/pkg/errors" ) func Run() error { ctx := context.Background() + utils.Log.Info().Msgf("init input data") dataIn, err := input(ctx) if err != nil { return errors.Wrap(err, "failed to obtain input") } + utils.Log.Info().Msgf("validating input data") err = dataIn.validate() if err != nil { - return errors.Wrap(err, "failed to obtain input") + return errors.Wrap(err, "failed to validate input") } - err = process(ctx, dataIn) + utils.Log.Info().Msgf("processing input data") + err = process(dataIn) if err != nil { return errors.Wrap(err, "failed to process") } diff --git a/cmd/root.go b/cmd/root.go index 0a0d3a0..3c6f6b3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -53,6 +53,6 @@ func initConfig() { viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) viper.AutomaticEnv() if err := viper.ReadInConfig(); err == nil { - utils.InitLogging() + utils.InitLogging(string(rootCmd.Name())) } } diff --git a/cmd/split/helpers.go b/cmd/split/helpers.go deleted file mode 100644 index e260ac7..0000000 --- a/cmd/split/helpers.go +++ /dev/null @@ -1,235 +0,0 @@ -package split - -import ( - "context" - "encoding/hex" - "regexp" - - "github.com/google/uuid" - "github.com/p2p-org/dkc/utils" - "github.com/p2p-org/dkc/utils/crypto/bls" - "github.com/spf13/viper" -) - -type SplitRuntime struct { - ctx context.Context - dWalletsPath string - ndWalletsPath string - passphrasesIn [][]byte - passphrasesOut [][]byte - accountDatas map[string]AccountExtends - peers utils.Peers - threshold uint32 - walletsMap map[uint64]utils.DWallet - peersIDs []uint64 - walletName string -} - -type AccountExtends struct { - InitialSignature []byte - PubKey []byte - CompositePubKeys [][]byte - Accounts []utils.Account - MasterPKs [][]byte -} - -func newSplitRuntime() (*SplitRuntime, error) { - sr := &SplitRuntime{} - var err error - - utils.LogSplit.Debug().Msg("validating nd-wallets config field") - var ndWalletConfig utils.NDWalletConfig - err = viper.UnmarshalKey("nd-wallets", &ndWalletConfig) - if err != nil { - return nil, err - } - - err = ndWalletConfig.Validate() - if err != nil { - return nil, err - } - - utils.LogSplit.Debug().Msg("validating d-wallets config field") - var dWalletConfig utils.DWalletConfig - err = viper.UnmarshalKey("distributed-wallets", &dWalletConfig) - if err != nil { - return nil, err - } - - err = dWalletConfig.Validate() - if err != nil { - return nil, err - } - - sr.ctx = context.Background() - sr.dWalletsPath = dWalletConfig.Path - sr.ndWalletsPath = ndWalletConfig.Path - sr.threshold = dWalletConfig.Threshold - sr.walletName = dWalletConfig.WalletName - utils.LogSplit.Debug().Msgf("getting input passwords from %s", ndWalletConfig.Passphrases) - sr.passphrasesIn, err = utils.GetAccountsPasswords(ndWalletConfig.Passphrases) - if err != nil { - return nil, err - } - utils.LogSplit.Debug().Msgf("getting input passwords from %s", dWalletConfig.Passphrases) - sr.passphrasesOut, err = utils.GetAccountsPasswords(dWalletConfig.Passphrases) - if err != nil { - return nil, err - } - sr.accountDatas = make(map[string]AccountExtends) - sr.walletsMap = make(map[uint64]utils.DWallet) - - sr.peers = dWalletConfig.Peers - - utils.LogSplit.Debug().Msg("generating peersIDs") - for id := range sr.peers { - sr.peersIDs = append(sr.peersIDs, id) - } - - return sr, nil -} - -func (sr *SplitRuntime) validate() error { - if sr.dWalletsPath == sr.ndWalletsPath { - return utils.ErrorSameDirs - } - return nil -} - -func (sr *SplitRuntime) createWallets() error { - walletName := uuid.New().String() - if sr.walletName != "" { - walletName = sr.walletName - } - for id, peer := range sr.peers { - res, err := regexp.Compile(`:.*`) - if err != nil { - return err - } - utils.LogSplit.Debug().Msgf("creating store for peer: %d", id) - storePath := sr.dWalletsPath + "/" + res.ReplaceAllString(peer, "") - store, err := utils.CreateStore(storePath) - if err != nil { - return err - } - utils.LogSplit.Debug().Msgf("creating wallet for peer %d", id) - wallet, err := utils.CreateDWallet(store, walletName) - if err != nil { - return err - } - sr.walletsMap[id] = wallet - } - return nil -} - -func (sr *SplitRuntime) loadWallets() error { - utils.LogSplit.Debug().Msgf("load store %s", sr.ndWalletsPath) - s, err := utils.LoadStore(sr.ctx, sr.ndWalletsPath, sr.passphrasesIn) - if err != nil { - return err - } - - for _, w := range s.Wallets { - utils.LogSplit.Debug().Msgf("load wallet %s ", w.Name()) - for account := range w.Accounts(sr.ctx) { - utils.LogSplit.Debug().Msgf("get private key for account %s ", account.Name()) - key, err := utils.GetAccountKey(sr.ctx, account, sr.passphrasesIn) - if err != nil { - return err - } - utils.LogSplit.Debug().Msgf("get pub key for account %s ", account.Name()) - pubKey, err := utils.GetAccountPubkey(account) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("signing test string for account %s ", account.Name()) - initialSignature, err := utils.AccountSign(sr.ctx, account, sr.passphrasesIn) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("bls split key for account %s ", account.Name()) - masterSKs, masterPKs, err := bls.Split(sr.ctx, key, sr.threshold) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("setup bls participants for account %s ", account.Name()) - participants, err := bls.SetupParticipants(masterSKs, masterPKs, sr.peersIDs, len(sr.peers)) - if err != nil { - return err - } - - sr.accountDatas[account.Name()] = AccountExtends{ - MasterPKs: masterPKs, - InitialSignature: initialSignature, - Accounts: participants, - PubKey: pubKey, - } - } - } - - return nil -} - -func (sr *SplitRuntime) saveAccounts() error { - for accountName, account := range sr.accountDatas { - utils.LogSplit.Debug().Msgf("saving account %s ", accountName) - for i, acc := range account.Accounts { - utils.LogSplit.Debug().Msgf("creating account with id %d ", acc.ID) - finalAccount, err := utils.CreateDAccount( - sr.walletsMap[acc.ID], - accountName, - account.MasterPKs, - acc.Key, - sr.threshold, - sr.peers, - sr.passphrasesOut[0], - ) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("generating signature for account with id %d ", acc.ID) - account.Accounts[i].Signature, err = utils.AccountSign(sr.ctx, finalAccount, sr.passphrasesOut) - if err != nil { - return err - } - utils.LogSplit.Debug().Msgf("getting composite pub key for account with id %d ", acc.ID) - compositePubKey, err := utils.GetAccountCompositePubkey(finalAccount) - if err != nil { - return err - } - account.CompositePubKeys = append(account.CompositePubKeys, compositePubKey) - } - } - - return nil -} - -func (sr *SplitRuntime) checkSignature() error { - for _, account := range sr.accountDatas { - utils.LogSplit.Debug().Msgf("generating bls signature for pub key %s", hex.EncodeToString(account.PubKey)) - finalSignature, err := bls.Sign(sr.ctx, account.Accounts) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("compare bls signatures for pub key %s", hex.EncodeToString(account.PubKey)) - err = bls.SignatureCompare(finalSignature, account.InitialSignature) - if err != nil { - return err - } - - utils.LogSplit.Debug().Msgf("compare composite pubkeys for pub key %s", hex.EncodeToString(account.PubKey)) - for _, compositePubKey := range account.CompositePubKeys { - err = bls.CompositeKeysCompare(compositePubKey, account.PubKey) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/cmd/split/run.go b/cmd/split/run.go deleted file mode 100644 index 0eae30f..0000000 --- a/cmd/split/run.go +++ /dev/null @@ -1,48 +0,0 @@ -package split - -import "github.com/p2p-org/dkc/utils" - -func Run() error { - utils.LogSplit.Info().Msg("validating config") - splitRuntime, err := newSplitRuntime() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - err = splitRuntime.validate() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - utils.LogSplit.Info().Msg("loading wallets") - err = splitRuntime.loadWallets() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - utils.LogSplit.Info().Msg("creating wallets") - err = splitRuntime.createWallets() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - utils.LogSplit.Info().Msg("saving accounts") - err = splitRuntime.saveAccounts() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - utils.LogSplit.Info().Msg("checking signatures") - err = splitRuntime.checkSignature() - if err != nil { - utils.LogSplit.Err(err).Send() - return err - } - - return nil -} diff --git a/config.yaml b/config.yaml index 899d8bc..8c37da7 100644 --- a/config.yaml +++ b/config.yaml @@ -1,21 +1,31 @@ input: store: - path: DISTRIBUTED_WALLETS + path: ./input_distributed_wallet wallet: type: distributed - passphrases: - path: ./input_wallet_passphrases.txt threshold: 2 peers: - 10: old1:9091 - 20: old2:9091 - 30: old3:9091 + 10: + name: old1:9091 + passphrases: + path: ./input_peer1_passphrases.txt + index: 1 + 20: + name: old2:9091 + passphrases: + path: ./input_peer2_passphrases.txt + index: 1 + 30: + name: old3:9091 + passphrases: + path: ./input_peer3_passphrases.txt + index: 1 output: store: - path: ND_WALLETS + path: ./output_hd_wallet wallet: - type: nd + type: hierarchical deterministic passphrases: - path: ./output_wallet_passphrases.txt + path: ./output_hd_wallet_passphrases.txt -log-level: debug \ No newline at end of file +log-level: debug diff --git a/utils/crypto/bls/crypto.go b/crypto/bls/crypto.go similarity index 59% rename from utils/crypto/bls/crypto.go rename to crypto/bls/crypto.go index 63940dc..3cb34d0 100644 --- a/utils/crypto/bls/crypto.go +++ b/crypto/bls/crypto.go @@ -4,7 +4,6 @@ import ( "context" "github.com/herumi/bls-eth-go-binary/bls" - "github.com/p2p-org/dkc/utils" ) func Split(ctx context.Context, key []byte, threshold uint32) ([][]byte, [][]byte, error) { @@ -18,6 +17,7 @@ func Split(ctx context.Context, key []byte, threshold uint32) ([][]byte, [][]byt masterPKs := append([][]byte{}, sk.GetPublicKey().Serialize()) masterSKs := append([][]byte{}, sk.Serialize()) + // We assume that peers for i := 1; i < int(threshold); i++ { var sk bls.SecretKey sk.SetByCSPRNG() // Shouldn't be a zero (all keys will be equal in that case) @@ -28,44 +28,11 @@ func Split(ctx context.Context, key []byte, threshold uint32) ([][]byte, [][]byt return masterSKs, masterPKs, nil } -func Sign(ctx context.Context, accounts []utils.Account) ([]byte, error) { - var subSignatures []bls.Sign - var subIDs []bls.ID - var sig bls.Sign - - for _, account := range accounts { - blsID, err := newBlsID(account.ID) - if err != nil { - return nil, err - } - subIDs = append( - subIDs, - *blsID, - ) - - var peerSig bls.Sign - err = peerSig.Deserialize(account.Signature) - if err != nil { - return nil, err - } - subSignatures = append( - subSignatures, - peerSig, - ) - } - - if err := sig.Recover(subSignatures, subIDs); err != nil { - return nil, err - } - - return sig.Serialize(), nil -} - -func Recover(ctx context.Context, accounts []utils.Account) ([]byte, error) { +func Combine(ctx context.Context, accounts map[uint64][]byte) ([]byte, error) { var subIDs []bls.ID var subSKs []bls.SecretKey - for _, account := range accounts { - blsID, err := newBlsID(account.ID) + for id, key := range accounts { + blsID, err := newBlsID(id) if err != nil { return nil, err } @@ -75,7 +42,7 @@ func Recover(ctx context.Context, accounts []utils.Account) ([]byte, error) { ) var mk bls.SecretKey - err = mk.Deserialize(account.Key) + err = mk.Deserialize(key) if err != nil { return nil, err } @@ -92,10 +59,10 @@ func Recover(ctx context.Context, accounts []utils.Account) ([]byte, error) { } func SetupParticipants(masterSKs [][]byte, masterPKs [][]byte, ids []uint64, threshold int) ( - []utils.Account, error, + map[uint64][]byte, error, ) { var mSKs []bls.SecretKey - var accounts = []utils.Account{} + peersIDs := map[uint64][]byte{} for _, s := range masterSKs { var sk bls.SecretKey @@ -117,13 +84,8 @@ func SetupParticipants(masterSKs [][]byte, masterPKs [][]byte, ids []uint64, thr return nil, err } - accounts = append(accounts, - utils.Account{ - Key: sk.Serialize(), - ID: ids[i], - Signature: nil, - }) + peersIDs[ids[i]] = sk.Serialize() } - return accounts, nil + return peersIDs, nil } diff --git a/crypto/bls/helpers.go b/crypto/bls/helpers.go new file mode 100644 index 0000000..29f703c --- /dev/null +++ b/crypto/bls/helpers.go @@ -0,0 +1,18 @@ +package bls + +import ( + "encoding/binary" + + "github.com/herumi/bls-eth-go-binary/bls" +) + +func newBlsID(id uint64) (*bls.ID, error) { + var res bls.ID + buf := [8]byte{} + binary.LittleEndian.PutUint64(buf[:], id) + err := res.SetLittleEndian(buf[:]) + if err != nil { + return nil, err + } + return &res, nil +} diff --git a/flake.lock b/flake.lock index e6c3015..eb62ccf 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,37 @@ { "nodes": { + "devour-flake": { + "flake": false, + "locked": { + "lastModified": 1694098737, + "narHash": "sha256-O51F4YFOzlaQAc9b6xjkAqpvrvCtw/Os2M7TU0y4SKQ=", + "owner": "srid", + "repo": "devour-flake", + "rev": "30a34036b29b0d12989ef6c8be77aa949d85aef5", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "devour-flake", + "type": "github" + } + }, + "devour-flake_2": { + "flake": false, + "locked": { + "lastModified": 1694098737, + "narHash": "sha256-O51F4YFOzlaQAc9b6xjkAqpvrvCtw/Os2M7TU0y4SKQ=", + "owner": "srid", + "repo": "devour-flake", + "rev": "30a34036b29b0d12989ef6c8be77aa949d85aef5", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "devour-flake", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -8,11 +40,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1683635384, - "narHash": "sha256-9goJTd05yOyD/McaMqZ4BUB8JW+mZMnZQJZ7VQ6C/Lw=", + "lastModified": 1698410321, + "narHash": "sha256-MphuSlgpmKwtJncGMohryHiK55J1n6WzVQ/OAfmfoMc=", "owner": "numtide", "repo": "devshell", - "rev": "5143ea68647c4cf5227e4ad2100db6671fc4c369", + "rev": "1aed986e3c81a4f6698e85a7452cbfcc4b31a36e", "type": "github" }, "original": { @@ -23,18 +55,18 @@ }, "devshell_2": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "ethereum-nix", "nixpkgs" - ] + ], + "systems": "systems_2" }, "locked": { - "lastModified": 1682700442, - "narHash": "sha256-qjaAAcCYgp1pBBG7mY9z95ODUBZMtUpf0Qp3Gt/Wha0=", + "lastModified": 1698410321, + "narHash": "sha256-MphuSlgpmKwtJncGMohryHiK55J1n6WzVQ/OAfmfoMc=", "owner": "numtide", "repo": "devshell", - "rev": "fb6673fe9fe4409e3f43ca86968261e970918a83", + "rev": "1aed986e3c81a4f6698e85a7452cbfcc4b31a36e", "type": "github" }, "original": { @@ -45,22 +77,24 @@ }, "ethereum-nix": { "inputs": { + "devour-flake": "devour-flake", "devshell": "devshell_2", "flake-compat": "flake-compat", "flake-parts": "flake-parts", "flake-root": "flake-root", "foundry-nix": "foundry-nix", - "hercules-ci-effects": "hercules-ci-effects", - "nixpkgs": "nixpkgs_3", + "lib-extras": "lib-extras", + "mynixpkgs": "mynixpkgs", + "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1683806117, - "narHash": "sha256-yWtTGi338LhyT2Mo7TjF62EPGVG36o4bYaMsdvjBqYw=", + "lastModified": 1700487324, + "narHash": "sha256-bTKQOD0sq+6fIAKnRBgKVw0bDE9EVcajVVW//PEKfwc=", "owner": "nix-community", "repo": "ethereum.nix", - "rev": "2c000f083097bf48fa5cb7126e2c6d9152f3857f", + "rev": "c43c400bf08d6bc4a4de2c662e70a756aa598a0f", "type": "github" }, "original": { @@ -71,11 +105,11 @@ }, "flake-compat": { "locked": { - "lastModified": 1680531544, - "narHash": "sha256-8qbiDTYb1kGaDADRXTItpcMKQ1TeQVkuof6oEwHUvVA=", + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", "owner": "nix-community", "repo": "flake-compat", - "rev": "95e78dc12268c5e4878621845c511077f3798729", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", "type": "github" }, "original": { @@ -84,22 +118,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -108,11 +126,11 @@ ] }, "locked": { - "lastModified": 1682984683, - "narHash": "sha256-fSMthG+tp60AHhNmaHc4StT3ltfHkQsJtN8GhfLWmtI=", + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "86684881e184f41aa322e653880e497b66429f3e", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "type": "github" }, "original": { @@ -122,57 +140,17 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1678379998, - "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": [ - "ethereum-nix", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1678379998, - "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nixpkgs" ] }, "locked": { - "lastModified": 1683560683, - "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", "type": "github" }, "original": { @@ -183,11 +161,11 @@ }, "flake-root": { "locked": { - "lastModified": 1680964220, - "narHash": "sha256-dIdTYcf+KW9a4pKHsEbddvLVSfR1yiAJynzg2x0nfWg=", + "lastModified": 1692742795, + "narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=", "owner": "srid", "repo": "flake-root", - "rev": "f1c0b93d05bdbea6c011136ba1a135c80c5b326c", + "rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937", "type": "github" }, "original": { @@ -197,21 +175,6 @@ } }, "flake-utils": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -226,22 +189,7 @@ "type": "github" } }, - "flake-utils_3": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { + "flake-utils_2": { "locked": { "lastModified": 1667077288, "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", @@ -258,18 +206,18 @@ }, "foundry-nix": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "ethereum-nix", "nixpkgs" ] }, "locked": { - "lastModified": 1683191603, - "narHash": "sha256-KdSKdwz3+VJQIHc8sCDwPo2OQtPs5jbxwrLXseHLlfc=", + "lastModified": 1696410815, + "narHash": "sha256-uku47D/L+VzO3sVoZbnexPQPGeQtMwMFBesyaA1vKtE=", "owner": "shazow", "repo": "foundry.nix", - "rev": "5a53423b983f623420733f62c01fa69d1f4cdda9", + "rev": "a56126a754d73f85d904768fed569a9e250388d9", "type": "github" }, "original": { @@ -279,167 +227,133 @@ "type": "github" } }, - "gitignore": { + "haumea": { "inputs": { "nixpkgs": [ "ethereum-nix", - "hercules-ci-effects", - "hercules-ci-agent", - "pre-commit-hooks-nix", + "mynixpkgs", "nixpkgs" ] }, "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "haskell-flake": { - "locked": { - "lastModified": 1678138103, - "narHash": "sha256-D0lao82bV3t2gEFjHiU6RN233t+1MnkQV+bq8MEu2ic=", - "owner": "hercules-ci", - "repo": "haskell-flake", - "rev": "1e1660e6dd00838ba73bc7952e6e73be67da18d1", + "lastModified": 1685133229, + "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", + "owner": "nix-community", + "repo": "haumea", + "rev": "34dd58385092a23018748b50f9b23de6266dffc2", "type": "github" }, "original": { - "owner": "hercules-ci", - "ref": "0.1-extraLibraries", - "repo": "haskell-flake", + "owner": "nix-community", + "ref": "v0.2.2", + "repo": "haumea", "type": "github" } }, - "hercules-ci-agent": { + "lib-extras": { "inputs": { - "flake-parts": "flake-parts_3", - "haskell-flake": "haskell-flake", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs", - "pre-commit-hooks-nix": "pre-commit-hooks-nix" - }, - "locked": { - "lastModified": 1678446614, - "narHash": "sha256-Z6Gsba5ahn/N0QlF0vJfIEfnZgCs4qr1IZtXAqjbE7s=", - "owner": "hercules-ci", - "repo": "hercules-ci-agent", - "rev": "0b90d1a87c117a5861785cb85833dd1c9df0b6ef", - "type": "github" - }, - "original": { - "id": "hercules-ci-agent", - "type": "indirect" - } - }, - "hercules-ci-effects": { - "inputs": { - "flake-parts": "flake-parts_2", - "hercules-ci-agent": "hercules-ci-agent", - "nixpkgs": "nixpkgs_2" + "devshell": [ + "ethereum-nix", + "devshell" + ], + "flake-parts": [ + "ethereum-nix", + "flake-parts" + ], + "flake-root": [ + "ethereum-nix", + "flake-root" + ], + "nixpkgs": [ + "ethereum-nix", + "nixpkgs" + ], + "treefmt-nix": [ + "ethereum-nix", + "treefmt-nix" + ] }, "locked": { - "lastModified": 1681898675, - "narHash": "sha256-nIJ7CAdiHv4i1no/VgDoeTJLzbLYwu5+/Ycoyzn0S78=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "15ff4f63e5f28070391a5b09a82f6d5c6cc5c9d0", + "lastModified": 1699974671, + "narHash": "sha256-4EsuPiX4pGEg8ME9ONn8ebY1ZKYLOp9DRCcdTrOj8sY=", + "owner": "aldoborrero", + "repo": "lib-extras", + "rev": "83c8935af27738b8b155e0077522220d81865269", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", + "owner": "aldoborrero", + "ref": "v0.2.2", + "repo": "lib-extras", "type": "github" } }, - "nix-darwin": { + "mynixpkgs": { "inputs": { + "devour-flake": "devour-flake_2", + "devshell": [ + "ethereum-nix", + "devshell" + ], + "flake-parts": [ + "ethereum-nix", + "flake-parts" + ], + "flake-root": [ + "ethereum-nix", + "flake-root" + ], + "haumea": "haumea", + "lib-extras": [ + "ethereum-nix", + "lib-extras" + ], "nixpkgs": [ "ethereum-nix", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" + "nixpkgs-unstable" + ], + "treefmt-nix": [ + "ethereum-nix", + "treefmt-nix" ] }, "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "lastModified": 1700152649, + "narHash": "sha256-hr69KASr/uWyQJ9dfGk1b/o58h8MB+N9eBOqpxRx7no=", + "owner": "aldoborrero", + "repo": "mynixpkgs", + "rev": "e376efd8ead02ce897c25cc496805de64f9d2222", "type": "github" }, "original": { - "owner": "LnL7", - "repo": "nix-darwin", + "owner": "aldoborrero", + "repo": "mynixpkgs", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1678293141, - "narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1678375444, - "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", - "owner": "NixOS", + "lastModified": 1685566663, + "narHash": "sha256-btHN1czJ6rzteeCuE/PNrdssqYD2nIA4w48miQAFloM=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "4ecab3273592f27479a583fb6d975d4aba3486fe", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-22.11", + "owner": "nixos", + "ref": "23.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1683442750, - "narHash": "sha256-IiJ0WWW6OcCrVFl1ijE+gTaP0ChFfV6dNkJR05yStmw=", + "lastModified": 1698336494, + "narHash": "sha256-sO72WDBKyijYD1GcKPlGsycKbMBiTJMBCnmOxLAs880=", "owner": "nixos", "repo": "nixpkgs", - "rev": "eb751d65225ec53de9cf3d88acbf08d275882389", + "rev": "808c0d8c53c7ae50f82aca8e7df263225cf235bf", "type": "github" }, "original": { @@ -451,42 +365,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1678891326, - "narHash": "sha256-cjgrjKx7y+hO9I8O2b6QvBaTt9w7Xhk/5hsnJYTUb2I=", + "lastModified": 1700444282, + "narHash": "sha256-s/+tgT+Iz0LZO+nBvSms+xsMqvHt2LqYniG9r+CYyJc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1544ef240132d4357d9a39a40c8e6afd1678b052", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1669833724, - "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1683777345, - "narHash": "sha256-V2p/A4RpEGqEZussOnHYMU6XglxBJGCODdzoyvcwig8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "635a306fc8ede2e34cb3dd0d6d0a5d49362150ed", + "rev": "3f21a22b5aafefa1845dec6f4a378a8f53d8681c", "type": "github" }, "original": { @@ -498,34 +381,7 @@ }, "pre-commit-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", - "gitignore": "gitignore", - "nixpkgs": [ - "ethereum-nix", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks-nix_2": { - "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -549,9 +405,9 @@ "inputs": { "devshell": "devshell", "ethereum-nix": "ethereum-nix", - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_4", - "pre-commit-hooks-nix": "pre-commit-hooks-nix_2", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks-nix": "pre-commit-hooks-nix", "treefmt-nix": "treefmt-nix_2" } }, @@ -570,6 +426,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -578,11 +449,11 @@ ] }, "locked": { - "lastModified": 1683307174, - "narHash": "sha256-A7nF2Q+F+Bqs4u6VS4aOzyURfly5f4ZAiihGU0FA29g=", + "lastModified": 1698438538, + "narHash": "sha256-AWxaKTDL3MtxaVTVU5lYBvSnlspOS0Fjt8GxBgnU0Do=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "b44794f94514b61512352a18cd77c710f0005f15", + "rev": "5deb8dc125a9f83b65ca86cf0c8167c46593e0b1", "type": "github" }, "original": { @@ -598,11 +469,11 @@ ] }, "locked": { - "lastModified": 1683307174, - "narHash": "sha256-A7nF2Q+F+Bqs4u6VS4aOzyURfly5f4ZAiihGU0FA29g=", + "lastModified": 1699786194, + "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "b44794f94514b61512352a18cd77c710f0005f15", + "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", "type": "github" }, "original": { diff --git a/go.mod b/go.mod index 22309ad..24be9f3 100644 --- a/go.mod +++ b/go.mod @@ -3,50 +3,74 @@ module github.com/p2p-org/dkc go 1.19 require ( - github.com/google/uuid v1.3.0 - github.com/herumi/bls-eth-go-binary v1.29.1 + github.com/google/uuid v1.4.0 + github.com/herumi/bls-eth-go-binary v1.32.1 github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.29.1 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.15.0 - github.com/wealdtech/go-eth2-types/v2 v2.8.1 - github.com/wealdtech/go-eth2-wallet v1.15.1 - github.com/wealdtech/go-eth2-wallet-store-filesystem v1.17.1 - github.com/wealdtech/go-eth2-wallet-types/v2 v2.10.1 + github.com/rs/zerolog v1.31.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.17.0 + github.com/wealdtech/go-eth2-types/v2 v2.8.2 + github.com/wealdtech/go-eth2-wallet v1.16.0 + github.com/wealdtech/go-eth2-wallet-store-filesystem v1.18.1 + github.com/wealdtech/go-eth2-wallet-types/v2 v2.11.0 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + golang.org/x/sync v0.5.0 ) require ( - github.com/aws/aws-sdk-go v1.44.261 // indirect + github.com/alecthomas/gometalinter v3.0.0+incompatible // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/aws/aws-sdk-go v1.48.0 // indirect + github.com/client9/misspell v0.3.4 // indirect github.com/ferranbt/fastssz v0.1.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/minio/sha256-simd v1.0.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/nicksnyder/go-i18n v1.10.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/phoreproject/bls v0.0.0-20191211001008-9d5f85bf4a9b // indirect + github.com/sagikazarmark/locafero v0.3.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.10.0 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/wealdtech/go-bytesutil v1.2.1 // indirect - github.com/wealdtech/go-ecodec v1.1.3 // indirect - github.com/wealdtech/go-eth2-util v1.8.1 // indirect - github.com/wealdtech/go-eth2-wallet-distributed v1.1.5 // indirect - github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.3.1 // indirect - github.com/wealdtech/go-eth2-wallet-hd/v2 v2.6.1 // indirect - github.com/wealdtech/go-eth2-wallet-nd/v2 v2.4.1 // indirect - github.com/wealdtech/go-eth2-wallet-store-s3 v1.11.3 // indirect - github.com/wealdtech/go-indexer v1.0.1 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + github.com/wealdtech/go-ecodec v1.1.4 // indirect + github.com/wealdtech/go-eth2-types v1.0.0 // indirect + github.com/wealdtech/go-eth2-util v1.8.2 // indirect + github.com/wealdtech/go-eth2-wallet-distributed v1.2.1 // indirect + github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 // indirect + github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0 // indirect + github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0 // indirect + github.com/wealdtech/go-eth2-wallet-store-s3 v1.12.0 // indirect + github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.2 // indirect + github.com/wealdtech/go-eth2-wallet-types v1.10.0 // indirect + github.com/wealdtech/go-indexer v1.1.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.15.0 // indirect + gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 17c761d..d98fcac 100644 --- a/go.sum +++ b/go.sum @@ -38,21 +38,31 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/alecthomas/gometalinter v3.0.0+incompatible h1:e9Zfvfytsw/e6Kd/PYd75wggK+/kX5Xn8IYDUKyc5fU= +github.com/alecthomas/gometalinter v3.0.0+incompatible/go.mod h1:qfIpQGGz3d+NmgyPBqv+LSh50emm1pt72EtcX2vKYQk= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/aws/aws-sdk-go v1.44.261 h1:PcTMX/QVk+P3yh2n34UzuXDF5FS2z5Lse2bt+r3IpU4= github.com/aws/aws-sdk-go v1.44.261/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.48.0 h1:1SeJ8agckRDQvnSCt1dGZYAwUaoD2Ixj6IaXB4LCv8Q= +github.com/aws/aws-sdk-go v1.48.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlespiau/covertool v0.0.0-20180314162135-b0c4c6d0583a/go.mod h1:/eQMcW3eA1bzKx23ZYI2H3tXPdJB5JWYTHzoUPBvQY4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -64,10 +74,16 @@ github.com/ferranbt/fastssz v0.1.3/go.mod h1:0Y9TEd/9XuFlh7mskMPfXiI2Dkw4Ddg9EyX github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -109,6 +125,7 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190309163659-77426154d546/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -119,18 +136,27 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/herumi/bls-eth-go-binary v1.29.1 h1:XcNSHYTyNjEUVfWDCE2gtG5r95biTwd7MJUJF09LtSE= github.com/herumi/bls-eth-go-binary v1.29.1/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U= +github.com/herumi/bls-eth-go-binary v1.32.1 h1:FbSbbNiWmuR9CWkMzFQWT5yujSn4wof48TnAlMUTm9s= +github.com/herumi/bls-eth-go-binary v1.32.1/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -145,6 +171,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -160,12 +188,30 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mmcloughlin/avo v0.0.0-20190318053554-7a0eb66183da/go.mod h1:lf5GMZxA5kz8dnCweJuER5Rmbx6dDu6qvw0fO3uYKK8= +github.com/nicksnyder/go-i18n v1.10.1 h1:isfg77E/aCD7+0lD/D00ebR2MV5vgeQ276WYyDaCRQc= +github.com/nicksnyder/go-i18n v1.10.1/go.mod h1:e4Di5xjP9oTVrC6y3C7C0HoSYXjSbhh/dU0eUV32nB4= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/phoreproject/bls v0.0.0-20190821133044-da95d4798b09/go.mod h1:7pK0Ldy91shCmI47LLTn3i3rfTQcHiJJvPqGqzvN5nE= +github.com/phoreproject/bls v0.0.0-20191211001008-9d5f85bf4a9b h1:tE/F54uL3jp0ZGSKNMPGCTF003pSmtD/sQojpKADAxY= +github.com/phoreproject/bls v0.0.0-20191211001008-9d5f85bf4a9b/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= @@ -175,23 +221,40 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= +github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 h1:Xuk8ma/ibJ1fOy4Ee11vHhUFHQNpHhrBneOCNHVXS5w= github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7AwjWCpdPhkSmNAgUv5C7EJ4AbmjEB3r047r3DXWu3Y= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= +github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -203,41 +266,78 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/umbracle/gohashtree v0.0.2-alpha.0.20230207094856-5b775a815c10 h1:CQh33pStIp/E30b7TxDlXfM0145bn2e8boI30IxAhTg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/wealdtech/go-bytesutil v1.0.0/go.mod h1:jENeMqeTEU8FNZyDFRVc7KqBdRKSnJ9CCh26TcuNb9s= +github.com/wealdtech/go-bytesutil v1.1.0/go.mod h1:jENeMqeTEU8FNZyDFRVc7KqBdRKSnJ9CCh26TcuNb9s= github.com/wealdtech/go-bytesutil v1.2.1 h1:TjuRzcG5KaPwaR5JB7L/OgJqMQWvlrblA1n0GfcXFSY= github.com/wealdtech/go-bytesutil v1.2.1/go.mod h1:RhUDUGT1F4UP4ydqbYp2MWJbAel3M+mKd057Pad7oag= github.com/wealdtech/go-ecodec v1.1.3 h1:ldQFJqzvega2IMsbjB6Yp4uZMsQTxvYnuM521ZGiglo= github.com/wealdtech/go-ecodec v1.1.3/go.mod h1:+sSrfAZvFf1bqEBfPGB42VtHijcT27cUkw6J1gueJKg= +github.com/wealdtech/go-ecodec v1.1.4 h1:iHx9/X3Szn1Q5RbZmk5l8A1TdUDXtAFb21gJH1JcO5A= +github.com/wealdtech/go-ecodec v1.1.4/go.mod h1:zEblpCFdl9xZlcNYoDL9o6U7YtzY+eWzOao13UVe4j0= +github.com/wealdtech/go-eth2-types v1.0.0 h1:ggrbQ5HeFcxVm20zxVWr8Sc3uCditaetzWB/Ax/4g0w= +github.com/wealdtech/go-eth2-types v1.0.0/go.mod h1:fWUgtKQ7hiNVl6263bGeyjlydYuaxkxcUIPIopgz2CM= github.com/wealdtech/go-eth2-types/v2 v2.8.1 h1:y2N3xSIZ3tVqsnvj4AgPkh48U5sM612vhZwlK3k+3lM= github.com/wealdtech/go-eth2-types/v2 v2.8.1/go.mod h1:3TJShI4oBzG8pCZsfe3NZAq8QAmXrC2rd45q7Vn/XB8= +github.com/wealdtech/go-eth2-types/v2 v2.8.2 h1:b5aXlNBLKgjAg/Fft9VvGlqAUCQMP5LzYhlHRrr4yPg= +github.com/wealdtech/go-eth2-types/v2 v2.8.2/go.mod h1:IAz9Lz1NVTaHabQa+4zjk2QDKMv8LVYo0n46M9o/TXw= github.com/wealdtech/go-eth2-util v1.8.1 h1:nb50hygsNoql94akg7GN6im/weg8ZZgJWHgiyrj8qiU= github.com/wealdtech/go-eth2-util v1.8.1/go.mod h1:vv+8jVgYRXEGty/VLPNn1RYlbQNYmTht3VR6nfh0z4E= +github.com/wealdtech/go-eth2-util v1.8.2 h1:gq+JMrnadifyKadUr75wmfP7+usiqMu9t3VVoob5Dvo= +github.com/wealdtech/go-eth2-util v1.8.2/go.mod h1:/80GAK0K/3+PqUBZHvaOPd3b1sjHeimxQh1nrJzgaPk= github.com/wealdtech/go-eth2-wallet v1.15.1 h1:gtjl5EE5XgJBEs7s6s4XenIyGsn2d4TQCmXj9anP7Gc= github.com/wealdtech/go-eth2-wallet v1.15.1/go.mod h1:FoUxyJQ1xNNdUJkb9KfNTM79MmItX682EujqbcnVLdc= +github.com/wealdtech/go-eth2-wallet v1.16.0 h1:syD1xDYB7emk4x+6bTYm5VZp9nx5FLab5Fgm09Eq1Kg= +github.com/wealdtech/go-eth2-wallet v1.16.0/go.mod h1:JFA2P7PpPR8quQ/T6Gsr/4VLj5sQVnyzKgfPA+eqmYE= github.com/wealdtech/go-eth2-wallet-distributed v1.1.5 h1:kUpESVq2dVGeI4GXUy/LfoP5fycl3LGYTUcta7VTIjE= github.com/wealdtech/go-eth2-wallet-distributed v1.1.5/go.mod h1:zaATC9jRC3bn7jAmB2+MaCiyyJcavHGzSq5OCd7h/tM= +github.com/wealdtech/go-eth2-wallet-distributed v1.2.1 h1:+pbG9i9b5TrWd7GDRX8yq4FKA+D7k7aI6uySEvAZ+Kk= +github.com/wealdtech/go-eth2-wallet-distributed v1.2.1/go.mod h1:jYkDax2VhUNKIct6TVlgxAagvR56/eg7y7J+JFq+gDo= github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.3.1 h1:NlWiq9cUd69xFvhAdCRpz7CwfDjMuz8cEvPQ9yponT4= github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.3.1/go.mod h1:luy/Y/I3gC3JxT0mQBKqysvzRN1DiFnwqUij8Yc2SP4= +github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 h1:9j7bpwjT9wmwBb54ZkBhTm1uNIlFFcCJXefd/YskZPw= +github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1/go.mod h1:+tI1VD76E1WINI+Nstg7RVGpUolL5ql10nu2YztMO/4= github.com/wealdtech/go-eth2-wallet-encryptor-unencrypted v1.0.1 h1:x6bq8cVgRgfhwtSQSYo/9AqJ8qEeaS6af28cW0cVj5U= github.com/wealdtech/go-eth2-wallet-hd/v2 v2.6.1 h1:pEVfJCHB5T02oVtOumpcwU9H4zC2vWsJEQl09moh+n0= github.com/wealdtech/go-eth2-wallet-hd/v2 v2.6.1/go.mod h1:11BHG8gt2FqQC02MrT4KN2+EV1ZTsn9SmSVme1HWp7E= +github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0 h1:5g4emFacTf+sX6zx6SbZIZGR7Jx5Xr/Xdb7sXnEXlWk= +github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0/go.mod h1:aWgnEi07w1L9wMBRB69sYvoEONppAUly6FDQRWQGqH8= github.com/wealdtech/go-eth2-wallet-nd/v2 v2.4.1 h1:LvgLIYaP+WqZ8xcrN4e0CAIGDtjKhzpBqAhjExQzqb4= github.com/wealdtech/go-eth2-wallet-nd/v2 v2.4.1/go.mod h1:279Gj7DqpQBar9eoo82RcC6SgD0fiZs1Dc6SffsDZM0= +github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0 h1:vphAFklkYMRJVo9f5rVWly7PECHrLS4yarjemBa7fRM= +github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0/go.mod h1:kBZUZogqwvvxulEvXi5l6OjZyd7EBmCKxce5Q+lW7fs= github.com/wealdtech/go-eth2-wallet-store-filesystem v1.17.1 h1:fe3wd7fKCy4d3TsdKGWsy5/uKoyKiz4GsYyck/BDO88= github.com/wealdtech/go-eth2-wallet-store-filesystem v1.17.1/go.mod h1:mlB4RA5n1/3CnktH2iphuYoky7xn3DEugKvXrFqkBW4= +github.com/wealdtech/go-eth2-wallet-store-filesystem v1.18.1 h1:Ceq74WL57jdBQnrZJFJyGRBKOOFI5wwq9VoxeAbjoEk= +github.com/wealdtech/go-eth2-wallet-store-filesystem v1.18.1/go.mod h1:woTpldN8qThnmya/0yeD+a3u/3Zj42u6/ijgF9CGaz8= github.com/wealdtech/go-eth2-wallet-store-s3 v1.11.3 h1:HAUyuCcoxpmm5c1DVJ3P7vI9v12aI3u23O2qrw7vugE= github.com/wealdtech/go-eth2-wallet-store-s3 v1.11.3/go.mod h1:OQyhned9FiLSC/5misLeAvc/BGhBDlksZGOe0PFq17o= +github.com/wealdtech/go-eth2-wallet-store-s3 v1.12.0 h1:noknYCbHw2soPhwke1LvC99Kk/2CLN787KcgxdZ7OGo= +github.com/wealdtech/go-eth2-wallet-store-s3 v1.12.0/go.mod h1:1lSVxfQynUAd5u46rCeAI8wCl8S44lZsNYYXlxVAvwU= github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.1 h1:0JRUCM6UgpsgTGGpd8Q6BDQXAyhRd359mumBf6pAdlc= +github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.2 h1:TwOt7bEHsVe6dKJb7XuUG7m06gaBGPCQlBk24Ql8Mws= +github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.2/go.mod h1:rtIoB34tqL3kUOK+LsLTAHfynxLR8pGScy0lmQmpbKc= +github.com/wealdtech/go-eth2-wallet-types v1.10.0 h1:iQx3MxMQQwoEfyPDHy5vtKYVtrUjY4nzEODbUPcz2bg= +github.com/wealdtech/go-eth2-wallet-types v1.10.0/go.mod h1:vwK05jlJM/ibZs/QCqJ4dOhsjjpNcIP4X7Vx6WYXLGI= github.com/wealdtech/go-eth2-wallet-types/v2 v2.10.1 h1:RRJhZ9M3S2Vh5k1SLwQmyA4NZ7E1HM4QnnHhiUySFdk= github.com/wealdtech/go-eth2-wallet-types/v2 v2.10.1/go.mod h1:ErJ+f0bEVFn218QcwhY+Sy9UUa8XgfEjVeNauUJqOgE= +github.com/wealdtech/go-eth2-wallet-types/v2 v2.11.0 h1:yX9+FfUXvPDvZ8Q5bhF+64AWrQwh4a3/HpfTx99DnZc= +github.com/wealdtech/go-eth2-wallet-types/v2 v2.11.0/go.mod h1:UVP9YFcnPiIzHqbmCMW3qrQ3TK5FOqr1fmKqNT9JGr8= github.com/wealdtech/go-indexer v1.0.1 h1:kInFsg0ZYHXE5EPY0dhgyBu1nSfS126h4m2iKgvuBFQ= github.com/wealdtech/go-indexer v1.0.1/go.mod h1:kqGWOcsn/5rFSIJF4hjwQnIUM/Aqa91RNrdWVNBhqCg= +github.com/wealdtech/go-indexer v1.1.0 h1:vn4gY7nSYSLe0sXVauJgyHvK4NXiDrLKBYYYKWypahk= +github.com/wealdtech/go-indexer v1.1.0/go.mod h1:lEFTda1rul1EwWIX3QqXq/KW0tnEEhC41Lup06V7Tlo= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -245,7 +345,14 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= +golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -255,6 +362,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -265,6 +374,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -278,6 +389,8 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -288,12 +401,16 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190326090315-15845e8f865b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -320,6 +437,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= @@ -343,10 +461,14 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -376,8 +498,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -387,9 +511,13 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -404,15 +532,19 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190106171756-3ef68632349c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190325223049-1d95b17f1b04/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -454,7 +586,10 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -547,12 +682,16 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 h1:CEBpW6C191eozfEuWdUmIAHn7lwlLxJ7HVdr2e2Tsrw= +gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -569,5 +708,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/nix/default.nix b/nix/default.nix index 253fc02..93e63c8 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,8 +1,3 @@ { - imports = [ - ./formatter.nix - ./package.nix - ./pre-commit.nix - ./shell.nix - ]; + imports = [./formatter.nix ./package.nix ./pre-commit.nix ./shell.nix]; } diff --git a/nix/lib/default.nix b/nix/lib/default.nix deleted file mode 100644 index f057c8d..0000000 --- a/nix/lib/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -lib: let - inventory = import ./inventory.nix lib; - fs = import ./fs.nix lib; -in { - inherit inventory fs; -} diff --git a/nix/lib/fs.nix b/nix/lib/fs.nix deleted file mode 100644 index f7f623a..0000000 --- a/nix/lib/fs.nix +++ /dev/null @@ -1,45 +0,0 @@ -lib: rec { - flattenTree = { - tree, - separator ? ".", - }: let - op = sum: path: val: let - pathStr = builtins.concatStringsSep separator path; - in - if builtins.isPath val - then - (sum - // { - "${pathStr}" = val; - }) - else if builtins.isAttrs val - then - # recurse into that attribute set - (recurse sum path val) - else - # ignore that value - sum; - - recurse = sum: path: val: - builtins.foldl' - (sum: key: op sum (path ++ [key]) val.${key}) - sum - (builtins.attrNames val); - in - recurse {} [] tree; - - rakeLeaves = dirPath: let - collect = file: type: { - name = lib.removeSuffix ".nix" file; - value = let - path = dirPath + "/${file}"; - in - if (type == "regular") - then path - else rakeLeaves path; - }; - - files = builtins.readDir dirPath; - in - lib.filterAttrs (_: v: v != {}) (lib.mapAttrs' collect files); -} diff --git a/nix/lib/inventory.nix b/nix/lib/inventory.nix deleted file mode 100644 index 42cc5b2..0000000 --- a/nix/lib/inventory.nix +++ /dev/null @@ -1,8 +0,0 @@ -lib: { - createInventory = let - inherit (builtins) attrNames pathExists readDir; - inherit (lib) filterAttrs genAttrs; - inventoryDirs = dir: attrNames (filterAttrs (name: type: type == "directory" && pathExists (dir + /${name}/config.nix)) (readDir dir)); - in - dir: genAttrs (inventoryDirs dir) (name: import (dir + /${name}/config.nix)); -} diff --git a/nix/package.nix b/nix/package.nix index 3dab24e..9f48c47 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -12,7 +12,7 @@ inherit pname version; src = ../.; - vendorHash = "sha256-EtGm+9jpGGB+/aUzIyFfe3ZbyhqliL3G9qJBf2nKseY="; + vendorHash = "sha256-vLYu5Yi6YpE7vfjkqe6WQ9CcGRtJZ3BwPdH61pzHRKU="; buildInputs = [mcl bls]; diff --git a/nix/pre-commit.nix b/nix/pre-commit.nix index d8d6152..3baf965 100644 --- a/nix/pre-commit.nix +++ b/nix/pre-commit.nix @@ -2,7 +2,7 @@ imports = [ inputs.pre-commit-hooks-nix.flakeModule ]; - perSystem = _: { + perSystem = { pre-commit.settings = { hooks = { alejandra.enable = true; diff --git a/nix/shell.nix b/nix/shell.nix index fcb41de..a788a4f 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -4,7 +4,6 @@ ]; perSystem = { pkgs, - config, inputs', ... }: let @@ -23,23 +22,6 @@ openssl ethdo ]; - commands = [ - { - category = "Tools"; - name = "fmt"; - help = "Format the source tree"; - command = "nix fmt"; - } - { - category = "Tools"; - name = "check"; - help = "Nix flake check"; - command = "nix flake check"; - } - ]; - devshell.startup = { - pre-commit.text = config.pre-commit.installationScript; - }; }; }; } diff --git a/store/distributed.go b/store/distributed.go new file mode 100644 index 0000000..dc15409 --- /dev/null +++ b/store/distributed.go @@ -0,0 +1,247 @@ +package store + +import ( + "context" + "fmt" + "regexp" + + "github.com/p2p-org/dkc/crypto/bls" + "github.com/p2p-org/dkc/utils" + "github.com/pkg/errors" + "github.com/spf13/viper" + e2wallet "github.com/wealdtech/go-eth2-wallet" + types "github.com/wealdtech/go-eth2-wallet-types/v2" + "golang.org/x/exp/maps" +) + +type Peers map[uint64]Peer +type Peer struct { + Name string + Passphrases struct { + Path string + Index int + } +} + +type Threshold uint32 +type DistributedStore struct { + Type string + Path string + Peers map[uint64]string + PeersPasswords map[uint64][][]byte + PeersPaths map[uint64]string + Threshold Threshold + Ctx context.Context +} + +func (s *DistributedStore) Create() error { + for id := range s.Peers { + _, err := createStore(s.PeersPaths[id]) + if err != nil { + return err + } + } + + return nil +} + +func (s *DistributedStore) GetWalletsAccountsMap() (WalletAccountsMap, error) { + // We assume that all distributed wallets in the store have the same accounts + peers := maps.Values(s.Peers) + res, err := regexp.Compile(`:.*`) + if err != nil { + return nil, err + } + wa, err := getWalletsAccountsMap(s.Ctx, s.Path+"/"+res.ReplaceAllString(peers[0], "")) + if err != nil { + return nil, err + } + + return wa, nil +} + +func (s *DistributedStore) CreateWallet(name string) error { + for id := range s.Peers { + store, err := getStore(s.PeersPaths[id]) + if err != nil { + return err + } + _, err = e2wallet.CreateWallet(name, e2wallet.WithType(s.Type), e2wallet.WithStore(store)) + if err != nil { + return err + } + } + return nil +} + +func (s *DistributedStore) GetPK(w string, a string) ([]byte, error) { + accounts := map[uint64][]byte{} + + for id := range s.Peers { + wallet, err := getWallet(s.PeersPaths[id], w) + if err != nil { + return nil, err + } + err = wallet.(types.WalletLocker).Unlock(s.Ctx, nil) + if err != nil { + return nil, err + } + + defer func() { + err = wallet.(types.WalletLocker).Lock(s.Ctx) + }() + + account, err := wallet.(types.WalletAccountByNameProvider).AccountByName(s.Ctx, a) + if err != nil { + return nil, err + } + + key, err := getAccountPK(account, s.Ctx, s.PeersPasswords[id]) + if err != nil { + return nil, err + } + + accounts[id] = key + + } + key, err := bls.Combine(s.Ctx, accounts) + if err != nil { + return nil, err + } + return key, nil +} + +func (s *DistributedStore) SavePKToWallet(w string, a []byte, n string) error { + // Spliting PK to shards and get Public and Private Keys for each shard + masterSKs, masterPKs, err := bls.Split(s.Ctx, a, uint32(s.Threshold)) + if err != nil { + return err + } + + peersIDs := maps.Keys(s.Peers) + participants, err := bls.SetupParticipants(masterSKs, masterPKs, peersIDs, len(s.Peers)) + if err != nil { + return err + } + + for id := range s.Peers { + wallet, err := getWallet(s.PeersPaths[id], w) + if err != nil { + return err + } + err = wallet.(types.WalletLocker).Unlock(s.Ctx, nil) + if err != nil { + return err + } + + defer func() { + err = wallet.(types.WalletLocker).Lock(s.Ctx) + }() + + _, err = wallet.(types.WalletDistributedAccountImporter).ImportDistributedAccount( + s.Ctx, + n, + participants[id], + uint32(s.Threshold), + masterPKs, + s.Peers, + //Always Use The First Password In Array + s.PeersPasswords[id][0], + ) + if err != nil { + return err + } + } + + return nil +} + +func newDistributedStore(t string) (DistributedStore, error) { + s := DistributedStore{} + //Parse Wallet Type + + wt := viper.GetString(fmt.Sprintf("%s.wallet.type", t)) + + utils.Log.Debug().Msgf("setting store type to %s", wt) + s.Type = wt + + //Parse Store Path + storePath := viper.GetString(fmt.Sprintf("%s.store.path", t)) + utils.Log.Debug().Msgf("setting store path to %s", storePath) + if storePath == "" { + return s, errors.New("distributed store path is empty") + } + s.Path = storePath + + //Parse Peers + var peers Peers + utils.Log.Debug().Msgf("getting peers") + err := viper.UnmarshalKey(fmt.Sprintf("%s.wallet.peers", t), &peers) + if err != nil { + return s, err + } + + //Peers list must be >= 2 + utils.Log.Debug().Msgf("checking peers length: %d", len(peers)) + if len(peers) < 2 { + return s, errors.New("number of peers for distributed store is less than 2") + } + + // Parse Peers Passwords Paths and Names + // Regexp To Get Peers Path + res, err := regexp.Compile(`:.*`) + if err != nil { + return s, err + } + s.Peers = map[uint64]string{} + s.PeersPasswords = map[uint64][][]byte{} + s.PeersPaths = map[uint64]string{} + for id, peer := range peers { + //Parse Passphrases + utils.Log.Debug().Msgf("getting passhphrases for peers %s", peer.Name) + passphrases, err := getAccountsPasswords(peer.Passphrases.Path) + if err != nil { + return s, err + } + utils.Log.Debug().Msgf("checking passhphrases len: %d for peers %s", len(passphrases), peer.Name) + if len(passphrases) == 0 { + return s, errors.New("passhparases file for distributed peer is empty") + } + // Cheking If Passphrases Index Is Set + if viper.IsSet(fmt.Sprintf("%s.peers.%d.passphrases.index", t, id)) { + passphrases = [][]byte{passphrases[viper.GetInt(fmt.Sprintf("%s.peers.%d.passphrases.index", t, id))]} + } + s.Peers[id] = peer.Name + s.PeersPasswords[id] = passphrases + s.PeersPaths[id] = s.Path + "/" + res.ReplaceAllString(peer.Name, "") + } + + //Parse Threshold + var threshold Threshold + utils.Log.Debug().Msgf("getting threshold value") + err = viper.UnmarshalKey(fmt.Sprintf("%s.wallet.threshold", t), &threshold) + if err != nil { + return s, err + } + + //Check number of peers and threshold + utils.Log.Debug().Msgf("checking threshold value") + if uint32(threshold) <= uint32(len(peers)/2) { + return s, errors.New("thershold value for distributed store is less than peers/2") + } + if uint32(threshold) > uint32(len(peers)) { + return s, errors.New("threshold value for distributed store is more than peer") + } + + s.Threshold = threshold + + return s, nil +} + +func (s *DistributedStore) GetPath() string { + return s.Path +} + +func (s *DistributedStore) GetType() string { + return s.Type +} diff --git a/store/hd.go b/store/hd.go new file mode 100644 index 0000000..9790881 --- /dev/null +++ b/store/hd.go @@ -0,0 +1,113 @@ +package store + +import ( + "context" + "fmt" + + "github.com/p2p-org/dkc/utils" + "github.com/pkg/errors" + "github.com/spf13/viper" + e2wallet "github.com/wealdtech/go-eth2-wallet" + types "github.com/wealdtech/go-eth2-wallet-types/v2" +) + +type HDStore struct { + Type string + Path string + Passphrases [][]byte + Ctx context.Context +} + +func (s *HDStore) Create() error { + _, err := createStore(s.Path) + if err != nil { + return err + } + + return nil +} +func (s *HDStore) GetWalletsAccountsMap() (WalletAccountsMap, error) { + wa, err := getWalletsAccountsMap(s.Ctx, s.Path) + if err != nil { + return nil, err + } + + return wa, nil +} + +func (s *HDStore) CreateWallet(name string) (types.Wallet, error) { + store, err := getStore(s.Path) + if err != nil { + return nil, err + } + wallet, err := e2wallet.CreateWallet(name, e2wallet.WithType(s.Type), e2wallet.WithStore(store)) + if err != nil { + return nil, err + } + return wallet, nil +} + +func (s *HDStore) GetPK(w string, a string) ([]byte, error) { + wallet, err := getWallet(s.Path, w) + if err != nil { + return nil, err + } + account, err := wallet.(types.WalletAccountByNameProvider).AccountByName(s.Ctx, a) + if err != nil { + return nil, err + } + + key, err := getAccountPK(account, s.Ctx, s.Passphrases) + if err != nil { + return nil, err + } + + return key, nil +} + +func (s *HDStore) GetPath() string { + return s.Path +} + +func (s *HDStore) GetType() string { + return s.Type +} + +func newHDStore(t string) (HDStore, error) { + s := HDStore{} + //Parse Wallet Type + wt := viper.GetString(fmt.Sprintf("%s.wallet.type", t)) + utils.Log.Debug().Msgf("setting store type to %s", wt) + s.Type = wt + + //Parse Store Path + storePath := viper.GetString(fmt.Sprintf("%s.store.path", t)) + utils.Log.Debug().Msgf("setting store path to %s", storePath) + if storePath == "" { + return s, errors.New("hd store path is empty") + } + s.Path = storePath + + //Parse Passphrases + utils.Log.Debug().Msgf("getting passhphrases") + passphrases, err := getAccountsPasswords( + viper.GetString(fmt.Sprintf("%s.wallet.passphrases.path", t)), + ) + if err != nil { + return s, err + } + utils.Log.Debug().Msgf("checking passhphrases len: %d", len(passphrases)) + if len(passphrases) == 0 { + return s, errors.New("passhparases file for hd store is empty") + } + + // Cheking If Passphrases Index Is Set + if viper.IsSet(fmt.Sprintf("%s.wallet.passphrases.index", t)) { + index := viper.GetInt(fmt.Sprintf("%s.wallet.passphrases.index", t)) + passphrases = [][]byte{passphrases[index]} + } + + s.Passphrases = passphrases + + return s, nil +} diff --git a/store/helpers.go b/store/helpers.go new file mode 100644 index 0000000..727d3c0 --- /dev/null +++ b/store/helpers.go @@ -0,0 +1,132 @@ +package store + +import ( + "bytes" + "context" + "os" + + "github.com/pkg/errors" + e2wallet "github.com/wealdtech/go-eth2-wallet" + filesystem "github.com/wealdtech/go-eth2-wallet-store-filesystem" + types "github.com/wealdtech/go-eth2-wallet-types/v2" +) + +type WalletAccountsMap map[string][]string + +func lockAccount(ctx context.Context, acc types.Account) error { + if locker, isLocker := acc.(types.AccountLocker); isLocker { + unlocked, err := locker.IsUnlocked(ctx) + if err != nil { + return err + } + if unlocked { + err := locker.Lock(ctx) + if err != nil { + return err + } + } + } + return nil +} + +func unlockAccount(ctx context.Context, acc types.Account, passphrases [][]byte) (types.Account, error) { + account := acc + if locker, isLocker := account.(types.AccountLocker); isLocker { + unlocked, err := locker.IsUnlocked(ctx) + if err != nil { + return nil, err + } + if !unlocked { + for _, passphrase := range passphrases { + err = locker.Unlock(ctx, passphrase) + if err == nil { + unlocked = true + break + } + } + if !unlocked { + err = errors.Wrap(nil, "failed to ulock account") + return nil, err + } + } + } + + return account, nil +} + +func getAccountsPasswords(path string) ([][]byte, error) { + + content, err := os.ReadFile(path) + if err != nil { + return nil, err + } + + accountsPasswords := bytes.Split(content, []byte{'\n'}) + if len(accountsPasswords) == 0 { + return nil, errors.New("accounts passwords is empty") + } + return accountsPasswords, nil +} + +func createStore(path string) (types.Store, error) { + store := filesystem.New(filesystem.WithLocation(path)) + return store, nil +} + +func getStore(path string) (types.Store, error) { + store := filesystem.New(filesystem.WithLocation(path)) + return store, nil +} + +func getWalletsAccountsMap(ctx context.Context, location string) (WalletAccountsMap, error) { + wa := WalletAccountsMap{} + store := filesystem.New(filesystem.WithLocation(location)) + if err := e2wallet.UseStore(store); err != nil { + return wa, err + } + for w := range e2wallet.Wallets() { + for a := range w.Accounts(ctx) { + wa[w.Name()] = append(wa[w.Name()], a.Name()) + } + } + + return wa, nil +} + +func getAccountPK(account types.Account, ctx context.Context, passphrases [][]byte) ([]byte, error) { + privateKeyProvider, isPrivateKeyProvider := account.(types.AccountPrivateKeyProvider) + if !isPrivateKeyProvider { + err := errors.New("failed to get account method") + return nil, err + } + + _, err := unlockAccount(ctx, account, passphrases) + if err != nil { + return nil, err + } + + key, err := privateKeyProvider.PrivateKey(ctx) + if err != nil { + return nil, err + } + + // Lock Account + defer func() { + err = lockAccount(ctx, account) + }() + + return key.Marshal(), nil +} + +func getWallet(location string, n string) (types.Wallet, error) { + store := filesystem.New(filesystem.WithLocation(location)) + if err := e2wallet.UseStore(store); err != nil { + return nil, err + } + w, err := e2wallet.OpenWallet(n) + if err != nil { + return nil, err + } + + return w, nil +} diff --git a/store/nd.go b/store/nd.go new file mode 100644 index 0000000..a7c1175 --- /dev/null +++ b/store/nd.go @@ -0,0 +1,139 @@ +package store + +import ( + "context" + "fmt" + + "github.com/p2p-org/dkc/utils" + "github.com/pkg/errors" + "github.com/spf13/viper" + e2wallet "github.com/wealdtech/go-eth2-wallet" + types "github.com/wealdtech/go-eth2-wallet-types/v2" +) + +type NDStore struct { + Type string + Path string + Passphrases [][]byte + Ctx context.Context +} + +func (s *NDStore) Create() error { + _, err := createStore(s.Path) + if err != nil { + return err + } + + return nil +} + +func (s *NDStore) GetWalletsAccountsMap() (WalletAccountsMap, error) { + wa, err := getWalletsAccountsMap(s.Ctx, s.Path) + if err != nil { + return nil, err + } + + return wa, nil +} + +func (s *NDStore) CreateWallet(name string) error { + store, err := getStore(s.Path) + if err != nil { + return err + } + _, err = e2wallet.CreateWallet(name, e2wallet.WithType(s.Type), e2wallet.WithStore(store)) + if err != nil { + return err + } + return nil +} + +func (s *NDStore) GetPK(w string, a string) ([]byte, error) { + wallet, err := getWallet(s.Path, w) + if err != nil { + return nil, err + } + account, err := wallet.(types.WalletAccountByNameProvider).AccountByName(s.Ctx, a) + if err != nil { + return nil, err + } + + key, err := getAccountPK(account, s.Ctx, s.Passphrases) + if err != nil { + return nil, err + } + + return key, nil +} + +func (s *NDStore) SavePKToWallet(w string, a []byte, n string) error { + wallet, err := getWallet(s.Path, w) + if err != nil { + return err + } + err = wallet.(types.WalletLocker).Unlock(context.Background(), nil) + if err != nil { + return err + } + + defer func() { + err = wallet.(types.WalletLocker).Lock(context.Background()) + }() + + _, err = wallet.(types.WalletAccountImporter).ImportAccount(s.Ctx, + n, + a, + //Always Use The First Password In Array + s.Passphrases[0], + ) + if err != nil { + return err + } + + return nil +} + +func (s *NDStore) GetPath() string { + return s.Path +} + +func (s *NDStore) GetType() string { + return s.Type +} + +func newNDStore(t string) (NDStore, error) { + s := NDStore{} + //Parse Wallet Type + wt := viper.GetString(fmt.Sprintf("%s.wallet.type", t)) + utils.Log.Debug().Msgf("setting store type to %s", wt) + s.Type = wt + + //Parse Store Path + storePath := viper.GetString(fmt.Sprintf("%s.store.path", t)) + utils.Log.Debug().Msgf("setting store path to %s", storePath) + if storePath == "" { + return s, errors.New("nd store path is empty") + } + s.Path = storePath + + //Parse Passphrases + utils.Log.Debug().Msgf("getting passhphrases") + passphrases, err := getAccountsPasswords(viper.GetString(fmt.Sprintf("%s.wallet.passphrases.path", t))) + if err != nil { + return s, err + } + utils.Log.Debug().Msgf("checking passhphrases len: %d", len(passphrases)) + if len(passphrases) == 0 { + return s, errors.New("passhparases file for nd store is empty") + } + + // Cheking If Passphrases Index Is Set + if viper.IsSet(fmt.Sprintf("%s.wallet.passphrases.index", t)) { + index := viper.GetInt(fmt.Sprintf("%s.wallet.passphrases.index", t)) + passphrases = [][]byte{passphrases[index]} + } + + s.Passphrases = passphrases + + return s, nil +} diff --git a/store/stores.go b/store/stores.go new file mode 100644 index 0000000..1eeee6a --- /dev/null +++ b/store/stores.go @@ -0,0 +1,82 @@ +package store + +import ( + "context" + + "github.com/pkg/errors" +) + +type IStore interface { + // Get Wallets Names And Account Names + GetWalletsAccountsMap() (WalletAccountsMap, error) + // Get Private Key From Wallet Using Account Name + GetPK(a string, w string) ([]byte, error) + // Get Store Type + GetType() string + // Get Store Path + GetPath() string +} + +type OStore interface { + // Create Store + Create() error + // Create New Wallet + CreateWallet(name string) error + // Save Private Key To Wallet + SavePKToWallet(w string, a []byte, n string) error + // Get Store Type + GetType() string + // Get Store Path + GetPath() string +} + +func InputStoreInit(ctx context.Context, t string) (IStore, error) { + switch t { + case "distributed": + s, err := newDistributedStore("input") + if err != nil { + return nil, errors.Wrap(err, "failed to init distributed store as input store") + } + s.Ctx = ctx + return &s, nil + case "hierarchical deterministic": + s, err := newHDStore("input") + if err != nil { + return nil, errors.Wrap(err, "failed to init hierarchial deterministic store as input store") + } + s.Ctx = ctx + return &s, nil + case "non-deterministic": + s, err := newNDStore("input") + if err != nil { + return nil, errors.Wrap(err, "failed to init non-deterministic store as input store") + } + s.Ctx = ctx + return &s, nil + default: + return nil, errors.New("incorrect input wallet type") + } + +} + +func OutputStoreInit(ctx context.Context, t string) (OStore, error) { + switch t { + case "distributed": + s, err := newDistributedStore("output") + if err != nil { + return nil, errors.Wrap(err, "failed to init distributed store as output store") + } + s.Ctx = ctx + return &s, nil + case "non-deterministic": + s, err := newNDStore("output") + if err != nil { + return nil, errors.Wrap(err, "failed to init non-deterministic store as output store") + } + s.Ctx = ctx + return &s, nil + default: + return nil, errors.New("incorrect output wallet type") + } + +} diff --git a/utils/accounts.go b/utils/accounts.go deleted file mode 100644 index 139cd2b..0000000 --- a/utils/accounts.go +++ /dev/null @@ -1,155 +0,0 @@ -package utils - -import ( - "context" - - "github.com/pkg/errors" - - types "github.com/wealdtech/go-eth2-wallet-types/v2" -) - -const ( - signingString = "bkeCE2vRuTxxc5RpzrvLzoU5EgulV7uk3zMnt5MP9MgsXBaif9mUQcf7rZGC5mNj9lBqQ2s" -) - -func CreateNDAccount( - wallet NDWallet, - name string, - masterSK []byte, - passphrase []byte, -) (types.Account, error) { - - err := wallet.Unlock(context.Background(), nil) - if err != nil { - return nil, errors.Wrap(err, ErrorUnlockWrapper) - } - - defer func() { - err = wallet.Lock(context.Background()) - }() - - account, err := wallet.ImportAccount(context.Background(), - name, - masterSK, - passphrase, - ) - if err != nil { - return nil, errors.Wrap(err, ErrorImportWrapper) - } - - return account, nil -} - -func CreateDAccount( - wallet DWallet, - name string, - masterPKs [][]byte, - masterSK []byte, - threshold uint32, - peers map[uint64]string, - passphrase []byte, -) (types.Account, error) { - - err := wallet.Unlock(context.Background(), nil) - if err != nil { - return nil, errors.Wrap(err, ErrorUnlockWrapper) - } - - defer func() { - err = wallet.(types.WalletLocker).Lock(context.Background()) - }() - - account, err := wallet.ImportDistributedAccount(context.Background(), - name, - masterSK, - threshold, - masterPKs, - peers, - passphrase) - if err != nil { - return nil, errors.Wrap(err, ErrorImportWrapper) - } - - return account, nil -} - -func AccountSign(ctx context.Context, acc types.Account, passphrases [][]byte) ([]byte, error) { - account, err := unlockAccount(ctx, acc, passphrases) - if err != nil { - return nil, errors.Wrap(err, ErrorUnlockWrapper) - } - - accountSigner := account.(types.AccountSigner) - signedData, err := accountSigner.Sign(ctx, []byte(signingString)) - if err != nil { - return nil, errors.Wrap(err, ErrorAccountSign) - } - - if !signedData.Verify([]byte(signingString), acc.PublicKey()) { - return nil, errors.Wrap(err, ErrorSignVerify) - } - - return signedData.Marshal(), nil -} - -func GetAccountKey(ctx context.Context, account types.Account, passphrases [][]byte) ([]byte, error) { - privateKeyProvider, isPrivateKeyProvider := account.(types.AccountPrivateKeyProvider) - if !isPrivateKeyProvider { - err := ErrorNoPrivateKeyMsg - return nil, err - } - - _, err := unlockAccount(ctx, account, passphrases) - if err != nil { - return nil, err - } - - key, err := privateKeyProvider.PrivateKey(ctx) - if err != nil { - return nil, err - } - - return key.Marshal(), nil -} - -func GetAccountCompositePubkey(account types.Account) ([]byte, error) { - compositePublicKeyProvider, isCompositePublicKeyProvider := account.(types.AccountCompositePublicKeyProvider) - if !isCompositePublicKeyProvider { - err := ErrorNoPrivateKeyMsg - return nil, err - } - - pubKey := compositePublicKeyProvider.CompositePublicKey() - - return pubKey.Marshal(), nil -} - -func GetAccountPubkey(account types.Account) (data []byte, err error) { - data = account.PublicKey().Marshal() - return -} - -func unlockAccount(ctx context.Context, acc types.Account, passphrases [][]byte) (types.Account, error) { - account := acc - if locker, isLocker := account.(types.AccountLocker); isLocker { - unlocked, err := locker.IsUnlocked(ctx) - if err != nil { - return nil, err - } - if !unlocked { - for _, passphrase := range passphrases { - err = locker.Unlock(ctx, passphrase) - if err == nil { - unlocked = true - break - } - } - if !unlocked { - err = ErrorAccountIsNotUnlocked - return nil, err - } - } - } - - return account, nil -} diff --git a/utils/config.go b/utils/config.go deleted file mode 100644 index 0d514d8..0000000 --- a/utils/config.go +++ /dev/null @@ -1,115 +0,0 @@ -package utils - -import ( - "bytes" - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/spf13/viper" -) - -const ( - errorFailedToCreateWalletWrapper = "failed to create wallet" -) - -type Peers map[string]uint64 - -type W struct { - Type string - Path string - Passphrases [][]byte - - //Distributed Wallets fields - Peers Peers - Threshold uint32 -} - -var validWalletTypes = map[string]map[string]bool{ - "input": { - "distributed": true, - "hierarchical deterministic": true, - "non-deterministic": true, - }, - "output": { - "distributed": true, - "non-deterministic": true, - }, -} - -func (w W) ParseCfg(t string) (W, error) { - //Check For correct input - if t != "input" || t != "output" { - return w, errors.Wrap(nil, "incorrect") - } - - //Parse Wallet Type - wt := viper.GetString(fmt.Sprintf("%s.wallet.type", t)) - if !validWalletTypes[t][wt] { - return w, errors.New("timeout is required") - } - w.Type = wt - - //Parse Store Path - storePath := viper.GetString(fmt.Sprintf("%s.store.path", t)) - if storePath == "" { - return w, errors.New("timeout is required") - } - w.Path = storePath - - //Parse Passphrases - passphrases, err := getAccountsPasswords(viper.GetString(fmt.Sprintf("%s.wallet.passphrases.path", t))) - if err != nil { - return w, errors.New("timeout is required") - } - if len(passphrases) == 0 { - return w, errors.New("timeout is requried") - } - w.Passphrases = passphrases - - //Parse Distributed Wallet - switch wt { - case "distributed": - //Parse Peers - var peers Peers - viper.UnmarshalKey(fmt.Sprintf("%s.wallet.peers", t), peers) - if err != nil { - return w, errors.New("timeout is required") - } - //Peers list must be >= 2 - if len(peers) < 2 { - return w, errors.New("timeout is required") - } - w.Peers = peers - - //Parse Threshold - threshold := viper.GetUint32(fmt.Sprintf("%s.wallet.threshold", t)) - - //Check number of peers and threshold - if threshold <= uint32(len(peers)/2) { - return w, errors.New("timeout is required") - } - if threshold > uint32(len(peers)) { - return w, errors.New("timeout is required") - } - - w.Threshold = threshold - } - - return w, nil -} - -func getAccountsPasswords(path string) ([][]byte, error) { - - content, err := os.ReadFile(path) - if err != nil { - return nil, err - } - - accountsPasswords := bytes.Split(content, []byte{'\n'}) - if len(accountsPasswords) == 0 { - err := ErrorPassphrasesField - return nil, errors.Wrap(err, ErrorDWalletStructWrapper) - } - return accountsPasswords, nil -} diff --git a/utils/crypto/bls/helpers.go b/utils/crypto/bls/helpers.go deleted file mode 100644 index b8ea9dc..0000000 --- a/utils/crypto/bls/helpers.go +++ /dev/null @@ -1,35 +0,0 @@ -package bls - -import ( - "bytes" - "encoding/binary" - - "github.com/herumi/bls-eth-go-binary/bls" - "github.com/p2p-org/dkc/utils" -) - -func newBlsID(id uint64) (*bls.ID, error) { - var res bls.ID - buf := [8]byte{} - binary.LittleEndian.PutUint64(buf[:], id) - err := res.SetLittleEndian(buf[:]) - if err != nil { - return nil, err - } - return &res, nil -} - -func CompositeKeysCompare(compositeKey []byte, pubkey []byte) error { - if !bytes.Equal(compositeKey, pubkey) { - return utils.ErrorPubKeyMatch - } - - return nil -} - -func SignatureCompare(outputSignature []byte, inputSignature []byte) error { - if !bytes.Equal(outputSignature, inputSignature) { - return utils.ErrorSignatureMatch - } - return nil -} diff --git a/utils/errors.go b/utils/errors.go deleted file mode 100644 index 9bc7a03..0000000 --- a/utils/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -package utils - -import "github.com/pkg/errors" - -var ( - ErrorPubKeyMatch = errors.New("pubkeys don't match") - ErrorSignatureMatch = errors.New("signature doesn't match") - ErrorNoPrivateKeyMsg = errors.New("account does not provide it's private key") - ErrorAccountIsNotUnlocked = errors.New("account is not unlocked") - ErrorPassphrasesField = errors.New("passphrases field is empty") - ErrorPathField = errors.New("path field is empty") - ErrorPeersField = errors.New("peers field is empty") - ErrorThresholdField = errors.New("threshold field is empty") - ErrorPassphraseEmpty = errors.New("passphrase is empty") - ErrorNotEnoughPeers = errors.New("current peer value is not enough for threshold value") - ErrorSameDirs = errors.New("same dir for d-wallets and nd-wallets") -) - -const ( - ErrorNDWalletStructWrapper = "failed to validate NDWalletStruct" - ErrorDWalletStructWrapper = "failed to validate DWalletStruct" - ErrorFailedToCreateWalletWrapper = "failed to create wallet" - ErrorWalletDirWrapper = "failed to get wallet dir" - ErrorLoadStoreWrapper = "can't load store" - ErrorUseStoreWrapper = "failed to use store" - ErrorUnlockWrapper = "failed to unlock account" - ErrorImportWrapper = "failed to import account" - ErrorAccountSign = "failed to sign message" - ErrorSignVerify = "failed to verify signature" -) diff --git a/utils/logging.go b/utils/logging.go index b03d7f6..878ffd9 100644 --- a/utils/logging.go +++ b/utils/logging.go @@ -11,14 +11,9 @@ import ( var Log zerolog.Logger -var LogSplit zerolog.Logger -var LogCombine zerolog.Logger - -func InitLogging() { +func InitLogging(cmd string) { Log = zerologger.With().Logger().Level(logLevel(viper.GetString("log-level"))).Output(zerolog.ConsoleWriter{Out: os.Stderr}) - LogSplit = Log.With().Str("cmd", "split").Logger() - LogCombine = Log.With().Str("cmd", "combine").Logger() - + Log = Log.With().Str("cmd", cmd).Logger() } func logLevel(input string) zerolog.Level { diff --git a/utils/stores/distributed.go b/utils/stores/distributed.go deleted file mode 100644 index 8ff6535..0000000 --- a/utils/stores/distributed.go +++ /dev/null @@ -1,58 +0,0 @@ -package utils - -import ( - "context" - - "github.com/pkg/errors" - e2wallet "github.com/wealdtech/go-eth2-wallet" - types "github.com/wealdtech/go-eth2-wallet-types/v2" - "golang.org/x/exp/maps" -) - -type DistributedStore struct { - Type string - Store types.Store - Wallets map[string][]types.Wallet -} - -func (s DistributedStore) GetWallets() []string { - //Get Only First Peer, we assume that all peers have the same number of wallets and wallets have the same accounts - var wallets []string - peers := maps.Keys(s.Wallets) - for _, w := range s.Wallets[peers[0]] { - wallets = append(wallets, w.Name()) - } - return wallets -} - -func (s DistributedStore) Create(path string) error { - store, err := createStore(path) - if err != nil { - return err - } - s.Store = store - return nil -} - -func (s DistributedStore) Load(ctx context.Context, location string, passphrases [][]byte, peers Peers) error { - for peer := range peers { - w, err := loadStore(ctx, location+"/"+peer, passphrases) - if err != nil { - return err - } - s.Wallets[peer] = w - } - return nil -} - -func (s DistributedStore) CreateWallet(name string) (types.Wallet, error) { - err := e2wallet.UseStore(s.Store) - if err != nil { - return nil, err - } - wallet, err := e2wallet.CreateWallet(name, e2wallet.WithType(s.Type)) - if err != nil { - return nil, errors.Wrap(err, "test") - } - return wallet, nil -} diff --git a/utils/stores/hd.go b/utils/stores/hd.go deleted file mode 100644 index d99a408..0000000 --- a/utils/stores/hd.go +++ /dev/null @@ -1,55 +0,0 @@ -package utils - -import ( - "context" - - "github.com/pkg/errors" - e2wallet "github.com/wealdtech/go-eth2-wallet" - types "github.com/wealdtech/go-eth2-wallet-types/v2" -) - -type HDStore struct { - Type string - Store types.Store - Wallets []types.Wallet -} - -func (s HDStore) GetWallets() []string { - var wallets []string - for _, w := range s.Wallets { - wallets = append(wallets, w.Name()) - } - return wallets -} - -func (s HDStore) Create(path string) error { - store, err := createStore(path) - if err != nil { - return err - } - s.Store = store - return nil -} - -func (s HDStore) Load(ctx context.Context, location string, passphrases [][]byte, peers Peers) error { - wallets, err := loadStore(ctx, location, passphrases) - if err != nil { - return err - } - - s.Wallets = wallets - - return nil -} - -func (s HDStore) CreateWallet(name string) (types.Wallet, error) { - err := e2wallet.UseStore(s.Store) - if err != nil { - return nil, err - } - wallet, err := e2wallet.CreateWallet(name, e2wallet.WithType(s.Type)) - if err != nil { - return nil, errors.Wrap(err, "test") - } - return wallet, nil -} diff --git a/utils/stores/nd.go b/utils/stores/nd.go deleted file mode 100644 index 3391aa1..0000000 --- a/utils/stores/nd.go +++ /dev/null @@ -1,55 +0,0 @@ -package utils - -import ( - "context" - - "github.com/pkg/errors" - e2wallet "github.com/wealdtech/go-eth2-wallet" - types "github.com/wealdtech/go-eth2-wallet-types/v2" -) - -type NDStore struct { - Type string - Store types.Store - Wallets []types.Wallet -} - -func (s NDStore) GetWallets() []string { - var wallets []string - for _, w := range s.Wallets { - wallets = append(wallets, w.Name()) - } - return wallets -} - -func (s NDStore) Create(path string) error { - store, err := createStore(path) - if err != nil { - return err - } - - s.Store = store - return nil -} - -func (s NDStore) Load(ctx context.Context, location string, passphrases [][]byte, peers Peers) error { - wallets, err := loadStore(ctx, location, passphrases) - if err != nil { - return err - } - - s.Wallets = wallets - return nil -} - -func (s NDStore) CreateWallet(name string) (types.Wallet, error) { - err := e2wallet.UseStore(s.Store) - if err != nil { - return nil, err - } - wallet, err := e2wallet.CreateWallet(name, e2wallet.WithType(s.Type)) - if err != nil { - return nil, errors.Wrap(err, "test") - } - return wallet, nil -} diff --git a/utils/stores/stores.go b/utils/stores/stores.go deleted file mode 100644 index 59fe191..0000000 --- a/utils/stores/stores.go +++ /dev/null @@ -1,70 +0,0 @@ -package utils - -import ( - "context" - - "github.com/pkg/errors" - e2wallet "github.com/wealdtech/go-eth2-wallet" - filesystem "github.com/wealdtech/go-eth2-wallet-store-filesystem" - types "github.com/wealdtech/go-eth2-wallet-types/v2" -) - -type Peers = map[string]uint64 - -type IStore interface { - Load(ctx context.Context, location string, passphrases [][]byte, peers Peers) error - GetWallets() []string -} - -type OStore interface { - Create(path string) error - CreateWallet(name string) (types.Wallet, error) -} - -func InputStoreInit(t string) (IStore, error) { - switch t { - case "distributed": - return DistributedStore{Type: "distributed"}, nil - case "hierarchical deterministic": - return HDStore{Type: "hierarchical deterministic"}, nil - case "non-deterministic": - return NDStore{Type: "non-deterministic"}, nil - default: - return nil, errors.Wrap(nil, "filed") - } - -} - -func OutputStoreInit(t string) (OStore, error) { - switch t { - case "distributed": - return DistributedStore{Type: "distributed"}, nil - case "hierarchical deterministic": - return HDStore{Type: "hierarchical deterministic"}, nil - case "non-deterministic": - return NDStore{Type: "non-deterministic"}, nil - default: - return nil, errors.Wrap(nil, "filed") - } - -} - -func createStore(path string) (types.Store, error) { - store := filesystem.New(filesystem.WithLocation(path)) - return store, nil -} - -func loadStore(ctx context.Context, location string, passphrases [][]byte) ([]types.Wallet, error) { - var wallets []types.Wallet - store := filesystem.New(filesystem.WithLocation(location)) - if err := e2wallet.UseStore(store); err != nil { - return nil, errors.Wrap(err, "test") - } - for wallet := range e2wallet.Wallets() { - wallets = append(wallets, wallet) - } - if len(wallets) == 0 { - return nil, errors.Wrap(nil, "test") - } - return wallets, nil -}