@@ -15,3 +15,228 @@ export const ShareWalletKeychain = t.partial({
1515 toPubKey : t . string ,
1616 path : t . string ,
1717} ) ;
18+
19+ /**
20+ * Wallet user with permissions
21+ */
22+ export const WalletUser = t . type ( {
23+ user : t . string ,
24+ permissions : t . array ( t . string ) ,
25+ } ) ;
26+
27+ /**
28+ * Address balance information
29+ */
30+ export const AddressBalance = t . type ( {
31+ updated : t . string ,
32+ balance : t . number ,
33+ balanceString : t . string ,
34+ totalReceived : t . number ,
35+ totalSent : t . number ,
36+ confirmedBalanceString : t . string ,
37+ spendableBalanceString : t . string ,
38+ } ) ;
39+
40+ /**
41+ * Address information
42+ */
43+ export const ReceiveAddress = t . partial ( {
44+ /** Address ID */
45+ id : t . string ,
46+ /** The actual address string */
47+ address : t . string ,
48+ /** Chain index (0 for external, 1 for internal) */
49+ chain : t . number ,
50+ /** Address index */
51+ index : t . number ,
52+ /** Coin type */
53+ coin : t . string ,
54+ /** Wallet ID this address belongs to */
55+ wallet : t . string ,
56+ /** Last nonce used */
57+ lastNonce : t . number ,
58+ /** Coin-specific address data */
59+ coinSpecific : t . UnknownRecord ,
60+ /** Address balance information */
61+ balance : AddressBalance ,
62+ /** Address label */
63+ label : t . string ,
64+ /** Address type (e.g., 'p2sh', 'p2wsh') */
65+ addressType : t . string ,
66+ } ) ;
67+
68+ /**
69+ * Policy rule for wallet
70+ */
71+ export const PolicyRule = t . partial ( {
72+ /** Rule ID */
73+ id : t . string ,
74+ /** Rule type */
75+ type : t . string ,
76+ /** Date when rule becomes locked */
77+ lockDate : t . string ,
78+ /** Mutability constraint */
79+ mutabilityConstraint : t . string ,
80+ /** Coin this rule applies to */
81+ coin : t . string ,
82+ /** Rule condition */
83+ condition : t . UnknownRecord ,
84+ /** Rule action */
85+ action : t . UnknownRecord ,
86+ } ) ;
87+
88+ /**
89+ * Wallet policy
90+ */
91+ export const WalletPolicy = t . partial ( {
92+ /** Policy ID */
93+ id : t . string ,
94+ /** Policy creation date */
95+ date : t . string ,
96+ /** Policy version number */
97+ version : t . number ,
98+ /** Policy label */
99+ label : t . string ,
100+ /** Whether this is the latest version */
101+ latest : t . boolean ,
102+ /** Policy rules */
103+ rules : t . array ( PolicyRule ) ,
104+ } ) ;
105+
106+ /**
107+ * Admin settings for wallet
108+ */
109+ export const WalletAdmin = t . partial ( {
110+ policy : WalletPolicy ,
111+ } ) ;
112+
113+ /**
114+ * Freeze information
115+ */
116+ export const WalletFreeze = t . partial ( {
117+ time : t . string ,
118+ expires : t . string ,
119+ } ) ;
120+
121+ /**
122+ * Build defaults for wallet transactions
123+ */
124+ export const BuildDefaults = t . partial ( {
125+ minFeeRate : t . number ,
126+ maxFeeRate : t . number ,
127+ feeMultiplier : t . number ,
128+ changeAddressType : t . string ,
129+ txFormat : t . string ,
130+ } ) ;
131+
132+ /**
133+ * Custom change key signatures
134+ */
135+ export const CustomChangeKeySignatures = t . partial ( {
136+ user : t . string ,
137+ backup : t . string ,
138+ bitgo : t . string ,
139+ } ) ;
140+
141+ /**
142+ * Wallet response data
143+ * Comprehensive wallet information returned from wallet operations
144+ * Based on WalletData interface from sdk-core
145+ */
146+ export const WalletResponse = t . partial ( {
147+ /** Wallet ID */
148+ id : t . string ,
149+ /** Wallet label/name */
150+ label : t . string ,
151+ /** Coin type (e.g., btc, tlnbtc, lnbtc) */
152+ coin : t . string ,
153+ /** Array of keychain IDs */
154+ keys : t . array ( t . string ) ,
155+ /** Number of signatures required (m in m-of-n) */
156+ m : t . number ,
157+ /** Total number of keys (n in m-of-n) */
158+ n : t . number ,
159+ /** Number of approvals required for transactions */
160+ approvalsRequired : t . number ,
161+ /** Wallet balance as number */
162+ balance : t . number ,
163+ /** Confirmed balance as number */
164+ confirmedBalance : t . number ,
165+ /** Spendable balance as number */
166+ spendableBalance : t . number ,
167+ /** Wallet balance as string */
168+ balanceString : t . string ,
169+ /** Confirmed balance as string */
170+ confirmedBalanceString : t . string ,
171+ /** Spendable balance as string */
172+ spendableBalanceString : t . string ,
173+ /** Number of unspent outputs */
174+ unspentCount : t . number ,
175+ /** Enterprise ID this wallet belongs to */
176+ enterprise : t . string ,
177+ /** Wallet type (e.g., 'hot', 'cold', 'custodial') */
178+ type : t . string ,
179+ /** Wallet subtype (e.g., 'lightningSelfCustody') */
180+ subType : t . string ,
181+ /** Multisig type ('onchain' or 'tss') */
182+ multisigType : t . union ( [ t . literal ( 'onchain' ) , t . literal ( 'tss' ) ] ) ,
183+ /** Multisig type version (e.g., 'MPCv2') */
184+ multisigTypeVersion : t . string ,
185+ /** Coin-specific wallet data */
186+ coinSpecific : t . UnknownRecord ,
187+ /** Admin settings including policy */
188+ admin : WalletAdmin ,
189+ /** Users with access to this wallet */
190+ users : t . array ( WalletUser ) ,
191+ /** Receive address information */
192+ receiveAddress : ReceiveAddress ,
193+ /** Whether the wallet can be recovered */
194+ recoverable : t . boolean ,
195+ /** Tags associated with the wallet */
196+ tags : t . array ( t . string ) ,
197+ /** Whether backup key signing is allowed */
198+ allowBackupKeySigning : t . boolean ,
199+ /** Build defaults for transactions */
200+ buildDefaults : BuildDefaults ,
201+ /** Whether the wallet is cold storage */
202+ isCold : t . boolean ,
203+ /** Custodial wallet information */
204+ custodialWallet : t . UnknownRecord ,
205+ /** Custodial wallet ID */
206+ custodialWalletId : t . string ,
207+ /** Whether the wallet is deleted */
208+ deleted : t . boolean ,
209+ /** Whether transaction notifications are disabled */
210+ disableTransactionNotifications : t . boolean ,
211+ /** Freeze status */
212+ freeze : WalletFreeze ,
213+ /** Node ID for lightning wallets */
214+ nodeId : t . string ,
215+ /** Pending approvals for this wallet */
216+ pendingApprovals : t . array ( t . UnknownRecord ) ,
217+ /** Start date information */
218+ startDate : t . UnknownRecord ,
219+ /** Custom change key signatures */
220+ customChangeKeySignatures : CustomChangeKeySignatures ,
221+ /** Wallet which this was migrated from */
222+ migratedFrom : t . string ,
223+ /** EVM keyring reference wallet ID */
224+ evmKeyRingReferenceWalletId : t . string ,
225+ /** Whether this is a parent wallet */
226+ isParent : t . boolean ,
227+ /** Enabled child chains */
228+ enabledChildChains : t . array ( t . string ) ,
229+ /** Wallet flags */
230+ walletFlags : t . array (
231+ t . type ( {
232+ name : t . string ,
233+ value : t . string ,
234+ } )
235+ ) ,
236+ /** Token balances */
237+ tokens : t . array ( t . UnknownRecord ) ,
238+ /** NFT balances */
239+ nfts : t . record ( t . string , t . UnknownRecord ) ,
240+ /** Unsupported NFT balances */
241+ unsupportedNfts : t . record ( t . string , t . UnknownRecord ) ,
242+ } ) ;
0 commit comments