mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Release 0.8.5
This commit is contained in:
parent
b65711d38b
commit
e6ebee87e3
8 changed files with 68 additions and 6 deletions
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.8.5] - 2021-01-03
|
||||||
|
### Fixed
|
||||||
|
- Remove trailing slash from HKP server URL
|
||||||
|
|
||||||
## [0.8.4] - 2021-01-02
|
## [0.8.4] - 2021-01-02
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fetch Twitter proofs from Nitter
|
- Fetch Twitter proofs from Nitter
|
||||||
|
|
4
dist/doip.js
vendored
4
dist/doip.js
vendored
|
@ -1621,8 +1621,8 @@ const mergeOptions = require('merge-options')
|
||||||
const fetchHKP = (identifier, keyserverBaseUrl) => {
|
const fetchHKP = (identifier, keyserverBaseUrl) => {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
keyserverBaseUrl = keyserverBaseUrl
|
keyserverBaseUrl = keyserverBaseUrl
|
||||||
? `https://${keyserverBaseUrl}/`
|
? `https://${keyserverBaseUrl}`
|
||||||
: 'https://keys.openpgp.org/'
|
: 'https://keys.openpgp.org'
|
||||||
|
|
||||||
const hkp = new openpgp.HKP(keyserverBaseUrl)
|
const hkp = new openpgp.HKP(keyserverBaseUrl)
|
||||||
const lookupOpts = {
|
const lookupOpts = {
|
||||||
|
|
2
dist/doip.min.js
vendored
2
dist/doip.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
||||||
# doip.js <small>0.8.4</small>
|
# doip.js <small>0.8.5</small>
|
||||||
|
|
||||||
<img src="doip.png" width="120">
|
<img src="doip.png" width="120">
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.8.5]
|
||||||
|
|
||||||
|
[2021-01-03](https://codeberg.org/keyoxide/doipjs/releases/tag/0.8.5)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Remove trailing slash from HKP server URL
|
||||||
|
|
||||||
## [0.8.4]
|
## [0.8.4]
|
||||||
|
|
||||||
[2021-01-02](https://codeberg.org/keyoxide/doipjs/releases/tag/0.8.4)
|
[2021-01-02](https://codeberg.org/keyoxide/doipjs/releases/tag/0.8.4)
|
||||||
|
|
|
@ -15,7 +15,7 @@ npm install --save doipjs
|
||||||
Install on website by including the following HTML snippet:
|
Install on website by including the following HTML snippet:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/npm/doipjs@0.8.4/dist/doip.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/doipjs@0.8.5/dist/doip.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
Next step: [quick start (Node.js)](quickstart-nodejs.md) and [quick start (browser)](quickstart-browser.md)
|
Next step: [quick start (Node.js)](quickstart-nodejs.md) and [quick start (browser)](quickstart-browser.md)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "doipjs",
|
"name": "doipjs",
|
||||||
"version": "0.8.4",
|
"version": "0.8.5",
|
||||||
"description": "Decentralized OpenPGP Identity Proofs library in Node.js",
|
"description": "Decentralized OpenPGP Identity Proofs library in Node.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
51
t.js
Normal file
51
t.js
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
const openpgp = require('./node_modules/openpgp/dist/openpgp.min.js')
|
||||||
|
const doip = require('./')
|
||||||
|
|
||||||
|
const t = async () => {
|
||||||
|
const opts = {
|
||||||
|
proxyPolicy: 'never'
|
||||||
|
}
|
||||||
|
// console.log(await doip.claims.verify('dns:yarmo.eu', '9f0048ac0b23301e1f77e994909f6bd6f80f485d'))
|
||||||
|
// console.log(await doip.claims.verify('dns:yarmo.eu', '9f0048ac0b23301e1f77e994909f6bd6f80f485d', {returnMatchesOnly: false, doipProxyHostname: 'proxy.keyoxide.org'}));
|
||||||
|
|
||||||
|
// console.log(await doip.claims.verify('https://stream.yarmo.eu', '9f0048ac0b23301e1f77e994909f6bd6f80f485d'))
|
||||||
|
console.log(await doip.claims.verify('https://twitter.com/YarmoM/status/1277886959143157760', '9f0048ac0b23301e1f77e994909f6bd6f80f485d', opts))
|
||||||
|
// console.log(await doip.claims.verify('https://www.reddit.com/user/YarmoM/comments/hhd318/openpgp_proof/', '9f0048ac0b23301e1f77e994909f6bd6f80f485d'))
|
||||||
|
|
||||||
|
// const publicKey = await doip.keys.fetch.uri(
|
||||||
|
// 'hkp:9f0048ac0b23301e1f77e994909f6bd6f80f485d'
|
||||||
|
// )
|
||||||
|
// const publicKey = await doip.keys.fetch.uri(
|
||||||
|
// 'hkp:e8923e0f9c7c84a663a37f850be1a9ae16f417a2'
|
||||||
|
// )
|
||||||
|
return
|
||||||
|
|
||||||
|
try {
|
||||||
|
// const publicKey = await doip.keys.fetch.uri('hkp:yarmo@yarmo.eu')
|
||||||
|
// const publicKey = await doip.keys.fetch.uri('hkp:test@doip.rocks')
|
||||||
|
// const publicKey = await doip.keys.fetch.uri('hkp:keyserver.ubuntu.com:test@doip.rocks')
|
||||||
|
// const publicKey = await doip.keys.fetch.uri('hkp:keyserver.ubuntu.com:3637202523e7c1309ab79e99ef2dc5827b445f4b')
|
||||||
|
// const publicKey = await doip.keys.fetch.uri('wkd:yarmo@yarmo.eu')
|
||||||
|
|
||||||
|
// console.log(publicKey)
|
||||||
|
// console.log(publicKey instanceof openpgp.key.Key)
|
||||||
|
|
||||||
|
const data = await doip.keys.process(publicKey)
|
||||||
|
|
||||||
|
const claims = await doip.claims.verify(publicKey)
|
||||||
|
console.log(claims)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
|
||||||
|
// const fingerprint = await doip.keys.getFingerprint(publicKey)
|
||||||
|
// const claims = await doip.keys.getClaims(publicKey)
|
||||||
|
// await doip.claims.verify([claims[0], claims[1]], fingerprint)
|
||||||
|
// console.log(publicKey)
|
||||||
|
// console.log(claims)
|
||||||
|
// console.log(await doip.claims.verify(claims[0], fingerprint))
|
||||||
|
// console.log(await doip.claims.verify([claims[0], claims[1]], fingerprint))
|
||||||
|
}
|
||||||
|
|
||||||
|
t()
|
Loading…
Reference in a new issue