diff --git a/apps/api/src/assets/images/powered-by.png b/apps/api/src/assets/images/powered-by.png new file mode 100644 index 0000000..0b36e1e Binary files /dev/null and b/apps/api/src/assets/images/powered-by.png differ diff --git a/apps/api/src/assets/images/powered-by400h.png b/apps/api/src/assets/images/powered-by400h.png new file mode 100644 index 0000000..94c4225 Binary files /dev/null and b/apps/api/src/assets/images/powered-by400h.png differ diff --git a/apps/api/src/assets/images/powered-by@2x.png b/apps/api/src/assets/images/powered-by@2x.png new file mode 100644 index 0000000..5a1ba58 Binary files /dev/null and b/apps/api/src/assets/images/powered-by@2x.png differ diff --git a/apps/api/src/assets/images/templates/business-visa.png b/apps/api/src/assets/images/templates/business-visa.png new file mode 100644 index 0000000..750740e Binary files /dev/null and b/apps/api/src/assets/images/templates/business-visa.png differ diff --git a/apps/api/src/assets/images/templates/citizenship.png b/apps/api/src/assets/images/templates/citizenship.png new file mode 100644 index 0000000..eb31636 Binary files /dev/null and b/apps/api/src/assets/images/templates/citizenship.png differ diff --git a/apps/api/src/assets/images/templates/residence-card.png b/apps/api/src/assets/images/templates/residence-card.png new file mode 100644 index 0000000..a1721a3 Binary files /dev/null and b/apps/api/src/assets/images/templates/residence-card.png differ diff --git a/apps/api/src/assets/images/templates/visitor-pass.png b/apps/api/src/assets/images/templates/visitor-pass.png new file mode 100644 index 0000000..c6d0bff Binary files /dev/null and b/apps/api/src/assets/images/templates/visitor-pass.png differ diff --git a/libs/anchor/.eslintrc.json b/libs/anchor/.eslintrc.json deleted file mode 100644 index 5dc06da..0000000 --- a/libs/anchor/.eslintrc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.json"], - "parser": "jsonc-eslint-parser", - "rules": { - "@nx/dependency-checks": [ - "error", - { - "ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] - } - ] - } - } - ] -} diff --git a/libs/anchor/.swcrc b/libs/anchor/.swcrc deleted file mode 100644 index 28e88ec..0000000 --- a/libs/anchor/.swcrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "jsc": { - "target": "es2017", - "parser": { - "syntax": "typescript", - "decorators": true, - "dynamicImport": true - }, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true - }, - "keepClassNames": true, - "externalHelpers": true, - "loose": true - }, - "module": { - "type": "es6" - }, - "sourceMaps": true, - "exclude": [ - "jest.config.ts", - ".*\\.spec.tsx?$", - ".*\\.test.tsx?$", - "./src/jest-setup.ts$", - "./**/jest-setup.ts$", - ".*.js$" - ] -} diff --git a/libs/anchor/Anchor.toml b/libs/anchor/Anchor.toml deleted file mode 100644 index 679bd27..0000000 --- a/libs/anchor/Anchor.toml +++ /dev/null @@ -1,28 +0,0 @@ -[toolchain] - -[features] -seeds = false -skip-lint = false - -[programs.localnet] -counter = "5t7i8rFcWxrBhf7PYbxBQudXYQLnJW4zBS4xiknaFuCv" - -[registry] -url = "https://api.apr.dev" - -[provider] -cluster = "Localnet" -wallet = "~/.config/solana/id.json" - -[scripts] -test = "../../node_modules/.bin/nx run anchor:jest" - -[test] -startup_wait = 5000 -shutdown_wait = 2000 -upgradeable = false - -[test.validator] -bind_address = "127.0.0.1" -ledger = ".anchor/test-ledger" -rpc_port = 8899 diff --git a/libs/anchor/Cargo.lock b/libs/anchor/Cargo.lock deleted file mode 100644 index f6790c8..0000000 --- a/libs/anchor/Cargo.lock +++ /dev/null @@ -1,1765 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.11", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" -dependencies = [ - "cfg-if", - "getrandom 0.2.11", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "anchor-attribute-access-control" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-account" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" -dependencies = [ - "anchor-syn", - "anyhow", - "bs58 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-constant" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" -dependencies = [ - "anchor-syn", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-error" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" -dependencies = [ - "anchor-syn", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-event" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-program" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-accounts" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-space" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-lang" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" -dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-program", - "anchor-derive-accounts", - "anchor-derive-space", - "arrayref", - "base64 0.13.1", - "bincode", - "borsh 0.10.3", - "bytemuck", - "getrandom 0.2.11", - "solana-program", - "thiserror", -] - -[[package]] -name = "anchor-syn" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" -dependencies = [ - "anyhow", - "bs58 0.5.0", - "heck", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2 0.10.8", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "array-bytes" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "bytemuck" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "console_log" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "counter" -version = "0.1.0" -dependencies = [ - "anchor-lang", -] - -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.7", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.6", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac", -] - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.11", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - -[[package]] -name = "serde" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "smallvec" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" - -[[package]] -name = "solana-frozen-abi" -version = "1.16.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a63aebf4beac713a1949216ae180355c044df9cc3db9a58ca153bb10bb5843b" -dependencies = [ - "ahash 0.8.6", - "blake3", - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "byteorder", - "cc", - "either", - "generic-array", - "getrandom 0.1.16", - "im", - "lazy_static", - "log", - "memmap2", - "once_cell", - "rand_core 0.6.4", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.16.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bced1b3c0421605312fd7eae7ceb6850d3b1d2e939da349c928e6d46a945c829" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.39", -] - -[[package]] -name = "solana-program" -version = "1.16.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f5c12cb15108734adae20be5e922c2db09d9623099541dcc61790703c6271c" -dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "array-bytes", - "base64 0.21.5", - "bincode", - "bitflags", - "blake3", - "borsh 0.10.3", - "borsh 0.9.3", - "bs58 0.4.0", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.11", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "log", - "memoffset", - "num-bigint", - "num-derive", - "num-traits", - "parking_lot", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.8", - "sha3", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", - "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.16.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fae2d1f62d655f88280a39711db401973d1bbe54fec9f795be80b9d76837ae" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.39", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac", - "once_cell", - "pbkdf2", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "web-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "zerocopy" -version = "0.7.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] diff --git a/libs/anchor/Cargo.toml b/libs/anchor/Cargo.toml deleted file mode 100644 index f397704..0000000 --- a/libs/anchor/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[workspace] -members = [ - "programs/*" -] -resolver = "2" - -[profile.release] -overflow-checks = true -lto = "fat" -codegen-units = 1 -[profile.release.build-override] -opt-level = 3 -incremental = false -codegen-units = 1 diff --git a/libs/anchor/README.md b/libs/anchor/README.md deleted file mode 100644 index f845a14..0000000 --- a/libs/anchor/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# anchor - -This library was generated with [Nx](https://nx.dev). - -## Building - -Run `nx build anchor` to build the library. - -## Running unit tests - -Run `nx test anchor` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/anchor/jest.config.ts b/libs/anchor/jest.config.ts deleted file mode 100644 index ea57138..0000000 --- a/libs/anchor/jest.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs' - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse(readFileSync(`${__dirname}/.swcrc`, 'utf-8')) - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'anchor', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['ts', 'js', 'html'], - testEnvironment: '', - coverageDirectory: '../../coverage/libs/anchor', -} diff --git a/libs/anchor/migrations/deploy.ts b/libs/anchor/migrations/deploy.ts deleted file mode 100644 index cf17c68..0000000 --- a/libs/anchor/migrations/deploy.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Migrations are an early feature. Currently, they're nothing more than this -// single deploy script that's invoked from the CLI, injecting a provider -// configured from the workspace's Anchor.toml. - -import * as anchor from '@coral-xyz/anchor' - -module.exports = async function (provider) { - // Configure client to use the provider. - anchor.setProvider(provider) - - // Add your deploy script here. -} diff --git a/libs/anchor/package.json b/libs/anchor/package.json deleted file mode 100644 index 876ce2d..0000000 --- a/libs/anchor/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@tokengator/anchor", - "version": "0.0.1", - "dependencies": { - "@coral-xyz/anchor": "^0.29.0", - "@solana/web3.js": "^1.87.6" - }, - "type": "commonjs", - "main": "./index.cjs", - "module": "./index.js" -} diff --git a/libs/anchor/programs/counter/Cargo.toml b/libs/anchor/programs/counter/Cargo.toml deleted file mode 100644 index 8eb3c3d..0000000 --- a/libs/anchor/programs/counter/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "counter" -version = "0.1.0" -description = "Created with Anchor" -edition = "2021" - -[lib] -crate-type = ["cdylib", "lib"] -name = "counter" - -[features] -no-entrypoint = [] -no-idl = [] -no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] - -[dependencies] -anchor-lang = "0.28.0" diff --git a/libs/anchor/programs/counter/Xargo.toml b/libs/anchor/programs/counter/Xargo.toml deleted file mode 100644 index 475fb71..0000000 --- a/libs/anchor/programs/counter/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.bpfel-unknown-unknown.dependencies.std] -features = [] diff --git a/libs/anchor/programs/counter/src/lib.rs b/libs/anchor/programs/counter/src/lib.rs deleted file mode 100644 index a6420e0..0000000 --- a/libs/anchor/programs/counter/src/lib.rs +++ /dev/null @@ -1,70 +0,0 @@ -#![allow(clippy::result_large_err)] - -use anchor_lang::prelude::*; - -declare_id!("5t7i8rFcWxrBhf7PYbxBQudXYQLnJW4zBS4xiknaFuCv"); - -#[program] -pub mod counter { - use super::*; - - pub fn close_counter(_ctx: Context) -> Result<()> { - Ok(()) - } - - pub fn decrement(ctx: Context) -> Result<()> { - ctx.accounts.counter.count = ctx.accounts.counter.count.checked_sub(1).unwrap(); - Ok(()) - } - - pub fn increment(ctx: Context) -> Result<()> { - ctx.accounts.counter.count = ctx.accounts.counter.count.checked_add(1).unwrap(); - Ok(()) - } - - pub fn initialize_counter(_ctx: Context) -> Result<()> { - Ok(()) - } - - pub fn set(ctx: Context, value: u8) -> Result<()> { - ctx.accounts.counter.count = value.clone(); - Ok(()) - } -} - -#[derive(Accounts)] -pub struct InitializeCounter<'info> { - #[account(mut)] - pub payer: Signer<'info>, - - #[account( - init, - space = 8 + Counter::INIT_SPACE, - payer = payer - )] - pub counter: Account<'info, Counter>, - pub system_program: Program<'info, System>, -} -#[derive(Accounts)] -pub struct CloseCounter<'info> { - #[account(mut)] - pub payer: Signer<'info>, - - #[account( - mut, - close = payer, // close account and return lamports to payer - )] - pub counter: Account<'info, Counter>, -} - -#[derive(Accounts)] -pub struct Update<'info> { - #[account(mut)] - pub counter: Account<'info, Counter>, -} - -#[account] -#[derive(InitSpace)] -pub struct Counter { - count: u8, -} diff --git a/libs/anchor/project.json b/libs/anchor/project.json deleted file mode 100644 index 7b261c7..0000000 --- a/libs/anchor/project.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "anchor", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/anchor/src", - "projectType": "library", - "targets": { - "build": { - "executor": "@nx/rollup:rollup", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/libs/anchor", - "main": "libs/anchor/src/index.ts", - "tsConfig": "libs/anchor/tsconfig.lib.json", - "assets": [], - "project": "libs/anchor/package.json", - "compiler": "swc", - "format": ["cjs", "esm"] - } - }, - "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] - }, - "test": { - "executor": "nx:run-commands", - "options": { - "cwd": "libs/anchor", - "commands": [{ "command": "anchor test", "forwardAllArgs": false }], - "parallel": false - } - }, - "anchor": { - "executor": "nx:run-commands", - "options": { - "cwd": "libs/anchor", - "commands": ["anchor"], - "parallel": false - } - }, - "localnet": { - "executor": "nx:run-commands", - "options": { - "cwd": "libs/anchor", - "commands": ["anchor localnet"], - "parallel": false - } - }, - "jest": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "libs/anchor/jest.config.ts" - } - } - }, - "tags": [] -} diff --git a/libs/anchor/src/counter-exports.ts b/libs/anchor/src/counter-exports.ts deleted file mode 100644 index 9a279f5..0000000 --- a/libs/anchor/src/counter-exports.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Program } from '@coral-xyz/anchor' -import { Cluster, PublicKey } from '@solana/web3.js' -import { IDL as CounterIDL } from '../target/types/counter' -import type { Counter } from '../target/types/counter' - -export { Counter, CounterIDL } -export type CounterProgram = Program -export const COUNTER_PROGRAM_ID = new PublicKey('5t7i8rFcWxrBhf7PYbxBQudXYQLnJW4zBS4xiknaFuCv') - -export function getCounterProgramId(cluster: Cluster) { - switch (cluster) { - case 'devnet': - case 'testnet': - case 'mainnet-beta': - return new PublicKey('CounNZdmsQmWh7uVngV9FXW2dZ6zAgbJyYsvBpqbykg') - default: - return COUNTER_PROGRAM_ID - } -} diff --git a/libs/anchor/src/index.ts b/libs/anchor/src/index.ts deleted file mode 100644 index 5a811d0..0000000 --- a/libs/anchor/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './counter-exports' diff --git a/libs/anchor/target/idl/counter.json b/libs/anchor/target/idl/counter.json deleted file mode 100644 index 7397f3d..0000000 --- a/libs/anchor/target/idl/counter.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "version": "0.1.0", - "name": "counter", - "instructions": [ - { - "name": "closeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "decrement", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "increment", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initializeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "set", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "value", - "type": "u8" - } - ] - } - ], - "accounts": [ - { - "name": "Counter", - "type": { - "kind": "struct", - "fields": [ - { - "name": "count", - "type": "u8" - } - ] - } - } - ], - "metadata": { - "address": "5t7i8rFcWxrBhf7PYbxBQudXYQLnJW4zBS4xiknaFuCv" - } -} \ No newline at end of file diff --git a/libs/anchor/target/types/counter.ts b/libs/anchor/target/types/counter.ts deleted file mode 100644 index 1c5b0c0..0000000 --- a/libs/anchor/target/types/counter.ts +++ /dev/null @@ -1,191 +0,0 @@ -export type Counter = { - "version": "0.1.0", - "name": "counter", - "instructions": [ - { - "name": "closeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "decrement", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "increment", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initializeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "set", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "value", - "type": "u8" - } - ] - } - ], - "accounts": [ - { - "name": "counter", - "type": { - "kind": "struct", - "fields": [ - { - "name": "count", - "type": "u8" - } - ] - } - } - ] -}; - -export const IDL: Counter = { - "version": "0.1.0", - "name": "counter", - "instructions": [ - { - "name": "closeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "decrement", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "increment", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initializeCounter", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "counter", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "set", - "accounts": [ - { - "name": "counter", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "value", - "type": "u8" - } - ] - } - ], - "accounts": [ - { - "name": "counter", - "type": { - "kind": "struct", - "fields": [ - { - "name": "count", - "type": "u8" - } - ] - } - } - ] -}; diff --git a/libs/anchor/tests/counter.spec.ts b/libs/anchor/tests/counter.spec.ts deleted file mode 100644 index 2cbbc19..0000000 --- a/libs/anchor/tests/counter.spec.ts +++ /dev/null @@ -1,76 +0,0 @@ -import * as anchor from '@coral-xyz/anchor' -import { Program } from '@coral-xyz/anchor' -import { Keypair } from '@solana/web3.js' -import { Counter } from '../target/types/counter' - -describe('counter', () => { - // Configure the client to use the local cluster. - const provider = anchor.AnchorProvider.env() - anchor.setProvider(provider) - const payer = provider.wallet as anchor.Wallet - - const program = anchor.workspace.Counter as Program - - const counterKeypair = Keypair.generate() - - it('Initialize Counter', async () => { - await program.methods - .initializeCounter() - .accounts({ - counter: counterKeypair.publicKey, - payer: payer.publicKey, - }) - .signers([counterKeypair]) - .rpc() - - const currentCount = await program.account.counter.fetch(counterKeypair.publicKey) - - expect(currentCount.count).toEqual(0) - }) - - it('Increment Counter', async () => { - await program.methods.increment().accounts({ counter: counterKeypair.publicKey }).rpc() - - const currentCount = await program.account.counter.fetch(counterKeypair.publicKey) - - expect(currentCount.count).toEqual(1) - }) - - it('Increment Counter Again', async () => { - await program.methods.increment().accounts({ counter: counterKeypair.publicKey }).rpc() - - const currentCount = await program.account.counter.fetch(counterKeypair.publicKey) - - expect(currentCount.count).toEqual(2) - }) - - it('Decrement Counter', async () => { - await program.methods.decrement().accounts({ counter: counterKeypair.publicKey }).rpc() - - const currentCount = await program.account.counter.fetch(counterKeypair.publicKey) - - expect(currentCount.count).toEqual(1) - }) - - it('Set counter value', async () => { - await program.methods.set(42).accounts({ counter: counterKeypair.publicKey }).rpc() - - const currentCount = await program.account.counter.fetch(counterKeypair.publicKey) - - expect(currentCount.count).toEqual(42) - }) - - it('Set close the counter account', async () => { - await program.methods - .closeCounter() - .accounts({ - payer: payer.publicKey, - counter: counterKeypair.publicKey, - }) - .rpc() - - // The account should no longer exist, returning null. - const userAccount = await program.account.counter.fetchNullable(counterKeypair.publicKey) - expect(userAccount).toBeNull() - }) -}) diff --git a/libs/anchor/tsconfig.json b/libs/anchor/tsconfig.json deleted file mode 100644 index 19b9eec..0000000 --- a/libs/anchor/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs" - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/libs/anchor/tsconfig.lib.json b/libs/anchor/tsconfig.lib.json deleted file mode 100644 index 33eca2c..0000000 --- a/libs/anchor/tsconfig.lib.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "include": ["src/**/*.ts"], - "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] -} diff --git a/libs/anchor/tsconfig.spec.json b/libs/anchor/tsconfig.spec.json deleted file mode 100644 index f6d8ffc..0000000 --- a/libs/anchor/tsconfig.spec.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] -} diff --git a/libs/web/solana/feature/src/lib/counter/counter-feature.tsx b/libs/web/solana/feature/src/lib/counter/counter-feature.tsx deleted file mode 100644 index 23c5bdd..0000000 --- a/libs/web/solana/feature/src/lib/counter/counter-feature.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Group } from '@mantine/core' -import { WalletButton } from '@tokengator/web-solana-ui' -import { UiPage } from '@pubkey-ui/core' -import { useWallet } from '@solana/wallet-adapter-react' -import { CounterListFeature } from './counter-list-feature' - -export default function CounterFeature() { - const { publicKey } = useWallet() - - if (!publicKey) - return ( - - - - - - ) - - return -} diff --git a/libs/web/solana/feature/src/lib/counter/counter-list-feature.tsx b/libs/web/solana/feature/src/lib/counter/counter-list-feature.tsx deleted file mode 100644 index c263ea3..0000000 --- a/libs/web/solana/feature/src/lib/counter/counter-list-feature.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Button, Group, SimpleGrid } from '@mantine/core' -import { UiInfo, UiLoader, UiPage } from '@pubkey-ui/core' -import { Keypair } from '@solana/web3.js' -import { CounterProgramAccountProvider } from './data-access/counter-program-account-provider' -import { useCounterFetchAll } from './data-access/use-counter-fetch-all' -import { useCounterInitialize } from './data-access/use-counter-initialize' -import { ProgramCounterAccount } from './ui/program-counter-account' - -export function CounterListFeature() { - const fetchAllQuery = useCounterFetchAll() - const initializeQuery = useCounterInitialize() - - return ( - - - - - - - } - > - {fetchAllQuery.isLoading ? ( - - ) : ( - - {fetchAllQuery.data?.length ? ( - fetchAllQuery.data.map((account) => ( - - - - )) - ) : ( - - )} - - )} - - ) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/counter-program-account-provider.tsx b/libs/web/solana/feature/src/lib/counter/data-access/counter-program-account-provider.tsx deleted file mode 100644 index fcc33b2..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/counter-program-account-provider.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Program, ProgramAccount } from '@coral-xyz/anchor' -import { Counter } from '@tokengator/anchor' -import { createContext, ReactNode, useContext } from 'react' -import { useCounterProgram } from './use-counter-program' -import { useCluster } from '@tokengator/web-solana-data-access' -import { useCounterFetch } from './use-counter-fetch' -import { useCounterRefresh } from './use-counter-refresh' - -export interface CounterProgramAccountProviderContext { - account: ProgramAccount<{ count: number }> - program: Program - refresh: () => Promise - getExplorerUrl: (path: string) => string -} - -const Context = createContext({} as CounterProgramAccountProviderContext) - -export function CounterProgramAccountProvider({ - account, - children, -}: { - account: ProgramAccount<{ count: number }> - children: ReactNode -}) { - const program = useCounterProgram() - const { getExplorerUrl } = useCluster() - const counterRefresh = useCounterRefresh() - const counterQuery = useCounterFetch({ account: account.publicKey }) - - return ( - { - await Promise.all([counterQuery.refetch(), counterRefresh()]) - }, - getExplorerUrl, - }} - > - {children} - - ) -} - -export function useCounterProgramAccount() { - return useContext(Context) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-close.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-close.tsx deleted file mode 100644 index 939d947..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-close.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { uiToastLink } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { useMutation } from '@tanstack/react-query' -import { useCounterProgramAccount } from './counter-program-account-provider' - -export function useCounterClose() { - const { account, program, refresh, getExplorerUrl } = useCounterProgramAccount() - - return useMutation({ - mutationKey: ['counter', 'close', { account }], - mutationFn: () => - program.methods - .closeCounter() - .accounts({ counter: account.publicKey }) - .rpc() - .then(async (signature) => { - if (signature) { - uiToastLink({ - link: getExplorerUrl(`/tx/${signature}`), - label: 'View transaction', - }) - } - return refresh() - }) - .catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-decrement.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-decrement.tsx deleted file mode 100644 index 2f73ee7..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-decrement.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { uiToastLink } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { useMutation } from '@tanstack/react-query' -import { useCounterProgramAccount } from './counter-program-account-provider' - -export function useCounterDecrement() { - const { account, program, getExplorerUrl, refresh } = useCounterProgramAccount() - - return useMutation({ - mutationKey: ['counter', 'decrement', { account }], - mutationFn: () => - program.methods - .decrement() - .accounts({ counter: account.publicKey }) - .rpc() - .then((signature) => { - uiToastLink({ - link: getExplorerUrl(`/tx/${signature}`), - label: 'View transaction', - }) - return refresh() - }) - .catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch-all.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch-all.tsx deleted file mode 100644 index 87f93bd..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch-all.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useCluster } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { useQuery } from '@tanstack/react-query' -import { useCounterProgram } from './use-counter-program' - -export function useCounterFetchAll() { - const { cluster } = useCluster() - const program = useCounterProgram() - - return useQuery({ - queryKey: ['counter', 'fetch-all', { cluster }], - queryFn: () => program.account.counter.all().catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch.tsx deleted file mode 100644 index c04ab6a..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { toastError } from '@pubkey-ui/core' -import { useQuery } from '@tanstack/react-query' -import { useCounterProgram } from './use-counter-program' -import { PublicKey } from '@solana/web3.js' - -export function useCounterFetch({ account }: { account: PublicKey }) { - const program = useCounterProgram() - - return useQuery({ - queryKey: ['counter', 'fetch', { account }], - queryFn: () => program.account.counter.fetch(account).catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-increment.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-increment.tsx deleted file mode 100644 index a40984c..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-increment.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { uiToastLink } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { useMutation } from '@tanstack/react-query' -import { useCounterProgramAccount } from './counter-program-account-provider' - -export function useCounterIncrement() { - const { account, program, refresh, getExplorerUrl } = useCounterProgramAccount() - - return useMutation({ - mutationKey: ['counter', 'increment', { account }], - mutationFn: () => - program.methods - .increment() - .accounts({ counter: account.publicKey }) - .rpc() - .then((signature) => { - uiToastLink({ - link: getExplorerUrl(`/tx/${signature}`), - label: 'View transaction', - }) - return refresh() - }) - .catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-initialize.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-initialize.tsx deleted file mode 100644 index 9a88046..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-initialize.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { uiToastLink, useCluster } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { Keypair } from '@solana/web3.js' -import { useMutation } from '@tanstack/react-query' -import { useCounterProgram } from './use-counter-program' - -import { useCounterRefresh } from './use-counter-refresh' - -export function useCounterInitialize() { - const program = useCounterProgram() - const refresh = useCounterRefresh() - const { getExplorerUrl } = useCluster() - - return useMutation({ - mutationKey: ['counter', 'initialize'], - mutationFn: ({ keypair }: { keypair: Keypair }) => - program.methods - .initializeCounter() - .accounts({ counter: keypair.publicKey }) - .signers([keypair]) - .rpc() - .then((signature) => { - uiToastLink({ - link: getExplorerUrl(`/tx/${signature}`), - label: 'View transaction', - }) - - return refresh() - }) - .catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-program.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-program.tsx deleted file mode 100644 index d9cb0c9..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-program.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { Program } from '@coral-xyz/anchor' -import { CounterIDL, getCounterProgramId } from '@tokengator/anchor' -import { useAnchorProvider, useCluster } from '@tokengator/web-solana-data-access' -import { Cluster } from '@solana/web3.js' - -import { useMemo } from 'react' - -export function useCounterProgram() { - const provider = useAnchorProvider() - const { cluster } = useCluster() - - const programId = useMemo(() => getCounterProgramId(cluster.network as Cluster), [cluster]) - return new Program(CounterIDL, programId, provider) -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-refresh.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-refresh.tsx deleted file mode 100644 index 4c07b6c..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-refresh.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useWallet } from '@solana/wallet-adapter-react' -import { useGetBalance } from '@tokengator/web-solana-data-access' -import { useCounterFetchAll } from './use-counter-fetch-all' - -export function useCounterRefresh() { - const { publicKey } = useWallet() - - const getBalance = useGetBalance({ address: publicKey! }) - const countersQuery = useCounterFetchAll() - - return async () => { - await Promise.all([countersQuery.refetch(), getBalance.refetch()]) - } -} diff --git a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-set.tsx b/libs/web/solana/feature/src/lib/counter/data-access/use-counter-set.tsx deleted file mode 100644 index e86666d..0000000 --- a/libs/web/solana/feature/src/lib/counter/data-access/use-counter-set.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { BN } from '@coral-xyz/anchor' -import { uiToastLink } from '@tokengator/web-solana-data-access' -import { toastError } from '@pubkey-ui/core' -import { useMutation } from '@tanstack/react-query' -import { useCounterProgramAccount } from './counter-program-account-provider' - -export function useCounterSet() { - const { account, program, refresh, getExplorerUrl } = useCounterProgramAccount() - - return useMutation({ - mutationKey: ['counter', 'decrement', { account }], - mutationFn: (value: number) => - program.methods - .set(new BN(value)) - .accounts({ counter: account.publicKey }) - .rpc() - .then((signature) => { - if (signature) { - uiToastLink({ - link: getExplorerUrl(`/tx/${signature}`), - label: 'View transaction', - }) - } - return refresh() - }) - .catch((err) => toastError(err.message)), - }) -} diff --git a/libs/web/solana/feature/src/lib/counter/ui/counter-close-button.tsx b/libs/web/solana/feature/src/lib/counter/ui/counter-close-button.tsx deleted file mode 100644 index ed53fbd..0000000 --- a/libs/web/solana/feature/src/lib/counter/ui/counter-close-button.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ActionIcon, Tooltip } from '@mantine/core' -import { IconTrash } from '@tabler/icons-react' -import { useCounterClose } from '../data-access/use-counter-close' - -export function CounterCloseButton() { - const counterClose = useCounterClose() - - return ( - - counterClose.mutateAsync()} - > - - - - ) -} diff --git a/libs/web/solana/feature/src/lib/counter/ui/counter-decrement-button.tsx b/libs/web/solana/feature/src/lib/counter/ui/counter-decrement-button.tsx deleted file mode 100644 index 0a896b6..0000000 --- a/libs/web/solana/feature/src/lib/counter/ui/counter-decrement-button.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { ActionIcon, Tooltip } from '@mantine/core' -import { IconMinus } from '@tabler/icons-react' -import { useCounterDecrement } from '../data-access/use-counter-decrement' - -export function CounterDecrementButton() { - const counterDecrement = useCounterDecrement() - - return ( - - counterDecrement.mutateAsync()} - > - - - - ) -} diff --git a/libs/web/solana/feature/src/lib/counter/ui/counter-increment-button.tsx b/libs/web/solana/feature/src/lib/counter/ui/counter-increment-button.tsx deleted file mode 100644 index a3d08d9..0000000 --- a/libs/web/solana/feature/src/lib/counter/ui/counter-increment-button.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { ActionIcon, Tooltip } from '@mantine/core' -import { IconPlus } from '@tabler/icons-react' -import { useCounterIncrement } from '../data-access/use-counter-increment' - -export function CounterIncrementButton() { - const counterIncrement = useCounterIncrement() - - return ( - - counterIncrement.mutateAsync()} - > - - - - ) -} diff --git a/libs/web/solana/feature/src/lib/counter/ui/counter-value-button.tsx b/libs/web/solana/feature/src/lib/counter/ui/counter-value-button.tsx deleted file mode 100644 index 5c3e632..0000000 --- a/libs/web/solana/feature/src/lib/counter/ui/counter-value-button.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { ActionIcon, Tooltip } from '@mantine/core' -import { toastWarning } from '@pubkey-ui/core' - -import { useCounterFetch } from '../data-access/use-counter-fetch' -import { useCounterSet } from '../data-access/use-counter-set' -import { useCounterProgramAccount } from '../data-access/counter-program-account-provider' - -export function CounterValueButton() { - const { account } = useCounterProgramAccount() - const counterQuery = useCounterFetch({ account: account.publicKey }) - const counterSet = useCounterSet() - - const value = counterQuery.data?.count.toString() ?? '0' - - return ( - - { - const input = parseInt(prompt('Enter a value to set the counter to:', value) || '0') - if (isNaN(input) || input < 0 || input === Number(value)) { - toastWarning({ message: 'Invalid input' }) - return - } - return counterSet.mutateAsync(input) - }} - > - {value} - - - ) -} diff --git a/libs/web/solana/feature/src/lib/counter/ui/program-counter-account.tsx b/libs/web/solana/feature/src/lib/counter/ui/program-counter-account.tsx deleted file mode 100644 index 760da46..0000000 --- a/libs/web/solana/feature/src/lib/counter/ui/program-counter-account.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { Group, Stack } from '@mantine/core' -import { ellipsify } from '@tokengator/sdk' -import { SolanaUiExplorerLink } from '@tokengator/web-solana-ui' -import { UiCard, UiDebugModal } from '@pubkey-ui/core' -import { useCounterProgramAccount } from '../data-access/counter-program-account-provider' -import { CounterCloseButton } from './counter-close-button' -import { CounterDecrementButton } from './counter-decrement-button' -import { CounterIncrementButton } from './counter-increment-button' -import { CounterValueButton } from './counter-value-button' - -export function ProgramCounterAccount() { - const { account } = useCounterProgramAccount() - - return ( - - - - - - - - } - key={account.publicKey.toString()} - > - - - - - - - - - - - ) -} diff --git a/libs/web/solana/feature/src/lib/solana-feature.tsx b/libs/web/solana/feature/src/lib/solana-feature.tsx index c4461b6..8b5aee9 100644 --- a/libs/web/solana/feature/src/lib/solana-feature.tsx +++ b/libs/web/solana/feature/src/lib/solana-feature.tsx @@ -1,18 +1,16 @@ import { type UiGridRoute, UiGridRoutes } from '@pubkey-ui/core' -import { IconNumber, IconServer, IconWallet } from '@tabler/icons-react' +import { IconServer, IconWallet } from '@tabler/icons-react' import { lazy } from 'react' export const AccountListFeature = lazy(() => import('./account/account-list-feature')) export const AccountDetailFeature = lazy(() => import('./account/account-detail-feature')) export const ClusterFeature = lazy(() => import('./cluster/cluster-feature')) -export const CounterFeature = lazy(() => import('./counter/counter-feature')) export default function SolanaFeature() { const routes: UiGridRoute[] = [ { path: 'accounts', label: 'Accounts', element: , leftSection: }, { path: 'accounts/:address', element: }, { path: 'clusters', label: 'Clusters', element: , leftSection: }, - { path: 'counter', label: 'Counter', element: , leftSection: }, ] return } diff --git a/tsconfig.base.json b/tsconfig.base.json index ef4635f..0106ebf 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,7 +15,6 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@tokengator/anchor": ["libs/anchor/src/index.ts"], "@tokengator/api-auth-data-access": ["libs/api/auth/data-access/src/index.ts"], "@tokengator/api-auth-feature": ["libs/api/auth/feature/src/index.ts"], "@tokengator/api-claim-data-access": ["libs/api/claim/data-access/src/index.ts"],