UNPKG

zumokit

Version:

ZumoKit is a Wallet as a Service SDK

79 lines (78 loc) 3.13 kB
import { Decimal } from 'decimal.js'; import { TransactionCryptoProperties } from './TransactionCryptoProperties'; import { TransactionFiatProperties } from './TransactionFiatProperties'; import { TransactionCardProperties } from './TransactionCardProperties'; import { TransactionType, TransactionDirection, TransactionStatus, CurrencyCode, Network, TransactionJSON } from '../interfaces'; import { Exchange } from './Exchange'; import { TransactionAmount } from './TransactionAmount'; import { InternalTransaction } from './InternalTransaction'; import { CustodyOrder } from './CustodyOrder'; /** Transaction details. */ export declare class Transaction { /** @internal */ json: TransactionJSON; /** Identifier. */ id: string; /** Transaction type. */ type: TransactionType; /** Currency code. */ currencyCode: CurrencyCode; /** * Transaction direction relative to account data snapshot. * <p> * See {@link AccountDataSnapshot}. */ direction: TransactionDirection; /** Network type. */ network: Network; /** Transaction status. */ status: TransactionStatus; /** Amount in transaction currency or null if transaction is Ethereum contract deploy. */ amount: Decimal | null; /** Transaction fee in transaction currency or null, if not yet available. */ fee: Decimal | null; /** Transaction nonce or null. Used to prevent double spend. */ nonce: string | null; /** Transaction senders. */ senders: Array<TransactionAmount>; /** Transaction recipients. */ recipients: Array<TransactionAmount>; /** Internal transactions, e.g. ETH contract interaction side effects. */ internalTransactions: Array<InternalTransaction>; /** * Custody order properties if it is a transaction associated with a custody order, null otherwise. */ custodyOrder: CustodyOrder | null; /** * Crypto properties if it is a crypto transaction, null otherwise. * <p> * See {@link TransactionType}. */ cryptoProperties: TransactionCryptoProperties | null; /** * Fiat properties if it is a fiat transaction, null otherwise. * <p> * See {@link TransactionType}. */ fiatProperties: TransactionFiatProperties | null; /** * Card properties if it is a card transaction, null otherwise. * <p> * See {@link TransactionType}. */ cardProperties: TransactionCardProperties | null; /** * Exchange properties if it is a transaction associated with an exchange, null otherwise. */ exchange: Exchange | null; /** Transaction metadata. */ metadata: any; /** Epoch timestamp when transaction was submitted or null for incoming transactions from outside of Zumo ecosystem. */ submittedAt: number | null; /** Epoch timestamp when transaction was submitted or null if transaction was not confirmed yet. */ confirmedAt: number | null; /** Epoch timestamp, minimum non-null value between submitted at and confirmed at timestamps. */ timestamp: number; /** @internal */ constructor(json: TransactionJSON); }