@particle-network/auth-core-modal
Version:
Auth Core provides MPC (Multi-Party Computation)-based threshold signatures.
37 lines (36 loc) • 1.27 kB
TypeScript
import { GasFeeMode, type EVMTransaction, type GasFee, type GasFeeResult, type TokenPrice, type TotalAmount, type TransactionData } from '@particle-network/auth-core';
import { type ChainInfo } from '@particle-network/chains';
import React from 'react';
interface EVMState {
setTransaction: (tx: EVMTransaction) => void;
transactionData?: EVMTransaction;
updateTransaction: (tx: Partial<TransactionData>) => void;
gasFeeMode?: GasFeeMode;
setGasFeeMode: (mode: GasFeeMode) => void;
fetchGasAsync: (params: {
addresses: string[];
from: string;
to?: string;
value?: string;
data?: string;
}) => void;
gasFeeDisplay?: GasFee;
totalAmountDisplay?: TotalAmount;
tokenPrice?: TokenPrice[];
gasError?: {
code: number;
message: string;
};
gasFeeResult?: GasFeeResult;
latestGasLimit?: string;
currentChain: ChainInfo;
fetchPendingTransactions: (account: string) => Promise<any[]>;
}
export declare const EVMContext: React.Context<EVMState>;
export declare const EVMContextProvider: (props: {
method: string;
param: unknown;
children: React.ReactNode;
}) => React.JSX.Element;
export declare const useEVMTransaction: () => EVMState;
export {};