Skip to content

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Sep 23, 2025

Description

close #2538

TODO

  • ✅ connect to Spark network and fetch static Spark address
  • ✅ register lightning address
  • ✅ check if we already registered the lightning address instead of throwing 'lightning address unavailable'
  • ✅ implement sendPayment
  • fix receiving: I sent sats to the lightning address but the sats don't show up in the getInfo() call ...

mhh, suddenly started working, maybe I did something wrong before?

  • 🚧 no, the above still happens. funding via lnurl doesn't always increase the balance, see Funding wallet via LNURLp does not always increase balance breez/spark-sdk#287

  • 🚧 check implications of Node.js storage in prod: is there state that we cannot lose between deployments? if so, that should be in our database, not in sqlite via better-sqlite—but afaik, we're not using the SDK on the server. What about the data on the client in IndexedDB? Does it need to be synced with credentials across devices?

  • ❓ make sure user created backup of passphrase

  • withdrawals to L1 (cooperative or unilateral)

  • 🚧 'next' button of send form does not always pulse to indicate loading

Video

2025-09-23.15-46-12.mp4

Additional Context

tbd

Checklist

Are your changes backward compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

tbd

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

tbd

Did you use AI for this? If so, how much did it assist you?

no

@ekzyis ekzyis added feature new product features that weren't there before wallets labels Sep 23, 2025
@ekzyis ekzyis marked this pull request as draft September 23, 2025 08:18
Copy link

socket-security bot commented Sep 23, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedbip39@​3.1.010010010081100
Addedbetter-sqlite3@​9.6.01001009892100
Added@​breeztech/​breez-sdk-spark@​0.2.1100100100100100

View full report

We are using node v18.20.4 in production according to package.json but the SDK mentions this:

> Note: If using Node.js, the minimum supported version is v22.

-- https://sdk-doc-spark.breez.technology/guide/install.html#javascripttypescript-wasm

Maybe it will still work with v18.
@ekzyis ekzyis force-pushed the spark branch 2 times, most recently from b648893 to f2dab0c Compare September 28, 2025 20:30
@ekzyis
Copy link
Member Author

ekzyis commented Sep 28, 2025

Hey @dangeross, since you mentioned to keep you updated, I hope you can help me with this:

I read in the TG group that the public beta is next week.

Is this related to the error I'm seeing in this video when calling sendPayment:

Uncaught Error: missing field useSpark at line 1 column 923

2025-09-28.23-23-39.mp4

In the video, I am using a regtest invoice but it also happens with a mainnet invoice.

The relevant code is in wallets/client/protocols/spark.js of this PR.

@dangeross
Copy link

Uncaught Error: missing field useSpark at line 1 column 923

Hey. It changed to preferSpark and doesn't error if there is no spark address included if you enable it

@ekzyis
Copy link
Member Author

ekzyis commented Sep 29, 2025

But I am using preferSpark. I guess this means I need to update the SDK?

@dangeross
Copy link

dangeross commented Sep 29, 2025

Yep, I think only the latest includes it

@ekzyis
Copy link
Member Author

ekzyis commented Sep 29, 2025

Ok, cool, this worked! I updated to v0.2.1.

I also had to change mnemonic to seed because of breez/spark-sdk#271 but I saw you also updated the documentation here.

I now get this expected error for regtest invoices:

SparkSdkError: Service error: validation error: Invoice network does not match

When I try a mainnet invoice, sendPayment() throws this:

The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object

but it actually succeeds to pay the invoice!

@dangeross
Copy link

When I try a mainnet invoice, sendPayment() throws this:

The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object

Can you raise this in Telegram if this is still an issue?

@ekzyis ekzyis changed the title Spark wallet Breez Wallet (Spark) Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new product features that weren't there before wallets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breez wallet (Spark)
2 participants