LightWalletService

public protocol LightWalletService

Undocumented

  • Return the latest block height known to the service.

    Declaration

    Swift

    func latestBlockHeight(result: @escaping (Result<BlockHeight, LightWalletServiceError>) -> Void)

    Parameters

    result

    a result containing the height or an Error

  • Return the latest block height known to the service.

    Declaration

    Swift

    func latestBlockHeight() throws -> BlockHeight

    Parameters

    result

    a result containing the height or an Error

  • Return the given range of blocks.

    Declaration

    Swift

    func blockRange(_ range: CompactBlockRange, result: @escaping (Result<[ZcashCompactBlock], LightWalletServiceError>) -> Void)

    Parameters

    range

    the inclusive range to fetch. For instance if 1..5 is given, then every block in that will be fetched, including 1 and 5. Non blocking

  •     Return the given range of blocks.
    
        - Parameter range: the inclusive range to fetch.
    

    For instance if 1..5 is given, then every block in that will be fetched, including 1 and 5. blocking

    Declaration

    Swift

    func blockRange(_ range: CompactBlockRange) throws -> [ZcashCompactBlock]
  • Submits a raw transaction over lightwalletd. Non-Blocking

    Declaration

    Swift

    func submit(spendTransaction: Data, result: @escaping (Result<LightWalletServiceResponse, LightWalletServiceError>) -> Void)

    Parameters

    spendTransaction

    data representing the transaction to be sent

    result

    escaping closure that takes a result containing either LightWalletServiceResponse or LightWalletServiceError

  • Submits a raw transaction over lightwalletd. Blocking

    Throws

    LightWalletServiceError

    Declaration

    Swift

    func submit(spendTransaction: Data) throws -> LightWalletServiceResponse

    Parameters

    spendTransaction

    data representing the transaction to be sent

    Return Value

    LightWalletServiceResponse