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

refactor: import gateway client and updated wallet logic #267

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

gregdhill
Copy link
Contributor

@gregdhill gregdhill commented Jun 24, 2024

Add example usage

Copy link

vercel bot commented Jun 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bob ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2024 4:11pm

Copy link

changeset-bot bot commented Jun 24, 2024

⚠️ No Changeset found

Latest commit: 6ff8233

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@sander2 sander2 left a comment

Choose a reason for hiding this comment

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

Assuming most of the code is copied from the current production code. Mostly lgtm but the exposed functions lack in-code function documentation

sdk/examples/gateway.ts Outdated Show resolved Hide resolved
const _psbtHex = hex.encode(psbt);

// Sign all inputs with the payment address
const signedPsbtHex = ""; // TODO: sign PSBT
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what the intended use case is here, if it's to be used in e.g. bots, or if it's to allow people to embed this in their UIs. If the latter, an example showing that would also be nice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just example code, extracted from the UI to show partners how to integrate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plan is for @derrekcoleman to use this in a React example instead

sdk/src/utils.ts Show resolved Hide resolved
sdk/src/utils.ts Outdated Show resolved Hide resolved
const esploraClient = new DefaultEsploraClient(network);

// NOTE: esplora only returns the 25 most recent UTXOs
// TODO: change this to use the pagination API and return all UTXOs
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to address this before merging? Or maybe make an issue for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will make an issue

@gregdhill gregdhill merged commit c191de8 into master Jun 25, 2024
3 of 4 checks passed
@gregdhill gregdhill deleted the refactor/sdk branch June 25, 2024 16:10
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