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

JavaScript library #115

Open
xaur opened this issue Feb 16, 2019 · 10 comments
Open

JavaScript library #115

xaur opened this issue Feb 16, 2019 · 10 comments
Labels
dev Programming or development might be needed wallets wallets

Comments

@xaur
Copy link
Collaborator

xaur commented Feb 16, 2019

JavaScript library was asked about multiple times.

Most recent discussion was about Edge Wallet, ElectrumX and a missing JS lib. What is needed is "address stuff and signature stuff".

Requirements:

Discussions:

  • 2019-02-12: "So what is missing is the decred address and signature stuff in JS. Looks like a few weeks worth of code. Nothing crazy."
@xaur
Copy link
Collaborator Author

xaur commented Feb 16, 2019

@jzbz feel free to drop any details here, I'll add them to the issue description.

@xaur xaur added dev Programming or development might be needed wallets wallets labels Feb 16, 2019
@xaur
Copy link
Collaborator Author

xaur commented Feb 17, 2019

Hey @oregonisaac I think about adding contents of your gist to this issue, but wonder where did you take the first part from (Basic Coding Requirements)?

@oregonisaac
Copy link

I looked up articles on best practices and references one Typescript the site Dave referenced plus a number of JS best practice sites (did not make a reference list).

Would be good to verify with a few folks. I think this is what Dave was asking for - https://www.typescriptlang.org

@jzbz
Copy link

jzbz commented Feb 18, 2019

Yeah that's the TypeScript Dave had asked for. Might also make sense to include this:
https://github.com/decred/dcrd/blob/master/docs/code_contribution_guidelines.md

All the parts from section 4 onward (not relating to Go) would still apply.

@oregonisaac
Copy link

I’ll modify the gist accordingly.

@oregonisaac
Copy link

oregonisaac commented Feb 18, 2019

Updated, I might make sense to fork the Go based contribution requirements for other languages and include links to the language specific standards we want followed (for example I could like to the documentation page for TypeScript and make a JS version of that page).
For now I included a summary and a link to the doc with the steps to follow:
https://gist.github.com/oregonisaac/e41826e171b53826ff869cab75d8ed0b

@jzbz
Copy link

jzbz commented Feb 18, 2019

@oregonisaac that's actually a great idea. You might want to touch bases with @s-ben as he was working on dev docs IIRC.

@s-ben
Copy link

s-ben commented Feb 18, 2019

@oregonisaac @jzbz , I think we should at least add JS guidance to the Source Code Contributions page. Have created an Issue for that on dcrdocs.

I also think the general code contribution guidelines from dcrd are good. They're pretty specific to Go and the dcrd repo though (e.g. their GitHub process). I think it would be useful to have a page that captures our general code contribution guidelines at a higher level, but also directing people to the individual repo READMEs for specific guidelines. Have put this on my to do list.

@xaur
Copy link
Collaborator Author

xaur commented Feb 21, 2019

Pasting comment from @paullinator from the gist:

I would add that the library should be platform agnostic and work under browsers and nodejs. Ideally, the library should optionally accept some crypto routines as injections to allow the wallet to provide accelerated versions of those routines. ie secp256k1, sha256, pbkdf2, and random(). All of these should accept async function injections as native code accelerated functions have to be async in most implementations.

In addition to just creating and signing transactions, I would add parsing of transactions as well.

Also, since most wallets use pre-existing bitcoin libraries for all transaction parsing and creation, I would make sure that the part of Decred that differs from bitcoin be usable as a simple standalone module. ie. some currencies such as Groestlecoin differ by only the hashing algo used for addresses and transaction creation. That hashing algo is made available as a standalone function vs having to use an entire Groestlecoin library to create a tx.

@xaur
Copy link
Collaborator Author

xaur commented Jul 31, 2020

@JoeGruffins wrote some javascript for working with Decred transactions: trezor/trezor-utxo-lib#9

cc @svitekpavel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Programming or development might be needed wallets wallets
Projects
None yet
Development

No branches or pull requests

4 participants