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

Endpoint generation API #10

Open
Kagami opened this issue Nov 15, 2014 · 2 comments
Open

Endpoint generation API #10

Kagami opened this issue Nov 15, 2014 · 2 comments

Comments

@Kagami
Copy link
Contributor

Kagami commented Nov 15, 2014

As for now only cs1a implements CS API mentioned in README. cs2a and cs3a don't export .generate function, so we can't add them to the supported ciphersets list.

Also, what is the best way for using cs2a and cs3a ciphersets via high-level telehash.generate (which uses e3x.generate) API?
One way is to require the same e3x library and add them mutuably to the list before calling the telehash.generate but it's very tricky and error-prone: we need to have the same library version at the top of the node dependency tree so require will return the same object.
Another is to require wanted cipherset and call it directly but what is the purpose of telehash.generate function then?

Another quirk: how can we choose cipherset to use? telehash.generate doesn't take such parameters.

@quartzjer
Copy link
Member

Correct, cs2a and cs3a aren't updated to the newer e3x yet (perhaps next week, chunking/tcp first).

The telehash.generate is intended to be a simple/easy API that always does "use everything available", an app can always require the e3x modules directly and call their individual generate methods for special cases.

I definitely need to make another cleanup pass as you can see, there's still a lot of v2->v3 conversion work to do...

@Kagami
Copy link
Contributor Author

Kagami commented Nov 15, 2014

Ok, get it.
Sorry for the noise :) Trying to build simple application on top of telehash so step by step dig through the libs.

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

No branches or pull requests

2 participants