What changed, and why it matters
This commit is titled 'upgrade sui sdk' and mostly swaps the Sui library dependency to a newer, slimmer package, updates the Rust compiler version used across build scripts, and adjusts code to match the new library's types. There is one notable code change in the Sui request-checking function: it now immediately returns a success result and skips all actual validation. That looks like a temporary debugging change left in the commit, but it could allow an unverified Sui transaction to be approved. The commit does not describe itself as a security fix, and there is no disclosed vulnerability or researcher attribution.
Review whether the early return in sui_check_request is intentional for simulator/debug builds only; if it reaches production firmware it would disable Sui transaction verification. Confirm the new sui-transaction-types-core dependency is pinned to a trusted tag and that no validation logic was lost during the API migration. Re-run Sui transaction test vectors, including the new ValidDuring case, and verify CI coverage thresholds still reflect real checks.
Security signals we found
Sui transaction validation function returns success before performing any checks
Dependency upgrade to a new Sui transaction-types crate with API changes
Rust toolchain version bump across CI, Dockerfile, and build scripts
Simulator QR-from-screen macro re-enabled
Evidence from the diff
The commit replaces the old sui-types 0.1.2 dependency with sui-transaction-types-core at tag mainnet-nostd-v1.69.2.1, updates serde/serde_json, bumps the pinned Rust toolchain from nightly-2025-05-01 to nightly-2025-07-01, and centralizes toolchain selection via a rust-toolchain file. Code in rust_c/src/iota/structs.rs is adapted to the new crate’s types (Argument, CallArg, Command, TransactionData). In rust_c/src/sui/mod.rs, the first statement of sui_check_request is now return TransactionCheckResult::new().c_ptr();, causing the function to bypass master-fingerprint length checks, path/address validation, and transaction parsing. A new unit test for ‘ValidDuring’ transaction parsing is added. The simulator QR macro is re-enabled in ui_simulator/simulator_model.c. No CVE, advisory, or vendor security statement is present.
Changed components
rust/apps/suirust/rust_c/src/sui/mod.rsrust/rust_c/src/iota/structs.rsrust/Cargo.lockrust/Cargo.tomlrust/apps/sui/Cargo.tomlrust-toolchainui_simulator/simulator_model.cInspect captured patch +229 / −398
diff --git a/.github/workflows/rust-aptos-checks.yml b/.github/workflows/rust-aptos-checks.yml
index 799063e..9ee2925 100644
--- a/.github/workflows/rust-aptos-checks.yml
+++ b/.github/workflows/rust-aptos-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/aptos
- run: cd rust/apps/aptos && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 50 --fail-under-functions 70 --fail-under-lines 65 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/aptos && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 50 --fail-under-functions 70 --fail-under-lines 65 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-arweave-checks.yml b/.github/workflows/rust-arweave-checks.yml
index 2fc4440..3e8c7a7 100644
--- a/.github/workflows/rust-arweave-checks.yml
+++ b/.github/workflows/rust-arweave-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/arweave
- run: cd rust/apps/arweave && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 78 --fail-under-functions 81 --fail-under-lines 85 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/arweave && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 78 --fail-under-functions 81 --fail-under-lines 85 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-bitcoin-checks.yml b/.github/workflows/rust-bitcoin-checks.yml
index 423f899..b04a630 100644
--- a/.github/workflows/rust-bitcoin-checks.yml
+++ b/.github/workflows/rust-bitcoin-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/bitcoin
- run: cd rust/apps/bitcoin && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 74 --fail-under-functions 79 --fail-under-lines 86 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/bitcoin && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 74 --fail-under-functions 79 --fail-under-lines 86 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-cardano-checks.yml b/.github/workflows/rust-cardano-checks.yml
index 4b3aef4..cf12a40 100644
--- a/.github/workflows/rust-cardano-checks.yml
+++ b/.github/workflows/rust-cardano-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/cardano
- run: cd rust/apps/cardano && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 53 --fail-under-functions 63 --fail-under-lines 66 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/cardano && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 53 --fail-under-functions 63 --fail-under-lines 66 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-cosmos-checks.yml b/.github/workflows/rust-cosmos-checks.yml
index a5d1b74..aa4fc90 100644
--- a/.github/workflows/rust-cosmos-checks.yml
+++ b/.github/workflows/rust-cosmos-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/cosmos
- run: cd rust/apps/cosmos && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 65 --fail-under-functions 57 --fail-under-lines 74 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/cosmos && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 65 --fail-under-functions 57 --fail-under-lines 74 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-ethereum-checks.yml b/.github/workflows/rust-ethereum-checks.yml
index be00f75..109f8b1 100644
--- a/.github/workflows/rust-ethereum-checks.yml
+++ b/.github/workflows/rust-ethereum-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/ethereum
- run: cd rust/apps/ethereum && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 52 --fail-under-functions 56 --fail-under-lines 75 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/ethereum && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 52 --fail-under-functions 56 --fail-under-lines 75 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-fmt-checks.yml b/.github/workflows/rust-fmt-checks.yml
index ce20378..fe1febe 100644
--- a/.github/workflows/rust-fmt-checks.yml
+++ b/.github/workflows/rust-fmt-checks.yml
@@ -13,42 +13,45 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
target: x86_64-apple-darwin
components: rustfmt
- name: Run rust/apps/bitcoin
- run: cd rust/apps/bitcoin && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/bitcoin && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/ethereum
- run: cd rust/apps/ethereum && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/ethereum && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/solana
- run: cd rust/apps/solana && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/solana && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/cardano
- run: cd rust/apps/cardano && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/cardano && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/tron
- run: cd rust/apps/tron && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/tron && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/near
- run: cd rust/apps/near && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/near && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/xrp
- run: cd rust/apps/xrp && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/xrp && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/cosmos
- run: cd rust/apps/cosmos && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/cosmos && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/aptos
- run: cd rust/apps/aptos && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/aptos && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/sui
- run: cd rust/apps/sui && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/sui && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/arweave
- run: cd rust/apps/arweave && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/arweave && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/stellar
- run: cd rust/apps/stellar && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/stellar && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/utils
- run: cd rust/apps/utils && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/utils && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/apps/wallets
- run: cd rust/apps/wallets && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/apps/wallets && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/keystore
- run: cd rust/keystore && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/keystore && cargo +$RUST_TOOLCHAIN fmt --check
- name: Run rust/rust_c
- run: cd rust/rust_c && cargo +nightly-2025-05-01 fmt --check
+ run: cd rust/rust_c && cargo +$RUST_TOOLCHAIN fmt --check
diff --git a/.github/workflows/rust-keystore-checks.yml b/.github/workflows/rust-keystore-checks.yml
index bd5338a..a6faeb6 100644
--- a/.github/workflows/rust-keystore-checks.yml
+++ b/.github/workflows/rust-keystore-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/keystore
- run: cd rust/keystore && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 65 --fail-under-functions 59 --fail-under-lines 83
+ run: cd rust/keystore && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 65 --fail-under-functions 59 --fail-under-lines 83
diff --git a/.github/workflows/rust-monero-checks.yml b/.github/workflows/rust-monero-checks.yml
index 57521f4..47904c8 100644
--- a/.github/workflows/rust-monero-checks.yml
+++ b/.github/workflows/rust-monero-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/monero
- run: cd rust/apps/monero && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 36 --fail-under-functions 41 --fail-under-lines 46 --ignore-filename-regex 'keystore/*'
+ run: cd rust/apps/monero && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 36 --fail-under-functions 41 --fail-under-lines 46 --ignore-filename-regex 'keystore/*'
diff --git a/.github/workflows/rust-near-checks.yml.disabled b/.github/workflows/rust-near-checks.yml.disabled
index f4faeec..daa1c68 100644
--- a/.github/workflows/rust-near-checks.yml.disabled
+++ b/.github/workflows/rust-near-checks.yml.disabled
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/near
- run: cd rust/apps/near && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 49 --fail-under-functions 52 --fail-under-lines 68
+ run: cd rust/apps/near && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 49 --fail-under-functions 52 --fail-under-lines 68
diff --git a/.github/workflows/rust-solana-checks.yml b/.github/workflows/rust-solana-checks.yml
index 88396fc..3c83925 100644
--- a/.github/workflows/rust-solana-checks.yml
+++ b/.github/workflows/rust-solana-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/solana
- run: cd rust/apps/solana && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 49 --fail-under-functions 65 --fail-under-lines 68 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/solana && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 49 --fail-under-functions 65 --fail-under-lines 68 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-stellar-checks.yml b/.github/workflows/rust-stellar-checks.yml
index 2480a47..d7ea422 100644
--- a/.github/workflows/rust-stellar-checks.yml
+++ b/.github/workflows/rust-stellar-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/stellar
- run: cd rust/apps/stellar && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 73 --fail-under-functions 89 --fail-under-lines 86 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/stellar && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 73 --fail-under-functions 89 --fail-under-lines 86 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-sui-checks.yml b/.github/workflows/rust-sui-checks.yml
index f756e40..60cc362 100644
--- a/.github/workflows/rust-sui-checks.yml
+++ b/.github/workflows/rust-sui-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/sui
- run: cd rust/apps/sui && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 84 --fail-under-functions 78 --fail-under-lines 91 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/sui && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 84 --fail-under-functions 78 --fail-under-lines 91 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-ton-checks.yml b/.github/workflows/rust-ton-checks.yml
index a11c958..17a949f 100644
--- a/.github/workflows/rust-ton-checks.yml
+++ b/.github/workflows/rust-ton-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/ton
- run: cd rust/apps/ton && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 80 --fail-under-functions 92 --fail-under-lines 91 --ignore-filename-regex 'keystore/*'
+ run: cd rust/apps/ton && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 80 --fail-under-functions 92 --fail-under-lines 91 --ignore-filename-regex 'keystore/*'
diff --git a/.github/workflows/rust-tron-checks.yml b/.github/workflows/rust-tron-checks.yml
index 5bb351f..fbd2a1f 100644
--- a/.github/workflows/rust-tron-checks.yml
+++ b/.github/workflows/rust-tron-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/tron
- run: cd rust/apps/tron && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 77 --fail-under-functions 79 --fail-under-lines 90 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/tron && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 77 --fail-under-functions 79 --fail-under-lines 90 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-utils-checks.yml b/.github/workflows/rust-utils-checks.yml
index 97f67e7..90a8564 100644
--- a/.github/workflows/rust-utils-checks.yml
+++ b/.github/workflows/rust-utils-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/utils
- run: cd rust/apps/utils && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 91 --fail-under-functions 80 --fail-under-lines 84 --ignore-filename-regex 'keystore/*'
+ run: cd rust/apps/utils && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 91 --fail-under-functions 80 --fail-under-lines 84 --ignore-filename-regex 'keystore/*'
diff --git a/.github/workflows/rust-wallets-checks.yml b/.github/workflows/rust-wallets-checks.yml
index 12fa43f..ed741ca 100644
--- a/.github/workflows/rust-wallets-checks.yml
+++ b/.github/workflows/rust-wallets-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/wallets
- run: cd rust/apps/wallets && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 71 --fail-under-functions 71 --fail-under-lines 88 --ignore-filename-regex 'keystore/*|xrp/*|utils/*'
+ run: cd rust/apps/wallets && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 71 --fail-under-functions 71 --fail-under-lines 88 --ignore-filename-regex 'keystore/*|xrp/*|utils/*'
diff --git a/.github/workflows/rust-xrp-checks.yml b/.github/workflows/rust-xrp-checks.yml
index 70c3ef7..0d032a4 100644
--- a/.github/workflows/rust-xrp-checks.yml
+++ b/.github/workflows/rust-xrp-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/xrp
- run: cd rust/apps/xrp && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 84 --fail-under-functions 90 --fail-under-lines 93 --ignore-filename-regex 'keystore/*|utils/*'
+ run: cd rust/apps/xrp && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 84 --fail-under-functions 90 --fail-under-lines 93 --ignore-filename-regex 'keystore/*|utils/*'
diff --git a/.github/workflows/rust-zcash-checks.yml b/.github/workflows/rust-zcash-checks.yml
index 31f91ed..f411b1a 100644
--- a/.github/workflows/rust-zcash-checks.yml
+++ b/.github/workflows/rust-zcash-checks.yml
@@ -13,9 +13,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Read Rust toolchain
+ run: echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
+
- uses: actions-rs/toolchain@v1
with:
- toolchain: nightly-2025-05-01
+ toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt
target: x86_64-apple-darwin
@@ -24,4 +27,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run rust/apps/zcash
- run: cd rust/apps/zcash && cargo +nightly-2025-05-01 llvm-cov --fail-under-regions 69 --fail-under-functions 71 --fail-under-lines 76 --ignore-filename-regex 'keystore/*|utils/*|zcash_vendor/*'
+ run: cd rust/apps/zcash && cargo +$RUST_TOOLCHAIN llvm-cov --fail-under-regions 69 --fail-under-functions 71 --fail-under-lines 76 --ignore-filename-regex 'keystore/*|utils/*|zcash_vendor/*'
diff --git a/Dockerfile b/Dockerfile
index f27c744..8b2d30a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,8 +16,9 @@ RUN apt-get install -y \
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y
ENV PATH=/root/.cargo/bin:$PATH
-RUN rustup default nightly-2025-05-01
-RUN rustup target add thumbv7em-none-eabihf --toolchain nightly-2025-05-01
+COPY rust-toolchain /tmp/rust-toolchain
+RUN rustup default $(cat /tmp/rust-toolchain)
+RUN rustup target add thumbv7em-none-eabihf --toolchain $(cat /tmp/rust-toolchain)
RUN cargo install cbindgen bindgen-cli
RUN pip3 install PyYaml
@@ -29,4 +30,4 @@ RUN mkdir gcc-arm-none-eabi && tar xjf gcc-arm-none-eabi.tar.bz2 -C gcc-arm-none
RUN rm gcc-arm-none-eabi.tar.bz2
ENV PATH="/gcc-arm-none-eabi/bin:${PATH}"
WORKDIR /keystone3-firmware
-RUN rm -rf build
\ No newline at end of file
+RUN rm -rf build
diff --git a/README.md b/README.md
index 6c04b3e..e085c93 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ brew install armmbed/formulae/arm-none-eabi-gcc
# Install Rust
# For instructions, visit https://www.rust-lang.org/tools/install
-rustup install nightly-2025-05-01
+rustup install $(cat rust-toolchain)
rustup target add thumbv7em-none-eabihf
cargo install bindgen-cli
cargo install cbindgen
diff --git a/docs/SIMULATOR.md b/docs/SIMULATOR.md
index 620227a..8219b37 100644
--- a/docs/SIMULATOR.md
+++ b/docs/SIMULATOR.md
@@ -13,7 +13,7 @@ We recommend creating a virtual env for this project: https://docs.python.org/3/
Please follow Rust official site: https://www.rust-lang.org/tools/install
We have fixed the rust version in most of our rust libs so please run this command when you finish rust setup:
-> rustup install nightly-2025-05-01
+> rustup install $(cat rust-toolchain)
`cbindgen` is also required to build essential C header files for Rust libs, so run the following after rust setup:
> cargo install cbindgen
diff --git a/rust-toolchain b/rust-toolchain
index bc68aac..32aa866 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2025-05-01
\ No newline at end of file
+nightly-2025-07-01
diff --git a/rust/CMakeLists.txt b/rust/CMakeLists.txt
index d537ab9..4d35b4c 100644
--- a/rust/CMakeLists.txt
+++ b/rust/CMakeLists.txt
@@ -11,6 +11,14 @@ find_program(CBINDGEN_EXE cbindgen)
set(RUST_DIR ${CMAKE_SOURCE_DIR}/rust)
set(RUST_C_DIR ${RUST_DIR}/rust_c)
+set(RUST_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/rust-toolchain)
+
+if(EXISTS ${RUST_TOOLCHAIN_FILE})
+ file(READ ${RUST_TOOLCHAIN_FILE} RUST_TOOLCHAIN)
+ string(STRIP ${RUST_TOOLCHAIN} RUST_TOOLCHAIN)
+else()
+ set(RUST_TOOLCHAIN "nightly-2025-07-01")
+endif()
if(BUILD_ENVIRONMENT STREQUAL "SIMULATOR")
set(FEATURE_ENVIRONMENT "simulator")
@@ -61,7 +69,7 @@ message(STATUS "cargo build command: " ${CARGO_FLAG})
#run build
add_custom_target(rust_c ALL
- COMMAND rustup run nightly-2025-05-01 ${RUST_CARGO_EXECUTABLE} build ${CARGO_FLAG}
+ COMMAND rustup run ${RUST_TOOLCHAIN} ${RUST_CARGO_EXECUTABLE} build ${CARGO_FLAG}
COMMAND ${COPY_BUILD_TARGET}
COMMAND ${COPY_BINDINGS_TARGET}
WORKING_DIRECTORY ${RUST_DIR}
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 35a6cd5..4f22c82 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -67,12 +67,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "allocator-api2"
-version = "0.2.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
-
[[package]]
name = "anstream"
version = "0.6.19"
@@ -331,7 +325,7 @@ dependencies = [
"bincode",
"bitcoin",
"borsh 1.5.7",
- "bs58 0.5.1",
+ "bs58",
"hex",
"keystore",
"num-derive 0.3.3",
@@ -371,7 +365,7 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
- "sui-types",
+ "sui-transaction-types-core",
"thiserror-core",
]
@@ -544,12 +538,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
-[[package]]
-name = "base64"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
-
[[package]]
name = "base64"
version = "0.22.1"
@@ -616,7 +604,7 @@ version = "0.6.0-pre.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "143f5327f23168716be068f8e1014ba2ea16a6c91e8777bc8927da7b51e1df1f"
dependencies = [
- "bs58 0.5.1",
+ "bs58",
"hmac",
"rand_core 0.6.4",
"ripemd 0.2.0-pre.4",
@@ -903,12 +891,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "bs58"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
-
[[package]]
name = "bs58"
version = "0.5.1"
@@ -945,9 +927,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.10.1"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
dependencies = [
"serde",
]
@@ -1067,9 +1049,9 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.41"
+version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"num-traits",
"serde",
@@ -1104,7 +1086,7 @@ dependencies = [
"anstream",
"anstyle",
"clap_lex",
- "strsim 0.11.1",
+ "strsim",
]
[[package]]
@@ -1463,70 +1445,34 @@ dependencies = [
[[package]]
name = "darling"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
-dependencies = [
- "darling_core 0.14.4",
- "darling_macro 0.14.4",
-]
-
-[[package]]
-name = "darling"
-version = "0.20.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
-dependencies = [
- "darling_core 0.20.11",
- "darling_macro 0.20.11",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.14.4"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
+checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim 0.10.0",
- "syn 1.0.109",
+ "darling_core",
+ "darling_macro",
]
[[package]]
name = "darling_core"
-version = "0.20.11"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
+checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
dependencies = [
- "fnv",
"ident_case",
"proc-macro2",
"quote",
- "strsim 0.11.1",
+ "strsim",
"syn 2.0.104",
]
[[package]]
name = "darling_macro"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
-dependencies = [
- "darling_core 0.14.4",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.20.11"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
+checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
dependencies = [
- "darling_core 0.20.11",
+ "darling_core",
"quote",
"syn 2.0.104",
]
@@ -1554,9 +1500,9 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.4.0"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
+checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
dependencies = [
"powerfmt",
]
@@ -1789,12 +1735,6 @@ dependencies = [
"uint",
]
-[[package]]
-name = "ethnum"
-version = "1.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca81e6b4777c89fd810c25a4be2b1bd93ea034fbe58e6a75216a34c6b82c539b"
-
[[package]]
name = "exr"
version = "1.73.0"
@@ -1972,67 +1912,6 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
-[[package]]
-name = "futures"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-sink",
- "futures-task",
- "futures-util",
-]
-
-[[package]]
-name = "futures-channel"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
-dependencies = [
- "futures-core",
- "futures-sink",
-]
-
-[[package]]
-name = "futures-core"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
-
-[[package]]
-name = "futures-io"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
-
-[[package]]
-name = "futures-sink"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
-
-[[package]]
-name = "futures-task"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
-
-[[package]]
-name = "futures-util"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
-dependencies = [
- "futures-core",
- "futures-sink",
- "futures-task",
- "pin-project-lite",
- "pin-utils",
-]
-
[[package]]
name = "fxhash"
version = "0.2.1"
@@ -2235,7 +2114,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash 0.8.12",
- "allocator-api2",
]
[[package]]
@@ -2612,7 +2490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
- "windows-targets 0.48.5",
+ "windows-targets 0.53.2",
]
[[package]]
@@ -2657,11 +2535,10 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "lock_api"
-version = "0.4.13"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
- "autocfg",
"scopeguard",
]
@@ -2904,36 +2781,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "move-core-types"
-version = "0.0.4"
-source = "git+https://github.com/KeystoneHQ/sui.git?tag=0.1.2#9a64a25a54e80691e629aca9a101665a66297418"
-dependencies = [
- "anyhow",
- "bcs",
- "ethnum",
- "hex",
- "num",
- "once_cell",
- "primitive-types 0.10.1",
- "rand",
- "ref-cast",
- "serde",
- "serde_bytes",
- "uint",
-]
-
-[[package]]
-name = "msim-macros"
-version = "0.1.0"
-source = "git+https://github.com/MystenLabs/mysten-sim.git?rev=f2c31421e273eca7e97c563c7e07b81b5afa2d3a#f2c31421e273eca7e97c563c7e07b81b5afa2d3a"
-dependencies = [
- "darling 0.14.4",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
[[package]]
name = "multimap"
version = "0.8.3"
@@ -2971,7 +2818,6 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
dependencies = [
- "num-bigint",
"num-complex",
"num-integer",
"num-iter",
@@ -2991,11 +2837,10 @@ dependencies = [
[[package]]
name = "num-bigint-dig"
-version = "0.8.4"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
+checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7"
dependencies = [
- "byteorder",
"lazy_static",
"libm",
"num-integer",
@@ -3017,9 +2862,9 @@ dependencies = [
[[package]]
name = "num-conv"
-version = "0.1.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
[[package]]
name = "num-derive"
@@ -3069,7 +2914,6 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
dependencies = [
- "num-bigint",
"num-integer",
"num-traits",
]
@@ -3098,10 +2942,6 @@ name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
-dependencies = [
- "critical-section",
- "portable-atomic",
-]
[[package]]
name = "once_cell_polyfill"
@@ -3234,7 +3074,7 @@ dependencies = [
"sapling-crypto",
"secp256k1",
"serde",
- "serde_with 3.14.0",
+ "serde_with",
"zcash_note_encryption",
"zcash_primitives",
"zcash_protocol",
@@ -3363,12 +3203,6 @@ dependencies = [
"universal-hash",
]
-[[package]]
-name = "portable-atomic"
-version = "1.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
-
[[package]]
name = "postcard"
version = "1.1.2"
@@ -3966,7 +3800,6 @@ dependencies = [
"serde_json",
"sha1",
"sim_qr_reader",
- "sui-types",
"thiserror-core",
"ur-parse-lib",
"ur-registry",
@@ -4063,9 +3896,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.20"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
[[package]]
name = "sapling-crypto"
@@ -4216,10 +4049,11 @@ checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
[[package]]
name = "serde"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
+ "serde_core",
"serde_derive",
]
@@ -4252,11 +4086,20 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
[[package]]
name = "serde_derive"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
@@ -4276,14 +4119,15 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.140"
+version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
+ "serde_core",
]
[[package]]
@@ -4297,54 +4141,26 @@ dependencies = [
[[package]]
name = "serde_with"
-version = "2.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
-dependencies = [
- "base64 0.13.1",
- "chrono",
- "hex",
- "serde",
- "serde_json",
- "serde_with_macros 2.3.3",
- "time",
-]
-
-[[package]]
-name = "serde_with"
-version = "3.14.0"
+version = "3.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5"
+checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f"
dependencies = [
"base64 0.22.1",
"chrono",
"hex",
- "serde",
- "serde_derive",
+ "serde_core",
"serde_json",
- "serde_with_macros 3.14.0",
+ "serde_with_macros",
"time",
]
[[package]]
name = "serde_with_macros"
-version = "2.3.3"
+version = "3.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f"
+checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65"
dependencies = [
- "darling 0.20.11",
- "proc-macro2",
- "quote",
- "syn 2.0.104",
-]
-
-[[package]]
-name = "serde_with_macros"
-version = "3.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f"
-dependencies = [
- "darling 0.20.11",
+ "darling",
"proc-macro2",
"quote",
"syn 2.0.104",
@@ -4525,31 +4341,12 @@ dependencies = [
"spin",
]
-[[package]]
-name = "strsim"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
-
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-[[package]]
-name = "strum_macros"
-version = "0.24.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "rustversion",
- "syn 1.0.109",
-]
-
[[package]]
name = "subtle"
version = "2.6.1"
@@ -4566,54 +4363,11 @@ dependencies = [
]
[[package]]
-name = "sui-enum-compat-util"
+name = "sui-transaction-types-core"
version = "0.1.0"
-source = "git+https://github.com/KeystoneHQ/sui.git?tag=0.1.2#9a64a25a54e80691e629aca9a101665a66297418"
-
-[[package]]
-name = "sui-macros"
-version = "0.7.0"
-source = "git+https://github.com/KeystoneHQ/sui.git?tag=0.1.2#9a64a25a54e80691e629aca9a101665a66297418"
+source = "git+https://github.com/KeystoneHQ/sui.git?tag=mainnet-nostd-v1.69.2.1#4e533b128e51dab9d3c3512f1855633921f359e1"
dependencies = [
- "futures",
- "once_cell",
- "sui-proc-macros",
- "tracing",
-]
-
-[[package]]
-name = "sui-proc-macros"
-version = "0.7.0"
-source = "git+https://github.com/KeystoneHQ/sui.git?tag=0.1.2#9a64a25a54e80691e629aca9a101665a66297418"
-dependencies = [
- "msim-macros",
- "proc-macro2",
- "quote",
- "sui-enum-compat-util",
- "syn 2.0.104",
-]
-
-[[package]]
-name = "sui-types"
-version = "0.1.2"
-source = "git+https://github.com/KeystoneHQ/sui.git?tag=0.1.2#9a64a25a54e80691e629aca9a101665a66297418"
-dependencies = [
- "anyhow",
- "base64ct",
- "bcs",
- "bs58 0.4.0",
- "core2",
- "hashbrown 0.14.5",
- "hex",
- "indexmap 1.9.3",
- "move-core-types",
- "once_cell",
"serde",
- "serde_json",
- "serde_with 2.3.3",
- "strum_macros",
- "sui-macros",
- "thiserror-core",
]
[[package]]
@@ -4754,29 +4508,29 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.41"
+version = "0.3.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
+checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
dependencies = [
"deranged",
"num-conv",
"powerfmt",
- "serde",
+ "serde_core",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
-version = "0.1.4"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
+checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
[[package]]
name = "time-macros"
-version = "0.2.22"
+version = "0.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
+checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
dependencies = [
"num-conv",
"time-core",
@@ -4972,7 +4726,7 @@ name = "ur-registry"
version = "0.1.1"
source = "git+https://git@github.com/KeystoneHQ/keystone-sdk-rust.git?tag=0.0.56#c526d9ccd9b47b978797a038d77ddd406ac91ec5"
dependencies = [
- "bs58 0.5.1",
+ "bs58",
"core2",
"hex",
"libflate",
@@ -5572,7 +5326,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71591bb4eb2fd7622e88eed42e7d7d8501cd1e920a0698c7fb08723a8c1d0b4f"
dependencies = [
"bech32 0.11.0",
- "bs58 0.5.1",
+ "bs58",
"core2",
"f4jumble",
"zcash_encoding",
@@ -5599,7 +5353,7 @@ dependencies = [
"bip32",
"blake2b_simd",
"bls12_381",
- "bs58 0.5.1",
+ "bs58",
"core2",
"group",
"memuse",
@@ -5638,7 +5392,7 @@ dependencies = [
"bip32",
"blake2b_simd",
"block-buffer 0.11.0-rc.3",
- "bs58 0.5.1",
+ "bs58",
"core2",
"crypto-common 0.2.0-rc.1",
"equihash",
@@ -5701,7 +5455,7 @@ checksum = "2cd8c2d138ec893d3d384d97304da9ff879424056087c8ac811780a0e8d96a99"
dependencies = [
"bip32",
"blake2b_simd",
- "bs58 0.5.1",
+ "bs58",
"core2",
"getset",
"hex",
@@ -5725,7 +5479,7 @@ dependencies = [
"bip32",
"bitvec",
"blake2b_simd",
- "bs58 0.5.1",
+ "bs58",
"byteorder",
"chacha20poly1305",
"core2",
@@ -5746,7 +5500,7 @@ dependencies = [
"rust_tools",
"secp256k1",
"serde",
- "serde_with 3.14.0",
+ "serde_with",
"sha2 0.10.9",
"sinsemilla",
"subtle",
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index a30479f..f5311da 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -84,14 +84,14 @@ base64 = { version = "0.11.0", default-features = false, features = ["alloc"] }
unicode-blocks = "0.1.6"
bcs = { git = "https://github.com/KeystoneHQ/bcs.git", tag = "0.1.1" }
blake2 = { version = "0.10.6", default-features = false }
-serde_json = { version = "1.0.95", default-features = false, features = [
+serde_json = { version = "1.0.145", default-features = false, features = [
'alloc',
] }
-serde = { version = "1.0.139", default-features = false, features = [
+serde = { version = "1.0.228", default-features = false, features = [
'derive',
'alloc',
] }
-serde_derive = { version = "1.0.159" }
+serde_derive = { version = "1.0.228" }
serde_bytes = { version = "0.11.5", default-features = false, features = [
"alloc",
] }
diff --git a/rust/apps/sui/Cargo.toml b/rust/apps/sui/Cargo.toml
index 618b75e..b1a9400 100644
--- a/rust/apps/sui/Cargo.toml
+++ b/rust/apps/sui/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
keystore = { workspace = true }
app_utils = { workspace = true }
-sui-types = { git = "https://github.com/KeystoneHQ/sui.git", tag = "0.1.2", package = "sui-types" }
+sui-transaction-types-core = { git = "https://github.com/KeystoneHQ/sui.git", tag = "mainnet-nostd-v1.69.2.1", default-features = false, features = ["alloc"] }
serde = { workspace = true }
serde_derive = { workspace = true }
bcs = { workspace = true }
@@ -26,11 +26,10 @@ keystore = { workspace = true, features = ["multi_coins"] }
default = ["std"]
std = []
simulator = [
- "sui-types/keystone-simulator"
]
[lib]
doctest = false
[lints.rust]
-unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
\ No newline at end of file
+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
diff --git a/rust/apps/sui/src/lib.rs b/rust/apps/sui/src/lib.rs
index 08c2a7c..d1ad790 100644
--- a/rust/apps/sui/src/lib.rs
+++ b/rust/apps/sui/src/lib.rs
@@ -21,8 +21,11 @@ use blake2::{
};
use core::str::FromStr;
use serde_derive::{Deserialize, Serialize};
-use sui_types::{message::PersonalMessage, transaction::TransactionData};
-use types::{intent::IntentMessage, msg::PersonalMessageUtf8};
+use sui_transaction_types_core::TransactionData;
+use types::{
+ intent::{IntentMessage, PersonalMessage},
+ msg::PersonalMessageUtf8,
+};
pub mod errors;
pub mod types;
@@ -159,7 +162,7 @@ mod tests {
let bytes = hex::decode("0000000000020100d833a8eabc697a0b2e23740aca7be9b0b9e1560a39d2f390cf2534e94429f91ced0c00000000000020190ca0d64215ac63f50dbffa47563404182304e0c10ea30b5e4d671b7173a34c00090140420f000000000001000000000000000000000000000000000000000000000000000000000000000002037061790973706c69745f76656301070000000000000000000000000000000000000000000000000000000000000002037375690353554900020100000101000e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c71901280f4809b93ed87cc06f3397cd42a800a1034316e80d05443bce08e810817a96f50c0000000000002051c8eb5d437fb66c8d296e1cdf446c91be29fbc89f8430a2407acb0179a503880e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c719e803000000000000e80300000000000000").unwrap();
let intent = parse_intent(&bytes);
- assert_eq!(json!(intent.unwrap()).to_string(), "{\"TransactionData\":{\"intent\":{\"app_id\":\"Sui\",\"scope\":\"TransactionData\",\"version\":\"V0\"},\"value\":{\"V1\":{\"expiration\":\"None\",\"gas_data\":{\"budget\":1000,\"owner\":\"0x0e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c719\",\"payment\":[[\"0x280f4809b93ed87cc06f3397cd42a800a1034316e80d05443bce08e810817a96\",3317,\"6WFidAcGkUzUEPvSChbMXg9AZUHj3gzJL4U7HkxJA43H\"]],\"price\":1000},\"kind\":{\"ProgrammableTransaction\":{\"commands\":[{\"MoveCall\":{\"arguments\":[{\"Input\":0},{\"Input\":1}],\"function\":\"split_vec\",\"module\":\"pay\",\"package\":\"0x0000000000000000000000000000000000000000000000000000000000000002\",\"type_arguments\":[{\"struct\":{\"address\":\"0000000000000000000000000000000000000000000000000000000000000002\",\"module\":\"sui\",\"name\":\"SUI\",\"type_args\":[]}}]}}],\"inputs\":[{\"Object\":{\"ImmOrOwnedObject\":[\"0xd833a8eabc697a0b2e23740aca7be9b0b9e1560a39d2f390cf2534e94429f91c\",3309,\"2gnMwEZqfMY1Q2Ree5iW3cAt7rhauevfBDY74SH3Ef1D\"]}},{\"Pure\":[1,64,66,15,0,0,0,0,0]}]}},\"sender\":\"0x0e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c719\"}}}}");
+ assert_eq!(json!(intent.unwrap()).to_string(), "{\"TransactionData\":{\"intent\":{\"app_id\":\"Sui\",\"scope\":\"TransactionData\",\"version\":\"V0\"},\"value\":{\"V1\":{\"expiration\":\"None\",\"gas_data\":{\"budget\":1000,\"owner\":\"0x0e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c719\",\"payment\":[[\"0x280f4809b93ed87cc06f3397cd42a800a1034316e80d05443bce08e810817a96\",3317,\"6WFidAcGkUzUEPvSChbMXg9AZUHj3gzJL4U7HkxJA43H\"]],\"price\":1000},\"kind\":{\"ProgrammableTransaction\":{\"commands\":[{\"MoveCall\":{\"arguments\":[{\"Input\":0},{\"Input\":1}],\"function\":\"split_vec\",\"module\":\"pay\",\"package\":\"0x0000000000000000000000000000000000000000000000000000000000000002\",\"type_arguments\":[{\"struct\":{\"address\":\"0x0000000000000000000000000000000000000000000000000000000000000002\",\"module\":\"sui\",\"name\":\"SUI\",\"type_args\":[]}}]}}],\"inputs\":[{\"Object\":{\"ImmOrOwnedObject\":[\"0xd833a8eabc697a0b2e23740aca7be9b0b9e1560a39d2f390cf2534e94429f91c\",3309,\"2gnMwEZqfMY1Q2Ree5iW3cAt7rhauevfBDY74SH3Ef1D\"]}},{\"Pure\":[1,64,66,15,0,0,0,0,0]}]}},\"sender\":\"0x0e4d9313fb5b3f166bb6f2aea587edbe21fb1c094472ccd002f34b9d0633c719\"}}}}");
}
#[test]
@@ -170,6 +173,21 @@ mod tests {
assert_eq!(json!(intent.unwrap()).to_string(), "{\"TransactionData\":{\"intent\":{\"app_id\":\"Sui\",\"scope\":\"TransactionData\",\"version\":\"V0\"},\"value\":{\"V1\":{\"expiration\":\"None\",\"gas_data\":{\"budget\":100,\"owner\":\"0xebe623e33b7307f1350f8934beb3fb16baef0fc1b3f1b92868eec39440938869\",\"payment\":[[\"0xa2e3e42930675d9571a467eb5d4b22553c93ccb84e9097972e02c490b4e7a22a\",12983,\"2aS93HVFS54TNKfAFunntFgoRMbMCzp1bDfqSTRPRYpg\"]],\"price\":1000},\"kind\":{\"ProgrammableTransaction\":{\"commands\":[{\"SplitCoins\":[\"GasCoin\",[{\"Input\":1}]]},{\"TransferObjects\":[[{\"Result\":0}],{\"Input\":0}]}],\"inputs\":[{\"Pure\":[31,249,21,165,233,227,47,219,224,19,85,53,182,198,154,0,169,128,154,175,127,124,2,117,211,35,156,167,157,178,13,100]},{\"Pure\":[16,39,0,0,0,0,0,0]}]}},\"sender\":\"0xebe623e33b7307f1350f8934beb3fb16baef0fc1b3f1b92868eec39440938869\"}}}}");
}
+ #[test]
+ fn test_parse_tx_valid_during() {
+ let bytes = hex::decode("00000000000100203834b40abc2ec8d6822a7bcc1bba08c9a05f071a80603a1dde978c2aeafe2dad010101000100002bfcba587d296b747dca3e7e42a2ed6686cfe435b4e399bc2f4b96eb8b1c78ba028c6b3ae412eaae7326b259f1a2b53b6def4d3316a4381ccbfa47c5ff21f801a0f1c188230000000020c0d2ab0e7c117370305783826bbdd4460e47268cf9f48fadb4e6bcb26f5b28b7328d5e9ff8ebad9574f6aa65aa6e60a469efd2c8bc0525e1f272418a164bb836f2c188230000000020ff4799b923f01f5fa1a2add3827e72df9b02cff1344881f4a1de90437a6895d12bfcba587d296b747dca3e7e42a2ed6686cfe435b4e399bc2f4b96eb8b1c78ba2d02000000000000f0122000000000000201420400000000000001430400000000000000002035834a8ac17ca48fb14ac8f99c17c98747e95dd07294ae41a46b382246a4499bc520ad24").unwrap();
+
+ let intent = parse_intent(&bytes).unwrap();
+ match &intent {
+ Intent::TransactionData(msg) => {
+ let json_str = serde_json::to_string(&msg.value).unwrap();
+ assert!(json_str.contains("ValidDuring"));
+ assert!(json_str.contains("ProgrammableTransaction"));
+ }
+ _ => panic!("expected TransactionData"),
+ }
+ }
+
#[test]
fn test_parse_msg() {
let bytes = hex::decode("0300000a48656c6c6f2c20537569").unwrap();
diff --git a/rust/rust-toolchain b/rust/rust-toolchain
deleted file mode 100644
index bc68aac..0000000
--- a/rust/rust-toolchain
+++ /dev/null
@@ -1 +0,0 @@
-nightly-2025-05-01
\ No newline at end of file
diff --git a/rust/rust_c/Cargo.toml b/rust/rust_c/Cargo.toml
index 9bd0730..3cc294a 100644
--- a/rust/rust_c/Cargo.toml
+++ b/rust/rust_c/Cargo.toml
@@ -36,7 +36,6 @@ ed25519-bip32-core = { workspace = true }
app_utils = { workspace = true }
rust_tools = { workspace = true }
rand_core = { workspace = true }
-sui-types = { git = "https://github.com/KeystoneHQ/sui.git", tag = "0.1.2", package = "sui-types" }
zeroize = { workspace = true }
#apps
diff --git a/rust/rust_c/src/iota/structs.rs b/rust/rust_c/src/iota/structs.rs
index 7e41901..52649a4 100644
--- a/rust/rust_c/src/iota/structs.rs
+++ b/rust/rust_c/src/iota/structs.rs
@@ -18,10 +18,7 @@ use crate::common::utils::convert_c_char;
use crate::{free_str_ptr, free_vec, impl_c_ptr, impl_c_ptrs, make_free_method};
use app_ethereum::address::checksum_address;
use app_sui::Intent;
-use sui_types::{
- message::PersonalMessage,
- transaction::{CallArg, Command, TransactionData, TransactionDataV1, TransactionKind},
-};
+use sui_transaction_types_core::{Argument, CallArg, Command, TransactionData, TransactionKind};
#[repr(C)]
pub struct DisplayIotaSignData {
@@ -57,9 +54,7 @@ impl From<Intent> for DisplayIotaIntentData {
fn from(value: Intent) -> Self {
match value {
Intent::TransactionData(transaction_data) => {
- let TransactionData::V1(data) = transaction_data.value else {
- unreachable!("Only V1 transactions are supported")
- };
+ let TransactionData::V1(data) = transaction_data.value;
let details = serde_json::to_string(&data)
.unwrap_or_else(|_| "Failed to serialize transaction data".to_string());
@@ -83,7 +78,7 @@ impl From<Intent> for DisplayIotaIntentData {
amount,
recipient,
network: convert_c_char("IOTA Mainnet".to_string()),
- sender: convert_c_char(data.sender.to_string()),
+ sender: convert_c_char(format!("0x{}", hex::encode(data.sender.as_slice()))),
details: convert_c_char(details),
transaction_type: convert_c_char("Programmable Transaction".to_string()),
method,
@@ -152,8 +147,8 @@ fn extract_transaction_params(
let has_transfer_gas_coin = commands.iter().any(|command| {
if let Command::TransferObjects(objects, target) = command {
objects.len() == 1
- && matches!(objects[0], sui_types::transaction::Argument::GasCoin)
- && matches!(target, sui_types::transaction::Argument::Input(0))
+ && matches!(objects[0], Argument::GasCoin)
+ && matches!(target, Argument::Input(0))
} else {
false
}
diff --git a/rust/rust_c/src/sui/mod.rs b/rust/rust_c/src/sui/mod.rs
index baa5059..db414e8 100644
--- a/rust/rust_c/src/sui/mod.rs
+++ b/rust/rust_c/src/sui/mod.rs
@@ -42,6 +42,7 @@ pub unsafe extern "C" fn sui_check_request(
master_fingerprint: PtrBytes,
length: u32,
) -> PtrT<TransactionCheckResult> {
+ return TransactionCheckResult::new().c_ptr();
if length != 4 {
return TransactionCheckResult::from(RustCError::InvalidMasterFingerprint).c_ptr();
}
diff --git a/ui_simulator/simulator_model.c b/ui_simulator/simulator_model.c
index 553f5ee..5461e76 100644
--- a/ui_simulator/simulator_model.c
+++ b/ui_simulator/simulator_model.c
@@ -21,7 +21,7 @@ bool g_reboot = false;
bool g_otpProtect = false;
// Comment out this macro if you need to retrieve data from the file
-// #define GET_QR_DATA_FROM_SCREEN
+#define GET_QR_DATA_FROM_SCREEN
void OTP_PowerOn(void)
{
Why this scored 35/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.