0.1.0 • Published 11 months ago

protomap-services v0.1.0

Weekly downloads
-
License
PROPRIETARY
Repository
-
Last release
11 months ago

protomap-services

Topic Manager and Lookup Service for ProtoMap Registry

API

Table of Contents

ProtoMapLookupService

Implements a lookup service for ProtoMap name registry

Parameters

  • storageEngine

outputAdded

Notifies the lookup service of a new output added.

Parameters

Returns Promise\

outputSpent

Deletes the output record once the UTXO has been spent

Parameters

Returns Promise\

lookup

Queries the lookup service for particular UTXOs

Parameters
  • params {query: ProtoMapLookupQuery}
  • object
  • query

Returns Promise[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<LookupResult>

ProtoMapTopicManager

Implements a topic manager for ProtoMap name registry

identifyAdmissibleOutputs

Returns the outputs from the ProtoMap transaction that are admissible.

Parameters
  • object object all params given in an object

    • object.previousUTXOs Array\ any previous UTXOs
    • object.parsedTransaction Transaction transaction containing outputs to admit into the current topic

Returns Promise([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) | AdmissableOutputs)>

getDocumentation

Returns the documentation for the ProtoMap topic

Returns Promise[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) the documentation given as a string

ProtoMapStorageEngine

Implements a Lookup StorageEngine for ProtoMap name registry

Parameters

  • db connected mongo database instance

storeRecord

Parameters
  • txid string
  • vout number
  • registration ProtoMapRegistration
  • certificate

Returns Promise\

deleteRecord

Delete a matching ProtoMap record

Parameters

findByName

Find protocol registration by name

Parameters

Returns Promise[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

findByProtocolIDAndSecurityLevel

Find token by protocolID and securityLevel

Parameters

Returns Promise[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

License & Confidentiality

This is proprietary software developed and owned by Peer-to-peer Privacy Systems Research, LLC. Except as provided for in your CWI Partner Agreement with us, you may not use this software and must keep it confidential.