diff --git a/deno.jsonc b/deno.jsonc index 865be3a..d680ae3 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -8,7 +8,11 @@ "@std/expect": "jsr:@std/expect", "@cache": "./cache.js" }, - "workspace": ["./packages/client", "./packages/contracts"], + "workspace": [ + "./packages/client", + "./packages/contracts", + "./packages/server" + ], "nodeModulesDir": "auto", "compilerOptions": { "strict": true, diff --git a/deno.lock b/deno.lock index 209c793..5ec7e65 100644 --- a/deno.lock +++ b/deno.lock @@ -1,12 +1,23 @@ { "version": "4", "specifiers": { + "jsr:@oak/commons@1": "1.0.0", + "jsr:@oak/oak@^17.1.4": "17.1.4", + "jsr:@std/assert@1": "1.0.7", "jsr:@std/assert@^1.0.7": "1.0.7", + "jsr:@std/bytes@1": "1.0.2", "jsr:@std/cli@*": "1.0.6", + "jsr:@std/crypto@1": "1.0.3", + "jsr:@std/encoding@1": "1.0.5", + "jsr:@std/encoding@^1.0.5": "1.0.5", "jsr:@std/expect@*": "1.0.7", + "jsr:@std/http@1": "1.0.12", "jsr:@std/internal@^1.0.5": "1.0.5", + "jsr:@std/media-types@1": "1.1.0", "jsr:@std/path@*": "1.0.8", + "jsr:@std/path@1": "1.0.8", "npm:@babel/plugin-transform-react-jsx-development@*": "7.25.9_@babel+core@7.26.0", + "npm:@lifi/sdk@^3.5.1": "3.5.1_@solana+wallet-adapter-base@0.9.23__@solana+web3.js@1.98.0_@solana+web3.js@1.98.0_viem@2.21.49__ws@8.18.0___bufferutil@4.0.8___utf-8-validate@5.0.10_bs58@6.0.0", "npm:@openzeppelin/contracts@^5.1.0": "5.1.0", "npm:@preact/compat@*": "18.3.1_preact@10.25.0", "npm:@preact/preset-vite@*": "2.9.1_@babel+core@7.26.0_vite@5.4.11__@types+node@22.5.4_preact@10.25.0_@types+node@22.5.4", @@ -14,14 +25,18 @@ "npm:@privy-io/react-auth@^1.92.6": "1.94.3_react@18.3.1_react-dom@18.3.1__react@18.3.1_viem@2.21.49__ws@8.18.0___bufferutil@4.0.8___utf-8-validate@5.0.10_@solana+wallet-adapter-base@0.9.23__@solana+web3.js@1.95.5___encoding@0.1.13__encoding@0.1.13_encoding@0.1.13", "npm:@radix-ui/react-form@0.1": "0.1.0_react@18.3.1_react-dom@18.3.1__react@18.3.1", "npm:@types/node@*": "22.5.4", + "npm:autoprefixer@^10.4.20": "10.4.20_postcss@8.4.49", "npm:babel-plugin-transform-hook-names@*": "1.0.2_@babel+core@7.26.0", "npm:hardhat@*": "2.22.15", "npm:lucide-preact@*": "0.460.0_preact@10.25.0", + "npm:path-to-regexp@^6.3.0": "6.3.0", + "npm:postcss@^8.4.49": "8.4.49", "npm:preact-iso@^2.8.1": "2.8.1_preact@10.25.0_preact-render-to-string@6.5.11__preact@10.25.0", "npm:preact@^10.24.3": "10.25.0", "npm:solc@*": "0.8.26", "npm:tailwind-merge@^2.5.4": "2.5.4", "npm:tailwindcss-motion@~0.4.1-beta": "0.4.1-beta_tailwindcss@3.4.15__postcss@8.4.49", + "npm:tailwindcss@^3.4.17": "3.4.17_postcss@8.4.49", "npm:viem@^2.21.40": "2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10", "npm:viem@^2.21.49": "2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10", "npm:vite-plugin-pwa@*": "0.21.0_vite@5.4.11__@types+node@22.5.4_workbox-build@7.3.0__ajv@8.17.1__@babel+core@7.26.0__rollup@2.79.2_workbox-window@7.3.0_@types+node@22.5.4", @@ -29,25 +44,66 @@ "npm:vite@^5.4.10": "5.4.11_@types+node@22.5.4" }, "jsr": { + "@oak/commons@1.0.0": { + "integrity": "49805b55603c3627a9d6235c0655aa2b6222d3036b3a13ff0380c16368f607ac", + "dependencies": [ + "jsr:@std/assert@1", + "jsr:@std/bytes", + "jsr:@std/crypto", + "jsr:@std/encoding@1", + "jsr:@std/http", + "jsr:@std/media-types" + ] + }, + "@oak/oak@17.1.4": { + "integrity": "60530b582bf276ff741e39cc664026781aa08dd5f2bc5134d756cc427bf2c13e", + "dependencies": [ + "jsr:@oak/commons", + "jsr:@std/assert@1", + "jsr:@std/bytes", + "jsr:@std/http", + "jsr:@std/media-types", + "jsr:@std/path@1", + "npm:path-to-regexp" + ] + }, "@std/assert@1.0.7": { "integrity": "64ce9fac879e0b9f3042a89b3c3f8ccfc9c984391af19e2087513a79d73e28c3", "dependencies": [ "jsr:@std/internal" ] }, + "@std/bytes@1.0.2": { + "integrity": "fbdee322bbd8c599a6af186a1603b3355e59a5fb1baa139f8f4c3c9a1b3e3d57" + }, "@std/cli@1.0.6": { "integrity": "d22d8b38c66c666d7ad1f2a66c5b122da1704f985d3c47f01129f05abb6c5d3d" }, + "@std/crypto@1.0.3": { + "integrity": "a2a32f51ddef632d299e3879cd027c630dcd4d1d9a5285d6e6788072f4e51e7f" + }, + "@std/encoding@1.0.5": { + "integrity": "ecf363d4fc25bd85bd915ff6733a7e79b67e0e7806334af15f4645c569fefc04" + }, "@std/expect@1.0.7": { "integrity": "3904afa77cfe5c45dd2cd2c476e6fc5b6f57103d712890f0783d74c19d4b05a9", "dependencies": [ - "jsr:@std/assert", + "jsr:@std/assert@^1.0.7", "jsr:@std/internal" ] }, + "@std/http@1.0.12": { + "integrity": "85246d8bfe9c8e2538518725b158bdc31f616e0869255f4a8d9e3de919cab2aa", + "dependencies": [ + "jsr:@std/encoding@^1.0.5" + ] + }, "@std/internal@1.0.5": { "integrity": "54a546004f769c1ac9e025abd15a76b6671ddc9687e2313b67376125650dc7ba" }, + "@std/media-types@1.1.0": { + "integrity": "c9d093f0c05c3512932b330e3cc1fe1d627b301db33a4c2c2185c02471d6eaa4" + }, "@std/path@1.0.8": { "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" } @@ -864,6 +920,16 @@ "@babel/helper-validator-identifier" ] }, + "@bigmi/core@0.1.0_bs58@6.0.0": { + "integrity": "sha512-sTCuWsGnCQ8haZjdEmcSA6PPQKNSwpAO36fPqYJauZPTAvd9ChnuwawMD7HlIkj0+KVdCfDRgKYUdCESqnq+bg==", + "dependencies": [ + "@noble/hashes@1.7.0", + "bech32@2.0.0", + "bitcoinjs-lib", + "bs58@6.0.0", + "viem@2.22.3_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10" + ] + }, "@coinbase/wallet-sdk@4.0.3": { "integrity": "sha512-y/OGEjlvosikjfB+wk+4CVb9OxD1ob9cidEBLI5h8Hxaf/Qoob2XoVT1uvhtAzBx34KpGYSd+alKvh/GCRre4Q==", "dependencies": [ @@ -1176,7 +1242,7 @@ "@ethersproject/strings", "@ethersproject/transactions", "@ethersproject/web", - "bech32", + "bech32@1.1.4", "ws@7.4.6" ] }, @@ -1390,6 +1456,23 @@ "@jridgewell/sourcemap-codec" ] }, + "@lifi/sdk@3.5.1_@solana+wallet-adapter-base@0.9.23__@solana+web3.js@1.98.0_@solana+web3.js@1.98.0_viem@2.21.49__ws@8.18.0___bufferutil@4.0.8___utf-8-validate@5.0.10_bs58@6.0.0": { + "integrity": "sha512-Kd/WMMGitlusFa/ZMoy3Bl3xsUf1ZYel8qYHzxy8kUQozsXmfbpolPShZpG14JyauuSxa2Na/bzGmeIqYS3UkA==", + "dependencies": [ + "@bigmi/core", + "@lifi/types", + "@noble/curves@1.8.0", + "@solana/wallet-adapter-base@0.9.23_@solana+web3.js@1.98.0", + "@solana/web3.js@1.98.0", + "bech32@2.0.0", + "bitcoinjs-lib", + "bs58@6.0.0", + "viem@2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10" + ] + }, + "@lifi/types@16.5.0": { + "integrity": "sha512-DqDNnVZiyOrtFdn3Jlloni5J2QDnVfHiS5n3bD9qX9l2ISrgp7YBTJRfNGucHfStvegSNSyuG0/THJ4Kh4f08A==" + }, "@lit-labs/ssr-dom-shim@1.2.1": { "integrity": "sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==" }, @@ -1526,6 +1609,18 @@ "@noble/hashes@1.5.0" ] }, + "@noble/curves@1.7.0": { + "integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==", + "dependencies": [ + "@noble/hashes@1.6.0" + ] + }, + "@noble/curves@1.8.0": { + "integrity": "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==", + "dependencies": [ + "@noble/hashes@1.7.0" + ] + }, "@noble/hashes@1.2.0": { "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==" }, @@ -1535,6 +1630,15 @@ "@noble/hashes@1.5.0": { "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==" }, + "@noble/hashes@1.6.0": { + "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==" + }, + "@noble/hashes@1.6.1": { + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==" + }, + "@noble/hashes@1.7.0": { + "integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==" + }, "@noble/secp256k1@1.7.1": { "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==" }, @@ -1804,7 +1908,7 @@ "libphonenumber-js", "set-cookie-parser", "uuid@9.0.1", - "viem" + "viem@2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10" ] }, "@privy-io/public-api@2.15.1": { @@ -1838,7 +1942,7 @@ "@metamask/eth-sig-util@6.0.2", "@privy-io/js-sdk-core", "@simplewebauthn/browser", - "@solana/wallet-adapter-base", + "@solana/wallet-adapter-base@0.9.23_@solana+web3.js@1.95.5__encoding@0.1.13_encoding@0.1.13", "@solana/wallet-standard-wallet-adapter-base", "@solana/wallet-standard-wallet-adapter-react", "@wallet-standard/app", @@ -1865,7 +1969,7 @@ "stylis@4.3.4", "tinycolor2", "uuid@9.0.1", - "viem", + "viem@2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10", "web3-core", "web3-core-helpers@1.10.3" ] @@ -2105,12 +2209,15 @@ "@scure/base@1.1.9": { "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==" }, + "@scure/base@1.2.1": { + "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==" + }, "@scure/bip32@1.1.5": { "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dependencies": [ "@noble/hashes@1.2.0", "@noble/secp256k1", - "@scure/base" + "@scure/base@1.1.9" ] }, "@scure/bip32@1.4.0": { @@ -2118,7 +2225,7 @@ "dependencies": [ "@noble/curves@1.4.2", "@noble/hashes@1.4.0", - "@scure/base" + "@scure/base@1.1.9" ] }, "@scure/bip32@1.5.0": { @@ -2126,28 +2233,43 @@ "dependencies": [ "@noble/curves@1.6.0", "@noble/hashes@1.5.0", - "@scure/base" + "@scure/base@1.1.9" + ] + }, + "@scure/bip32@1.6.0": { + "integrity": "sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==", + "dependencies": [ + "@noble/curves@1.7.0", + "@noble/hashes@1.6.1", + "@scure/base@1.2.1" ] }, "@scure/bip39@1.1.1": { "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dependencies": [ "@noble/hashes@1.2.0", - "@scure/base" + "@scure/base@1.1.9" ] }, "@scure/bip39@1.3.0": { "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", "dependencies": [ "@noble/hashes@1.4.0", - "@scure/base" + "@scure/base@1.1.9" ] }, "@scure/bip39@1.4.0": { "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", "dependencies": [ "@noble/hashes@1.5.0", - "@scure/base" + "@scure/base@1.1.9" + ] + }, + "@scure/bip39@1.5.0": { + "integrity": "sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==", + "dependencies": [ + "@noble/hashes@1.6.1", + "@scure/base@1.2.1" ] }, "@sentry/core@5.30.0": { @@ -2229,7 +2351,17 @@ "integrity": "sha512-apqMuYwFp1jFi55NxDfvXUX2x1T0Zh07MxhZ/nCCTGys5raSfYUh82zen2BLv8BSDj/JxZ2P/s7jrQZGrX8uAw==", "dependencies": [ "@solana/wallet-standard-features", - "@solana/web3.js", + "@solana/web3.js@1.95.5_encoding@0.1.13", + "@wallet-standard/base", + "@wallet-standard/features", + "eventemitter3@4.0.7" + ] + }, + "@solana/wallet-adapter-base@0.9.23_@solana+web3.js@1.98.0": { + "integrity": "sha512-apqMuYwFp1jFi55NxDfvXUX2x1T0Zh07MxhZ/nCCTGys5raSfYUh82zen2BLv8BSDj/JxZ2P/s7jrQZGrX8uAw==", + "dependencies": [ + "@solana/wallet-standard-features", + "@solana/web3.js@1.98.0", "@wallet-standard/base", "@wallet-standard/features", "eventemitter3@4.0.7" @@ -2259,11 +2391,11 @@ "@solana/wallet-standard-wallet-adapter-base@1.1.2_@solana+web3.js@1.95.5__encoding@0.1.13_bs58@4.0.1_encoding@0.1.13": { "integrity": "sha512-DqhzYbgh3disHMgcz6Du7fmpG29BYVapNEEiL+JoVMa+bU9d4P1wfwXUNyJyRpGGNXtwhyZjIk2umWbe5ZBNaQ==", "dependencies": [ - "@solana/wallet-adapter-base", + "@solana/wallet-adapter-base@0.9.23_@solana+web3.js@1.95.5__encoding@0.1.13_encoding@0.1.13", "@solana/wallet-standard-chains", "@solana/wallet-standard-features", "@solana/wallet-standard-util", - "@solana/web3.js", + "@solana/web3.js@1.95.5_encoding@0.1.13", "@wallet-standard/app", "@wallet-standard/base", "@wallet-standard/features", @@ -2274,7 +2406,7 @@ "@solana/wallet-standard-wallet-adapter-react@1.1.2_@solana+wallet-adapter-base@0.9.23__@solana+web3.js@1.95.5___encoding@0.1.13__encoding@0.1.13_react@18.3.1_encoding@0.1.13": { "integrity": "sha512-bN6W4QkzenyjUoUz3sC5PAed+z29icGtPh9VSmLl1ZrRO7NbFB49a8uwUUVXNxhL/ZbMsyVKhb9bNj47/p8uhQ==", "dependencies": [ - "@solana/wallet-adapter-base", + "@solana/wallet-adapter-base@0.9.23_@solana+web3.js@1.95.5__encoding@0.1.13_encoding@0.1.13", "@solana/wallet-standard-wallet-adapter-base", "@wallet-standard/app", "@wallet-standard/base", @@ -2296,7 +2428,27 @@ "buffer", "fast-stable-stringify", "jayson", - "node-fetch", + "node-fetch@2.7.0_encoding@0.1.13", + "rpc-websockets", + "superstruct@2.0.2" + ] + }, + "@solana/web3.js@1.98.0": { + "integrity": "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==", + "dependencies": [ + "@babel/runtime", + "@noble/curves@1.8.0", + "@noble/hashes@1.7.0", + "@solana/buffer-layout", + "agentkeepalive", + "bigint-buffer", + "bn.js@5.2.1", + "borsh", + "bs58@4.0.1", + "buffer", + "fast-stable-stringify", + "jayson", + "node-fetch@2.7.0", "rpc-websockets", "superstruct@2.0.2" ] @@ -2795,6 +2947,9 @@ "abitype@1.0.6": { "integrity": "sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==" }, + "abitype@1.0.7": { + "integrity": "sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw==" + }, "abort-controller@3.0.0": { "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dependencies": [ @@ -2922,6 +3077,18 @@ "atomic-sleep@1.0.0": { "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" }, + "autoprefixer@10.4.20_postcss@8.4.49": { + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dependencies": [ + "browserslist", + "caniuse-lite", + "fraction.js", + "normalize-range", + "picocolors", + "postcss@8.4.49", + "postcss-value-parser" + ] + }, "available-typed-arrays@1.0.7": { "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dependencies": [ @@ -2970,12 +3137,18 @@ "base-x@4.0.0": { "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" }, + "base-x@5.0.0": { + "integrity": "sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==" + }, "base64-js@1.5.1": { "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bech32@1.1.4": { "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "bech32@2.0.0": { + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bigint-buffer@1.1.5": { "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", "dependencies": [ @@ -2994,6 +3167,25 @@ "file-uri-to-path" ] }, + "bip174@3.0.0-rc.1": { + "integrity": "sha512-+8P3BpSairVNF2Nee6Ksdc1etIjWjBOi/MH0MwKtq9YaYp+S2Hk2uvup0e8hCT4IKlS58nXJyyQVmW92zPoD4Q==", + "dependencies": [ + "uint8array-tools@0.0.9", + "varuint-bitcoin" + ] + }, + "bitcoinjs-lib@7.0.0-rc.0": { + "integrity": "sha512-7CQgOIbREemKR/NT2uc3uO/fkEy+6CM0sLxboVVY6bv6DbZmPt3gg5Y/hhWgQFeZu5lfTbtVAv32MIxf7lMh4g==", + "dependencies": [ + "@noble/hashes@1.7.0", + "bech32@2.0.0", + "bip174", + "bs58check@4.0.0", + "uint8array-tools@0.0.9", + "valibot", + "varuint-bitcoin" + ] + }, "blakejs@1.2.1": { "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" }, @@ -3087,6 +3279,12 @@ "base-x@4.0.0" ] }, + "bs58@6.0.0": { + "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==", + "dependencies": [ + "base-x@5.0.0" + ] + }, "bs58check@2.1.2": { "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dependencies": [ @@ -3095,6 +3293,13 @@ "safe-buffer" ] }, + "bs58check@4.0.0": { + "integrity": "sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==", + "dependencies": [ + "@noble/hashes@1.7.0", + "bs58@6.0.0" + ] + }, "buffer-from@1.1.2": { "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, @@ -3318,13 +3523,13 @@ "cross-fetch@3.1.8_encoding@0.1.13": { "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dependencies": [ - "node-fetch" + "node-fetch@2.7.0_encoding@0.1.13" ] }, "cross-fetch@4.0.0_encoding@0.1.13": { "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dependencies": [ - "node-fetch" + "node-fetch@2.7.0_encoding@0.1.13" ] }, "cross-spawn@7.0.6": { @@ -3771,7 +3976,7 @@ "@types/secp256k1", "blakejs", "browserify-aes", - "bs58check", + "bs58check@2.1.2", "create-hash", "create-hmac", "hash.js", @@ -4031,6 +4236,9 @@ "fp-ts@1.19.3": { "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==" }, + "fraction.js@4.3.7": { + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==" + }, "fs-extra@7.0.1": { "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dependencies": [ @@ -4693,6 +4901,9 @@ "lilconfig@3.1.2": { "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==" }, + "lilconfig@3.1.3": { + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==" + }, "lines-and-columns@1.2.4": { "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, @@ -4981,6 +5192,12 @@ "node-fetch-native@1.6.4": { "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, + "node-fetch@2.7.0": { + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": [ + "whatwg-url@5.0.0" + ] + }, "node-fetch@2.7.0_encoding@0.1.13": { "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": [ @@ -5007,6 +5224,9 @@ "normalize-path@3.0.0": { "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "normalize-range@0.1.2": { + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==" + }, "npm-run-path@5.3.0": { "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dependencies": [ @@ -5096,7 +5316,19 @@ "@noble/hashes@1.5.0", "@scure/bip32@1.5.0", "@scure/bip39@1.4.0", - "abitype", + "abitype@1.0.6", + "eventemitter3@5.0.1" + ] + }, + "ox@0.6.0": { + "integrity": "sha512-blUzTLidvUlshv0O02CnLFqBLidNzPoAZdIth894avUAotTuWziznv6IENv5idRuOSSP3dH8WzcYw84zVdu0Aw==", + "dependencies": [ + "@adraffy/ens-normalize", + "@noble/curves@1.8.0", + "@noble/hashes@1.7.0", + "@scure/bip32@1.6.0", + "@scure/bip39@1.5.0", + "abitype@1.0.7", "eventemitter3@5.0.1" ] }, @@ -5176,6 +5408,9 @@ "minipass" ] }, + "path-to-regexp@6.3.0": { + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==" + }, "pathe@1.1.2": { "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" }, @@ -5289,7 +5524,7 @@ "postcss-load-config@4.0.2_postcss@8.4.49": { "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dependencies": [ - "lilconfig@3.1.2", + "lilconfig@3.1.3", "postcss@8.4.49", "yaml" ] @@ -5991,7 +6226,7 @@ "tailwindcss-motion@0.4.1-beta_tailwindcss@3.4.15__postcss@8.4.49": { "integrity": "sha512-yCybZsy6Vq4mgKS4KN41mGKfsOQVzgcapUEQ7Rws1gfN7zZUEm2gji6x6KAWNYf64lstVXPmZuxMmPaQp4XyLA==", "dependencies": [ - "tailwindcss" + "tailwindcss@3.4.15_postcss@8.4.49" ] }, "tailwindcss@3.4.15_postcss@8.4.49": { @@ -6021,6 +6256,33 @@ "sucrase" ] }, + "tailwindcss@3.4.17_postcss@8.4.49": { + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "dependencies": [ + "@alloc/quick-lru", + "arg", + "chokidar@3.6.0", + "didyoumean", + "dlv", + "fast-glob", + "glob-parent@6.0.2", + "is-glob", + "jiti@1.21.6", + "lilconfig@3.1.3", + "micromatch", + "normalize-path", + "object-hash", + "picocolors", + "postcss@8.4.49", + "postcss-import", + "postcss-js", + "postcss-load-config", + "postcss-nested", + "postcss-selector-parser", + "resolve@1.22.8", + "sucrase" + ] + }, "temp-dir@2.0.0": { "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==" }, @@ -6188,6 +6450,12 @@ "ufo@1.5.4": { "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" }, + "uint8array-tools@0.0.8": { + "integrity": "sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==" + }, + "uint8array-tools@0.0.9": { + "integrity": "sha512-9vqDWmoSXOoi+K14zNaf6LBV51Q8MayF0/IiQs3GlygIKUYtog603e6virExkjjFosfJUBI4LhbQK1iq8IG11A==" + }, "uint8arrays@3.1.0": { "integrity": "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==", "dependencies": [ @@ -6328,6 +6596,9 @@ "uuid@9.0.1": { "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, + "valibot@0.38.0": { + "integrity": "sha512-RCJa0fetnzp+h+KN9BdgYOgtsMAG9bfoJ9JSjIhFHobKWVWyzM3jjaeNTdpFK9tQtf3q1sguXeERJ/LcmdFE7w==" + }, "valtio@1.11.2_react@18.3.1": { "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", "dependencies": [ @@ -6336,6 +6607,12 @@ "use-sync-external-store" ] }, + "varuint-bitcoin@2.0.0": { + "integrity": "sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==", + "dependencies": [ + "uint8array-tools@0.0.8" + ] + }, "viem@2.21.49_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10": { "integrity": "sha512-NNItYfTv4+yGE5DDKc+S/g2S7KeJn047GwgEYG60FAJlK0FzwuP6lQKSeQ8k7Y4VasfuKPqiT+XiilcCtTRiDQ==", "dependencies": [ @@ -6343,9 +6620,23 @@ "@noble/hashes@1.5.0", "@scure/bip32@1.5.0", "@scure/bip39@1.4.0", - "abitype", + "abitype@1.0.6", + "isows", + "ox@0.1.2", + "webauthn-p256", + "ws@8.18.0_bufferutil@4.0.8_utf-8-validate@5.0.10" + ] + }, + "viem@2.22.3_ws@8.18.0__bufferutil@4.0.8__utf-8-validate@5.0.10": { + "integrity": "sha512-lO8K4lL5vWfJ9dmeJo9BfwlJJ0vNDrgLXgwFJNzjLJ6eDfOGXr48yzNhqt96ybYS7SlM7ecT7yhJIVfhZLkOkw==", + "dependencies": [ + "@noble/curves@1.7.0", + "@noble/hashes@1.6.1", + "@scure/bip32@1.6.0", + "@scure/bip39@1.5.0", + "abitype@1.0.7", "isows", - "ox", + "ox@0.6.0", "webauthn-p256", "ws@8.18.0_bufferutil@4.0.8_utf-8-validate@5.0.10" ] @@ -6837,16 +7128,20 @@ "packages/client": { "dependencies": [ "npm:@babel/plugin-transform-react-jsx-development@*", + "npm:@lifi/sdk@^3.5.1", "npm:@preact/compat@*", "npm:@preact/signals@*", "npm:@privy-io/react-auth@^1.92.6", "npm:@radix-ui/react-form@0.1", + "npm:autoprefixer@^10.4.20", "npm:babel-plugin-transform-hook-names@*", "npm:lucide-preact@*", + "npm:postcss@^8.4.49", "npm:preact-iso@^2.8.1", "npm:preact@^10.24.3", "npm:tailwind-merge@^2.5.4", "npm:tailwindcss-motion@~0.4.1-beta", + "npm:tailwindcss@^3.4.17", "npm:viem@^2.21.40", "npm:vite@^5.4.10" ] @@ -6856,6 +7151,12 @@ "npm:@openzeppelin/contracts@^5.1.0", "npm:viem@^2.21.49" ] + }, + "packages/server": { + "dependencies": [ + "jsr:@oak/oak@^17.1.4", + "npm:@lifi/sdk@^3.5.1" + ] } } } diff --git a/packages/client/deno.jsonc b/packages/client/deno.jsonc index 2efbf4d..da54ccd 100644 --- a/packages/client/deno.jsonc +++ b/packages/client/deno.jsonc @@ -6,10 +6,17 @@ "preview": "vite preview" }, "imports": { +<<<<<<< HEAD "autoprefixer": "npm:autoprefixer@^10.4.20", +======= + "@lifi/sdk": "npm:@lifi/sdk@^3.5.1", + "autoprefixer": "npm:autoprefixer@^10.4.20", + "postcss": "npm:postcss@^8.4.49", +>>>>>>> 483f547 (initialise server and lifi sdk) "privy": "npm:@privy-io/react-auth@^1.92.6", "@radix-ui/react-form": "npm:@radix-ui/react-form@^0.1.0", "tailwind-merge": "npm:tailwind-merge@^2.5.4", + "tailwindcss": "npm:tailwindcss@^3.4.17", "tailwindcss-motion": "npm:tailwindcss-motion@^0.4.1-beta", "lucide-preact": "npm:lucide-preact", diff --git a/packages/client/src/pages/discover/page.tsx b/packages/client/src/pages/discover/page.tsx index 46575e3..b8bf609 100644 --- a/packages/client/src/pages/discover/page.tsx +++ b/packages/client/src/pages/discover/page.tsx @@ -1,14 +1,24 @@ // import { usePrivy } from "privy"; +import { useEffect } from "preact/hooks"; import FlexSeparator from "../../shared/components/FlexSeparator.tsx"; import Header from "../../shared/components/Header.tsx"; import LoginBanner from "../../shared/components/LoginBanner.tsx"; import RiskWarningBanner from "../../shared/components/RiskWarningBanner.tsx"; import Navigation from "./Navigation.tsx"; import Tokens from "./Tokens.tsx"; +import { useWallets } from "privy"; export default function () { // const { authenticated } = usePrivy(); + const w = useWallets(); + + useEffect(() => { + (async () => { + const provider = await w.wallets[0].getEthereumProvider(); + console.log("hello", provider); + })(); + }, [w]); return (
diff --git a/packages/server/deno.jsonc b/packages/server/deno.jsonc new file mode 100644 index 0000000..056d879 --- /dev/null +++ b/packages/server/deno.jsonc @@ -0,0 +1,9 @@ +{ + "tasks": { + "start:dev": "deno run -A --watch server.ts" + }, + "imports": { + "@lifi/sdk": "npm:@lifi/sdk@^3.5.1", + "@oak/oak": "jsr:@oak/oak@^17.1.4" + } +} diff --git a/packages/server/lifi.ts b/packages/server/lifi.ts new file mode 100644 index 0000000..4b1eb1e --- /dev/null +++ b/packages/server/lifi.ts @@ -0,0 +1,17 @@ +import { ChainId, createConfig, getQuote } from "@lifi/sdk"; + +createConfig({ + integrator: "pFrax", +}); + +const quote = await getQuote({ + fromAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", + fromChain: ChainId.ARB, + toChain: ChainId.OPT, + fee: 0.005, + fromToken: "0x0000000000000000000000000000000000000000", + toToken: "0x0000000000000000000000000000000000000000", + fromAmount: "1000000000000000000", +}); + +console.log(quote); diff --git a/packages/server/server.ts b/packages/server/server.ts new file mode 100644 index 0000000..04bde7e --- /dev/null +++ b/packages/server/server.ts @@ -0,0 +1,14 @@ +import { Application, Router } from "@oak/oak"; + +const router = new Router(); + +router.post("/", (ctx) => { + ctx.response.status = 200; + ctx.response.body = ctx; +}); + +const app = new Application(); +app.use(router.routes()); +app.use(router.allowedMethods()); + +app.listen({ port: 9090 });