bitauth / libauth

An ultra-lightweight, zero-dependency TypeScript library for Bitcoin Cash, Bitcoin, and Bitauth applications.

Home Page:https://libauth.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add links to Examples in the README

modenero opened this issue · comments

Hey Jason,

I've been eager to try your library for like EVER now, but I never knew where to begin.

I recently integrated Hop.cash into my platform Smartstarter and had the pleasure of working with Jonathan Silverblood's codebase, which makes great use of your library.

I'm looking forward to extending my knowledge of your APIs, but I'm strongly encouraging you to provide a few "practical" examples for the "average" developer to get started. Similar to what BitPay's Bitcore Lib Cash does in their README.

I LOVE that fact that your library is PURE JavaScript.

"THIS IS THE WAY"

As soon as I can make the time, I intend to replace Bitcore Lib Cash with Libauth for my own primary SDK NitoJS.

I've been so frustrated with Bitcore Lib Cash over the years as it really DOESN'T play well with others. Not even other/older versions of itself, I mean srsly wtf is THAT about?? And try adding Bitcore Mnemonic in the same app, because you HAVE to import it first, otherwise it'll error out some cryptic message.

Anyway, I'm happy to contribute to this effort, but I'd like some guidance from you as to "how" to construct these examples. Due to how "low-level" your API is, examples could be quite long. I look forward to connecting soon..

Cheers!
Shomari

Hi Shomari, I got a notification that you linked here from reddit, sorry I missed responding before!

I wrote more about the roadmap for Libauth in this comment – some relevant bits:

Please feel free to send a PR fixing any of the existing infrastructure as you find useful. Just a heads up, I'm going to have to make very deep changes in transaction generation code to support simultaneous compiling of multiple transactions by multiple entities + some other features required for proper support for decentralized application transactions. This is likely to change the TX generation API almost entirely, so you may prefer to just vendor whatever you need directly into your own library for now.
[...]
I've made no attempt to make P2PKH wallets easier to create/use with Libauth (basically every JS library does that well already). Instead I'm working from the most advanced transactions backwards: it's very hard to take a simple P2PKH transaction construction API and make it support more complex compilations using multiple contract types, interactions between inputs/outputs, fee estimation, etc. (I think that's why we still don't have this support in any libraries 10+ years later.) But once this advanced stuff is working, I'll build some simpler P2PKH-specific "shortcut" tooling that makes P2PKH transactions as easy as other libraries.
[...]
I'm working on these changes right now, and I'll be pushing them to the v2 branch as soon as I have something to share. It's a huge effort though, so I expect it may still take me several months. I'll put out Libauth v2 betas and release candidates as soon as this refactor is done.

Most of v2 is already very stable, but once the new transaction creation infrastructure lands, I plan to overhaul https://libauth.org to focus around guides, and the existing generated documentation will just be reference material. I would love to take PRs contributing docs/guides!