Block

public struct Block : Decodable

Block returned by the server.

  • Height of the block.

    Declaration

    Swift

    public var number: Int
  • Hex-encoded 32-byte hash of the block.

    Declaration

    Swift

    public var hash: String
  • pow

    Hex-encoded 32-byte Proof-of-Work hash of the block.

    Declaration

    Swift

    public var pow: String
  • Hex-encoded 32-byte hash of the predecessor block.

    Declaration

    Swift

    public var parentHash: String
  • The nonce of the block used to fulfill the Proof-of-Work.

    Declaration

    Swift

    public var nonce: Int
  • Hex-encoded 32-byte hash of the block body Merkle root.

    Declaration

    Swift

    public var bodyHash: String
  • Hex-encoded 32-byte hash of the accounts tree root.

    Declaration

    Swift

    public var accountsHash: String
  • Block difficulty, encoded as decimal number in string.

    Declaration

    Swift

    public var difficulty: String
  • UNIX timestamp of the block

    Declaration

    Swift

    public var timestamp: Int
  • Number of confirmations for this transaction (number of blocks on top of the block where this transaction was in).

    Declaration

    Swift

    public var confirmations: Int
  • Hex-encoded 20 byte address of the miner of the block.

    Declaration

    Swift

    public var miner: String
  • User friendly address (NQ-address) of the miner of the block.

    Declaration

    Swift

    public var minerAddress: String
  • Hex-encoded value of the extra data field, maximum of 255 bytes.

    Declaration

    Swift

    public var extraData: String
  • Block size in byte.

    Declaration

    Swift

    public var size: Int
  • Array of transactions. Either represented by the transaction hash or a Transaction object.

    Declaration

    Swift

    public var transactions: [Any]
  • Declaration

    Swift

    public init(from decoder: Decoder) throws