Skip to content

feat(spec/ext) specify getWallet/onPayment#664

Open
asurkov wants to merge 1 commit intomainfrom
onpayment
Open

feat(spec/ext) specify getWallet/onPayment#664
asurkov wants to merge 1 commit intomainfrom
onpayment

Conversation

@asurkov
Copy link
Copy Markdown
Member

@asurkov asurkov commented May 1, 2026

No description provided.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for webmonetization-preview ready!

Name Link
🔨 Latest commit c9b4b52
🔍 Latest deploy log https://app.netlify.com/projects/webmonetization-preview/deploys/69f4dc6bc2873f00087a6c6c
😎 Deploy Preview https://deploy-preview-664--webmonetization-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@asurkov asurkov requested a review from sidvishnoi May 1, 2026 17:01
@asurkov asurkov self-assigned this May 1, 2026

<dt><dfn>currency</dfn></dt>
<dd>
An ISO 4217 currency code (e.g. <code>"USD"</code>).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not that this needs to be changed immediately, but there is the possibility of loosening the currency code requirements to be a string, not necessarily conforming to any specific ISO or other standard, though with ISO 4217 as a default. See #651 for a proposed change (which is apparently still being debated at Interledger).


<dt><dfn>initial</dfn></dt>
<dd>
A decimal string representing the total budget for the current
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be in scaled currency (e.g., 1000) instead of a decimal?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We're aligning this more with PaymentCurrencyAmount and Intl APIs, than with Open Payments.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's mention these are compatible with PaymentCurrencyAmount or link to PaymentRequest/WebMonetization spec


<dt><dfn>remaining</dfn></dt>
<dd>
A decimal string representing the remaining budget for the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ditto to line 52.

Copy link
Copy Markdown
Contributor

@meyerweb meyerweb left a comment

Choose a reason for hiding this comment

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

Some thoughts on first read.


<h4>Parameters</h4>
<dl>
<dt><code>callback</code></dt>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: ReSpec supports this syntax for <code>

Suggested change
<dt><code>callback</code></dt>
<dt>`callback`</dt>

<pre class="idl">
dictionary MonetizationInfo {
dictionary Wallet {
required DOMString address;
Copy link
Copy Markdown
Collaborator

@sidvishnoi sidvishnoi May 2, 2026

Choose a reason for hiding this comment

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

Is this the address user provided (e.g. https://sidvishnoi.com/.well-known/pay) or the resolved wallet address ID (e.g. https://ilp.gatehub.net/981946513/eur)?

dictionary MonetizationInfo {
dictionary Wallet {
required DOMString address;
required DOMString name;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In Open Payments, the publicName field is optional.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe name will be empty string in those cases?

Comment on lines +26 to +27
required DOMString initial;
required DOMString remaining;
Copy link
Copy Markdown
Collaborator

@sidvishnoi sidvishnoi May 2, 2026

Choose a reason for hiding this comment

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

Should these have "balance" in their names?

required DOMString initial;
required DOMString remaining;
DOMString? renewDate;
required boolean needsReconnect;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we discussed we might want a "reason" along with needsReconnect?


<dt><dfn>initial</dfn></dt>
<dd>
A decimal string representing the total budget for the current
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We're aligning this more with PaymentCurrencyAmount and Intl APIs, than with Open Payments.


<dt><dfn>initial</dfn></dt>
<dd>
A decimal string representing the total budget for the current
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's mention these are compatible with PaymentCurrencyAmount or link to PaymentRequest/WebMonetization spec

Comment on lines +70 to +71
<code>true</code> when the stored access token is invalid and the
wallet must be reconnected.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What happens when remaining budget is too low? Do we set needsReconnect then as well?

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.

3 participants