@tuwaio/nova-payments 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PaymentsAdapter, a as PaymentFamily, C as CheckoutWallet, N as NativeFee } from './types-DkYd2XhD.cjs';
2
- export { b as PulsarTransactionParams, c as canPayWithQr, d as connectedWallet, f as familyOf, i as isWalletIconUrl, m as methodFamily, e as methodToken, n as networkName, p as payerFor, g as priceAdjustment, w as walletLabel } from './types-DkYd2XhD.cjs';
1
+ import { P as PaymentsAdapter, a as PaymentFamily, C as CheckoutWallet, N as NativeFee } from './types-DOxwRLyU.cjs';
2
+ export { b as PulsarTransactionParams, c as canPayWithQr, d as connectedWallet, f as familyOf, i as isWalletIconUrl, m as methodFamily, e as methodToken, n as networkName, p as payerFor, g as priceAdjustment, w as walletLabel } from './types-DOxwRLyU.cjs';
3
3
  import * as react from 'react';
4
4
  import { ReactNode, ComponentType, ButtonHTMLAttributes, Context } from 'react';
5
5
  import { CheckoutMethod, CheckoutView, CheckoutPhase, CheckoutQuote, CheckoutError, CheckoutState, PaymentInstructions, CheckoutApi, EventSourceConstructor, CheckoutStore, RefundPhase, RefundState, RefundStore, PayerProofMessage, CheckoutMerchant } from '@tuwaio/quasar-sdk/checkout';
@@ -2366,9 +2366,9 @@ declare function instructionsChainId(instructions: PaymentInstructions): string;
2366
2366
  interface PayInvoiceParams {
2367
2367
  /** The adapter of the quote's chain family. */
2368
2368
  adapter: PaymentsAdapter;
2369
- /** The checkout store (only `submit` and `relay` are used). */
2369
+ /** The checkout store (only `submit`, `relay` and `relayFromPage` are used). */
2370
2370
  store: {
2371
- getState: () => Pick<CheckoutState, 'submit' | 'relay'>;
2371
+ getState: () => Pick<CheckoutState, 'submit' | 'relay'> & Partial<Pick<CheckoutState, 'relayFromPage'>>;
2372
2372
  };
2373
2373
  /** The locked quote. */
2374
2374
  quote: CheckoutQuote;
@@ -2376,7 +2376,10 @@ interface PayInvoiceParams {
2376
2376
  wallet: CheckoutWallet;
2377
2377
  /** How the wallet pays, from `payPath`. */
2378
2378
  path: PayPath;
2379
- /** The checkout's ERC-7677 paymaster URL, for the `paymaster` path. */
2379
+ /**
2380
+ * The checkout's ERC-7677 paymaster URL: the `paymaster` path sends through it, and the `relay` path sends the
2381
+ * authorized call from a one-time account through it when the adapter can (`sendOneTimeRelay`).
2382
+ */
2380
2383
  paymasterUrl: string | null;
2381
2384
  /** Called when the wallet answered, before the payment is handed to Quasar. */
2382
2385
  onWalletDone?: () => void;
@@ -2396,8 +2399,9 @@ interface PayInvoiceParams {
2396
2399
  }
2397
2400
  /**
2398
2401
  * Pays a locked quote: `transfer` sends the transfer and hands its key to Quasar (`submit`), `relay` signs the
2399
- * authorization for Quasar to send (`relay`), `paymaster` sends the sponsored calls and hands their transaction hash
2400
- * to Quasar. A transaction the wallet sent is always handed over, whatever the page shows meanwhile, with the method it
2402
+ * authorization and the page sends the call Quasar answers for it from a one-time account (`relayFromPage` with the
2403
+ * adapter's `sendOneTimeRelay`; without them, or with no paymaster URL, Quasar sends it: `relay`), `paymaster` sends
2404
+ * the sponsored calls and hands their transaction hash to Quasar. A transaction the wallet sent is always handed over, whatever the page shows meanwhile, with the method it
2401
2405
  * was quoted for: the buyer may have gone on to a price on another network while the wallet asked.
2402
2406
  *
2403
2407
  * Side effects: a wallet prompt; requests to the checkout routes of Quasar.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PaymentsAdapter, a as PaymentFamily, C as CheckoutWallet, N as NativeFee } from './types-DkYd2XhD.js';
2
- export { b as PulsarTransactionParams, c as canPayWithQr, d as connectedWallet, f as familyOf, i as isWalletIconUrl, m as methodFamily, e as methodToken, n as networkName, p as payerFor, g as priceAdjustment, w as walletLabel } from './types-DkYd2XhD.js';
1
+ import { P as PaymentsAdapter, a as PaymentFamily, C as CheckoutWallet, N as NativeFee } from './types-DOxwRLyU.js';
2
+ export { b as PulsarTransactionParams, c as canPayWithQr, d as connectedWallet, f as familyOf, i as isWalletIconUrl, m as methodFamily, e as methodToken, n as networkName, p as payerFor, g as priceAdjustment, w as walletLabel } from './types-DOxwRLyU.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode, ComponentType, ButtonHTMLAttributes, Context } from 'react';
5
5
  import { CheckoutMethod, CheckoutView, CheckoutPhase, CheckoutQuote, CheckoutError, CheckoutState, PaymentInstructions, CheckoutApi, EventSourceConstructor, CheckoutStore, RefundPhase, RefundState, RefundStore, PayerProofMessage, CheckoutMerchant } from '@tuwaio/quasar-sdk/checkout';
@@ -2366,9 +2366,9 @@ declare function instructionsChainId(instructions: PaymentInstructions): string;
2366
2366
  interface PayInvoiceParams {
2367
2367
  /** The adapter of the quote's chain family. */
2368
2368
  adapter: PaymentsAdapter;
2369
- /** The checkout store (only `submit` and `relay` are used). */
2369
+ /** The checkout store (only `submit`, `relay` and `relayFromPage` are used). */
2370
2370
  store: {
2371
- getState: () => Pick<CheckoutState, 'submit' | 'relay'>;
2371
+ getState: () => Pick<CheckoutState, 'submit' | 'relay'> & Partial<Pick<CheckoutState, 'relayFromPage'>>;
2372
2372
  };
2373
2373
  /** The locked quote. */
2374
2374
  quote: CheckoutQuote;
@@ -2376,7 +2376,10 @@ interface PayInvoiceParams {
2376
2376
  wallet: CheckoutWallet;
2377
2377
  /** How the wallet pays, from `payPath`. */
2378
2378
  path: PayPath;
2379
- /** The checkout's ERC-7677 paymaster URL, for the `paymaster` path. */
2379
+ /**
2380
+ * The checkout's ERC-7677 paymaster URL: the `paymaster` path sends through it, and the `relay` path sends the
2381
+ * authorized call from a one-time account through it when the adapter can (`sendOneTimeRelay`).
2382
+ */
2380
2383
  paymasterUrl: string | null;
2381
2384
  /** Called when the wallet answered, before the payment is handed to Quasar. */
2382
2385
  onWalletDone?: () => void;
@@ -2396,8 +2399,9 @@ interface PayInvoiceParams {
2396
2399
  }
2397
2400
  /**
2398
2401
  * Pays a locked quote: `transfer` sends the transfer and hands its key to Quasar (`submit`), `relay` signs the
2399
- * authorization for Quasar to send (`relay`), `paymaster` sends the sponsored calls and hands their transaction hash
2400
- * to Quasar. A transaction the wallet sent is always handed over, whatever the page shows meanwhile, with the method it
2402
+ * authorization and the page sends the call Quasar answers for it from a one-time account (`relayFromPage` with the
2403
+ * adapter's `sendOneTimeRelay`; without them, or with no paymaster URL, Quasar sends it: `relay`), `paymaster` sends
2404
+ * the sponsored calls and hands their transaction hash to Quasar. A transaction the wallet sent is always handed over, whatever the page shows meanwhile, with the method it
2401
2405
  * was quoted for: the buyer may have gone on to a price on another network while the wallet asked.
2402
2406
  *
2403
2407
  * Side effects: a wallet prompt; requests to the checkout routes of Quasar.