diff --git a/package-lock.json b/package-lock.json index 724a55f..4f0144e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jackallabs/jackal.js", - "version": "3.1.1", + "version": "3.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jackallabs/jackal.js", - "version": "3.1.1", + "version": "3.2.0", "license": "MIT", "dependencies": { "@cosmjs/proto-signing": "^0.31.3", @@ -441,9 +441,9 @@ "integrity": "sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], @@ -456,9 +456,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], @@ -471,9 +471,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], @@ -486,9 +486,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], @@ -501,9 +501,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], @@ -516,9 +516,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], @@ -531,9 +531,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], @@ -561,9 +561,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], @@ -576,9 +576,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], @@ -591,9 +591,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], @@ -606,9 +606,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], @@ -621,9 +621,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], @@ -636,9 +636,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], @@ -651,9 +651,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], @@ -666,9 +666,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], @@ -681,9 +681,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], @@ -696,9 +696,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], @@ -711,9 +711,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], @@ -726,9 +726,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], @@ -741,9 +741,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], @@ -756,9 +756,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], @@ -771,9 +771,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -1546,9 +1546,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", - "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.2.tgz", + "integrity": "sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==", "cpu": [ "arm" ], @@ -1558,9 +1558,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz", - "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.2.tgz", + "integrity": "sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ==", "cpu": [ "arm64" ], @@ -1570,9 +1570,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz", - "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.2.tgz", + "integrity": "sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg==", "cpu": [ "arm64" ], @@ -1582,9 +1582,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz", - "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.2.tgz", + "integrity": "sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q==", "cpu": [ "x64" ], @@ -1594,9 +1594,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz", - "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.2.tgz", + "integrity": "sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg==", "cpu": [ "arm" ], @@ -1606,9 +1606,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz", - "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.2.tgz", + "integrity": "sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ==", "cpu": [ "arm" ], @@ -1618,9 +1618,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz", - "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.2.tgz", + "integrity": "sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A==", "cpu": [ "arm64" ], @@ -1630,9 +1630,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz", - "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.2.tgz", + "integrity": "sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA==", "cpu": [ "arm64" ], @@ -1642,9 +1642,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz", - "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.2.tgz", + "integrity": "sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg==", "cpu": [ "ppc64" ], @@ -1654,9 +1654,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz", - "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.2.tgz", + "integrity": "sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg==", "cpu": [ "riscv64" ], @@ -1666,9 +1666,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz", - "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.2.tgz", + "integrity": "sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA==", "cpu": [ "s390x" ], @@ -1678,9 +1678,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", - "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.2.tgz", + "integrity": "sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ==", "cpu": [ "x64" ], @@ -1690,9 +1690,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", - "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.2.tgz", + "integrity": "sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g==", "cpu": [ "x64" ], @@ -1702,9 +1702,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz", - "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.2.tgz", + "integrity": "sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA==", "cpu": [ "arm64" ], @@ -1714,9 +1714,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz", - "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.2.tgz", + "integrity": "sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw==", "cpu": [ "ia32" ], @@ -1726,9 +1726,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz", - "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.2.tgz", + "integrity": "sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA==", "cpu": [ "x64" ], @@ -3246,9 +3246,9 @@ } }, "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -3257,29 +3257,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escape-string-regexp": { @@ -4872,9 +4872,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -4918,9 +4918,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -4937,8 +4937,8 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -5249,9 +5249,9 @@ } }, "node_modules/rollup": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", - "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.2.tgz", + "integrity": "sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg==", "dependencies": { "@types/estree": "1.0.5" }, @@ -5263,22 +5263,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.17.2", - "@rollup/rollup-android-arm64": "4.17.2", - "@rollup/rollup-darwin-arm64": "4.17.2", - "@rollup/rollup-darwin-x64": "4.17.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", - "@rollup/rollup-linux-arm-musleabihf": "4.17.2", - "@rollup/rollup-linux-arm64-gnu": "4.17.2", - "@rollup/rollup-linux-arm64-musl": "4.17.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", - "@rollup/rollup-linux-riscv64-gnu": "4.17.2", - "@rollup/rollup-linux-s390x-gnu": "4.17.2", - "@rollup/rollup-linux-x64-gnu": "4.17.2", - "@rollup/rollup-linux-x64-musl": "4.17.2", - "@rollup/rollup-win32-arm64-msvc": "4.17.2", - "@rollup/rollup-win32-ia32-msvc": "4.17.2", - "@rollup/rollup-win32-x64-msvc": "4.17.2", + "@rollup/rollup-android-arm-eabi": "4.22.2", + "@rollup/rollup-android-arm64": "4.22.2", + "@rollup/rollup-darwin-arm64": "4.22.2", + "@rollup/rollup-darwin-x64": "4.22.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.2", + "@rollup/rollup-linux-arm-musleabihf": "4.22.2", + "@rollup/rollup-linux-arm64-gnu": "4.22.2", + "@rollup/rollup-linux-arm64-musl": "4.22.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.2", + "@rollup/rollup-linux-riscv64-gnu": "4.22.2", + "@rollup/rollup-linux-s390x-gnu": "4.22.2", + "@rollup/rollup-linux-x64-gnu": "4.22.2", + "@rollup/rollup-linux-x64-musl": "4.22.2", + "@rollup/rollup-win32-arm64-msvc": "4.22.2", + "@rollup/rollup-win32-ia32-msvc": "4.22.2", + "@rollup/rollup-win32-x64-msvc": "4.22.2", "fsevents": "~2.3.2" } }, @@ -5453,9 +5453,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "engines": { "node": ">=0.10.0" } @@ -6011,13 +6011,13 @@ } }, "node_modules/vite": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", - "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", + "version": "5.4.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", + "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", "dependencies": { - "esbuild": "^0.20.1", - "postcss": "^8.4.38", - "rollup": "^4.13.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -6036,6 +6036,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -6053,6 +6054,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, diff --git a/package.json b/package.json index 6ea6f34..b18c536 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jackallabs/jackal.js", - "version": "3.1.1", + "version": "3.2.0", "description": "Javascript library for interacting with the Jackal Chain", "keywords": [ "jackal", diff --git a/src/classes/encodingHandler.ts b/src/classes/encodingHandler.ts index 49549df..c1a5d6f 100644 --- a/src/classes/encodingHandler.ts +++ b/src/classes/encodingHandler.ts @@ -355,7 +355,7 @@ export class EncodingHandler { try { const mH = pkg.meta as IFolderMetaHandler const meta = mH.export() - console.log('saving:', meta.whoAmI) + // console.log('saving:', meta.whoAmI) const lookup: IRootLookupMetaData = { metaDataType: 'rootlookup', @@ -381,7 +381,7 @@ export class EncodingHandler { try { const mH = pkg.meta as IFolderMetaHandler const meta = mH.export() - console.log('saving:', meta.whoAmI) + // console.log('saving:', meta.whoAmI) const parentAndChild = await merkleParentAndChild(`s/ulid/${mH.getUlid()}`) return await this.storageEncodeFileTree(parentAndChild, meta, { aes: pkg.aes }) diff --git a/src/classes/filetreeReader.ts b/src/classes/filetreeReader.ts index 282ef9d..02d9cea 100644 --- a/src/classes/filetreeReader.ts +++ b/src/classes/filetreeReader.ts @@ -96,18 +96,21 @@ export class FiletreeReader implements IFiletreeReader { * @returns {IChildMetaDataMap} - Contents structure. */ async readFolderContents (path: string, options: IReadFolderContentOptions = {}): Promise { + // console.log(path) const { owner = this.clientAddress, refresh = false, } = options + // console.log(options) + // console.log(this.bluepages[owner]) + // console.log(this.yellowpages[owner]) + try { - if (this.bluepages[owner][path]) { - if (refresh) { - await this.pathToLookupPostProcess(path, owner, this.yellowpages[owner][path]) - } + if (this.bluepages[owner][path] && !refresh) { return this.bluepages[owner][path] } else { - throw new Error('No Resource Found') + await this.pathToLookupPostProcess(path, owner, this.yellowpages[owner][path]) + return this.bluepages[owner][path] } } catch (err) { throw warnError('filetreeReader readFolderContents()', err) @@ -150,7 +153,9 @@ export class FiletreeReader implements IFiletreeReader { async loadFolderMetaHandler (path: string): Promise { try { const lookup = await this.pathToLookup(path) + // console.log("lookup:", lookup) const { file } = await this.jackalSigner.queries.fileTree.file(lookup) + // console.log("File: ", file) const { contents } = file const access = await this.extractEditAccess(file) if (access) { @@ -657,7 +662,7 @@ export class FiletreeReader implements IFiletreeReader { if (this.yellowpages[ownerAddress][path]) { return this.yellowpages[ownerAddress][path] } else { - console.log(path) + // console.log(path) const hexRootAddress = await merklePath(`s/ulid/${path}`) const rootLookup = { address: hexRootAddress, @@ -671,7 +676,7 @@ export class FiletreeReader implements IFiletreeReader { const lookup = (await this.decryptAndParseContents( file, )) as IRootLookupMetaData - console.log(lookup) + // console.log(lookup) if (!(ownerAddress in this.redpages)) { this.redpages[ownerAddress] = {} } diff --git a/src/classes/metaHandlers.ts b/src/classes/metaHandlers.ts index 52610b9..4f4db75 100644 --- a/src/classes/metaHandlers.ts +++ b/src/classes/metaHandlers.ts @@ -3,7 +3,6 @@ import { ulid } from 'ulid' import { chunkSize } from '@/utils/globalDefaults' import { intToHex, - maybeMakeThumbnail, uintArrayToString, } from '@/utils/converters' import { bufferToHex } from '@/utils/hash' @@ -286,7 +285,6 @@ export class FileMetaHandler implements IFileMetaHandler { rdy.merkleRoot = new Uint8Array(tree.getRoot()) rdy.merkleHex = tree.getRootAsHex() rdy.merkleMem = uintArrayToString(rdy.merkleRoot) - rdy.thumbnail = await maybeMakeThumbnail(source.file) } return new FileMetaHandler(rdy) diff --git a/src/classes/storageHandler.ts b/src/classes/storageHandler.ts index bd5987a..d665567 100644 --- a/src/classes/storageHandler.ts +++ b/src/classes/storageHandler.ts @@ -6,7 +6,7 @@ import type { TJackalSigningClient, } from '@jackallabs/jackal.js-protos' import { PrivateKey } from 'eciesjs' -import { extractFileMetaData } from '@/utils/converters' +import { extractFileMetaData, maybeMakeThumbnail } from '@/utils/converters' import { isItPastDate, shuffleArray, signerNotEnabled, tidyString, warnError } from '@/utils/misc' import { FileMetaHandler, FolderMetaHandler, NullMetaHandler } from '@/classes/metaHandlers' import { encryptionChunkSize, signatureSeed } from '@/utils/globalDefaults' @@ -36,6 +36,7 @@ import { IProviderIpSet, IProviderPool, IProviderUploadResponse, + IReadFolderContentOptions, IRegisterPubKeyOptions, IRnsHandler, IShareOptions, @@ -256,22 +257,43 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { /** * - * @param {string} [path] + * @param {IReadFolderContentOptions} [options] * @returns {Promise} */ - async loadDirectory (path?: string): Promise { + async loadDirectory (options: IReadFolderContentOptions = {}): Promise { if (await this.checkLocked({ noConvert: true, signer: true })) { throw new Error('Locked.') } + const { + owner, + path, + refresh = true, + } = options + // console.log('path:', path) try { this.path = path || this.path this.meta = await this.reader.loadFolderMetaHandler(this.path) - this.children = await this.reader.readFolderContents(this.path, { refresh: true }) + this.children = await this.reader.readFolderContents(this.path, { owner, refresh }) } catch (err) { throw warnError('storageHandler loadDirectory()', err) } } + /** + * + * @param {string} path + * @param {IReadFolderContentOptions} [options] + * @returns {Promise} + */ + async readDirectoryContents (path: string, options?: IReadFolderContentOptions): Promise { + if (await this.checkLocked({ noConvert: true, signer: true })) { + throw new Error('Locked.') + } + // console.log('path:', path) + + return this.reader.readFolderContents(path, options) + } + /** * * @returns {Promise} @@ -347,7 +369,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { async getAvailableProviders (): Promise { try { const data = await this.jackalClient.getQueries().storage.activeProviders() - console.log(data) + // console.log(data) const final: string[] = [] for (let value of data.providers) { final.push(value.address) @@ -368,14 +390,14 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { try { const ips: Record = {} for (let address of providers) { - console.log(address) + // console.log(address) const details = await this.jackalClient .getQueries() .storage.provider({ address }) - console.log(details) + // console.log(details) ips[details.provider.address] = details.provider.ip } - console.log(ips) + // console.log(ips) return ips } catch (err) { throw warnError('storageHandler findProviderIps()', err) @@ -390,11 +412,11 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { async loadProviderPool (providers?: IProviderIpSet): Promise { try { providers = providers || (await this.loadProvidersFromChain()) - console.log(providers) + // console.log(providers) for (let ip of Object.values(providers)) { - console.log(ip) + // console.log(ip) const root = ip.split('.').slice(-2).join('.') - console.log(root) + // console.log(root) if (!(root in this.providers)) { this.providers[root] = [] } @@ -403,7 +425,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { ip, failures: 0, }) - console.log(this.providers) + // console.log(this.providers) } } catch (err) { throw warnError('storageHandler loadProviderPool()', err) @@ -621,7 +643,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { } foundMatch = false } - console.log(bundle.folderMeta) + // console.log(bundle.folderMeta) const folderMsgs = await this.existingFolderToMsgs({ meta: bundle.folderMeta, }) @@ -919,6 +941,9 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { } baseFile = new File(parts, name, meta) } + if (baseFile.size == 0) { + throw new Error('File is empty') + } return baseFile } } catch (err) { @@ -1107,7 +1132,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { protected async loadProvidersFromChain (): Promise { try { const providers = await this.getAvailableProviders() - console.log(providers) + // console.log(providers) return await this.findProviderIps(providers) } catch (err) { throw warnError('storageHandler loadProvidersFromChain()', err) @@ -1198,7 +1223,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { fileFormData.set('sender', this.jklAddress) fileFormData.set('start', startBlock.toString()) - console.log('startBlock:', startBlock.toString()) + // console.log('startBlock:', startBlock.toString()) return await fetch(url, { method: 'POST', body: fileFormData }).then( async (resp): Promise => { if (typeof resp === 'undefined' || resp === null) { @@ -1365,13 +1390,17 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { merkle: ft.merkleRoot, }) const [details] = files - const deletePkg = { - creator: this.jklAddress, - merkle: details.merkle, - start: details.start, + try { + const deletePkg = { + creator: this.jklAddress, + merkle: details.merkle, + start: details.start, + } + const wrapped = this.fileDeleteToMsgs(deletePkg) + msgs.push(...wrapped) + } catch (err) { + console.warn('looks like we\'re deleting a dead file...', err) } - const wrapped = this.fileDeleteToMsgs(deletePkg) - msgs.push(...wrapped) } else if (ft.metaDataType === 'folder') { const data = await this.reader.readFolderContents(target) for (let file of Object.values(data.files)) { @@ -1472,13 +1501,16 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { const finalName = await hashAndHex(fileMeta.name + Date.now().toString()) const file = new File(encryptedArray, finalName, { type: 'text/plain' }) + const thumbnail = await maybeMakeThumbnail(toProcess) + const ulid = this.readCurrentUlid() - console.log(ulid) + // console.log(ulid) const baseMeta = await FileMetaHandler.create({ description: '', file, fileMeta, location: this.readCurrentUlid(), + thumbnail, }) return { file, meta: baseMeta, duration, aes } } catch (err) { @@ -1528,7 +1560,7 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler { } if (checkSet.needsProviders) { const k = Object.keys(this.providers) - console.log(k) + // console.log(k) const providerCount = k.length if (providerCount === 0) { throw true diff --git a/src/interfaces/classes/IStorageHandler.ts b/src/interfaces/classes/IStorageHandler.ts index bb23f2d..75b7c96 100644 --- a/src/interfaces/classes/IStorageHandler.ts +++ b/src/interfaces/classes/IStorageHandler.ts @@ -1,5 +1,7 @@ import { + IBroadcastOptions, IBuyStorageOptions, + IChildMetaDataMap, ICreateFolderOptions, IDeleteTargetOptions, IDownloadTracker, @@ -8,11 +10,12 @@ import { IFolderMetaData, IInitStorageOptions, IProviderIpSet, + IReadFolderContentOptions, IRegisterPubKeyOptions, IShareOptions, IStagedUploadPackage, IStorageStatus, - IWrappedEncodeObject + IWrappedEncodeObject, } from '@/interfaces' import type { TSharedRootMetaDataMap } from '@/types' @@ -21,7 +24,9 @@ export interface IStorageHandler { registerPubKey (options?: IRegisterPubKeyOptions): Promise - loadDirectory (path?: string): Promise + loadDirectory (options?: IReadFolderContentOptions): Promise + + readDirectoryContents (path: string, options?: IReadFolderContentOptions): Promise loadShared (): Promise @@ -71,7 +76,7 @@ export interface IStorageHandler { queuePublic (toQueue: File | File[], duration?: number): Promise - processAllQueues (): Promise + processAllQueues (options?: IBroadcastOptions): Promise getFileParticulars (filePath: string): Promise @@ -80,7 +85,7 @@ export interface IStorageHandler { downloadExternalFile ( userAddress: string, filePath: string, - trackers: IDownloadTracker + trackers: IDownloadTracker, ): Promise deleteTargets (options: IDeleteTargetOptions): Promise diff --git a/src/interfaces/options/IReadFolderContentOptions.ts b/src/interfaces/options/IReadFolderContentOptions.ts index e6ba6fd..d65c50c 100644 --- a/src/interfaces/options/IReadFolderContentOptions.ts +++ b/src/interfaces/options/IReadFolderContentOptions.ts @@ -1,4 +1,5 @@ export interface IReadFolderContentOptions { owner?: string + path?: string refresh?: true } diff --git a/src/utils/converters.ts b/src/utils/converters.ts index 917b9c8..5679dd2 100644 --- a/src/utils/converters.ts +++ b/src/utils/converters.ts @@ -222,14 +222,122 @@ export function blockToDateFixed(options: IBlockTimeOptions): Date { * @private */ export async function maybeMakeThumbnail(source: File): Promise { - const convertableImages: string[] = ['png'] - if (source.type in convertableImages) { - return '' + + console.log("Making thumbnail for type....", source.name, source.type) + if ( + source.type.startsWith("image") + ) { + console.log("it is an image!") + return await convertToWebP(source) + } else if ( + source.type.startsWith("video") + ) { + console.log("it is a video!") + return await extractThumbnailFromVideo(source) } else { + console.log("it is not convertable :(") return '' } } +function extractThumbnailFromVideo(file: File): Promise { + return new Promise((resolve, reject) => { + const video = document.createElement("video"); + + video.src = URL.createObjectURL(file); + video.muted = true; // Mute the video to prevent sound playing + video.playsInline = true; + + video.onloadedmetadata = () => { + const duration = video.duration; + const randomTime = Math.random() * duration; // Select a random time point in the video + video.currentTime = randomTime; // Seek to the random time + + video.onseeked = () => { + // Set the maximum dimension to 256 + const maxSize = 256; + let { videoWidth: width, videoHeight: height } = video; + + // Maintain aspect ratio when resizing + if (width > height) { + if (width > maxSize) { + height *= maxSize / width; + width = maxSize; + } + } else { + if (height > maxSize) { + width *= maxSize / height; + height = maxSize; + } + } + + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + + // Set canvas dimensions to the resized dimensions + canvas.width = width; + canvas.height = height; + + // Draw the current video frame onto the resized canvas + ctx?.drawImage(video, 0, 0, width, height); + + // Convert the canvas to a WebP image + const base64String = canvas.toDataURL("image/webp", 0.25); // 25% compression + resolve(base64String); + }; + }; + + video.onerror = reject; + }); +}; +function convertToWebP (file: File): Promise { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = (event) => { + const img = new Image(); + img.src = event.target?.result as string; + + img.onload = () => { + const maxSize = 256; + let { width, height } = img; + + // Calculate new dimensions while maintaining aspect ratio + if (width > height) { + if (width > maxSize) { + height *= maxSize / width; + width = maxSize; + } + } else { + if (height > maxSize) { + width *= maxSize / height; + height = maxSize; + } + } + + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + + if (!ctx) return reject("Canvas context is unavailable"); + + // Set canvas dimensions to the resized dimensions + canvas.width = width; + canvas.height = height; + + // Draw resized image onto the canvas + ctx.drawImage(img, 0, 0, width, height); + + // Convert canvas to WebP format and get Base64 string + canvas.toDataURL("image/webp", 0.25); // 25% compression + const base64String = canvas.toDataURL("image/webp", 0.25); + // console.log(base64String) + resolve(base64String); + }; + }; + + reader.onerror = reject; + reader.readAsDataURL(file); + }); +}; /** * Safely stringify FileTree contents for saving to chain. * @param {TMetaDataSets} source - Meta data handler export to save. diff --git a/src/utils/gas.ts b/src/utils/gas.ts index bf5733e..352f7d0 100644 --- a/src/utils/gas.ts +++ b/src/utils/gas.ts @@ -5,7 +5,7 @@ const gasBaselineRate = 56 const gasFallbackTxCost = 142 const gasMap: Record = { /** Filetree */ - '/canine_chain.filetree.MsgPostFile': 110, + '/canine_chain.filetree.MsgPostFile': 210, '/canine_chain.filetree.MsgPostKey': 12, '/canine_chain.filetree.MsgDeleteFile': 9, /** Notifications */