Skip navigation links

rivetz-api 1.0.12 API

rivetz-api: Rivetz Public API

See: Description

Packages 
Package Description
com.rivetz.api

rivetz-api: Rivetz Public API

rivetz-api is the cross-platform API module of RivetzJ. Other modules provide Android support and (private) library functions. It is a pure Java API that works on Android OS 7 (API 24) and later and on Java 8 and later.

rivetz-bridge is the Android implementation and (with some minor, temporary exceptions) should not be directly referenced in the source code of an Rivetz Android application.

rivetz-lib provides supporting functionality and should not be accessed directly by applications.

At present Android is the only platform supported, but we are hard at work on additional platforms and (where possible) developers should strive to write cross-platform Rivetz applications so your technology can be used on additional Rivetz platforms in the future.

Rivet class hierarchy overview

This following diagram shows the Public RivetWalletActivity class hierarchy. In general, Riveted apps should extend the RivetWalletActivity class for accessing RivetzJ functionality through the RivetCrypto or RivetWallet interfaces. The RivetCrypto interface is used for cryptographical operations and the RivetWallet interface is used for wallet related functionality.

diagram classes

Exception Handling

Java Error Handling Refresher

This is just a quick refresher diagram of the class hierarchy of Java exceptions. For more information, pleaser refer to the JavaDoc for Throwable and its subclasses.

NOTE

This refresher section can be removed from this document once the design settles down and is included here as a convenience for Rivetz internal use by those who are not familiar with Java.

diagram java exceptions

Rivetz Exception Handling

A Rivet implementation can return 3 types of results:

  1. A value, e.g. RivetKeyDescriptor

  2. A 'null' result

  3. An Exception

Rivetz has its own type of unchecked Exception called RivetRunTimeException , which extends the regular Java RunTimeException.

Additionally, it implements RivetStatusException because they wrap Rivet status codes (type int) that have a string mapping in RivetErrors. (In the future we may add exceptions that come from other sources — at that point we may only implement RivetStatusException in a subset of our exception classes.)

diagram rivetz exceptions
Skip navigation links