diff --git a/README.md b/README.md index 5a04dd5..82a3c0a 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ You can use Bitcoin Connect without any build tools: ```html @@ -356,6 +356,16 @@ if (connectorConfig) { } ``` +#### Refresh balance + +Programmatically trigger a balance refresh for all `` components on the page. Useful after making a payment or receiving funds to update the displayed balance. + +```ts +import {refreshBalance} from '@getalby/bitcoin-connect'; + +refreshBalance(); +``` + #### Events ##### onConnected diff --git a/demos/html/bc-api-usage.html b/demos/html/bc-api-usage.html index 220521e..4ab4497 100644 --- a/demos/html/bc-api-usage.html +++ b/demos/html/bc-api-usage.html @@ -65,7 +65,7 @@

Programmatic Access Demo

launchPaymentModal, requestProvider, disconnect, - } from 'https://esm.sh/@getalby/bitcoin-connect@^3.11.0'; + } from 'https://esm.sh/@getalby/bitcoin-connect@^3.12.0'; import {LightningAddress} from 'https://esm.sh/@getalby/lightning-tools@^5.2.0'; // Initialize Bitcoin Connect with your app name diff --git a/demos/html/bc-button.html b/demos/html/bc-button.html index 3bfca99..469d83d 100644 --- a/demos/html/bc-button.html +++ b/demos/html/bc-button.html @@ -5,7 +5,7 @@ bc-button Demo