magiclink_server_wallets_api/
dto.rs1use crate::domain::Network;
2use serde::{
3 Deserialize,
4 Serialize,
5};
6use std::collections::HashMap;
7
8#[derive(Debug, Serialize)]
9pub struct WalletGroupMetadataParam {
10 metadata: HashMap<String, String>,
11}
12
13#[derive(Debug, Serialize)]
14pub struct WalletParam {
15 encryption_context: String,
16 network: Network,
17 wallet_group_id: String,
18 metadata: HashMap<String, String>,
19}
20
21#[derive(Debug, Serialize)]
22pub struct RecoveryParam {
23 wallet_id: String,
24 encryption_context: String,
25 recovery_key: String,
26}
27
28#[derive(Debug, Serialize)]
29pub struct TransSigningParam<T> {
30 encryption_context: String,
31 access_key: String,
32 wallet_id: String,
33 payload: T,
34}
35
36#[derive(Debug, Serialize)]
37pub struct EVMPayload {
38 _type: u16,
39 chainId: u64,
40 nonce: u16,
41 value: String,
42 gas: u64,
43 maxFeePerGas: u64,
44 maxPriorityFeePerGas: u64,
45 to: String,
46}
47
48pub type SolanaPayload = String;
49
50#[derive(Debug, Serialize)]
51pub struct BitcoinPayload {
52 inputs: Vec<AddressInfo>,
53 outputs: Vec<AddressInfo>,
54}
55
56#[derive(Debug, Serialize)]
57pub struct AddressInfo {
58 address: String,
59 value: u16,
60 txid: Option<String>,
61 tx_num: Option<u16>,
62}
63
64#[derive(Debug, Serialize)]
65pub struct MessageSigningParam {
66 raw_data_hash: String,
67 encryption_context: String,
68 access_key: String,
69 wallet_id: String,
70}
71
72#[derive(Debug, Serialize)]
73pub struct SolanaSignMessageParam {
74 message_base64: String,
75 encryption_context: String,
76 access_key: String,
77 wallet_id: String,
78}