Skip to content

Commit 0431722

Browse files
authored
remove solana-sdk from solana-remote-wallet (#3629)
* remove solana-sdk from remote-wallet * missing dev dep * missing feature activation * missing feature activation
1 parent 2cea8e6 commit 0431722

File tree

10 files changed

+34
-25
lines changed

10 files changed

+34
-25
lines changed

Cargo.lock

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clap-v3-utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ solana-cluster-type = { workspace = true }
1818
solana-commitment-config = { workspace = true }
1919
solana-derivation-path = { workspace = true }
2020
solana-hash = { workspace = true }
21-
solana-keypair = { workspace = true }
21+
solana-keypair = { workspace = true, features = ["seed-derivable"] }
2222
solana-native-token = { workspace = true }
2323
solana-presigner = { workspace = true }
2424
solana-program = { workspace = true }

faucet/Cargo.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ solana-message = { workspace = true }
2727
solana-metrics = { workspace = true }
2828
solana-native-token = { workspace = true }
2929
solana-packet = { workspace = true }
30-
solana-pubkey = { workspace = true }
30+
solana-pubkey = { workspace = true, features = ["rand"] }
3131
solana-signer = { workspace = true }
3232
solana-system-interface = { workspace = true }
3333
solana-system-transaction = { workspace = true }
@@ -37,9 +37,6 @@ spl-memo = { workspace = true, features = ["no-entrypoint"] }
3737
thiserror = { workspace = true }
3838
tokio = { workspace = true, features = ["full"] }
3939

40-
[dev-dependencies]
41-
solana-pubkey = { workspace = true, features = ["rand"] }
42-
4340
[lib]
4441
crate-type = ["lib"]
4542
name = "solana_faucet"

programs/sbf/Cargo.lock

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remote-wallet/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ parking_lot = { workspace = true }
2020
qstring = { workspace = true }
2121
semver = { workspace = true }
2222
solana-derivation-path = { workspace = true }
23-
solana-sdk = { workspace = true }
23+
solana-offchain-message = { workspace = true }
24+
solana-pubkey = { workspace = true, features = ["std"] }
25+
solana-signature = { workspace = true, features = ["std"] }
26+
solana-signer = { workspace = true }
2427
thiserror = { workspace = true }
2528
uriparse = { workspace = true }
2629

2730
[dev-dependencies]
2831
assert_matches = { workspace = true }
32+
solana-pubkey = { workspace = true, features = ["rand"] }
2933

3034
[features]
3135
default = ["linux-static-hidraw", "hidapi"]

remote-wallet/src/ledger.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use {
1313
crate::{ledger_error::LedgerError, locator::Manufacturer},
1414
log::*,
1515
num_traits::FromPrimitive,
16-
solana_sdk::{pubkey::Pubkey, signature::Signature},
16+
solana_pubkey::Pubkey,
17+
solana_signature::Signature,
1718
std::{cmp::min, convert::TryFrom},
1819
};
1920

@@ -531,8 +532,8 @@ impl RemoteWallet<hidapi::DeviceInfo> for LedgerWallet {
531532
message: &[u8],
532533
) -> Result<Signature, RemoteWalletError> {
533534
if message.len()
534-
> solana_sdk::offchain_message::v0::OffchainMessage::MAX_LEN_LEDGER
535-
+ solana_sdk::offchain_message::v0::OffchainMessage::HEADER_LEN
535+
> solana_offchain_message::v0::OffchainMessage::MAX_LEN_LEDGER
536+
+ solana_offchain_message::v0::OffchainMessage::HEADER_LEN
536537
{
537538
return Err(RemoteWalletError::InvalidInput(
538539
"Off-chain message to sign is too long".to_string(),

remote-wallet/src/locator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use {
2-
solana_sdk::pubkey::{ParsePubkeyError, Pubkey},
2+
solana_pubkey::{ParsePubkeyError, Pubkey},
33
std::{
44
convert::{Infallible, TryFrom, TryInto},
55
str::FromStr,

remote-wallet/src/remote_keypair.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ use {
88
},
99
},
1010
solana_derivation_path::DerivationPath,
11-
solana_sdk::{
12-
pubkey::Pubkey,
13-
signature::{Signature, Signer, SignerError},
14-
},
11+
solana_pubkey::Pubkey,
12+
solana_signature::Signature,
13+
solana_signer::{Signer, SignerError},
1514
};
1615

1716
pub struct RemoteKeypair {

remote-wallet/src/remote_wallet.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ use {
99
log::*,
1010
parking_lot::RwLock,
1111
solana_derivation_path::{DerivationPath, DerivationPathError},
12-
solana_sdk::{
13-
pubkey::Pubkey,
14-
signature::{Signature, SignerError},
15-
},
12+
solana_pubkey::Pubkey,
13+
solana_signature::Signature,
14+
solana_signer::SignerError,
1615
std::{
1716
rc::Rc,
1817
time::{Duration, Instant},
@@ -336,7 +335,7 @@ mod tests {
336335

337336
#[test]
338337
fn test_parse_locator() {
339-
let pubkey = solana_sdk::pubkey::new_rand();
338+
let pubkey = solana_pubkey::new_rand();
340339
let locator = Locator {
341340
manufacturer: Manufacturer::Ledger,
342341
pubkey: Some(pubkey),
@@ -369,7 +368,7 @@ mod tests {
369368

370369
#[test]
371370
fn test_remote_wallet_info_matches() {
372-
let pubkey = solana_sdk::pubkey::new_rand();
371+
let pubkey = solana_pubkey::new_rand();
373372
let info = RemoteWalletInfo {
374373
manufacturer: Manufacturer::Ledger,
375374
model: "Nano S".to_string(),
@@ -391,7 +390,7 @@ mod tests {
391390
assert!(info.matches(&test_info));
392391
test_info.host_device_path = "/host/device/path".to_string();
393392
assert!(info.matches(&test_info));
394-
let another_pubkey = solana_sdk::pubkey::new_rand();
393+
let another_pubkey = solana_pubkey::new_rand();
395394
test_info.pubkey = another_pubkey;
396395
assert!(!info.matches(&test_info));
397396
test_info.pubkey = pubkey;
@@ -400,7 +399,7 @@ mod tests {
400399

401400
#[test]
402401
fn test_get_pretty_path() {
403-
let pubkey = solana_sdk::pubkey::new_rand();
402+
let pubkey = solana_pubkey::new_rand();
404403
let pubkey_str = pubkey.to_string();
405404
let remote_wallet_info = RemoteWalletInfo {
406405
model: "nano-s".to_string(),

svm/examples/Cargo.lock

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)