You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/blog/2025-10-23-redesigned-publisher-tools.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,9 +61,10 @@ Based on what we’ve established so far, we can draw the following:
61
61
**Key flow steps:**
62
62
63
63
1. Publisher customizes through the interface (the `frontend` module) → Configuration stored as JSON (keyed by wallet address + preset tag e.g., ($ilp.link/your-wallet)", "version1").
64
-
2. Visitor loads page with embed script → Script loads from `cdn` module
65
-
3. Script fetches configuration → `api` retrieves stored JSON and returns it
66
-
4. Script renders the Tool → Instantiates Web Component from `components` with fetched configuration
64
+
2. Publisher pastes the generated embed script into into the page `<body />`
65
+
3. Visitor loads page with embed script → Script loads from `cdn` module
66
+
4. Script fetches configuration → `api` retrieves stored JSON and returns it
67
+
5. Script renders the Tool → Instantiates Web Component from `components` with fetched configuration
The `<wm-payment-widget>` element is one of our interactive tools defined in the `components` module. The script creates an instance, passes the configuration as properties, and appends it to the DOM, using Shadow DOM for style encapsulation.
88
89
89
-
Lastly, also adds a monetization `<link>` tag to the `<head>`, using the wallet address used through the `frontend` interface. That means your site becomes Web Monetized automatically. You are welcome!
90
+
Lastly, it also adds a monetization `<link>` tag to the `<head>`, using the wallet address used through the `frontend` interface. That means your site becomes Web Monetized automatically. You are welcome!
90
91
91
92
```typescript
92
93
function appendMonetizationLink(walletAddressUrl:string) {
@@ -103,7 +104,7 @@ That’s all the embedded script does, nothing hidden or extra complexity, but d
103
104
104
105
**Why we need a `components` module**
105
106
106
-
The UI logic for widgets needs to live somewhere separate from the embed script, hence `components` module contains the actual Web Component implementations: the rendering logic, event handlers, state management, and UI interactions.
107
+
The UI logic for widgets needs to live somewhere separate from the embed script, hence the `components` module contains the actual Web Component implementations: the rendering logic, event handlers, state management, and UI interactions.
107
108
108
109
By keeping components as standalone source code, they can be consumed in multiple ways:
109
110
@@ -113,7 +114,7 @@ By keeping components as standalone source code, they can be consumed in multipl
113
114
114
115
### Runtime Payment Operations
115
116
116
-
Beyond the new architecture, the Publisher Tools also handle payments using [Open Payments protocol](https://openpayments.dev/overview/getting-started/). Every step of the payment flow is proxied through our `api` module. For example, when a visitor interacts with the widget wanting to make a one time donation (entering an amount, clicking "Pay"), the component makes API requests:
117
+
Beyond the new architecture, the Publisher Tools also handle payments using [Open Payments](https://openpayments.dev/overview/getting-started/). Every step of the payment flow is proxied through our `api` module. For example, when a visitor interacts with the widget wanting to make a one time donation (entering an amount, clicking "Pay"), the component makes API requests:
The API manages all interactions with Open Payments SDK handling grant authorization, creating outgoing payments, and coordinating with the component to complete the full protocol flow for the payment.
137
+
The API manages all interactions with the Open Payments SDK handling grant authorization, creating outgoing payments, and coordinating with the component to complete the full flow for the payment.
137
138
138
139
**Key flow steps:**
139
140
140
141
1. Visitor interacts with widget (from `components`) → Enters wallet address and desired amount
141
142
2. Component requests quote → `api` proxies to Open Payments infrastructure to handle the amount
142
143
3. Component initializes interactive grant → `api` returns authorization URL
143
-
4. Visitor authenticate and authorizes in popup → Wallet provider redirects back with interaction reference
144
+
4. Visitor authenticates and authorizes in popup → Wallet provider redirects back with interaction reference
The redesigned Publisher Tools establish a foundation for future enhancements:
149
150
150
-
**More tools** We plan to add new interactive tools with new ways of visitors to interact and sponsor your website's content through open payments.
151
+
**More tools** We plan to add new interactive tools with new ways for visitors to interact and sponsor your website's content through Open Payments.
151
152
152
153
**Analytics integration** We want to give publishers insight into how visitors engage with their tools: how often users interact and how revenue breaks down per page.
0 commit comments