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

Export tech preview #227

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

amika-sq
Copy link
Contributor

Mobile currently cannot exercise sync capabilities, as the generated managed identities do not have DWN endpoints associated with them.

Exporting the functions from the tech-preview file will allow mobile to call getTechPreviewDwnEndpoints to acquire the test endpoints, and associate them with created ION DIDs. This will allow mobile to test if sync works.

@codesandbox
Copy link

codesandbox bot commented Sep 27, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #227 (93b5bef) into main (ff920f5) will increase coverage by 0.00%.
Report is 4 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   90.78%   90.79%           
=======================================
  Files          67       67           
  Lines       12828    12838   +10     
  Branches     1268     1268           
=======================================
+ Hits        11646    11656   +10     
  Misses       1159     1159           
  Partials       23       23           
Components Coverage Δ
api 94.06% <ø> (ø)
common 95.00% <ø> (ø)
credentials 92.77% <ø> (ø)
crypto 100.00% <ø> (ø)
dids 92.16% <ø> (ø)
agent 87.80% <ø> (ø)
identity-agent 59.05% <ø> (ø)
proxy-agent 58.59% <ø> (ø)
user-agent 57.36% <ø> (ø)

Copy link
Contributor

@frankhinek frankhinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @amika-sq -- looks good

You probably already found this, but in case its useful here's the code to use getTechPreviewDwnEndpoints() with identityManager.create():

const serviceEndpointNodes = techPreview?.dwnEndpoints ?? await getTechPreviewDwnEndpoints();
// Generate ION DID service and key set.
const didOptions = await DidIonMethod.generateDwnOptions({ serviceEndpointNodes });
// Generate a new Identity for the end-user.
const identity = await userAgent.identityManager.create({
name : 'Default',
didMethod : 'ion',
didOptions,
kms : 'local'
});

@amika-sq amika-sq merged commit c77b1f2 into TBD54566975:main Sep 27, 2023
22 of 23 checks passed
@amika-sq amika-sq deleted the amika/dwn-endpoints branch September 27, 2023 15:20
andorsk pushed a commit to modernfoundry/web5-js that referenced this pull request Sep 28, 2023
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.

2 participants