-
Notifications
You must be signed in to change notification settings - Fork 313
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 SEP0010 transaction challenge builder. #375
Conversation
@morleyzhi I need to do a couple of cleanups and then it should be good - why did we disable namespaces in TypeScript? |
c13c0c1
to
82d7d28
Compare
@abuiles Because of Babel not supporting it there was a lot FUD of namespaces being "deprecated" or not "official", although Typescript team never said so. And then support came to Babel 20 days ago (babel/babel#9785). Unfortunately the whole FUD got so far as a linter rule. I'm all for using namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t intentionally ban namespaces. If that rule is defined in stellar/product-conventions we should disable it.
This is turned on by `tslint:recommended`, but now that it is supported by babel we can use it safely. See @Akuukis comment here stellar/js-stellar-sdk#375 (comment).
This is turned on by `tslint:recommended`, but now that it is supported by babel we can use it safely. See @Akuukis comment here stellar/js-stellar-sdk#375 (comment).
6d23b2e
to
36536b9
Compare
36536b9
to
8a67e79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/utils.ts
Outdated
@@ -0,0 +1,66 @@ | |||
import { randomBytes } from "crypto"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we removed dependency on crypto
package in stellar/js-stellar-base#169. You should probably use randombytes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartekn thanks for the heads up, fixed!
Add utils helper to build a SEP0010 valid challenge.
Sample output
Fixes #370
Example