UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

35 lines 1.64 kB
import { Transaction } from '@elrondnetwork/erdjs'; import { ActiveLedgerTransactionType, MultiSignTransactionType, ScamInfoType } from 'types'; export interface UseSignMultipleTransactionsPropsType { egldLabel: string; address: string; verifyReceiverScam?: boolean; isLedger?: boolean; transactionsToSign?: Transaction[]; onCancel?: () => void; onSignTransaction: (transaction: Transaction) => Promise<Transaction>; onTransactionsSignSuccess: (transactions: Transaction[]) => void; onTransactionsSignError: (errorMessage: string) => void; onGetScamAddressData?: ((address: string) => Promise<{ scamInfo?: ScamInfoType; }>) | null; } declare type DeviceSignedTransactions = Record<number, Transaction>; export interface UseSignMultipleTransactionsReturnType { allTransactions: MultiSignTransactionType[]; onSignTransaction: () => void; onNext: () => void; onPrev: () => void; onAbort: () => void; waitingForDevice: boolean; shouldContinueWithoutSigning: boolean; isFirstTransaction: boolean; isLastTransaction: boolean; hasMultipleTransactions: boolean; currentStep: number; signedTransactions?: DeviceSignedTransactions; currentTransaction: ActiveLedgerTransactionType | null; } export declare function useSignMultipleTransactions({ isLedger, transactionsToSign, egldLabel, address, onCancel, onSignTransaction, onTransactionsSignError, onTransactionsSignSuccess, onGetScamAddressData }: UseSignMultipleTransactionsPropsType): UseSignMultipleTransactionsReturnType; export {}; //# sourceMappingURL=useSignMultipleTransactions.d.ts.map