TzKTTransaction

public struct TzKTTransaction : Codable, CustomStringConvertible, Hashable, Identifiable

A model matching the response that comes back from TzKT’s API: v1/accounts/<address>/operations

  • Declaration

    Swift

    public static let dateFormatter: DateFormatter

Types

Properties

CustomStringConvertible

  • Declaration

    Swift

    public var description: String { get }

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (lhs: TzKTTransaction, rhs: TzKTTransaction) -> Bool

Codable Protocol

Helpers

  • Declaration

    Swift

    public func parameterValueAsArray() -> [Any]?
  • Declaration

    Swift

    public func parameterValueAsDict() -> [String : Any]?
  • Declaration

    Swift

    public func parameterValueAsArrayOfDictionary() -> [[String : Any]]?
  • Declaration

    Swift

    public func parameterValueAsType<T>(type: T.Type) -> T?
  • Declaration

    Swift

    public func getEntrypoint() -> String?
  • Declaration

    Swift

    public mutating func processAdditionalData(withCurrentWalletAddress currentWalletAddress: String)
  • Declaration

    Swift

    public func createPrimaryToken() -> Token?
  • The TzKT transaction API doesn’t provide all the info needed to normalise Token amounts. It only gives address and rpc amount. Burried inside the michelson, the dex contract needs to be told the token id, and the target will contain the address. This function will try to extract address, token id and rpc amount and return them in the standard objects, so that they can be used in conjuction with other functions to fetch the decimal data. e.g. DipDup client can fetch all tokens from dexes, containing all token info. Using the address and id, the rest could be found via that, assuming zero for anything else (such as NFTs)

    Declaration

    Swift

    public func getFaTokenTransferData() -> Token?
  • Declaration

    Swift

    public func getTokenTransferDestination() -> String?
  • Declaration

    Swift

    public func errorString() -> String?