@cicero-zcash/react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +241 -2
- package/dist/index.d.mts +484 -0
- package/dist/index.d.ts +484 -0
- package/dist/index.js +2602 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2581 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type ZcashAddressType = 'unified' | 'sapling' | 'transparent' | 'unknown';
|
|
4
|
+
type ZcashNetwork = 'mainnet' | 'testnet';
|
|
5
|
+
type PaymentStatus = 'idle' | 'pending' | 'detected' | 'confirmed' | 'expired' | 'failed';
|
|
6
|
+
type CiceroTheme = 'supabase' | 'emerald' | 'dark' | 'light';
|
|
7
|
+
interface PaymentDetails {
|
|
8
|
+
recipient: string;
|
|
9
|
+
amount: number | string;
|
|
10
|
+
memo?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
network?: ZcashNetwork;
|
|
13
|
+
invoiceId?: string;
|
|
14
|
+
}
|
|
15
|
+
interface Zip321PaymentRequest {
|
|
16
|
+
address: string;
|
|
17
|
+
amount?: string;
|
|
18
|
+
memo?: string;
|
|
19
|
+
message?: string;
|
|
20
|
+
rawUri: string;
|
|
21
|
+
}
|
|
22
|
+
interface CiceroPayProps {
|
|
23
|
+
/** Zcash recipient address (Unified, Sapling, or Transparent) */
|
|
24
|
+
recipient: string;
|
|
25
|
+
/** Amount in ZEC */
|
|
26
|
+
amount: number | string;
|
|
27
|
+
/** Optional encrypted memo (up to 512 bytes, supported on shielded addresses) */
|
|
28
|
+
memo?: string;
|
|
29
|
+
/** Optional human-readable message */
|
|
30
|
+
message?: string;
|
|
31
|
+
/** Button label text */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** Zcash network (defaults to 'mainnet') */
|
|
34
|
+
network?: ZcashNetwork;
|
|
35
|
+
/** Visual theme */
|
|
36
|
+
theme?: CiceroTheme;
|
|
37
|
+
/** Button variant */
|
|
38
|
+
variant?: 'primary' | 'outline' | 'dark';
|
|
39
|
+
/** Button size */
|
|
40
|
+
size?: 'sm' | 'md' | 'lg';
|
|
41
|
+
/** Whether to show estimated USD value alongside ZEC */
|
|
42
|
+
showUsd?: boolean;
|
|
43
|
+
/** Custom modal title */
|
|
44
|
+
modalTitle?: string;
|
|
45
|
+
/** Custom modal subtitle */
|
|
46
|
+
modalSubtitle?: string;
|
|
47
|
+
/** Invoice expiration time in seconds (defaults to 900 = 15 mins) */
|
|
48
|
+
expiresInSeconds?: number;
|
|
49
|
+
/** Optional custom lightwalletd or indexer URL */
|
|
50
|
+
customRpcUrl?: string;
|
|
51
|
+
/** Optional unique invoice or order reference */
|
|
52
|
+
invoiceId?: string;
|
|
53
|
+
/** Callback fired when transaction confirmation is detected */
|
|
54
|
+
onSuccess?: (tx: {
|
|
55
|
+
txId: string;
|
|
56
|
+
amount: number;
|
|
57
|
+
memo?: string;
|
|
58
|
+
}) => void;
|
|
59
|
+
/** Callback fired on payment error */
|
|
60
|
+
onError?: (error: Error) => void;
|
|
61
|
+
/** Callback fired whenever the payment status transitions */
|
|
62
|
+
onStatusChange?: (status: PaymentStatus) => void;
|
|
63
|
+
/** Custom CSS classes for the trigger button */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Disable the button */
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
type WalletCategory = 'extension' | 'mobile' | 'desktop' | 'read-only' | 'developer';
|
|
70
|
+
interface WalletSession$1 {
|
|
71
|
+
address?: string;
|
|
72
|
+
viewingKey?: string;
|
|
73
|
+
network?: ZcashNetwork;
|
|
74
|
+
connected: boolean;
|
|
75
|
+
walletId: string;
|
|
76
|
+
balance?: number;
|
|
77
|
+
}
|
|
78
|
+
interface SendPaymentParams {
|
|
79
|
+
recipient: string;
|
|
80
|
+
amount: number | string;
|
|
81
|
+
memo?: string;
|
|
82
|
+
message?: string;
|
|
83
|
+
}
|
|
84
|
+
interface SendPaymentResult {
|
|
85
|
+
txId: string;
|
|
86
|
+
submitted: boolean;
|
|
87
|
+
rawUri?: string;
|
|
88
|
+
}
|
|
89
|
+
interface ZcashWallet {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
icon: string;
|
|
93
|
+
description: string;
|
|
94
|
+
category: WalletCategory;
|
|
95
|
+
downloadUrl?: string;
|
|
96
|
+
isAvailable: () => boolean;
|
|
97
|
+
connect: (options?: {
|
|
98
|
+
network?: ZcashNetwork;
|
|
99
|
+
}) => Promise<WalletSession$1>;
|
|
100
|
+
disconnect?: () => Promise<void>;
|
|
101
|
+
getBalance?: (options?: {
|
|
102
|
+
address?: string;
|
|
103
|
+
network?: ZcashNetwork;
|
|
104
|
+
}) => Promise<number | null>;
|
|
105
|
+
sendPayment?: (params: SendPaymentParams) => Promise<SendPaymentResult>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare const zucchiniWallet: ZcashWallet;
|
|
109
|
+
|
|
110
|
+
declare const zashiWallet: ZcashWallet;
|
|
111
|
+
|
|
112
|
+
declare const ywallet: ZcashWallet;
|
|
113
|
+
|
|
114
|
+
declare const viewingKeyWallet: ZcashWallet;
|
|
115
|
+
|
|
116
|
+
declare const burnerWallet: ZcashWallet;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns the default suite of supported Zcash wallets.
|
|
120
|
+
* Zucchini will be marked as available if the browser extension is detected.
|
|
121
|
+
*/
|
|
122
|
+
declare function getDefaultWallets(): ZcashWallet[];
|
|
123
|
+
|
|
124
|
+
interface AccountState {
|
|
125
|
+
address: string | null;
|
|
126
|
+
viewingKey: string | null;
|
|
127
|
+
isConnected: boolean;
|
|
128
|
+
isConnecting: boolean;
|
|
129
|
+
status: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
130
|
+
wallet: ZcashWallet | null;
|
|
131
|
+
error: string | null;
|
|
132
|
+
}
|
|
133
|
+
interface BalanceState {
|
|
134
|
+
zec: number;
|
|
135
|
+
usd: string | null;
|
|
136
|
+
isLoading: boolean;
|
|
137
|
+
}
|
|
138
|
+
interface CiceroContextType {
|
|
139
|
+
account: AccountState;
|
|
140
|
+
address: string | null;
|
|
141
|
+
isConnected: boolean;
|
|
142
|
+
isConnecting: boolean;
|
|
143
|
+
wallet: ZcashWallet | null;
|
|
144
|
+
network: ZcashNetwork;
|
|
145
|
+
switchNetwork: (net: ZcashNetwork) => void;
|
|
146
|
+
balance: BalanceState;
|
|
147
|
+
refetchBalance: () => Promise<void>;
|
|
148
|
+
connect: (walletId: string, customAddressOrKey?: string) => Promise<void>;
|
|
149
|
+
disconnect: () => Promise<void>;
|
|
150
|
+
sendPayment: (params: SendPaymentParams) => Promise<SendPaymentResult>;
|
|
151
|
+
isConnectModalOpen: boolean;
|
|
152
|
+
openConnectModal: () => void;
|
|
153
|
+
closeConnectModal: () => void;
|
|
154
|
+
isAccountModalOpen: boolean;
|
|
155
|
+
openAccountModal: () => void;
|
|
156
|
+
closeAccountModal: () => void;
|
|
157
|
+
wallets: ZcashWallet[];
|
|
158
|
+
appName?: string;
|
|
159
|
+
appLogo?: string;
|
|
160
|
+
}
|
|
161
|
+
interface CiceroProviderProps {
|
|
162
|
+
children: React.ReactNode;
|
|
163
|
+
initialNetwork?: ZcashNetwork;
|
|
164
|
+
wallets?: ZcashWallet[];
|
|
165
|
+
appName?: string;
|
|
166
|
+
appLogo?: string;
|
|
167
|
+
autoConnect?: boolean;
|
|
168
|
+
}
|
|
169
|
+
declare const CiceroProvider: React.FC<CiceroProviderProps>;
|
|
170
|
+
declare function useCicero(): CiceroContextType;
|
|
171
|
+
declare const useAccount: () => {
|
|
172
|
+
address: string | null;
|
|
173
|
+
isConnected: boolean;
|
|
174
|
+
isConnecting: boolean;
|
|
175
|
+
wallet: ZcashWallet | null;
|
|
176
|
+
disconnect: () => Promise<void>;
|
|
177
|
+
viewingKey: string | null;
|
|
178
|
+
status: "disconnected" | "connecting" | "connected" | "error";
|
|
179
|
+
error: string | null;
|
|
180
|
+
};
|
|
181
|
+
declare const useBalance: () => {
|
|
182
|
+
refetch: () => Promise<void>;
|
|
183
|
+
zec: number;
|
|
184
|
+
usd: string | null;
|
|
185
|
+
isLoading: boolean;
|
|
186
|
+
};
|
|
187
|
+
declare const useConnectModal: () => {
|
|
188
|
+
isOpen: boolean;
|
|
189
|
+
openConnectModal: () => void;
|
|
190
|
+
closeConnectModal: () => void;
|
|
191
|
+
};
|
|
192
|
+
declare const useAccountModal: () => {
|
|
193
|
+
isOpen: boolean;
|
|
194
|
+
openAccountModal: () => void;
|
|
195
|
+
closeAccountModal: () => void;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
interface CiceroConnectButtonProps {
|
|
199
|
+
label?: string;
|
|
200
|
+
variant?: 'primary' | 'outline' | 'dark';
|
|
201
|
+
size?: 'sm' | 'md' | 'lg';
|
|
202
|
+
showBalance?: boolean;
|
|
203
|
+
showNetwork?: boolean;
|
|
204
|
+
className?: string;
|
|
205
|
+
}
|
|
206
|
+
declare const CiceroConnectButton: React.FC<CiceroConnectButtonProps>;
|
|
207
|
+
|
|
208
|
+
interface CiceroConnectModalProps {
|
|
209
|
+
isOpen?: boolean;
|
|
210
|
+
onClose?: () => void;
|
|
211
|
+
}
|
|
212
|
+
declare const CiceroConnectModal: React.FC<CiceroConnectModalProps>;
|
|
213
|
+
|
|
214
|
+
interface CiceroAccountModalProps {
|
|
215
|
+
isOpen?: boolean;
|
|
216
|
+
onClose?: () => void;
|
|
217
|
+
}
|
|
218
|
+
declare const CiceroAccountModal: React.FC<CiceroAccountModalProps>;
|
|
219
|
+
|
|
220
|
+
declare const CiceroPayButton: React.FC<CiceroPayProps>;
|
|
221
|
+
|
|
222
|
+
interface CiceroModalProps {
|
|
223
|
+
isOpen: boolean;
|
|
224
|
+
onClose: () => void;
|
|
225
|
+
recipient: string;
|
|
226
|
+
amount: number | string;
|
|
227
|
+
memo?: string;
|
|
228
|
+
message?: string;
|
|
229
|
+
network?: ZcashNetwork;
|
|
230
|
+
status: PaymentStatus;
|
|
231
|
+
txId: string | null;
|
|
232
|
+
secondsRemaining: number;
|
|
233
|
+
zip321Uri: string;
|
|
234
|
+
addressType: string;
|
|
235
|
+
isShielded: boolean;
|
|
236
|
+
memoValidation: {
|
|
237
|
+
valid: boolean;
|
|
238
|
+
warning?: string;
|
|
239
|
+
byteLength: number;
|
|
240
|
+
};
|
|
241
|
+
onSimulateDetection?: () => void;
|
|
242
|
+
onResetPayment?: () => void;
|
|
243
|
+
title?: string;
|
|
244
|
+
subtitle?: string;
|
|
245
|
+
showUsd?: boolean;
|
|
246
|
+
/** Zucchini Wallet integration */
|
|
247
|
+
zucchiniAvailable?: boolean;
|
|
248
|
+
zucchiniPaying?: boolean;
|
|
249
|
+
onPayWithZucchini?: () => void;
|
|
250
|
+
}
|
|
251
|
+
declare const CiceroModal: React.FC<CiceroModalProps>;
|
|
252
|
+
|
|
253
|
+
interface CiceroQRCodeProps {
|
|
254
|
+
value: string;
|
|
255
|
+
size?: number;
|
|
256
|
+
className?: string;
|
|
257
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
258
|
+
includeMargin?: boolean;
|
|
259
|
+
}
|
|
260
|
+
declare const CiceroQRCode: React.FC<CiceroQRCodeProps>;
|
|
261
|
+
|
|
262
|
+
declare const CiceroInvoice: React.FC<CiceroPayProps>;
|
|
263
|
+
|
|
264
|
+
interface UseCiceroPaymentOptions {
|
|
265
|
+
recipient: string;
|
|
266
|
+
amount: number | string;
|
|
267
|
+
memo?: string;
|
|
268
|
+
message?: string;
|
|
269
|
+
network?: ZcashNetwork;
|
|
270
|
+
expiresInSeconds?: number;
|
|
271
|
+
invoiceId?: string;
|
|
272
|
+
customRpcUrl?: string;
|
|
273
|
+
onSuccess?: (tx: {
|
|
274
|
+
txId: string;
|
|
275
|
+
amount: number;
|
|
276
|
+
memo?: string;
|
|
277
|
+
}) => void;
|
|
278
|
+
onError?: (error: Error) => void;
|
|
279
|
+
onStatusChange?: (status: PaymentStatus) => void;
|
|
280
|
+
}
|
|
281
|
+
declare function useCiceroPayment({ recipient, amount, memo, message, network, expiresInSeconds, // 15 mins
|
|
282
|
+
invoiceId, customRpcUrl, onSuccess, onError, onStatusChange, }: UseCiceroPaymentOptions): {
|
|
283
|
+
status: PaymentStatus;
|
|
284
|
+
txId: string | null;
|
|
285
|
+
secondsRemaining: number;
|
|
286
|
+
isModalOpen: boolean;
|
|
287
|
+
openModal: () => void;
|
|
288
|
+
closeModal: () => void;
|
|
289
|
+
resetPayment: () => void;
|
|
290
|
+
zip321Uri: string;
|
|
291
|
+
deepLinks: {
|
|
292
|
+
generic: string;
|
|
293
|
+
zashi: string;
|
|
294
|
+
ywallet: string;
|
|
295
|
+
};
|
|
296
|
+
addressType: ZcashAddressType;
|
|
297
|
+
isShielded: boolean;
|
|
298
|
+
memoValidation: {
|
|
299
|
+
valid: boolean;
|
|
300
|
+
warning?: string;
|
|
301
|
+
byteLength: number;
|
|
302
|
+
};
|
|
303
|
+
simulateDetection: () => void;
|
|
304
|
+
invoiceId: string | undefined;
|
|
305
|
+
network: ZcashNetwork;
|
|
306
|
+
customRpcUrl: string | undefined;
|
|
307
|
+
zucchiniAvailable: boolean;
|
|
308
|
+
zucchiniPaying: boolean;
|
|
309
|
+
payWithZucchini: () => Promise<void>;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
declare function useZcashPrice(enabled?: boolean): {
|
|
313
|
+
convertZecToUsd: (zecAmount: number | string) => string | null;
|
|
314
|
+
usdPrice: number | null;
|
|
315
|
+
loading: boolean;
|
|
316
|
+
error: string | null;
|
|
317
|
+
lastUpdated: number | null;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
type WalletConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
321
|
+
type WalletPaymentStatus = 'idle' | 'requesting' | 'submitted' | 'error';
|
|
322
|
+
interface WalletSession {
|
|
323
|
+
address?: string;
|
|
324
|
+
connected: boolean;
|
|
325
|
+
balance?: number;
|
|
326
|
+
}
|
|
327
|
+
interface WalletPaymentResult {
|
|
328
|
+
txId: string;
|
|
329
|
+
submitted: boolean;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Adapter for the Zucchini Wallet browser extension.
|
|
333
|
+
*
|
|
334
|
+
* Zucchini injects a provider onto window.zucchini (or window.zcash) and implements
|
|
335
|
+
* the typed @zucchinifi/dapp-sdk Zcash contract.
|
|
336
|
+
*/
|
|
337
|
+
declare class ZucchiniWalletAdapter {
|
|
338
|
+
private client;
|
|
339
|
+
private provider;
|
|
340
|
+
private _connected;
|
|
341
|
+
private _address;
|
|
342
|
+
private _lastAccounts;
|
|
343
|
+
/**
|
|
344
|
+
* Checks whether the Zucchini Wallet extension is installed and its
|
|
345
|
+
* provider is available in the current browser environment.
|
|
346
|
+
*/
|
|
347
|
+
static isAvailable(): boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Subscribes to wallet readiness. Fires callback immediately if already available,
|
|
350
|
+
* or listens for injection events / polls briefly for late extension initialization.
|
|
351
|
+
*/
|
|
352
|
+
static onReady(callback: () => void): () => void;
|
|
353
|
+
/**
|
|
354
|
+
* Discovers and initializes the Zucchini Client using @zucchinifi/dapp-sdk/zcash
|
|
355
|
+
* with graceful fallback to raw window.zucchini / window.zcash globals.
|
|
356
|
+
*/
|
|
357
|
+
private getClient;
|
|
358
|
+
/**
|
|
359
|
+
* Requests connection with view_addresses and send_transaction permissions.
|
|
360
|
+
* Resolves the user's active Shielded Unified Address.
|
|
361
|
+
*/
|
|
362
|
+
connect(): Promise<WalletSession>;
|
|
363
|
+
/**
|
|
364
|
+
* Helper to normalize raw balance formats (e.g. number, string, zatoshis, or pool totals).
|
|
365
|
+
*/
|
|
366
|
+
private parseBalancePayload;
|
|
367
|
+
/**
|
|
368
|
+
* Reads real-time balance from Zucchini provider.
|
|
369
|
+
*/
|
|
370
|
+
getBalance(options?: {
|
|
371
|
+
address?: string;
|
|
372
|
+
network?: string;
|
|
373
|
+
}): Promise<number | null>;
|
|
374
|
+
/**
|
|
375
|
+
* Sends payment via standard ZIP-321 URI requestPayment or transaction fallback.
|
|
376
|
+
*/
|
|
377
|
+
requestPayment(params: {
|
|
378
|
+
recipient: string;
|
|
379
|
+
amount: number | string;
|
|
380
|
+
memo?: string;
|
|
381
|
+
}): Promise<WalletPaymentResult>;
|
|
382
|
+
/**
|
|
383
|
+
* Subscribes to accountsChanged events.
|
|
384
|
+
*/
|
|
385
|
+
onAccountsChanged(listener: (accounts: any) => void): () => void;
|
|
386
|
+
/**
|
|
387
|
+
* Subscribes to disconnect events.
|
|
388
|
+
*/
|
|
389
|
+
onDisconnect(listener: () => void): () => void;
|
|
390
|
+
/**
|
|
391
|
+
* Disconnects the current session.
|
|
392
|
+
*/
|
|
393
|
+
disconnect(): Promise<void>;
|
|
394
|
+
get isConnected(): boolean;
|
|
395
|
+
get address(): string | null;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
interface UseZucchiniWalletOptions {
|
|
399
|
+
/** Auto-connect on mount when extension is detected */
|
|
400
|
+
autoConnect?: boolean;
|
|
401
|
+
}
|
|
402
|
+
declare function useZucchiniWallet(options?: UseZucchiniWalletOptions): {
|
|
403
|
+
/** Whether the Zucchini extension is installed in this browser */
|
|
404
|
+
isAvailable: boolean;
|
|
405
|
+
/** Current wallet connection lifecycle state */
|
|
406
|
+
connectionStatus: WalletConnectionStatus;
|
|
407
|
+
/** Current payment request lifecycle state */
|
|
408
|
+
paymentStatus: WalletPaymentStatus;
|
|
409
|
+
/** Active session info (address, etc.) */
|
|
410
|
+
session: WalletSession | null;
|
|
411
|
+
/** Last error message (if any) */
|
|
412
|
+
error: string | null;
|
|
413
|
+
/** Prompt the user to connect their Zucchini Wallet */
|
|
414
|
+
connect: () => Promise<WalletSession>;
|
|
415
|
+
/** Send a ZIP-321 payment request for user review & approval */
|
|
416
|
+
requestPayment: (params: {
|
|
417
|
+
recipient: string;
|
|
418
|
+
amount: number | string;
|
|
419
|
+
memo?: string;
|
|
420
|
+
}) => Promise<WalletPaymentResult>;
|
|
421
|
+
/** Disconnect the current session */
|
|
422
|
+
disconnect: () => Promise<void>;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Detects the type of a Zcash address.
|
|
427
|
+
*/
|
|
428
|
+
declare function getAddressType(address: string): ZcashAddressType;
|
|
429
|
+
/**
|
|
430
|
+
* Checks whether an address supports zero-knowledge shielded encryption (Unified or Sapling).
|
|
431
|
+
*/
|
|
432
|
+
declare function isShieldedAddress(address: string): boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Truncates a long address for display purposes.
|
|
435
|
+
* e.g., u1abcdef...987654
|
|
436
|
+
*/
|
|
437
|
+
declare function truncateAddress(address: string, start?: number, end?: number): string;
|
|
438
|
+
/**
|
|
439
|
+
* Validates whether the address supports encrypted memos.
|
|
440
|
+
* Memos in Zcash are strictly for shielded receivers (Sapling & Orchard).
|
|
441
|
+
* Transparent addresses do not support on-chain encrypted memos.
|
|
442
|
+
*/
|
|
443
|
+
declare function validateMemoSupport(address: string, memo?: string): {
|
|
444
|
+
valid: boolean;
|
|
445
|
+
warning?: string;
|
|
446
|
+
byteLength: number;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Encodes a string to Base64URL without padding per RFC 4648 §5 / ZIP-321 specification.
|
|
451
|
+
*/
|
|
452
|
+
declare function encodeBase64Url(str: string): string;
|
|
453
|
+
/**
|
|
454
|
+
* Decodes a Base64URL string without padding per ZIP-321 specification.
|
|
455
|
+
*/
|
|
456
|
+
declare function decodeBase64Url(base64url: string): string;
|
|
457
|
+
interface BuildZip321Params {
|
|
458
|
+
address: string;
|
|
459
|
+
amount?: number | string;
|
|
460
|
+
memo?: string;
|
|
461
|
+
message?: string;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Generates an RFC-compliant ZIP-321 Payment Request URI.
|
|
465
|
+
* Example output:
|
|
466
|
+
* zcash:u1xyz...?amount=0.05&memo=T3JkZXIgIzEwNDI&message=Payment%20for%20order
|
|
467
|
+
*/
|
|
468
|
+
declare function generateZip321Uri({ address, amount, memo, message, }: BuildZip321Params): string;
|
|
469
|
+
/**
|
|
470
|
+
* Parses a ZIP-321 URI back into its component parts.
|
|
471
|
+
*/
|
|
472
|
+
declare function parseZip321Uri(rawUri: string): Zip321PaymentRequest;
|
|
473
|
+
/**
|
|
474
|
+
* Generates deep link URLs for major mobile Zcash wallets:
|
|
475
|
+
* - Zashi (Electric Coin Co.)
|
|
476
|
+
* - Ywallet
|
|
477
|
+
*/
|
|
478
|
+
declare function getWalletDeepLinks(zip321Uri: string): {
|
|
479
|
+
generic: string;
|
|
480
|
+
zashi: string;
|
|
481
|
+
ywallet: string;
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
export { type AccountState, type BalanceState, type BuildZip321Params, CiceroAccountModal, type CiceroAccountModalProps, CiceroConnectButton, type CiceroConnectButtonProps, CiceroConnectModal, type CiceroConnectModalProps, type CiceroContextType, CiceroInvoice, CiceroModal, CiceroPayButton, type CiceroPayProps, CiceroProvider, type CiceroProviderProps, CiceroQRCode, type CiceroTheme, type PaymentDetails, type PaymentStatus, type SendPaymentParams, type SendPaymentResult, type UseCiceroPaymentOptions, type UseZucchiniWalletOptions, type WalletCategory, type WalletSession$1 as WalletSession, type ZcashAddressType, type ZcashNetwork, type ZcashWallet, type Zip321PaymentRequest, ZucchiniWalletAdapter, burnerWallet, decodeBase64Url, encodeBase64Url, generateZip321Uri, getAddressType, getDefaultWallets, getWalletDeepLinks, isShieldedAddress, parseZip321Uri, truncateAddress, useAccount, useAccountModal, useBalance, useCicero, useCiceroPayment, useConnectModal, useZcashPrice, useZucchiniWallet, validateMemoSupport, viewingKeyWallet, ywallet, zashiWallet, zucchiniWallet };
|