Factom API support

Easing the transition from Factom to Accumulate

Introduction

Factom was originally deployed in 2015. Its API has been used on many projects and by many exchanges. This paper looks at the API as it exists and details what we can do to make the Accumulate API match to the extent possible. This paper outlines what we could do to bridge Factom to Accumulate. This will not be fully implemented by Activation, and we may not ever entirely implement the calls described in this document.

Factom API

The API is designed for outside applications to process transactions and interact with the Factom federated servers. The listening port can be configured and runs on 8088 by default. All these APIs use JSON-RPC, a remote procedure call protocol encoded in JSON. It is a very simple protocol (and very similar to XML-RPC), defining only a handful of data types and commands.

They can be invoked in your terminal as:

curl -X POST --data-binary '{"jsonrpc": "2.0", "id": 0, "method": "METHOD_HERE", "params": {"PARAM_1":"PARAM_DATA_1"}}' -H 'content-type:text/plain;' http://localhost:8088/v2 

The output will also be JSON.

We will go through the Factom API as it exists today and detail what we believe we can provide on Accumulate.

Factom API to Accumulate API mappings

ablock-by-heightarrow-up-right -- Not supported

ackarrow-up-right -- Only requires the transaction hash, however.

Returns Jason for entry and factoid transactions.

Accumulate has no commit transactions, so ack cannot return them Accumulate does have entries, so ack can return the entry reveals Requires a transaction date and a block date for factoid transactions

admin-blockarrow-up-right -- Not supported

chain-headarrow-up-right -- Returns the first entry of a given data account

commit-entry arrow-up-right

Commit-entry creates the signature for signing an entry and puts it in the wallet database keyed by the entry hash. Nothing is submitted to Accumulate at this time.

Reveal-entry creates the entry transaction and combines the entry transaction with the signature provided by commit-entry. The transaction is then submitted to Accumulate.

current-minutearrow-up-right --

Returns

circle-info

Note that minute times are approximate. Even in Factom, minute times could stretch or compress depending upon how the various leaders synced, or if a leader had to be replaced.

Reveal-chain is implemented as a Reveal-entry but creates a new Lite Data Account as well. This may be difficult to implement without a new call to create the Lite Data Account

Commit-entry creates the signature for signing an entry and puts it in the wallet database keyed by the entry hash. Nothing is submitted to Accumulate at this time. Reveal-entry creates the entry transaction and combines the entry transaction with the signature provided by commit-entry. The transaction is then submitted to Accumulate.

Sending a raw transaction allows transactions to be created off-line in secure environments and submitted to the network on a “hot” platform. Also useful for testing and debugging. Any transaction created for the Accumulate protocol should be available in raw form for disconnected construction.

Transactionarrow-up-right -- Supported

Caveats include:

  • No transaction block,

  • directory block can be reported Directoryblockheight will be reported as the DNV minor block height / 600

Factom Wallet API

Last updated

Was this helpful?