@worldcerts/dnsprove
v1.1.0
Published
Helper utility for retrieving OpenAttestations document store address records from DNS
Downloads
3
Readme
@opencerts/dnsprove
A helper library to retrieve OpenAttestation DNS-TXT records from domains
API
Table of Contents
- RecordTypes
- BlockchainNetwork
- EthereumAddress
- EthereumNetworkId
- OpenAttestationDNSTextRecord
- IDNSRecord
- IDNSQueryResponse
- parseDnsResults
- getDocumentStoreRecords
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