Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DID DHT method #240

Merged
merged 49 commits into from
Nov 1, 2023
Merged

Add DID DHT method #240

merged 49 commits into from
Nov 1, 2023

Conversation

decentralgabe
Copy link
Member

@decentralgabe decentralgabe commented Oct 6, 2023

@codesandbox
Copy link

codesandbox bot commented Oct 6, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@socket-security
Copy link

socket-security bot commented Oct 6, 2023

New and updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
bittorrent-dht-sodium 1.2.0 network, shell +1 3.38 MB emilbayes
z32 1.0.1 None +1 36.8 kB mafintosh
@types/dns-packet 5.6.1 None +2 4.01 MB types
pkarr 1.1.1 network, filesystem +36 5.74 MB nzh
bittorrent-dht 11.0.5 None +15 331 kB webtorrent-bot
uuid 9.0.1 None +0 123 kB ctavan
@noble/hashes 1.3.2 None +0 747 kB paulmillr
dns-packet 5.6.1 None +1 78.7 kB silverwind
did-jwt 7.2.6...7.4.2 None +2/-12 1.76 MB uport-automation-bot

package.json Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #240 (e3e2cb6) into main (01c56ce) will decrease coverage by 0.07%.
The diff coverage is 90.11%.

❗ Current head e3e2cb6 differs from pull request most recent head 947f1da. Consider uploading reports for the commit 947f1da to get more accurate results

@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
- Coverage   90.99%   90.92%   -0.07%     
==========================================
  Files          67       69       +2     
  Lines       12648    13314     +666     
  Branches     1261     1340      +79     
==========================================
+ Hits        11509    12106     +597     
- Misses       1116     1183      +67     
- Partials       23       25       +2     
Components Coverage Δ
api 94.07% <ø> (-0.27%) ⬇️
common 95.00% <ø> (ø)
credentials 92.77% <ø> (ø)
crypto 100.00% <ø> (ø)
dids 91.58% <90.11%> (-0.58%) ⬇️
agent 88.16% <ø> (ø)
identity-agent 59.05% <ø> (ø)
proxy-agent 58.59% <ø> (ø)
user-agent 57.36% <ø> (ø)

@decentralgabe
Copy link
Member Author

updated to use dns packets as per https://hackmd.io/-fBsfngHRpuJilwf5GY3Qg?both#DIDs-as-a-DNS-Packet

cc: @csuwildcat @Nuhvi

packages/dids/src/dht.ts Outdated Show resolved Hide resolved
@mistermoe
Copy link
Member

@decentralgabe convention for imports in this repo is:

  1. external dep types
  2. external deps
  3. internal dep types
  4. internal deps

example

anything i'm missing w.r.t. to imports @frankhinek ?

packages/dids/src/dht.ts Outdated Show resolved Hide resolved
@decentralgabe
Copy link
Member Author

ready to go pending final review/approval by @mistermoe @frankhinek

@mistermoe
Copy link
Member

mistermoe commented Oct 26, 2023

@frankhinek any reservations on pulling this in? not sure what work you have in flight or what that will disrupt

@frankhinek
Copy link
Contributor

Just started review. Also asked @shamilovtim to take a look to see what might need to be done to ensure that the @web5/dids package is still usable under React Native after this is merged.

@shamilovtim
Copy link
Contributor

shamilovtim commented Oct 31, 2023

I'll be taking a peak at this ASAP 👍

related: TBD54566975/web5-wallet#166

@frankhinek
Copy link
Contributor

@mistermoe @decentralgabe The changes in buffer PR 280 were merged in PR 334 but it doesn't appear that package has been published to NPM registry for years (last version is 6.0.3).

Before I reach out to the package maintainer, are either of you aware if there are plans to release/publish a new version. It isn't a blocker for this PRl, so I'll create an issue to track this so we don't forget to remove the patch if the package is ever updated.

@decentralgabe
Copy link
Member Author

unaware, an issue to track would be good

packages/dids/package.json Outdated Show resolved Hide resolved
packages/dids/package.json Outdated Show resolved Hide resolved
packages/dids/package.json Outdated Show resolved Hide resolved
packages/dids/package.json Outdated Show resolved Hide resolved
packages/dids/src/dht.ts Outdated Show resolved Hide resolved
packages/dids/src/dht.ts Outdated Show resolved Hide resolved
gabe and others added 4 commits November 1, 2023 10:08
Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
…r Web5 JS packages. Return boolean on publish.

Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
Signed-off-by: Frank Hinek <frankhinek@users.noreply.github.com>
@frankhinek frankhinek merged commit d1a85cd into main Nov 1, 2023
2 of 3 checks passed
@decentralgabe decentralgabe deleted the did-dht branch November 1, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants