1.1.0 • Published 4 years ago

@worldcerts/dnsprove v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@opencerts/dnsprove

A helper library to retrieve OpenAttestation DNS-TXT records from domains

API

Table of Contents

RecordTypes

Type: "openatts"

BlockchainNetwork

Type: "ethereum"

EthereumAddress

Type: string

EthereumNetworkId

OpenAttestationDNSTextRecord

IDNSRecord

IDNSQueryResponse

parseDnsResults

Takes a DNS-TXT Record set and returns openattestation document store records if any

Parameters

  • recordSet Array<IDNSRecord> Refer to tests for examples (optional, default [])

Returns Array<OpenAttestationDNSTextRecord>

getDocumentStoreRecords

Queries a given domain and parses the results to retrieve openattestation document store records if any

Parameters

  • domain string e.g: "example.openattestation.com"

Examples

> getDocumentStoreRecords("example.openattestation.com")
> [ { type: 'openatts',
net: 'ethereum',
netId: '3',
addr: '0x2f60375e8144e16Adf1979936301D8341D58C36C',
dnssec: true } ]

Returns Promise<Array<OpenAttestationDNSTextRecord>>

License

MIT