1.0.2 • Published 5 years ago

ora-protocol-registry v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Meshcache Registry

Installation

npm install ora-protocol-registry

Use

const Registry = require('ora-protocol-registry')

API

Get Registry Address

registry.getRegistryAddress()

This function returns the address of the registry.

Output

Get Services

var services = registry.getServices()

This function returns the list of services by ID.

Output

Get Service

var serviceId = services[0]
registry.getService(serviceId)
nametypedescription
serviceIduint256id of the service

This returns the associated service variables.

Output

Get Bootstraps

var serviceId = services[0]
registry.getBootstraps(serviceId)
nametypedescription
serviceIduint256id of the service

This returns the associated bootstrap nodes with the service.

Output

Schema

Service

    struct Service {
        uint256 serviceId;
        string id;
        address owner;
        uint256 index;
        string name;
        bytes32[] bootstraps;
        uint256 stake;

    }