ZKTransaction

Objective-C

@interface ZKTransaction : NSObject

Swift

class ZKTransaction : NSObject

Record containing transaction details.

  • Declaration

    Objective-C

    - (nonnull instancetype)initWithId:(nonnull NSString *)id
                                  type:(nonnull NSString *)type
                          currencyCode:(nonnull NSString *)currencyCode
                            fromUserId:(nullable NSString *)fromUserId
                              toUserId:(nullable NSString *)toUserId
                         fromAccountId:(nullable NSString *)fromAccountId
                           toAccountId:(nullable NSString *)toAccountId
                               network:(nonnull NSString *)network
                                status:(nonnull NSString *)status
                                amount:(nullable NSDecimalNumber *)amount
                                   fee:(nullable NSDecimalNumber *)fee
                                 nonce:(nullable NSString *)nonce
                      cryptoProperties:(nullable ZKTransactionCryptoProperties *)cryptoProperties
                        fiatProperties:(nullable ZKTransactionFiatProperties *)fiatProperties
                              exchange:(nullable ZKExchange *)exchange
                           submittedAt:(nullable NSNumber *)submittedAt
                           confirmedAt:(nullable NSNumber *)confirmedAt
                             timestamp:(int64_t)timestamp;

    Swift

    init(id: String, type: String, currencyCode: String, fromUserId: String?, toUserId: String?, fromAccountId: String?, toAccountId: String?, network: String, status: String, amount: NSDecimalNumber?, fee: NSDecimalNumber?, nonce: String?, cryptoProperties: ZKTransactionCryptoProperties?, fiatProperties: ZKTransactionFiatProperties?, exchange: ZKExchange?, submittedAt: NSNumber?, confirmedAt: NSNumber?, timestamp: Int64)
  • Declaration

    Objective-C

    + (nonnull instancetype)transactionWithId:(nonnull NSString *)id
                                         type:(nonnull NSString *)type
                                 currencyCode:(nonnull NSString *)currencyCode
                                   fromUserId:(nullable NSString *)fromUserId
                                     toUserId:(nullable NSString *)toUserId
                                fromAccountId:(nullable NSString *)fromAccountId
                                  toAccountId:(nullable NSString *)toAccountId
                                      network:(nonnull NSString *)network
                                       status:(nonnull NSString *)status
                                       amount:(nullable NSDecimalNumber *)amount
                                          fee:(nullable NSDecimalNumber *)fee
                                        nonce:(nullable NSString *)nonce
                             cryptoProperties:(nullable ZKTransactionCryptoProperties *)cryptoProperties
                               fiatProperties:(nullable ZKTransactionFiatProperties *)fiatProperties
                                     exchange:(nullable ZKExchange *)exchange
                                  submittedAt:(nullable NSNumber *)submittedAt
                                  confirmedAt:(nullable NSNumber *)confirmedAt
                                    timestamp:(int64_t)timestamp;
  • id

    Identifier.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *id;

    Swift

    var id: String { get }
  • Transaction type.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *type;

    Swift

    var type: String { get }
  • Currency code.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *currencyCode;

    Swift

    var currencyCode: String { get }
  • Sender integrator user identifier or null if it is external user.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *fromUserId;

    Swift

    var fromUserId: String? { get }
  • Recipient integrator user identifier or null if it is external user.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *toUserId;

    Swift

    var toUserId: String? { get }
  • Sender account identifier if it is internal transaction or null otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *fromAccountId;

    Swift

    var fromAccountId: String? { get }
  • Recipient account identifier if it is internal transaction or null otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *toAccountId;

    Swift

    var toAccountId: String? { get }
  • Network type.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *network;

    Swift

    var network: String { get }
  • Transaction status.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *status;

    Swift

    var status: String { get }
  • Amount in transaction currency or null if transaction is Ethereum contract deploy.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSDecimalNumber *amount;

    Swift

    var amount: NSDecimalNumber? { get }
  • fee

    Transaction fee in transaction currency or null, if not yet available.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSDecimalNumber *fee;

    Swift

    var fee: NSDecimalNumber? { get }
  • Transaction nonce or null. Used to prevent double spend.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *nonce;

    Swift

    var nonce: String? { get }
  • Crypto properties if it is a crypto transaction, null otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) ZKTransactionCryptoProperties *cryptoProperties;

    Swift

    var cryptoProperties: ZKTransactionCryptoProperties? { get }
  • Fiat properties if it is a fiat transaction, null otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) ZKTransactionFiatProperties *fiatProperties;

    Swift

    var fiatProperties: ZKTransactionFiatProperties? { get }
  • Exchange properties if it is a transaction associated with an exchange, null otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) ZKExchange *exchange;

    Swift

    var exchange: ZKExchange? { get }
  • Epoch timestamp when transaction was submitted or null for incoming transactions from outside of Zumo ecosystem.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *submittedAt;

    Swift

    var submittedAt: NSNumber? { get }
  • Epoch timestamp when transaction was submitted or null if transaction was not confirmed yet.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *confirmedAt;

    Swift

    var confirmedAt: NSNumber? { get }
  • Epoch timestamp, minimum non-null value between submitted at and confirmed at timestamps.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t timestamp;

    Swift

    var timestamp: Int64 { get }