BlockApi
public protocol BlockApi : BaseApi
Undocumented
-
get(byNum:)
Default implementationGet a full, signed block.
Throws
DCoreException.Network.notFound
if no matching block was found.Default Implementation
Declaration
Swift
func get(byNum num: UInt64) -> Single<SignedBlock>
Parameters
num
Height of the block whose header should be returned.
Return Value
-
getHeader(byNum:)
Default implementationGet block header
Throws
DCoreException.Network.notFound
if no matching block was found.Default Implementation
Declaration
Swift
func getHeader(byNum num: UInt64) -> Single<BlockHeader>
Parameters
num
Height of the block whose header should be returned.
Return Value
BlockHeader
of the referenced block. -
getHeadTime()
Default implementationGet last local block time.
Default Implementation
Declaration
Swift
func getHeadTime() -> Single<Date>
Return Value
Date
as block time.