diff --git a/.github/workflows/publish-bolt-crates.yml b/.github/workflows/publish-bolt-crates.yml index 6d1bd0a..56d9623 100644 --- a/.github/workflows/publish-bolt-crates.yml +++ b/.github/workflows/publish-bolt-crates.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - solana_version: v1.18.8 + solana_version: v1.18.15 jobs: install: @@ -166,6 +166,12 @@ jobs: cargo install --path cli --force --locked bolt build + - name: Generate lib + run: | + cd clients/bolt-sdk + yarn install && yarn build + cd ../.. + - name: run tests run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" diff --git a/.github/workflows/publish-bolt-sdk.yml b/.github/workflows/publish-bolt-sdk.yml index b9bf131..4f03960 100644 --- a/.github/workflows/publish-bolt-sdk.yml +++ b/.github/workflows/publish-bolt-sdk.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - solana_version: v1.18.8 + solana_version: v1.18.15 jobs: install: @@ -166,6 +166,12 @@ jobs: cargo install --path cli --force --locked bolt build + - name: Generate lib + run: | + cd clients/bolt-sdk + yarn install && yarn build + cd ../.. + - name: run tests run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5c46c01..c50ba5c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -6,7 +6,7 @@ on: pull_request: env: - solana_version: v1.18.9 + solana_version: v1.18.15 jobs: install: @@ -157,7 +157,7 @@ jobs: - name: Generate lib run: | cd clients/bolt-sdk - yarn build + yarn install && yarn build cd ../.. - name: run tests diff --git a/CHANGELOG.md b/CHANGELOG.md index 8512aaf..41780cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ +## [0.1.8] - 2024-06-27 + - Add allow undelegation ix (#68) + +## [0.1.7] - 2024-06-21 + +### ✨️ Features + - Add manual commit to the typescript sdk (#59) + - Upgrade to Anchor 0.30.1 (#62) + +### 👷 CI/CD + ## [0.1.5] - 2024-04-23 ### 📚 Documentation diff --git a/Cargo.lock b/Cargo.lock index d18fa35..4073566 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7368e171b3a317885dc08ec0f74eed9d0ad6c726cc819593aed81440dca926" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" dependencies = [ "anchor-syn", "proc-macro2", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f527df85a8cba3f2bea04e46ed71b66e525ea378c7fec538aa205f4520b73e31" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" dependencies = [ "anchor-syn", "bs58 0.5.1", @@ -138,9 +138,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb1dc1845cf8636c2e046a274ca074dabd3884ac8ed11cc4ed64b7e8ef5a318" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" dependencies = [ "anchor-syn", "quote", @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f382e41514c59a77ffa7bb1a47df9a0359564a749b6934485c742c11962e540" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" dependencies = [ "anchor-syn", "quote", @@ -160,9 +160,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473a122aeed3f6b666438236338d2ef7833ee5fdc5688e1baa80185d61088a53" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" dependencies = [ "anchor-syn", "proc-macro2", @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f88c7ffe2eb40aeac43ffd0d74a6671581158aedfaa0552330a2ef92fa5c889" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" dependencies = [ "anchor-lang-idl", "anchor-syn", @@ -189,9 +189,9 @@ dependencies = [ [[package]] name = "anchor-cli" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80273f97533cb07dd4d0ae164e23e550df2025802a5615d36eff6e0a90942a55" +checksum = "1b7ce8847bb8fd99c4ba0af11071b38dfeae28677bb9f15e213e8f129ef9d41f" dependencies = [ "anchor-client", "anchor-lang", @@ -201,7 +201,7 @@ dependencies = [ "bincode", "cargo_toml", "chrono", - "clap 4.5.4", + "clap 4.5.7", "dirs", "flate2", "heck 0.4.1", @@ -227,9 +227,9 @@ dependencies = [ [[package]] name = "anchor-client" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4adc1b211826d72036dc2fcb679a8ef7fe5b9afda376b0b26debe19e28de3ea" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -246,9 +246,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9b97c99dcec135aae0ff908c14bcfcd3e78cfc16a0c6f245135038f0e6d390" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" dependencies = [ "anchor-syn", "quote", @@ -257,9 +257,9 @@ dependencies = [ [[package]] name = "anchor-derive-serde" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbece98f6ad9c37070edc0841326c9623a249346cd74f433e7cef69b14f7f31d" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" dependencies = [ "anchor-syn", "borsh-derive-internal 0.10.3", @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8badbe2648bc99a85ee05a7a5f9512e5e2af8ffac71476a69350cb278057ac53" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" dependencies = [ "proc-macro2", "quote", @@ -281,9 +281,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41feb9c1cd9f4b0fad1c004fc8f289183f3ce27e9db38fa6e434470c716fb1e" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -307,22 +307,34 @@ dependencies = [ [[package]] name = "anchor-lang-idl" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b29da81eae478b1bb846749b06b8a2cb9c6f9ed26ca793b0c916793fdf36adab" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" dependencies = [ - "anchor-syn", + "anchor-lang-idl-spec", "anyhow", + "heck 0.3.3", "regex", "serde", "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", ] [[package]] name = "anchor-spl" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dcee54a30b27ea8317ca647759b5d9701a8c7caaaa0c922c6d3c306a7278a7a" +checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" dependencies = [ "anchor-lang", "mpl-token-metadata", @@ -336,9 +348,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac53f2378bc08e89e20c2b893c01986ffd34cfbc69a17e35bd6f754753e9fdad" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" dependencies = [ "anyhow", "bs58 0.5.1", @@ -409,9 +421,9 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] @@ -663,7 +675,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -685,9 +697,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -811,7 +823,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bolt-attribute-bolt-arguments" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -820,7 +832,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-component" -version = "0.1.6" +version = "0.1.8" dependencies = [ "bolt-utils", "proc-macro2", @@ -830,7 +842,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-component-deserialize" -version = "0.1.6" +version = "0.1.8" dependencies = [ "bolt-utils", "proc-macro2", @@ -840,7 +852,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-component-id" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -849,7 +861,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-delegate" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -858,7 +870,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-extra-accounts" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -867,7 +879,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-program" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -876,7 +888,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-system" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -885,7 +897,7 @@ dependencies = [ [[package]] name = "bolt-attribute-bolt-system-input" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -894,14 +906,14 @@ dependencies = [ [[package]] name = "bolt-cli" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-cli", "anchor-client", "anchor-lang-idl", "anchor-syn", "anyhow", - "clap 4.5.4", + "clap 4.5.7", "heck 0.5.0", "serde_json", "syn 1.0.109", @@ -909,7 +921,7 @@ dependencies = [ [[package]] name = "bolt-component" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-system", @@ -921,7 +933,7 @@ version = "0.0.1" [[package]] name = "bolt-helpers-system-template" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -930,7 +942,7 @@ dependencies = [ [[package]] name = "bolt-helpers-world-apply" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -939,7 +951,7 @@ dependencies = [ [[package]] name = "bolt-lang" -version = "0.1.6" +version = "0.1.8" dependencies = [ "ahash 0.8.11", "anchor-lang", @@ -961,7 +973,7 @@ dependencies = [ [[package]] name = "bolt-system" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-helpers-system-template", @@ -977,7 +989,7 @@ dependencies = [ [[package]] name = "bolt-utils" -version = "0.1.6" +version = "0.1.8" dependencies = [ "proc-macro2", "quote", @@ -1050,7 +1062,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "syn_derive", ] @@ -1152,9 +1164,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" dependencies = [ "bytemuck_derive", ] @@ -1167,7 +1179,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1204,9 +1216,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -1282,9 +1294,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -1292,26 +1304,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.0", + "clap_lex 0.7.1", "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1325,9 +1337,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" @@ -1540,7 +1552,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1551,7 +1563,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1575,14 +1587,26 @@ checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "delegation-program-sdk" -version = "0.0.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4c66a4e72ca5581f8f14cc69bcded51da1d1c8e548e2b394bc00bb76b0b7d" +checksum = "f8c618cde8084c987bdf7434d06253b5c79d032aa487fc996965d5dc59e3dbd6" dependencies = [ "borsh 0.10.3", + "delegation-sdk-attribute-delegate", "solana-program", ] +[[package]] +name = "delegation-sdk-attribute-delegate" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95b9e42aee58a38bcd7f3f0014a832e66ea31157f4f8102ae85a4a37aa4eeb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "der" version = "0.5.1" @@ -1707,13 +1731,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1736,7 +1760,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1827,7 +1851,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1976,7 +2000,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2227,9 +2251,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2592,9 +2616,9 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2659,9 +2683,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -2789,7 +2813,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2870,7 +2894,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2882,7 +2906,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2893,9 +2917,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" dependencies = [ "memchr", ] @@ -2951,7 +2975,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.2", "smallvec", "windows-targets 0.52.5", ] @@ -3050,7 +3074,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3135,7 +3159,7 @@ dependencies = [ [[package]] name = "position" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-lang", @@ -3212,9 +3236,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3236,7 +3260,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3419,9 +3443,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ "bitflags 2.5.0", ] @@ -3439,9 +3463,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -3451,9 +3475,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3462,9 +3486,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -3700,7 +3724,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3768,7 +3792,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3822,7 +3846,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3968,9 +3992,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52346da8fbbac45fdfbb9c09f7a4e263fabd13f401352e1feedc55e1178a8ba2" +checksum = "4973213a11c2e1b924b36e0c6688682b5aa4623f8d4eeaa1204c32cee524e6d6" dependencies = [ "Inflector", "base64 0.21.7", @@ -3993,9 +4017,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafd11f1614edd414adb414b96a481152b01ac45c14c3ff56fc757412698b228" +checksum = "909f4553d0b31bb5b97533a6b64cc321a4eace9112d6efbabcf4408ea1b3f1db" dependencies = [ "chrono", "clap 2.34.0", @@ -4010,9 +4034,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2228beb53090556c65a82251b904ae197f4979b34e08ab03303448c1ac9f609f" +checksum = "2242c4a0776cdaec1358d0ffc61b32131985a7b2210c491fa465d28c313eb880" dependencies = [ "dirs-next", "lazy_static", @@ -4026,9 +4050,9 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522922d51cc1fd3f0a6dd9ed0a8939f7ff46f5ebaa3a6d7eee3cd2516e6ac9e6" +checksum = "c5cc431df6cc1dd964134fa4ec7df765d3af3fae9c2148f96a3c4fb500290633" dependencies = [ "async-trait", "bincode", @@ -4059,9 +4083,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2010ba6fe2a1c4270ca3d3ef23ebfd893e3d2c980b9c0fc04451c4ce2f6b3deb" +checksum = "e38b040d3a42e8f7d80c4a86bb0d49d7aed663b56b0fe0ae135d2d145fb7ae3a" dependencies = [ "bincode", "chrono", @@ -4073,9 +4097,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acaf8e98f3f30596d73173183a80d7f83e23df1429a889a68cfe7be69abe39b" +checksum = "ae02622c63943485f0af3d0896626eaf6478e734f0b6bc61c7cc5320963c6e75" dependencies = [ "async-trait", "bincode", @@ -4095,9 +4119,9 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a16fe4b9806157121ec8514bde1907637184238b0b4431759a3b2100f8c06f7" +checksum = "6fb2e8702fea7c9549d4e946c9b30894f99c94778d80cc8a669d8fdccb131ce3" dependencies = [ "bincode", "byteorder", @@ -4119,9 +4143,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c00a6aca244dfa904e2c4a26406ba7b0987344ceaec932f3cda0b35eff0babc" +checksum = "4867f66e9527fa44451c861c1dc6d9b2a7c7a668d7c6a297cdefbe39f4395b33" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4144,21 +4168,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed58b27b9b8877893f69bc5cfd1c62e984315e0229d83cf8a32ad0933c0d6c9" +checksum = "168f24d97347b85f05192df58d6be3e3047a4aadc4001bc1b9e711a5ec878eea" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "solana-logger" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee2daf61ae582edf9634adf8e5021faf002df0d3f69078ecbcd6c7b41bdf833" +checksum = "a0511082fc62f2d086520fff5aa1917c389d8c840930c08ad255ae05952c08a2" dependencies = [ "env_logger", "lazy_static", @@ -4167,9 +4191,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "148512f384b82cf9e8bfe80503b688340d42a4cc17cfd572b88a6d803a488527" +checksum = "be55a3df105431d25f86f2a7da0cbbde5f54c1f0782ca59367ea4a8037bc6797" dependencies = [ "log", "solana-sdk", @@ -4177,9 +4201,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d734099c26f81621bd1aaddb8788908e20fd7fac28fb00402d564964eae4ea" +checksum = "ddec097ed7572804389195128dbd57958b427829153c6cd8ec3343c86fe3cd22" dependencies = [ "crossbeam-channel", "gethostname", @@ -4192,9 +4216,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563911bb92bc6ae3ba4e7d9930dc560c61333ee57f7ba0421abe0cab14982e72" +checksum = "258fa7c29fb7605b8d2ed89aa0d43c640d14f4147ad1f5b3fdad19a1ac145ca5" dependencies = [ "bincode", "clap 3.2.25", @@ -4214,9 +4238,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21bd999096d156dd122aed05eb4601fbc9dba016e229be72ba838aa5ff2a7df" +checksum = "ca422edcf16a6e64003ca118575ea641f7b750f14a0ad28c71dd84f33dcb912a" dependencies = [ "ahash 0.8.11", "bincode", @@ -4243,9 +4267,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4908f360900d0a1aa81c7bad7937c78f0825c3f08ff0b22f1de0e43e5946f2" +checksum = "2bc5a636dc75e5c25651e34f7a36afc9ae60d38166687c5b0375abb580ac81a2" dependencies = [ "ark-bn254", "ark-ec", @@ -4298,9 +4322,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c8ace7f999a8278351ea86ed93f57e7833cb65fb04167a9ba9ea593e995288" +checksum = "bf373c3da0387f47fee4c5ed2465a9628b9db026a62211a692a9285aa9251544" dependencies = [ "base64 0.21.7", "bincode", @@ -4326,9 +4350,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfaebabf56720238919d8d1699211240cca485bda3b12f6189c737679a935912" +checksum = "97b9abc76168d19927561db6a3685b98752bd0961b4ce4f8b7f85ee12238c017" dependencies = [ "crossbeam-channel", "futures-util", @@ -4351,9 +4375,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85f868c2bf7591835705298dd4350c38a8e9de07e53109fa243ebc55bbd33f03" +checksum = "7952c5306a0be5f5276448cd20246b31265bfa884f29a077a24303c6a16aeb34" dependencies = [ "async-mutex", "async-trait", @@ -4378,9 +4402,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c9c928e5b6b1e37296e139c757695f9540e2d4f04794a1ae1915eba7076e68" +checksum = "a4fa0cc66f8e73d769bca2ede3012ba2ef8ab67963e832808665369f2cf81743" dependencies = [ "lazy_static", "num_cpus", @@ -4388,9 +4412,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d9f47fb9de096edd536bb39c1a8383372acf719f3fd49242bfe332ea216c3b" +checksum = "289803796d4ff7b4699504d3ab9e9d9c5205ea3892b2ebe397b377494dbd75d4" dependencies = [ "console", "dialoguer", @@ -4407,9 +4431,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2259b63faca1132e3a0c8b98438fb60e5d25897260dd3655bcf4ec8c6f2bf8" +checksum = "6cb55a08018776a62ecff52139fbcdab1a7baa4e8f077202be58156e8dde4d5f" dependencies = [ "async-trait", "base64 0.21.7", @@ -4433,9 +4457,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0aea25d581de77ba256b81f4ebd8d963b85ec01d70a74829365e85f6403d497" +checksum = "72a8403038f4d6ab65bc7e7afb3afe8d9824c592232553c5cef55cf3de36025d" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4455,9 +4479,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef5cbfb47707599ccb5734aa70b5161a2d437df54044021870be3f575eb0f1a" +checksum = "4caca735caf76d51c074c3bacbfe38094bf7f92cfbe7b5b13f3bc4946e64f889" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4468,9 +4492,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50ec330850953d4971b052ff98c74a8e67e7618b4aed9f4971b8d3b68fcd1cd" +checksum = "df43d3a1e1637397ab43cbc216a5a8f977ec8a3cc3f3ae8c3851c83a3255dbcf" dependencies = [ "assert_matches", "base64 0.21.7", @@ -4523,15 +4547,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ef2ea49002d1bf52a4a8509570b2c3b88e7b6d0a131b11bbd637ca1e1df0ff" +checksum = "86c76414183a325038ff020b22c07d1e9d2da0703ddc0244acfed37ee2921d96" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4542,9 +4566,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-streamer" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29de0561c0aa6249292a2602be31e812977ae223be031b3a9e0715d98fb19b06" +checksum = "fad1bdb955ec6d23a1dbf87e403ff3e610d68616275693125a893d7ed4b2d323" dependencies = [ "async-channel", "bytes", @@ -4575,9 +4599,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20b7c9b7214fe50e2e72090f833f11e07f3b00ba69b57872b6adcf5479cdf32" +checksum = "bc301310ba0755c449a8800136f67f8ad14419b366404629894cd10021495360" dependencies = [ "bincode", "log", @@ -4590,9 +4614,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbfd83d8d7da758b10d6e1075322843dce591a75d15d611e9eec5508e9c7233" +checksum = "fb887bd5078ff015e103e9ee54a6713380590efa8ff1804b3a653f07188928c6" dependencies = [ "async-trait", "bincode", @@ -4614,9 +4638,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0439563ffb7471a0b51446f0fff5c8b2108e31248bf7dbab8b9efaa2af3a4c27" +checksum = "4a0cdfdf63192fb60de094fae8e81159e4e3e9aac9659fe3f9ef0e707023fb32" dependencies = [ "Inflector", "base64 0.21.7", @@ -4639,9 +4663,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1160ce03865189e4c3327cc492aeacc8567863f195a269533d98f15485402b74" +checksum = "3ea0d6d8d66e36371577f51c4d1d6192a66f1fa4efe7161a36d94677640dcadb" dependencies = [ "async-trait", "solana-connection-cache", @@ -4654,9 +4678,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb25449b519a334103778e2fc1c5c0e3ea7862ae2c1ffe90fc82ce3c96058171" +checksum = "6f4c2f531c22ce806b211118be8928a791425f97de4592371fb57b246ed33e34" dependencies = [ "log", "rustc_version", @@ -4670,9 +4694,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78899849d1131b2fbbe9f826080cc18cec5598da63a77357642c9cd8b1a86a86" +checksum = "6d8a6486017e71a3714a8e1a635e17209135cc20535ba9808ccf106d80ff6e8b" dependencies = [ "bincode", "log", @@ -4692,9 +4716,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.15" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cafb3df56516086f65e2a08a8cd03f504236f3b5348299abd45415d1d18ba32" +checksum = "513407f88394e437b4ff5aad892bc5bf51a655ae2401e6e63549734d3695c46f" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -4836,7 +4860,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn 0.1.2", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4847,7 +4871,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn 0.2.0", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4859,7 +4883,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.66", + "syn 2.0.67", "thiserror", ] @@ -4872,7 +4896,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.66", + "syn 2.0.67", "thiserror", ] @@ -4946,7 +4970,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4958,7 +4982,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -5214,9 +5238,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90" dependencies = [ "proc-macro2", "quote", @@ -5232,7 +5256,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -5255,7 +5279,7 @@ dependencies = [ [[package]] name = "system-apply-velocity" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "anchor-spl", @@ -5287,7 +5311,7 @@ dependencies = [ [[package]] name = "system-fly" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-lang", @@ -5296,7 +5320,7 @@ dependencies = [ [[package]] name = "system-simple-movement" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-lang", @@ -5306,9 +5330,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5379,7 +5403,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -5483,7 +5507,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -5611,7 +5635,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.10", + "winnow 0.6.13", ] [[package]] @@ -5640,7 +5664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -5729,9 +5753,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -5788,9 +5812,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -5805,9 +5829,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vec_map" @@ -5817,7 +5841,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "velocity" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-lang", @@ -5887,7 +5911,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "wasm-bindgen-shared", ] @@ -5921,7 +5945,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6147,9 +6171,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.10" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f217b6745021054125ef5741032a021a9c65f82bee2a8017cca928f1e3179991" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -6166,7 +6190,7 @@ dependencies = [ [[package]] name = "world" -version = "0.1.6" +version = "0.1.8" dependencies = [ "anchor-lang", "bolt-component", @@ -6231,7 +6255,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -6251,7 +6275,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -6275,9 +6299,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.11+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 469935a..d330eb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "0.1.6" +version = "0.1.8" authors = ["Magicblock Labs "] repository = "https://github.com/magicblock-labs/bolt" homepage = "https://www.magicblock.gg/" @@ -15,31 +15,31 @@ license = "MIT" edition = "2021" [workspace.dependencies] -bolt-attribute-bolt-program = { path = "crates/bolt-lang/attribute/bolt-program", version = "=0.1.6" } -bolt-attribute-bolt-delegate = { path = "crates/bolt-lang/attribute/delegate", version = "=0.1.6" } -bolt-attribute-bolt-component = { path = "crates/bolt-lang/attribute/component", version = "=0.1.6" } -bolt-attribute-bolt-system = { path = "crates/bolt-lang/attribute/system", version = "=0.1.6"} -bolt-attribute-bolt-system-input = { path = "crates/bolt-lang/attribute/system-input", version = "=0.1.6" } -bolt-attribute-bolt-extra-accounts = { path = "crates/bolt-lang/attribute/extra-accounts", version = "=0.1.6" } -bolt-attribute-bolt-arguments = { path = "crates/bolt-lang/attribute/arguments", version = "=0.1.6" } -bolt-attribute-bolt-component-deserialize = { path = "crates/bolt-lang/attribute/component-deserialize", version = "=0.1.6" } -bolt-attribute-bolt-component-id = { path = "crates/bolt-lang/attribute/component-id", version = "=0.1.6" } -bolt-helpers-system-template = { path = "crates/bolt-helpers/attribute/system-template", version = "=0.1.6" } -bolt-helpers-world-apply = { path = "crates/bolt-helpers/attribute/world-apply", version = "=0.1.6" } -bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.1.6" } -world = { path = "programs/world", features = ["cpi"], version = "=0.1.6"} -bolt-system = { path = "programs/bolt-system", features = ["cpi"], version = "=0.1.6"} -bolt-component = { path = "programs/bolt-component", features = ["cpi"], version = "=0.1.6"} +bolt-attribute-bolt-program = { path = "crates/bolt-lang/attribute/bolt-program", version = "=0.1.8" } +bolt-attribute-bolt-delegate = { path = "crates/bolt-lang/attribute/delegate", version = "=0.1.8" } +bolt-attribute-bolt-component = { path = "crates/bolt-lang/attribute/component", version = "=0.1.8" } +bolt-attribute-bolt-system = { path = "crates/bolt-lang/attribute/system", version = "=0.1.8"} +bolt-attribute-bolt-system-input = { path = "crates/bolt-lang/attribute/system-input", version = "=0.1.8" } +bolt-attribute-bolt-extra-accounts = { path = "crates/bolt-lang/attribute/extra-accounts", version = "=0.1.8" } +bolt-attribute-bolt-arguments = { path = "crates/bolt-lang/attribute/arguments", version = "=0.1.8" } +bolt-attribute-bolt-component-deserialize = { path = "crates/bolt-lang/attribute/component-deserialize", version = "=0.1.8" } +bolt-attribute-bolt-component-id = { path = "crates/bolt-lang/attribute/component-id", version = "=0.1.8" } +bolt-helpers-system-template = { path = "crates/bolt-helpers/attribute/system-template", version = "=0.1.8" } +bolt-helpers-world-apply = { path = "crates/bolt-helpers/attribute/world-apply", version = "=0.1.8" } +bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.1.8" } +world = { path = "programs/world", features = ["cpi"], version = "=0.1.8"} +bolt-system = { path = "programs/bolt-system", features = ["cpi"], version = "=0.1.8"} +bolt-component = { path = "programs/bolt-component", features = ["cpi"], version = "=0.1.8"} ## External crates -anchor-lang = { version = "=0.30.0", features = ["init-if-needed"] } -anchor-cli = { version = "=0.30.0" } -anchor-client = { version = "=0.30.0" } -anchor-syn = { version = "=0.30.0" } -anchor-lang-idl = { version = "=0.1.0" } +anchor-lang = { version = "=0.30.1", features = ["init-if-needed"] } +anchor-cli = { version = "=0.30.1" } +anchor-client = { version = "=0.30.1" } +anchor-syn = { version = "=0.30.1" } +anchor-spl = { version = "=0.30.1" } +anchor-lang-idl = { version = "=0.1.1" } solana-program = { version = "=1.18" } solana-client = { version = "=1.16" } -anchor-spl = { version = "=0.30.0" } solana-security-txt = "1.1.1" tuple-conv = "1.0.1" syn = { version = "1.0.60", features = ["full"] } @@ -51,7 +51,7 @@ anyhow = "1.0.32" heck = "0.5.0" clap = { version = "4.2.4", features = ["derive"] } ahash = "=0.8.11" -delegation-program-sdk = "=0.0.2" +delegation-program-sdk = "=0.1.3" [profile.release] overflow-checks = true diff --git a/README.md b/README.md index 03c7b6a..b1aa0d3 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,7 @@ Bolt is a high-performance, scalable SVM-based framework designed for Fully On Chain (FOC) Games and Autonomous Worlds. -With Bolt, you can create games that live forever on the blockchain. These games are platform-centric by default, empowering users to extend and modify both game content and logic. Bolt facilitates multiplayer gaming experiences with performances on pair with traditional multiplayer servers. - -Furthermore, the framework incorporates an Entity Component System (ECS) architecture, streamlining the game structuring and assembly process and providing ready-to-use components. Developers can reuse and contribute modules and logic deployed on the blockchain. +With Bolt, you can create games that live forever on the blockchain. These games are platform-centric by default, empowering users to extend and modify both game content and logic. The framework incorporates an Entity Component System (ECS) architecture, streamlining the game structuring and assembly process and providing ready-to-use components. Developers can reuse and contribute modules and logic deployed on the blockchain. ## Packages @@ -53,13 +51,10 @@ cd new-project bolt test ``` -## 📘 Bolt book - -Read the Bolt book: [book.boltengine.gg](https://book.boltengine.gg/) +## 📘 Bolt docs -## 📜 Bolt Whitepaper +Read the Bolt [docs](https://docs.magicblock.gg/BOLT/Introduction/introduction) -Read the Bolt whitepaper for a detailed overview on the architecture and the scalability solution: [Ephemeral Rollups are All you Need](https://arxiv.org/abs/2311.02650) ## 🚧 Under construction diff --git a/cli/npm-package/package.json b/cli/npm-package/package.json index f8c02b8..845df04 100644 --- a/cli/npm-package/package.json +++ b/cli/npm-package/package.json @@ -1,6 +1,6 @@ { "name": "@magicblock-labs/bolt-cli", - "version": "0.1.6", + "version": "0.1.8", "description": "Bolt CLI tool", "homepage": "https://github.com/magicblock-labs/bolt#readme", "bugs": { @@ -29,13 +29,13 @@ "typescript": "^4.9.4" }, "optionalDependencies": { - "@magicblock-labs/bolt-cli-darwin-x64": "0.1.6", - "@magicblock-labs/bolt-cli-darwin-arm64": "0.1.6", - "@magicblock-labs/bolt-cli-linux-x86": "0.1.6", - "@magicblock-labs/bolt-cli-linux-x64": "0.1.6", - "@magicblock-labs/bolt-cli-linux-arm64": "0.1.6", - "@magicblock-labs/bolt-cli-windows-x86": "0.1.6", - "@magicblock-labs/bolt-cli-windows-x64": "0.1.6" + "@magicblock-labs/bolt-cli-darwin-x64": "0.1.8", + "@magicblock-labs/bolt-cli-darwin-arm64": "0.1.8", + "@magicblock-labs/bolt-cli-linux-x86": "0.1.8", + "@magicblock-labs/bolt-cli-linux-x64": "0.1.8", + "@magicblock-labs/bolt-cli-linux-arm64": "0.1.8", + "@magicblock-labs/bolt-cli-windows-x86": "0.1.8", + "@magicblock-labs/bolt-cli-windows-x64": "0.1.8" }, "publishConfig": { "access": "public" diff --git a/cli/npm-package/package.json.tmpl b/cli/npm-package/package.json.tmpl index 753812a..6a0d9f1 100644 --- a/cli/npm-package/package.json.tmpl +++ b/cli/npm-package/package.json.tmpl @@ -1,7 +1,7 @@ { "name": "@magicblock-labs/${node_pkg}", "description": "Bolt CLI tool (${node_pkg})", - "version": "0.1.6", + "version": "0.1.8", "repository": { "type": "git", "url": "git+https://github.com/magicblock-labs/bolt.git" diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 4150c19..3d01f99 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -69,6 +69,7 @@ pub fn entry(opts: Opts) -> Result<()> { name, javascript, solidity, + no_install, no_git, template, test_template, @@ -78,6 +79,7 @@ pub fn entry(opts: Opts) -> Result<()> { name, javascript, solidity, + no_install, no_git, template, test_template, @@ -137,6 +139,7 @@ fn init( name: String, javascript: bool, solidity: bool, + no_install: bool, no_git: bool, template: anchor_cli::rust_template::ProgramTemplate, test_template: anchor_cli::rust_template::TestTemplate, @@ -385,10 +388,12 @@ fn init( } } - let yarn_result = install_node_modules("yarn")?; - if !yarn_result.status.success() { - println!("Failed yarn install will attempt to npm install"); - install_node_modules("npm")?; + if !no_install { + let yarn_result = install_node_modules("yarn")?; + if !yarn_result.status.success() { + println!("Failed yarn install will attempt to npm install"); + install_node_modules("npm")?; + } } if !no_git { diff --git a/clients/bolt-sdk/package.json b/clients/bolt-sdk/package.json index f42b3b7..ee285f5 100644 --- a/clients/bolt-sdk/package.json +++ b/clients/bolt-sdk/package.json @@ -1,13 +1,14 @@ { "name": "@magicblock-labs/bolt-sdk", - "version": "0.1.6", + "version": "0.1.8", "description": "Bolt typescript SDK", "author": "dev@magicblock.gg", "license": "MIT", "private": false, "dependencies": { "@metaplex-foundation/beet": "^0.7.1", - "@metaplex-foundation/beet-solana": "^0.4.0" + "@metaplex-foundation/beet-solana": "^0.4.0", + "@magicblock-labs/delegation-program": "0.1.3" }, "devDependencies": { "@metaplex-foundation/solita": "^0.20.1", diff --git a/clients/bolt-sdk/src/delegation/accounts.ts b/clients/bolt-sdk/src/delegation/accounts.ts deleted file mode 100644 index 8b4218d..0000000 --- a/clients/bolt-sdk/src/delegation/accounts.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; - -const SEED_BUFFER_PDA = "buffer"; -const SEED_DELEGATION_PDA = "delegation"; -const DELEGATED_ACCOUNT_SEEDS = "account-seeds"; -const SEED_COMMIT_STATE_RECORD_PDA = "commit-state-record"; -const SEED_STATE_DIFF_PDA = "state-diff"; -export const DELEGATION_PROGRAM_ID = - "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; - -export function getDelegationAccounts( - accountToDelegate: PublicKey, - ownerProgram: PublicKey, - ownedBuffer: boolean = true -) { - const pdaBytes = accountToDelegate.toBytes(); - - const [delegationPda] = PublicKey.findProgramAddressSync( - [Buffer.from(SEED_DELEGATION_PDA), pdaBytes], - new PublicKey(DELEGATION_PROGRAM_ID) - ); - - const [delegatedAccountSeedsPda] = PublicKey.findProgramAddressSync( - [Buffer.from(DELEGATED_ACCOUNT_SEEDS), pdaBytes], - new PublicKey(DELEGATION_PROGRAM_ID) - ); - - const [bufferPda] = PublicKey.findProgramAddressSync( - [Buffer.from(SEED_BUFFER_PDA), pdaBytes], - ownedBuffer - ? new PublicKey(ownerProgram) - : new PublicKey(DELEGATION_PROGRAM_ID) - ); - - const [commitStateRecordPda] = PublicKey.findProgramAddressSync( - [Buffer.from(SEED_COMMIT_STATE_RECORD_PDA), pdaBytes], - new PublicKey(DELEGATION_PROGRAM_ID) - ); - - const [commitStatePda] = PublicKey.findProgramAddressSync( - [Buffer.from(SEED_STATE_DIFF_PDA), pdaBytes], - new PublicKey(DELEGATION_PROGRAM_ID) - ); - return { - delegationPda, - delegatedAccountSeedsPda, - bufferPda, - commitStateRecordPda, - commitStatePda, - }; -} diff --git a/clients/bolt-sdk/src/delegation/allow_undelegation.ts b/clients/bolt-sdk/src/delegation/allow_undelegation.ts new file mode 100644 index 0000000..c34f674 --- /dev/null +++ b/clients/bolt-sdk/src/delegation/allow_undelegation.ts @@ -0,0 +1,75 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +import { + DelegateAccounts, + DELEGATION_PROGRAM_ID, +} from "@magicblock-labs/delegation-program"; + +export const allowUndelegationStruct = new beet.BeetArgsStruct<{ + instructionDiscriminator: number[] /* size: 8 */; +}>( + [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], + "allowUndelegationInstructionArgs" +); + +export interface AllowUndelegationInstructionAccounts { + delegatedAccount: web3.PublicKey; + ownerProgram: web3.PublicKey; + buffer?: web3.PublicKey; +} + +export const allowUndelegateInstructionDiscriminator = [ + 255, 66, 82, 208, 247, 5, 210, 126, +]; + +/** + * Creates a Delegate instruction. + */ + +export function createAllowUndelegationInstruction( + accounts: AllowUndelegationInstructionAccounts +) { + const [data] = allowUndelegationStruct.serialize({ + instructionDiscriminator: allowUndelegateInstructionDiscriminator, + }); + + const { delegationPda, delegationMetadata, bufferPda } = DelegateAccounts( + accounts.delegatedAccount, + accounts.ownerProgram + ); + + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.delegatedAccount, + isWritable: false, + isSigner: false, + }, + { + pubkey: delegationPda, + isWritable: false, + isSigner: false, + }, + { + pubkey: delegationMetadata, + isWritable: true, + isSigner: false, + }, + { + pubkey: bufferPda, + isWritable: false, + isSigner: false, + }, + { + pubkey: new web3.PublicKey(DELEGATION_PROGRAM_ID), + isWritable: true, + isSigner: false, + }, + ]; + + const programId = accounts.ownerProgram; + return new web3.TransactionInstruction({ + programId, + keys, + data, + }); +} diff --git a/clients/bolt-sdk/src/delegation/delegate.ts b/clients/bolt-sdk/src/delegation/delegate.ts index 1c13eaa..9fe3285 100644 --- a/clients/bolt-sdk/src/delegation/delegate.ts +++ b/clients/bolt-sdk/src/delegation/delegate.ts @@ -1,6 +1,9 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { DELEGATION_PROGRAM_ID, getDelegationAccounts } from "./accounts"; +import { + DelegateAccounts, + DELEGATION_PROGRAM_ID, +} from "@magicblock-labs/delegation-program"; export interface DelegateInstructionArgs { validUntil: beet.bignum; @@ -32,7 +35,7 @@ export interface DelegateInstructionAccounts { ownerProgram: web3.PublicKey; buffer?: web3.PublicKey; delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; + delegationMetadata?: web3.PublicKey; delegationProgram?: web3.PublicKey; systemProgram?: web3.PublicKey; } @@ -57,8 +60,10 @@ export function createDelegateInstruction( commitFrequencyMs, }); - const { delegationPda, delegatedAccountSeedsPda, bufferPda } = - getDelegationAccounts(accounts.account, accounts.ownerProgram); + const { delegationPda, delegationMetadata, bufferPda } = DelegateAccounts( + accounts.account, + accounts.ownerProgram + ); const keys: web3.AccountMeta[] = [ { @@ -92,7 +97,7 @@ export function createDelegateInstruction( isSigner: false, }, { - pubkey: accounts.delegateAccountSeeds ?? delegatedAccountSeedsPda, + pubkey: accounts.delegationMetadata ?? delegationMetadata, isWritable: true, isSigner: false, }, diff --git a/clients/bolt-sdk/src/delegation/undelegate.ts b/clients/bolt-sdk/src/delegation/undelegate.ts deleted file mode 100644 index beac3fb..0000000 --- a/clients/bolt-sdk/src/delegation/undelegate.ts +++ /dev/null @@ -1,115 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import { DELEGATION_PROGRAM_ID, getDelegationAccounts } from "./accounts"; -import { PublicKey } from "@solana/web3.js"; - -export const undelegateStruct = new beet.FixableBeetArgsStruct<{ - instructionDiscriminator: number[]; -}>( - [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], - "UndelegateInstructionArgs" -); - -/** - * Accounts required by the _undelegate_ instruction - */ - -export interface UndelegateInstructionAccounts { - payer: web3.PublicKey; - delegatedAccount: web3.PublicKey; - ownerProgram: web3.PublicKey; - buffer?: web3.PublicKey; - commitStatePda?: web3.PublicKey; - commitStateRecordPda?: web3.PublicKey; - delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; - reimbursement: web3.PublicKey; - systemProgram?: web3.PublicKey; -} - -export const undelegateInstructionDiscriminator = [3, 0, 0, 0, 0, 0, 0, 0]; - -/** - * Creates an _undelegate_ instruction. - * - */ - -export function createUndelegateInstruction( - accounts: UndelegateInstructionAccounts, - programId = new PublicKey(DELEGATION_PROGRAM_ID) -) { - const [data] = undelegateStruct.serialize({ - instructionDiscriminator: undelegateInstructionDiscriminator, - }); - - const { - delegationPda, - delegatedAccountSeedsPda, - bufferPda, - commitStateRecordPda, - commitStatePda, - } = getDelegationAccounts( - accounts.delegatedAccount, - accounts.ownerProgram, - false - ); - - const keys: web3.AccountMeta[] = [ - { - pubkey: accounts.payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: accounts.delegatedAccount, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.ownerProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.buffer ?? bufferPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.commitStatePda ?? commitStatePda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.commitStateRecordPda ?? commitStateRecordPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.delegationRecord ?? delegationPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.delegateAccountSeeds ?? delegatedAccountSeedsPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.reimbursement, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.systemProgram ?? web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - - return new web3.TransactionInstruction({ - programId, - keys, - data, - }); -} diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 6d62a13..9f2fd65 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -4,9 +4,13 @@ import { PROGRAM_ID } from "./generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; export * from "./world/transactions"; -export * from "./delegation/accounts"; export * from "./delegation/delegate"; -export * from "./delegation/undelegate"; +export * from "./delegation/allow_undelegation"; +export { + createCommitInstruction, + createUndelegateInstruction, + DELEGATION_PROGRAM_ID, +} from "@magicblock-labs/delegation-program"; export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey( "Sysvar1nstructions1111111111111111111111111" diff --git a/clients/bolt-sdk/yarn.lock b/clients/bolt-sdk/yarn.lock index 58aee17..8fe739d 100644 --- a/clients/bolt-sdk/yarn.lock +++ b/clients/bolt-sdk/yarn.lock @@ -14,6 +14,13 @@ dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" + integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + dependencies: + regenerator-runtime "^0.14.0" + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" @@ -77,6 +84,14 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" +"@magicblock-labs/delegation-program@0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@magicblock-labs/delegation-program/-/delegation-program-0.1.2.tgz#7b298398259d80a368eb9e91cb911e5a6e542391" + integrity sha512-9EGtcBWGAXGCOjTJVyzxydMpM8GGk8QjzQlgpV0q96BAbmpEO9C6b/N3lvMRTR1FfDuBn43a3Pa5YEiHyUu8Eg== + dependencies: + "@metaplex-foundation/beet" "^0.7.2" + "@solana/web3.js" "^1.92.3" + "@metaplex-foundation/beet-solana@^0.3.1": version "0.3.1" resolved "https://registry.npmjs.org/@metaplex-foundation/beet-solana/-/beet-solana-0.3.1.tgz" @@ -106,6 +121,16 @@ bn.js "^5.2.0" debug "^4.3.3" +"@metaplex-foundation/beet@^0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet/-/beet-0.7.2.tgz#fa4726e4cfd4fb6fed6cddc9b5213c1c2a2d0b77" + integrity sha512-K+g3WhyFxKPc0xIvcIjNyV1eaTVJTiuaHZpig7Xx0MuYRMoJLLvhLTnUXhFdR5Tu2l2QSyKwfyXDgZlzhULqFg== + dependencies: + ansicolors "^0.3.2" + assert "^2.1.0" + bn.js "^5.2.0" + debug "^4.3.3" + "@metaplex-foundation/rustbin@^0.3.0": version "0.3.5" resolved "https://registry.npmjs.org/@metaplex-foundation/rustbin/-/rustbin-0.3.5.tgz" @@ -140,11 +165,23 @@ dependencies: "@noble/hashes" "1.3.3" +"@noble/curves@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== + dependencies: + "@noble/hashes" "1.4.0" + "@noble/hashes@1.3.3", "@noble/hashes@^1.3.1": version "1.3.3" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== +"@noble/hashes@1.4.0", "@noble/hashes@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -171,7 +208,7 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@solana/buffer-layout@^4.0.0": +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== @@ -199,6 +236,34 @@ rpc-websockets "^7.5.1" superstruct "^0.14.2" +"@solana/web3.js@^1.92.3": + version "1.93.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.93.0.tgz#4b6975020993cec2f6626e4f2bf559ca042df8db" + integrity sha512-suf4VYwWxERz4tKoPpXCRHFRNst7jmcFUaD65kII+zg9urpy5PeeqgLV6G5eWGzcVzA9tZeXOju1A1Y+0ojEVw== + dependencies: + "@babel/runtime" "^7.24.7" + "@noble/curves" "^1.4.0" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.0" + node-fetch "^2.7.0" + rpc-websockets "^9.0.0" + superstruct "^1.0.4" + +"@swc/helpers@^0.5.11": + version "0.5.11" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.11.tgz#5bab8c660a6e23c13b2d23fcd1ee44a2db1b0cb7" + integrity sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A== + dependencies: + tslib "^2.4.0" + "@types/connect@^3.4.33": version "3.4.38" resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz" @@ -233,6 +298,11 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/ws@^7.4.4": version "7.4.7" resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz" @@ -240,6 +310,13 @@ dependencies: "@types/node" "*" +"@types/ws@^8.2.2": + version "8.5.10" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" + integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + dependencies: + "@types/node" "*" + "@typescript-eslint/eslint-plugin@^6.14.0": version "6.14.0" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz" @@ -348,7 +425,7 @@ acorn@^8.9.0: resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== -agentkeepalive@^4.3.0: +agentkeepalive@^4.3.0, agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== @@ -486,6 +563,17 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" +assert@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== + dependencies: + call-bind "^1.0.2" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" + asynciterator.prototype@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz" @@ -498,6 +586,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" @@ -584,7 +679,7 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" -buffer@6.0.3, buffer@~6.0.3: +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -608,6 +703,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -690,6 +796,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz" @@ -793,6 +908,18 @@ es-abstract@^1.22.1: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-iterator-helpers@^1.0.12: version "1.0.15" resolved "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz" @@ -1029,6 +1156,11 @@ eventemitter3@^4.0.7: resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + eyes@^0.1.8: version "0.1.8" resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" @@ -1172,6 +1304,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" @@ -1284,6 +1427,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" @@ -1301,6 +1451,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + hasown@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz" @@ -1346,9 +1503,9 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@^2.0.3: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== internal-slot@^1.0.5: @@ -1360,6 +1517,14 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz" @@ -1427,9 +1592,9 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.10: +is-generator-function@^1.0.10, is-generator-function@^1.0.7: version "1.0.10" - resolved "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== dependencies: has-tostringtag "^1.0.0" @@ -1446,6 +1611,14 @@ is-map@^2.0.1: resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-nan@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" @@ -1509,6 +1682,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: dependencies: which-typed-array "^1.1.11" +is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz" @@ -1774,7 +1954,7 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -node-fetch@^2.6.12: +node-fetch@^2.6.12, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -1796,6 +1976,14 @@ object-inspect@^1.13.1, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== +object-is@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" @@ -1934,6 +2122,11 @@ picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" @@ -2054,6 +2247,22 @@ rpc-websockets@^7.5.1: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.2.tgz#4c1568d00b8100f997379a363478f41f8f4b242c" + integrity sha512-YzggvfItxMY3Lwuax5rC18inhbjJv9Py7JXRHxTIi94JOLrqBsSsUUc5bbl5W6c11tXhdfpDPK0KzBhoGe8jjw== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" @@ -2107,6 +2316,18 @@ set-function-length@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0, set-function-name@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz" @@ -2178,8 +2399,16 @@ spok@^1.4.3: ansicolors "~0.3.2" find-process "^1.4.7" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: - name string-width-cjs +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2239,7 +2468,14 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -2268,6 +2504,11 @@ superstruct@^0.14.2: resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== +superstruct@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.4.tgz#0adb99a7578bd2f1c526220da6571b2d485d91ca" + integrity sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ== + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" @@ -2332,6 +2573,11 @@ tslib@^2.0.3: resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tslib@^2.4.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" @@ -2439,6 +2685,17 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + uuid@^8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" @@ -2517,6 +2774,17 @@ which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +which-typed-array@^1.1.14, which-typed-array@^1.1.2: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" diff --git a/crates/bolt-lang/attribute/delegate/src/lib.rs b/crates/bolt-lang/attribute/delegate/src/lib.rs index d74e4bc..0fe2536 100644 --- a/crates/bolt-lang/attribute/delegate/src/lib.rs +++ b/crates/bolt-lang/attribute/delegate/src/lib.rs @@ -34,6 +34,7 @@ pub fn delegate(args: TokenStream, input: TokenStream) -> TokenStream { fn modify_component_module(mut module: ItemMod, component_type: &Type) -> ItemMod { let (delegate_fn, delegate_struct) = generate_delegate(component_type); let (undelegate_fn, undelegate_struct) = generate_undelegate(); + let (allow_undelegate_fn, allow_undelegate_struct) = generate_allow_undelegate(); module.content = module.content.map(|(brace, mut items)| { items.extend( vec![ @@ -41,6 +42,8 @@ fn modify_component_module(mut module: ItemMod, component_type: &Type) -> ItemMo delegate_struct, undelegate_fn, undelegate_struct, + allow_undelegate_fn, + allow_undelegate_struct, ] .into_iter() .map(|item| syn::parse2(item).unwrap()) @@ -51,6 +54,47 @@ fn modify_component_module(mut module: ItemMod, component_type: &Type) -> ItemMo module } +/// Generates the allow_undelegate function and struct. +fn generate_allow_undelegate() -> (TokenStream2, TokenStream2) { + ( + quote! { + #[automatically_derived] + pub fn allow_undelegation(ctx: Context) -> Result<()> { + ::bolt_lang::allow_undelegation( + &ctx.accounts.base_account, + &ctx.accounts.delegation_record, + &ctx.accounts.delegation_metadata, + &ctx.accounts.buffer, + &ctx.accounts.delegation_program, + &id(), + )?; + Ok(()) + } + }, + quote! { + #[automatically_derived] + #[derive(Accounts)] + pub struct AllowUndelegation<'info> { + #[account()] + /// CHECK: The delegated component + pub base_account: AccountInfo<'info>, + #[account()] + /// CHECK: delegation record + pub delegation_record: AccountInfo<'info>, + #[account(mut)] + /// CHECK: delegation metadata + pub delegation_metadata: AccountInfo<'info>, + #[account()] + /// CHECK: singer buffer to enforce CPI + pub buffer: AccountInfo<'info>, + #[account()] + /// CHECK:` + pub delegation_program: AccountInfo<'info>, + } + }, + ) +} + /// Generates the undelegate function and struct. fn generate_undelegate() -> (TokenStream2, TokenStream2) { ( @@ -63,7 +107,7 @@ fn generate_undelegate() -> (TokenStream2, TokenStream2) { &ctx.accounts.payer, &ctx.accounts.system_program, ]; - undelegate_account( + ::bolt_lang::undelegate_account( delegated_account, &id(), buffer, @@ -77,7 +121,7 @@ fn generate_undelegate() -> (TokenStream2, TokenStream2) { quote! { #[automatically_derived] #[derive(Accounts)] - pub struct InitializeAfterUndelegation<'info> { + pub struct InitializeAfterUndelegation<'info> { /// CHECK:` #[account(mut)] pub base_account: AccountInfo<'info>, @@ -115,7 +159,7 @@ fn generate_delegate(component_type: &Type) -> (TokenStream2, TokenStream2) { let pda_seeds: &[&[u8]] = &[<#component_type>::seed(), &entity.key.to_bytes()]; - delegate_account( + ::bolt_lang::delegate_account( payer, account, owner_program, diff --git a/crates/bolt-lang/src/lib.rs b/crates/bolt-lang/src/lib.rs index 891634e..af54ac8 100644 --- a/crates/bolt-lang/src/lib.rs +++ b/crates/bolt-lang/src/lib.rs @@ -20,7 +20,7 @@ pub use world; pub use world::program::World; pub use world::Entity; -pub use delegation_program_sdk::{delegate_account, undelegate_account}; +pub use delegation_program_sdk::{allow_undelegation, delegate_account, undelegate_account}; pub use serde; diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index 895058b..a6b4c39 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -10,4 +10,4 @@ name = "bolt_types" [dependencies] bolt-lang = { path = "../../crates/bolt-lang" } -anchor-lang = { version = "0.30.0" } +anchor-lang = { version = "0.30.1" } diff --git a/package.json b/package.json index 3db2601..425e845 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" }, "dependencies": { - "@coral-xyz/anchor": "0.30.0" + "@coral-xyz/anchor": "0.30.1" }, "devDependencies": { "chai": "^4.3.4", diff --git a/tests/bolt.ts b/tests/bolt.ts index 497cd74..8c9dfab 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -7,9 +7,8 @@ import { type BoltComponent } from "../target/types/bolt_component"; import { type SystemSimpleMovement } from "../target/types/system_simple_movement"; import { type SystemFly } from "../target/types/system_fly"; import { type SystemApplyVelocity } from "../target/types/system_apply_velocity"; -import { type World } from "../target/types/world"; import { expect } from "chai"; -import BN from "bn.js"; +import type BN from "bn.js"; import { AddEntity, createDelegateInstruction, @@ -20,6 +19,7 @@ import { InitializeComponent, InitializeNewWorld, ApplySystem, + createAllowUndelegationInstruction, } from "../clients/bolt-sdk"; enum Direction { @@ -67,7 +67,6 @@ describe("bolt", () => { const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); - const boltWorld = anchor.workspace.World as Program; const boltComponentProgram = anchor.workspace .BoltComponent as Program; @@ -446,7 +445,7 @@ describe("bolt", () => { await provider.sendAndConfirm(applySystem.transaction); } catch (error) { failed = true; - //console.log("error", error); + // console.log("error", error); expect(error.logs.join("\n")).to.contain("Error Code: InvalidAuthority"); } expect(failed).to.equal(true); @@ -473,7 +472,7 @@ describe("bolt", () => { }) .rpc(); } catch (error) { - //console.log("error", error); + // console.log("error", error); expect(error.message).to.contain("Error Code: InvalidCaller"); invalid = true; } @@ -491,7 +490,7 @@ describe("bolt", () => { }) .rpc(); } catch (error) { - //console.log("error", error); + // console.log("error", error); expect(error.message).to.contain( "bolt_component. Error Code: AccountOwnedByWrongProgram" ); @@ -516,13 +515,19 @@ describe("bolt", () => { }); it("Check component undelegation", async () => { + const allowUndelegateIx = createAllowUndelegationInstruction({ + delegatedAccount: componentPositionEntity1Pda, + ownerProgram: exampleComponentPosition.programId, + }); const delegateIx = createUndelegateInstruction({ payer: provider.wallet.publicKey, delegatedAccount: componentPositionEntity1Pda, ownerProgram: exampleComponentPosition.programId, reimbursement: provider.wallet.publicKey, }); - const tx = new anchor.web3.Transaction().add(delegateIx); + const tx = new anchor.web3.Transaction() + .add(allowUndelegateIx) + .add(delegateIx); await provider.sendAndConfirm(tx); const acc = await provider.connection.getAccountInfo( componentPositionEntity1Pda diff --git a/tests/fixtures/delegation.so b/tests/fixtures/delegation.so index c6d44ab..2e64d9b 100644 Binary files a/tests/fixtures/delegation.so and b/tests/fixtures/delegation.so differ diff --git a/yarn.lock b/yarn.lock index 52f7446..17cda96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,12 +21,18 @@ dependencies: regenerator-runtime "^0.14.0" -"@coral-xyz/anchor@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.0.tgz#52acdba504b0008f1026d3a4bbbcb2d4feb5c69e" - integrity sha512-qreDh5ztiRHVnCbJ+RS70NJ6aSTPBYDAgFeQ7Z5QvaT5DcDIhNyt4onOciVz2ieIE1XWePOJDDu9SbNvPGBkvQ== - dependencies: - "@coral-xyz/borsh" "^0.30.0" +"@coral-xyz/anchor-errors@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz#bdfd3a353131345244546876eb4afc0e125bec30" + integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== + +"@coral-xyz/anchor@0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.1.tgz#17f3e9134c28cd0ea83574c6bab4e410bcecec5d" + integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== + dependencies: + "@coral-xyz/anchor-errors" "^0.30.1" + "@coral-xyz/borsh" "^0.30.1" "@noble/hashes" "^1.3.1" "@solana/web3.js" "^1.68.0" bn.js "^5.1.2" @@ -41,10 +47,10 @@ superstruct "^0.15.4" toml "^3.0.0" -"@coral-xyz/borsh@^0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.0.tgz#3e6f23e944ef6c89f2c9cbead383358752ac5e73" - integrity sha512-OrcV+7N10cChhgDRUxM4iEIuwxUHHs52XD85R8cFCUqE0vbLYrcoPPPs+VF6kZ9DhdJGVW2I6DHJOp5TykyZog== +"@coral-xyz/borsh@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.1.tgz#869d8833abe65685c72e9199b8688477a4f6b0e3" + integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== dependencies: bn.js "^5.1.2" buffer-layout "^1.2.0"