From c2f6f4810cac255b5726db8aa0e9657b52abb2be Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 17:30:04 +0400 Subject: [PATCH 1/6] release: v3.0.10 --- Cargo.lock | 2 +- programs/gpl_session/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cc0a63..e3e757c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1061,7 +1061,7 @@ dependencies = [ [[package]] name = "session-keys" -version = "2.0.8" +version = "3.0.10" dependencies = [ "anchor-lang", "session-keys-macros", diff --git a/programs/gpl_session/Cargo.toml b/programs/gpl_session/Cargo.toml index 5208099..1800869 100644 --- a/programs/gpl_session/Cargo.toml +++ b/programs/gpl_session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "session-keys" -version = "2.0.8" +version = "3.0.10" edition = "2021" authors = ["Gum Core Dev "] license = "GPL-3.0-or-later" From d95d2b22d4b0c1e7e9a6e86d3239caa08bfea9fd Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 17:36:42 +0400 Subject: [PATCH 2/6] feat: add publish workflow --- .github/workflows/publish-crates.yml | 93 ++++++++++++++++++++++++++++ programs/gpl_session/src/lib.rs | 15 +++-- 2 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish-crates.yml diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml new file mode 100644 index 0000000..69c1243 --- /dev/null +++ b/.github/workflows/publish-crates.yml @@ -0,0 +1,93 @@ +name: Publish Crates & SDKs +on: + release: + types: [published] + push: + branches: + - "release/v*" + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + rust_version: 1.85.0 + +jobs: + install: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: install essentials + run: | + sudo apt-get update + sudo apt-get install -y pkg-config build-essential libudev-dev + npm install --global yarn + + - name: Install Rust + shell: "bash" + run: rustup toolchain install ${{ env.rust_version }} --profile minimal + + - name: Cache rust + uses: Swatinem/rust-cache@v2 + + lint: + needs: install + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./ + + steps: + - uses: actions/checkout@v4 + - name: Run fmt + run: cargo fmt -- --check + + - name: Run clippy + run: cargo clippy -- --deny=warnings + + publish: + needs: [install, lint] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: run build + working-directory: ./ + run: | + cargo build + cargo test + + - name: Set DRY_RUN based on trigger + run: echo "DRY_RUN=true" >> $GITHUB_ENV + if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/v') + + - name: cargo publish + working-directory: ./ + run: | + DRY_RUN_FLAG="" + if [ "${DRY_RUN}" = "true" ]; then + DRY_RUN_FLAG="--dry-run" + fi + + if [ "${DRY_RUN}" = "true" ]; then + NO_VERIFY_FLAG="--no-verify" + fi + + cargo publish $DRY_RUN_FLAG --manifest-path=ephemeral/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=delegate/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=commit-attribute/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=action-attribute/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + + if [ "${DRY_RUN}" != "true" ]; then + cargo publish $DRY_RUN_FLAG --manifest-path=sdk/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=resolver/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=pinocchio/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + fi + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} + DRY_RUN: ${{ env.DRY_RUN }} + + \ No newline at end of file diff --git a/programs/gpl_session/src/lib.rs b/programs/gpl_session/src/lib.rs index 2a03949..5d99194 100644 --- a/programs/gpl_session/src/lib.rs +++ b/programs/gpl_session/src/lib.rs @@ -49,7 +49,12 @@ pub mod gpl_session { // Added the V2 instructions to support the new session token format. // The new format allows session to be created with a payer which on revoking // would send the lamports back to the payer. - pub fn create_session_v2(ctx: Context, top_up: Option, valid_until: Option, lamports: Option) -> Result<()> { + pub fn create_session_v2( + ctx: Context, + top_up: Option, + valid_until: Option, + lamports: Option, + ) -> Result<()> { let (top_up, valid_until) = process_session_params(top_up, valid_until)?; create_session_token_handler_v2(ctx, top_up, valid_until, lamports) } @@ -375,8 +380,11 @@ pub struct RevokeSessionTokenV2<'info> { // Handler to revoke a session token V2 pub fn revoke_session_token_handler_v2(ctx: Context) -> Result<()> { // If the session is still active, the authority must be a signer - if !ctx.accounts.session_token.is_expired()? { - require!(ctx.accounts.authority.is_signer, SessionError::InvalidAuthority); + if !ctx.accounts.session_token.is_expired()? { + require!( + ctx.accounts.authority.is_signer, + SessionError::InvalidAuthority + ); } Ok(()) } @@ -480,7 +488,6 @@ impl SessionTokenV2 { // Check if the token has expired self.is_expired() } - } pub trait Session<'info> { From 30129adb5d16ace75feabcdaf0b38865532260bc Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 17:43:20 +0400 Subject: [PATCH 3/6] fix: cargo clippy --deny=warnings fixes --- .../gpl_session/macros/attribute/src/lib.rs | 2 +- programs/gpl_session/src/lib.rs | 89 ++++++++++++------- 2 files changed, 60 insertions(+), 31 deletions(-) diff --git a/programs/gpl_session/macros/attribute/src/lib.rs b/programs/gpl_session/macros/attribute/src/lib.rs index f3ea827..25f56d6 100644 --- a/programs/gpl_session/macros/attribute/src/lib.rs +++ b/programs/gpl_session/macros/attribute/src/lib.rs @@ -83,7 +83,7 @@ pub fn derive(input: TokenStream) -> TokenStream { let session_token_field = fields .named .iter() - .find(|field| field.ident.as_ref().unwrap().to_string() == "session_token") + .find(|field| *field.ident.as_ref().unwrap() == "session_token") .expect("Session trait can only be derived for structs with a session_token field"); { let session_token_type = &session_token_field.ty; diff --git a/programs/gpl_session/src/lib.rs b/programs/gpl_session/src/lib.rs index 5d99194..a267cf2 100644 --- a/programs/gpl_session/src/lib.rs +++ b/programs/gpl_session/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use anchor_lang::{prelude::*, solana_program::native_token::LAMPORTS_PER_SOL, system_program}; #[cfg(feature = "no-entrypoint")] @@ -66,7 +68,7 @@ pub mod gpl_session { fn process_session_params(top_up: Option, valid_until: Option) -> Result<(bool, i64)> { let top_up = top_up.unwrap_or(false); - let valid_until = valid_until.unwrap_or(Clock::get()?.unix_timestamp + 60 * 60 * 1); + let valid_until = valid_until.unwrap_or(Clock::get()?.unix_timestamp + 60 * 60); Ok((top_up, valid_until)) } @@ -99,18 +101,28 @@ pub struct CreateSessionToken<'info> { pub system_program: Program<'info, System>, } -fn create_session_token_internal<'info>( - session_token: &mut Account<'info, SessionToken>, +struct CreateSessionTokenParams { authority: Pubkey, target_program: Pubkey, session_signer: Pubkey, - system_program: AccountInfo<'info>, - payer: AccountInfo<'info>, - session_signer_account: AccountInfo<'info>, top_up: bool, valid_until: i64, lamports: Option, +} + +fn create_session_token_internal<'info>( + session_token: &mut Account<'info, SessionToken>, + params: CreateSessionTokenParams, + system_program: AccountInfo<'info>, + payer: AccountInfo<'info>, + session_signer_account: AccountInfo<'info>, ) -> Result<()> { + let authority = params.authority; + let target_program = params.target_program; + let session_signer = params.session_signer; + let top_up = params.top_up; + let valid_until = params.valid_until; + let lamports = params.lamports; // Valid until can't be greater than a week require!( valid_until <= Clock::get()?.unix_timestamp + (60 * 60 * 24 * 7), @@ -150,15 +162,17 @@ pub fn create_session_token_handler( ) -> Result<()> { create_session_token_internal( &mut ctx.accounts.session_token, - ctx.accounts.authority.key(), - ctx.accounts.target_program.key(), - ctx.accounts.session_signer.key(), + CreateSessionTokenParams { + authority: ctx.accounts.authority.key(), + target_program: ctx.accounts.target_program.key(), + session_signer: ctx.accounts.session_signer.key(), + top_up, + valid_until, + lamports, + }, ctx.accounts.system_program.to_account_info(), ctx.accounts.authority.to_account_info(), ctx.accounts.session_signer.to_account_info(), - top_up, - valid_until, - lamports, ) } @@ -201,15 +215,17 @@ pub fn create_session_token_with_payer_handler( ) -> Result<()> { create_session_token_internal( &mut ctx.accounts.session_token, - ctx.accounts.authority.key(), - ctx.accounts.target_program.key(), - ctx.accounts.session_signer.key(), + CreateSessionTokenParams { + authority: ctx.accounts.authority.key(), + target_program: ctx.accounts.target_program.key(), + session_signer: ctx.accounts.session_signer.key(), + top_up, + valid_until, + lamports, + }, ctx.accounts.system_program.to_account_info(), ctx.accounts.payer.to_account_info(), ctx.accounts.session_signer.to_account_info(), - top_up, - valid_until, - lamports, ) } @@ -281,19 +297,30 @@ pub struct CreateSessionTokenV2<'info> { pub system_program: Program<'info, System>, } -fn create_session_token_v2_internal<'info>( - session_token: &mut Account<'info, SessionTokenV2>, +struct CreateSessionTokenV2Params { authority: Pubkey, target_program: Pubkey, session_signer: Pubkey, fee_payer: Pubkey, - system_program: AccountInfo<'info>, - payer: AccountInfo<'info>, - session_signer_account: AccountInfo<'info>, top_up: bool, valid_until: i64, lamports: Option, +} + +fn create_session_token_v2_internal<'info>( + session_token: &mut Account<'info, SessionTokenV2>, + params: CreateSessionTokenV2Params, + system_program: AccountInfo<'info>, + payer: AccountInfo<'info>, + session_signer_account: AccountInfo<'info>, ) -> Result<()> { + let authority = params.authority; + let target_program = params.target_program; + let session_signer = params.session_signer; + let fee_payer = params.fee_payer; + let top_up = params.top_up; + let valid_until = params.valid_until; + let lamports = params.lamports; // Valid until can't be greater than a week require!( valid_until <= Clock::get()?.unix_timestamp + (60 * 60 * 24 * 7), @@ -334,16 +361,18 @@ pub fn create_session_token_handler_v2( ) -> Result<()> { create_session_token_v2_internal( &mut ctx.accounts.session_token, - ctx.accounts.authority.key(), - ctx.accounts.target_program.key(), - ctx.accounts.session_signer.key(), - ctx.accounts.fee_payer.key(), + CreateSessionTokenV2Params { + authority: ctx.accounts.authority.key(), + target_program: ctx.accounts.target_program.key(), + session_signer: ctx.accounts.session_signer.key(), + fee_payer: ctx.accounts.fee_payer.key(), + top_up, + valid_until, + lamports, + }, ctx.accounts.system_program.to_account_info(), ctx.accounts.fee_payer.to_account_info(), ctx.accounts.session_signer.to_account_info(), - top_up, - valid_until, - lamports, ) } From b0485520a29bfaea4c0edcc82a5df062d81141df Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 18:02:06 +0400 Subject: [PATCH 4/6] fix: removed invalid folders in workflow --- .github/workflows/publish-crates.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml index 69c1243..23ea36b 100644 --- a/.github/workflows/publish-crates.yml +++ b/.github/workflows/publish-crates.yml @@ -76,15 +76,8 @@ jobs: NO_VERIFY_FLAG="--no-verify" fi - cargo publish $DRY_RUN_FLAG --manifest-path=ephemeral/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=delegate/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=commit-attribute/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=action-attribute/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - if [ "${DRY_RUN}" != "true" ]; then - cargo publish $DRY_RUN_FLAG --manifest-path=sdk/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=resolver/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=pinocchio/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=./Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG fi env: CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} From 3efe6fc19d1a200e9211677800bf6a80dc33f5fb Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 18:44:28 +0400 Subject: [PATCH 5/6] fix: anchor 0.32.1 dependency issues --- Cargo.lock | 783 +++----------------------------- programs/gpl_session/src/lib.rs | 5 +- 2 files changed, 73 insertions(+), 715 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3e757c..bf6ba16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" +checksum = "7a883ca44ef14b2113615fc6d3a85fefc68b5002034e88db37f7f1f802f88aa9" dependencies = [ "anchor-syn", "proc-macro2", @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" +checksum = "61c4d97763b29030412b4b80715076377edc9cc63bc3c9e667297778384b9fd2" dependencies = [ "anchor-syn", "bs58", @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" +checksum = "aae3328bbf9bbd517a51621b1ba6cbec06cbbc25e8cfc7403bddf69bcf088206" dependencies = [ "anchor-syn", "quote", @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" +checksum = "cf2398a6d9e16df1ee9d7d37d970a8246756de898c8dd16ef6bdbe4da20cf39a" dependencies = [ "anchor-syn", "quote", @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" +checksum = "f12758f4ec2f0e98d4d56916c6fe95cb23d74b8723dd902c762c5ef46ebe7b65" dependencies = [ "anchor-syn", "proc-macro2", @@ -84,9 +84,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" +checksum = "8c7193b5af2649813584aae6e3569c46fd59616a96af2083c556b13136c3830f" dependencies = [ "anchor-lang-idl", "anchor-syn", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" +checksum = "d332d1a13c0fca1a446de140b656e66110a5e8406977dcb6a41e5d6f323760b0" dependencies = [ "anchor-syn", "quote", @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anchor-derive-serde" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" +checksum = "8656e4af182edaeae665fa2d2d7ee81148518b5bd0be9a67f2a381bb17da7d46" dependencies = [ "anchor-syn", "borsh-derive-internal", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" +checksum = "dcff2a083560cd79817db07d89a4de39a2c4b2eaa00c1742cf0df49b25ff2bed" dependencies = [ "proc-macro2", "quote", @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" +checksum = "e67d85d5376578f12d840c29ff323190f6eecd65b00a0b5f2b2f232751d049cc" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -154,8 +154,27 @@ dependencies = [ "bincode", "borsh 0.10.3", "bytemuck", - "solana-program", - "thiserror 1.0.60", + "solana-account-info", + "solana-clock", + "solana-cpi", + "solana-define-syscall", + "solana-feature-gate-interface", + "solana-instruction", + "solana-instructions-sysvar", + "solana-invoke", + "solana-loader-v3-interface", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", + "thiserror", ] [[package]] @@ -170,7 +189,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -185,9 +204,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" +checksum = "b93b69aa7d099b59378433f6d7e20e1008fc10c69e48b220270e5b3f2ec4c8be" dependencies = [ "anyhow", "bs58", @@ -197,9 +216,9 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "syn 1.0.109", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -208,30 +227,12 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" -[[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.21.7" @@ -265,29 +266,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" -[[package]] -name = "blake3" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" -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" @@ -395,6 +373,9 @@ name = "bytemuck" version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" +dependencies = [ + "bytemuck_derive", +] [[package]] name = "bytemuck_derive" @@ -417,15 +398,6 @@ dependencies = [ "toml 0.8.12", ] -[[package]] -name = "cc" -version = "1.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" -dependencies = [ - "shlex", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -438,32 +410,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - [[package]] name = "cpufeatures" version = "0.2.7" @@ -473,12 +419,6 @@ dependencies = [ "libc", ] -[[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" @@ -498,9 +438,9 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", - "rand_core 0.6.4", + "rand_core", "rustc_version", "subtle", "zeroize", @@ -517,24 +457,14 @@ dependencies = [ "syn 2.0.100", ] -[[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", + "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -580,17 +510,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -600,7 +519,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -654,15 +573,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -675,52 +585,6 @@ version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" -[[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", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", -] - -[[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.9" @@ -743,45 +607,6 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -797,12 +622,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[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" @@ -826,12 +645,6 @@ dependencies = [ "windows-sys", ] -[[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" @@ -868,76 +681,11 @@ 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 = [ - "libc", - "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.15", -] - -[[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 = "redox_syscall" @@ -1084,19 +832,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -1105,74 +840,26 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] -[[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 = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "smallvec" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" -[[package]] -name = "solana-account" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" -dependencies = [ - "solana-account-info", - "solana-clock", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", -] - [[package]] name = "solana-account-info" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" +checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" dependencies = [ - "bincode", - "serde", "solana-program-error", "solana-program-memory", "solana-pubkey", ] -[[package]] -name = "solana-address-lookup-table-interface" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" -dependencies = [ - "bincode", - "bytemuck", - "serde", - "serde_derive", - "solana-clock", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", - "solana-slot-hashes", -] - [[package]] name = "solana-atomic-u64" version = "2.2.1" @@ -1182,50 +869,6 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "solana-big-mod-exp" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" -dependencies = [ - "num-bigint", - "num-traits", - "solana-define-syscall", -] - -[[package]] -name = "solana-bincode" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" -dependencies = [ - "bincode", - "serde", - "solana-instruction", -] - -[[package]] -name = "solana-blake3-hasher" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" -dependencies = [ - "blake3", - "solana-define-syscall", - "solana-hash", - "solana-sanitize", -] - -[[package]] -name = "solana-borsh" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" -dependencies = [ - "borsh 0.10.3", - "borsh 1.5.7", -] - [[package]] name = "solana-clock" version = "2.2.1" @@ -1295,44 +938,14 @@ dependencies = [ "solana-sysvar-id", ] -[[package]] -name = "solana-example-mocks" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" -dependencies = [ - "serde", - "serde_derive", - "solana-address-lookup-table-interface", - "solana-clock", - "solana-hash", - "solana-instruction", - "solana-keccak-hasher", - "solana-message", - "solana-nonce", - "solana-pubkey", - "solana-sdk-ids", - "solana-system-interface", - "thiserror 2.0.12", -] - [[package]] name = "solana-feature-gate-interface" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" dependencies = [ - "bincode", - "serde", - "serde_derive", - "solana-account", - "solana-account-info", - "solana-instruction", - "solana-program-error", "solana-pubkey", - "solana-rent", "solana-sdk-ids", - "solana-system-interface", ] [[package]] @@ -1352,7 +965,6 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" dependencies = [ - "borsh 1.5.7", "bs58", "bytemuck", "bytemuck_derive", @@ -1371,8 +983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" dependencies = [ "bincode", - "borsh 1.5.7", - "getrandom 0.2.15", + "getrandom", "js-sys", "num-traits", "serde", @@ -1384,9 +995,9 @@ dependencies = [ [[package]] name = "solana-instructions-sysvar" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427f2d0d6dc0bb49f16cef5e7f975180d2e80aab9bdd3b2af68e2d029ec63f43" +checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ "bitflags 2.9.0", "solana-account-info", @@ -1400,15 +1011,16 @@ dependencies = [ ] [[package]] -name = "solana-keccak-hasher" -version = "2.2.1" +name = "solana-invoke" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +checksum = "58f5693c6de226b3626658377168b0184e94e8292ff16e3d31d4766e65627565" dependencies = [ - "sha3", + "solana-account-info", "solana-define-syscall", - "solana-hash", - "solana-sanitize", + "solana-instruction", + "solana-program-entrypoint", + "solana-stable-layout", ] [[package]] @@ -1424,20 +1036,6 @@ dependencies = [ "solana-sysvar-id", ] -[[package]] -name = "solana-loader-v2-interface" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" -dependencies = [ - "serde", - "serde_bytes", - "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", -] - [[package]] name = "solana-loader-v3-interface" version = "3.0.0" @@ -1453,44 +1051,6 @@ dependencies = [ "solana-system-interface", ] -[[package]] -name = "solana-loader-v4-interface" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" -dependencies = [ - "serde", - "serde_bytes", - "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", - "solana-system-interface", -] - -[[package]] -name = "solana-message" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6bf99c4570173710107a1f233f3bee226feea5fc817308707d4f7cb100a72d" -dependencies = [ - "bincode", - "blake3", - "lazy_static", - "serde", - "serde_derive", - "solana-bincode", - "solana-hash", - "solana-instruction", - "solana-pubkey", - "solana-sanitize", - "solana-sdk-ids", - "solana-short-vec", - "solana-system-interface", - "solana-transaction-error", - "wasm-bindgen", -] - [[package]] name = "solana-msg" version = "2.2.1" @@ -1500,106 +1060,6 @@ dependencies = [ "solana-define-syscall", ] -[[package]] -name = "solana-native-token" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e9de00960197412e4be3902a6cd35e60817c511137aca6c34c66cd5d4017ec" - -[[package]] -name = "solana-nonce" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" -dependencies = [ - "serde", - "serde_derive", - "solana-fee-calculator", - "solana-hash", - "solana-pubkey", - "solana-sha256-hasher", -] - -[[package]] -name = "solana-program" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" -dependencies = [ - "bincode", - "blake3", - "borsh 0.10.3", - "borsh 1.5.7", - "bs58", - "bytemuck", - "console_error_panic_hook", - "console_log", - "getrandom 0.2.15", - "lazy_static", - "log", - "memoffset", - "num-bigint", - "num-derive", - "num-traits", - "rand 0.8.5", - "serde", - "serde_bytes", - "serde_derive", - "solana-account-info", - "solana-address-lookup-table-interface", - "solana-atomic-u64", - "solana-big-mod-exp", - "solana-bincode", - "solana-blake3-hasher", - "solana-borsh", - "solana-clock", - "solana-cpi", - "solana-decode-error", - "solana-define-syscall", - "solana-epoch-rewards", - "solana-epoch-schedule", - "solana-example-mocks", - "solana-feature-gate-interface", - "solana-fee-calculator", - "solana-hash", - "solana-instruction", - "solana-instructions-sysvar", - "solana-keccak-hasher", - "solana-last-restart-slot", - "solana-loader-v2-interface", - "solana-loader-v3-interface", - "solana-loader-v4-interface", - "solana-message", - "solana-msg", - "solana-native-token", - "solana-nonce", - "solana-program-entrypoint", - "solana-program-error", - "solana-program-memory", - "solana-program-option", - "solana-program-pack", - "solana-pubkey", - "solana-rent", - "solana-sanitize", - "solana-sdk-ids", - "solana-sdk-macro", - "solana-secp256k1-recover", - "solana-serde-varint", - "solana-serialize-utils", - "solana-sha256-hasher", - "solana-short-vec", - "solana-slot-hashes", - "solana-slot-history", - "solana-stable-layout", - "solana-stake-interface", - "solana-system-interface", - "solana-sysvar", - "solana-sysvar-id", - "solana-vote-interface", - "thiserror 2.0.12", - "wasm-bindgen", -] - [[package]] name = "solana-program-entrypoint" version = "2.2.1" @@ -1620,8 +1080,6 @@ checksum = "d8ae2c1a8d0d4ae865882d5770a7ebca92bab9c685e43f0461682c6c05a35bfa" dependencies = [ "borsh 1.5.7", "num-traits", - "serde", - "serde_derive", "solana-decode-error", "solana-instruction", "solana-msg", @@ -1666,7 +1124,7 @@ dependencies = [ "bytemuck_derive", "curve25519-dalek", "five8_const", - "getrandom 0.2.15", + "getrandom", "js-sys", "num-traits", "serde", @@ -1719,32 +1177,12 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "solana-secp256k1-recover" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" -dependencies = [ - "libsecp256k1", - "solana-define-syscall", - "thiserror 2.0.12", -] - [[package]] name = "solana-security-txt" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" -[[package]] -name = "solana-serde-varint" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" -dependencies = [ - "serde", -] - [[package]] name = "solana-serialize-utils" version = "2.2.1" @@ -1762,20 +1200,11 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" dependencies = [ - "sha2 0.10.8", + "sha2", "solana-define-syscall", "solana-hash", ] -[[package]] -name = "solana-short-vec" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" -dependencies = [ - "serde", -] - [[package]] name = "solana-slot-hashes" version = "2.2.1" @@ -1818,8 +1247,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" dependencies = [ - "borsh 0.10.3", - "borsh 1.5.7", "num-traits", "serde", "serde_derive", @@ -1857,8 +1284,6 @@ checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" dependencies = [ "base64 0.22.1", "bincode", - "bytemuck", - "bytemuck_derive", "lazy_static", "serde", "serde_derive", @@ -1896,40 +1321,6 @@ dependencies = [ "solana-sdk-ids", ] -[[package]] -name = "solana-transaction-error" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" -dependencies = [ - "solana-instruction", - "solana-sanitize", -] - -[[package]] -name = "solana-vote-interface" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f039b0788337bedc6c5450d2f237718f938defb5ce0e0ad8ef507e78dcd370" -dependencies = [ - "bincode", - "num-derive", - "num-traits", - "serde", - "serde_derive", - "solana-clock", - "solana-decode-error", - "solana-hash", - "solana-instruction", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-serde-varint", - "solana-serialize-utils", - "solana-short-vec", - "solana-system-interface", -] - [[package]] name = "subtle" version = "2.4.1" @@ -1964,16 +1355,7 @@ version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ - "thiserror-impl 1.0.60", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl", ] [[package]] @@ -1987,17 +1369,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -2091,12 +1462,6 @@ 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" @@ -2161,16 +1526,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "web-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "windows-sys" version = "0.45.0" diff --git a/programs/gpl_session/src/lib.rs b/programs/gpl_session/src/lib.rs index a267cf2..4b4cdcf 100644 --- a/programs/gpl_session/src/lib.rs +++ b/programs/gpl_session/src/lib.rs @@ -1,6 +1,9 @@ #![allow(unexpected_cfgs)] -use anchor_lang::{prelude::*, solana_program::native_token::LAMPORTS_PER_SOL, system_program}; +use anchor_lang::prelude::*; +use anchor_lang::system_program; + +const LAMPORTS_PER_SOL: u64 = 1_000_000_000; #[cfg(feature = "no-entrypoint")] pub use session_keys_macros::*; From 2b809dd9d187147c05f96b61243c8cff575cfb1e Mon Sep 17 00:00:00 2001 From: jonasXchen Date: Wed, 26 Nov 2025 19:49:00 +0400 Subject: [PATCH 6/6] fix: workspace dependencies for publishing + added version_align script --- Cargo.lock | 4 +- Cargo.toml | 20 +++++++- programs/gpl_session/Cargo.toml | 4 +- programs/gpl_session/macros/Cargo.toml | 4 +- .../gpl_session/macros/attribute/Cargo.toml | 2 +- version_align.sh | 49 +++++++++++++++++++ 6 files changed, 75 insertions(+), 8 deletions(-) create mode 100755 version_align.sh diff --git a/Cargo.lock b/Cargo.lock index bf6ba16..8c4fd57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -818,14 +818,14 @@ dependencies = [ [[package]] name = "session-keys-macros" -version = "0.1.2" +version = "3.0.10" dependencies = [ "session-keys-macros-attribute", ] [[package]] name = "session-keys-macros-attribute" -version = "0.1.2" +version = "3.0.10" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 0340fd8..e087a2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,29 @@ [workspace] -resolver = "2" members = [ "programs/gpl_session", "programs/gpl_session/macros", "programs/gpl_session/macros/attribute", ] +resolver = "2" + +[workspace.package] +version = "3.0.10" +authors = ["Magicblock Labs "] +edition = "2021" +license = "MIT" +homepage = "https://www.magicblock.gg/" +documentation = "https://docs.magicblock.gg/" +repository = "https://github.com/magicblock-labs/session-keys" +readme = "README.md" + +[workspace.dependencies] +session-keys = { path = "programs/gpl_session", version = "=3.0.10" } +session-keys-macros = { path = "programs/gpl_session/macros", version = "=3.0.10" } +session-keys-macros-attribute = { path = "programs/gpl_session/macros/attribute", version = "=3.0.10" } + +# Magicblock + [profile.release] overflow-checks = true lto = "fat" diff --git a/programs/gpl_session/Cargo.toml b/programs/gpl_session/Cargo.toml index 1800869..636af80 100644 --- a/programs/gpl_session/Cargo.toml +++ b/programs/gpl_session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "session-keys" -version = "3.0.10" +version = { workspace = true } edition = "2021" authors = ["Gum Core Dev "] license = "GPL-3.0-or-later" @@ -22,4 +22,4 @@ idl-build = ["anchor-lang/idl-build"] [dependencies] anchor-lang = "^0" solana-security-txt = "^1.1.1" -session-keys-macros = { version = "^0.1.2", path = "macros", optional = true } +session-keys-macros ={ workspace = true, path = "macros", optional = true } diff --git a/programs/gpl_session/macros/Cargo.toml b/programs/gpl_session/macros/Cargo.toml index 33c0ded..6215e07 100644 --- a/programs/gpl_session/macros/Cargo.toml +++ b/programs/gpl_session/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "session-keys-macros" -version = "0.1.2" +version = { workspace = true } edition = "2021" authors = ["Magicblock Dev "] license = "GPL-3.0-or-later" @@ -10,4 +10,4 @@ repository = "https://github.com/magicblock-labs/gum-program-library" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -session-keys-macros-attribute = { version = "0.1.2", path = "attribute" } +session-keys-macros-attribute = { workspace = true , path = "attribute" } diff --git a/programs/gpl_session/macros/attribute/Cargo.toml b/programs/gpl_session/macros/attribute/Cargo.toml index 56f6c7e..e24a7e1 100644 --- a/programs/gpl_session/macros/attribute/Cargo.toml +++ b/programs/gpl_session/macros/attribute/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "session-keys-macros-attribute" -version = "0.1.2" +version = { workspace = true } edition = "2021" authors = ["Magicblock Dev "] license = "GPL-3.0-or-later" diff --git a/version_align.sh b/version_align.sh new file mode 100755 index 0000000..afee270 --- /dev/null +++ b/version_align.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -e + +echo "Reading Cargo.toml" + +# Step 1: Read the version from Cargo.toml +version=$(grep '^version = ' Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/') + +if [ -z "$version" ]; then + echo "Version not found in Cargo.toml" + exit 1 +fi + +echo "Aligning for version: $version" + +# GNU/BSD compat +sedi=(-i'') +case "$(uname)" in + # For macOS, use two parameters + Darwin*) sedi=(-i '') +esac + +echo "Updating ..." + +# Update the version for all crates in the Cargo.toml workspace.dependencies section +sed "${sedi[@]}" -e '/\[workspace.dependencies\]/,/# Magicblock/s/version = ".*"/version = "='$version'"/' Cargo.toml + +# Potential for collisions in Cargo.lock, use cargo update to update it +cargo update --workspace --manifest-path ./Cargo.toml + +# Check if any changes have been made to the specified files, if running with --check +if [[ "$1" == "--check" ]]; then + files_to_check=( + "Cargo.toml" + "programs/gpl_session/Cargo.toml" + "programs/gpl_session/macros/Cargo.toml" + "programs/gpl_session/macros/attribute/Cargo.toml" + ) + + for file in "${files_to_check[@]}"; do + # Check if the file has changed from the previous commit + if git diff --name-only | grep -q "$file"; then + echo "Error: version not aligned for $file. Align the version, commit and try again." + exit 1 + fi + done + exit 0 +fi