Skip to content

Commit ab780fb

Browse files
dkijaniaclaude
andcommitted
Use explicit type exports and add ClientConfig default test
- Replace `pub use types::*` with explicit named exports for a cleaner public API surface - Add test asserting ClientConfig::default() values since they are part of the public API contract Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7188040 commit ab780fb

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ mod types;
3535
pub use client::{ClientConfig, MinaClient};
3636
pub use currency::Currency;
3737
pub use error::{Error, Result};
38-
pub use types::*;
38+
pub use types::{
39+
AccountBalance, AccountData, BlockInfo, DaemonStatus, PeerInfo, PooledUserCommand,
40+
SendDelegationResult, SendPaymentResult, SyncStatus,
41+
};

tests/client_tests.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ use wiremock::{Mock, MockServer, ResponseTemplate};
55

66
use mina_sdk::*;
77

8+
#[test]
9+
fn test_client_config_defaults() {
10+
let config = ClientConfig::default();
11+
assert_eq!(config.graphql_uri, "http://127.0.0.1:3085/graphql");
12+
assert_eq!(config.retries, 3);
13+
assert_eq!(config.retry_delay, Duration::from_secs(5));
14+
assert_eq!(config.timeout, Duration::from_secs(30));
15+
}
16+
817
fn test_config(uri: &str) -> ClientConfig {
918
ClientConfig {
1019
graphql_uri: uri.to_string(),

0 commit comments

Comments
 (0)