@supanovaapp/sdk 0.2.18 → 0.2.19

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.
@@ -5,7 +5,7 @@ export interface ConfirmationModalProps {
5
5
  onConfirm: () => void;
6
6
  onReject: () => void;
7
7
  title?: ReactNode;
8
- message: string;
8
+ message: string | string[];
9
9
  confirmText?: string;
10
10
  rejectText?: string;
11
11
  description?: string;
@@ -32,7 +32,7 @@ export interface SignTransactionModalProps {
32
32
  onClose: () => void;
33
33
  onConfirm: () => void;
34
34
  onReject: () => void;
35
- transaction: string;
35
+ transaction: string | string[];
36
36
  loading?: boolean;
37
37
  title?: string;
38
38
  description?: string;
@@ -0,0 +1,30 @@
1
+ import { CantonQueryCompletionResponseDto } from '../core/types';
2
+ import { CantonSubmitPreparedOptions } from '../services/cantonService';
3
+ import { CantonWallet } from '../utils/wallet';
4
+ export interface TransactionToSend {
5
+ commands: unknown;
6
+ disclosedContracts?: unknown;
7
+ }
8
+ export interface SendMultipleTransactionsOptions {
9
+ onSuccess?: (results: CantonQueryCompletionResponseDto[]) => void;
10
+ onRejection?: () => void;
11
+ onError?: (error: Error) => void;
12
+ skipModal?: boolean;
13
+ modalTitle?: string;
14
+ modalDescription?: string;
15
+ modalConfirmText?: string;
16
+ modalRejectText?: string;
17
+ /** Show technical transaction details (commands, disclosedContracts, hash) as JSON. Default: false */
18
+ showTechnicalDetails?: boolean;
19
+ submitOptions?: CantonSubmitPreparedOptions;
20
+ }
21
+ export interface UseSendMultipleTransactionsReturn {
22
+ /** Sign and send multiple Canton transactions with a single confirmation modal */
23
+ sendMultipleTransactions: (txs: TransactionToSend[], options?: SendMultipleTransactionsOptions) => Promise<CantonQueryCompletionResponseDto[] | null>;
24
+ loading: boolean;
25
+ error: Error | null;
26
+ clearError: () => void;
27
+ cantonWallets: CantonWallet[];
28
+ cantonWallet: CantonWallet | null;
29
+ }
30
+ export declare function useSendMultipleTransactions(): UseSendMultipleTransactionsReturn;
@@ -0,0 +1,12 @@
1
+ import { SendMultipleTransactionsOptions as SendTransactionsOptions, TransactionToSend, UseSendMultipleTransactionsReturn } from './useSendMultipleTransactions';
2
+ import { CantonQueryCompletionResponseDto } from '../core/types';
3
+ export interface UseSendTransactionsReturn {
4
+ /** Sign and send multiple Canton transactions with a single confirmation modal */
5
+ sendTransactions: (txs: TransactionToSend[], options?: SendTransactionsOptions) => Promise<CantonQueryCompletionResponseDto[] | null>;
6
+ loading: boolean;
7
+ error: Error | null;
8
+ clearError: () => void;
9
+ cantonWallets: UseSendMultipleTransactionsReturn['cantonWallets'];
10
+ cantonWallet: UseSendMultipleTransactionsReturn['cantonWallet'];
11
+ }
12
+ export declare function useSendTransactions(): UseSendTransactionsReturn;