Skip to main content

ows_lib/
types.rs

1use serde::{Deserialize, Serialize};
2
3/// A single account within a wallet (one per chain family).
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct AccountInfo {
6    pub chain_id: String,
7    pub address: String,
8    pub derivation_path: String,
9}
10
11/// Binding-friendly wallet information (no crypto envelope exposed).
12#[derive(Debug, Clone, Serialize, Deserialize)]
13pub struct WalletInfo {
14    pub id: String,
15    pub name: String,
16    pub accounts: Vec<AccountInfo>,
17    pub created_at: String,
18}
19
20/// Result from a signing operation.
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct SignResult {
23    pub signature: String,
24    pub recovery_id: Option<u8>,
25}
26
27/// Result from a sign-and-send operation.
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct SendResult {
30    pub tx_hash: String,
31}