UNPKG

@enclavemoney/enclave-wallet-sdk

Version:

A simple enclave wallet SDK for React applications

69 lines (68 loc) 1.55 kB
import React from "react"; import { OverallStatus } from "../types/activity"; /** * Transaction status enum for individual transactions */ export declare enum TransactionStatus { PENDING = "PENDING", COMPLETED = "COMPLETED", FAILED = "FAILED" } /** * Receiver interface for transaction recipients */ export interface User { username?: string; walletAddress?: string; solana_program_wallet?: string; ens?: string; } /** * Token details interface */ export interface TokenDetail { amount: string; amountFormatted: string; tokenAddress: string; tokenName: string; tokenSymbol: string; receiver?: User; } /** * Interface for individual transaction details */ export interface TransactionDetail { txnURL: string; status: TransactionStatus; } /** * Token Details */ export interface TokenURI { tokenName: string; tokenSymbol: string; tokenAddress: string; decimals: number; logoURI: string; } /** * Interface for transaction metadata */ export interface TransactionMetadata { senderDetails: User; receiverDetails: User[]; inputAmounts: Map<string, TokenDetail[]>; destinationAmounts: Map<string, TokenDetail[]>; status: OverallStatus; lastUpdatedTimestamp: number; transactions: Map<string, Map<string, TransactionDetail>>; tokenDetails: { inputToken: TokenURI; outputToken: TokenURI; }; metadata: any; } declare function Activity({ sdkKey }: { sdkKey: string; }): React.JSX.Element; export default Activity;