Hyper Node Anchoring Interface

Hyper Node Anchoring Interface


Overview

The purpose of this article is to outline steps to define an interface when anchoring an asset.

The asset is anchored by storing pertinent information in the metadata of a given asset.

A successfully anchored asset will disclose its characteristic.


Interface Definition

  • Anchor Asset Definition
{
    "data": {
       "type": "anchor",
        "kind": "supernode",
        "category": "tedn"
    }
}

  • Anchor Transaction Definition

When you create an anchor, the following is added to the metadata of the given transaction. Each transaction automatically has an asset.

{
    'type': 'anchor'
    "anchor":{
        "timestamp":  timestamp,
        "hex": <anchor 64 bytes>,
        "last_tx_id":  <64 byte tx hash value>
    }
}

Token Transfer

It takes 1 token to anchor. 1 token is created when you make your first transfer from EDN Token Asset.

For now, we create a new asset for each anchor.

We follow this protocol to avoid mixing of tokens, however, the method is open to change if needed.

When each anchor is created, you need to satisfy the following. First, you must transfer 1 token; second, you should have the next unspent anchor information.


Anchor Server Role

You read TX at every set time. Hash the information and save it in the HyperNode.

Therefore, the anchor server must be able to access both HyperNode and SuperNode by default.


Anchor Asset is created from outside. Afterward, anchor work is done in accordance to Asset ID.

Currently, AS can only do TEDN. Additional API set for anchor will be defined in the future.