@openreceive/browser 0.1.0 → 0.2.1
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/README.md +63 -0
- package/dist/chunk-V7C55QB2.js +2996 -0
- package/dist/headless.d.ts +799 -0
- package/dist/headless.js +932 -0
- package/dist/index.d.ts +32 -4
- package/dist/index.js +32 -2
- package/dist/status-CLCX5lfx.d.ts +963 -0
- package/dist/styles.css +3 -759
- package/package.json +57 -15
- package/dist/assets/icons/bank.svg +0 -12
- package/dist/assets/icons/bnb.svg +0 -1
- package/dist/assets/icons/card.svg +0 -14
- package/dist/assets/icons/doge.svg +0 -1
- package/dist/assets/pay_tutorials/boltz-1.webp +0 -0
- package/dist/assets/pay_tutorials/boltz-2.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-1.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-2.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-3.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-4.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-5.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-6.webp +0 -0
- package/dist/assets/pay_tutorials/coinbase-1.webp +0 -0
- package/dist/assets/pay_tutorials/coinbase-2.webp +0 -0
- package/dist/assets/pay_tutorials/fixedfloat-1.webp +0 -0
- package/dist/assets/pay_tutorials/fixedfloat-2.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-1.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-2.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-3.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-4.webp +0 -0
- package/dist/assets/pay_tutorials/strike-1.webp +0 -0
- package/dist/assets/pay_tutorials/strike-2.webp +0 -0
- package/dist/assets/pay_tutorials/strike-3.webp +0 -0
- package/dist/assets/pay_tutorials/strike-4.webp +0 -0
- package/dist/assets/provider-icons/aqua.png +0 -0
- package/dist/assets/provider-icons/belo.png +0 -0
- package/dist/assets/provider-icons/binance.png +0 -0
- package/dist/assets/provider-icons/bipa.png +0 -0
- package/dist/assets/provider-icons/bitfinex.png +0 -0
- package/dist/assets/provider-icons/bitget.png +0 -0
- package/dist/assets/provider-icons/bitnob.png +0 -0
- package/dist/assets/provider-icons/bitso.png +0 -0
- package/dist/assets/provider-icons/bity.png +0 -0
- package/dist/assets/provider-icons/blink.png +0 -0
- package/dist/assets/provider-icons/bluewallet.png +0 -0
- package/dist/assets/provider-icons/boltz.png +0 -0
- package/dist/assets/provider-icons/bringin.png +0 -0
- package/dist/assets/provider-icons/bullbitcoin.png +0 -0
- package/dist/assets/provider-icons/cakewallet.png +0 -0
- package/dist/assets/provider-icons/cashapp.png +0 -0
- package/dist/assets/provider-icons/changenow.png +0 -0
- package/dist/assets/provider-icons/chivo.png +0 -0
- package/dist/assets/provider-icons/coinbase.png +0 -0
- package/dist/assets/provider-icons/coincorner.png +0 -0
- package/dist/assets/provider-icons/fixedfloat.png +0 -0
- package/dist/assets/provider-icons/getalby.png +0 -0
- package/dist/assets/provider-icons/kraken.png +0 -0
- package/dist/assets/provider-icons/kryptex.png +0 -0
- package/dist/assets/provider-icons/kucoin.png +0 -0
- package/dist/assets/provider-icons/manifest.json +0 -207
- package/dist/assets/provider-icons/mtpelerin.png +0 -0
- package/dist/assets/provider-icons/muun.png +0 -0
- package/dist/assets/provider-icons/okcoin.png +0 -0
- package/dist/assets/provider-icons/okx.png +0 -0
- package/dist/assets/provider-icons/phoenix.png +0 -0
- package/dist/assets/provider-icons/pouch.png +0 -0
- package/dist/assets/provider-icons/ripio.png +0 -0
- package/dist/assets/provider-icons/river.png +0 -0
- package/dist/assets/provider-icons/rizful.png +0 -0
- package/dist/assets/provider-icons/shakepay.png +0 -0
- package/dist/assets/provider-icons/sideshift.png +0 -0
- package/dist/assets/provider-icons/simpleswap.png +0 -0
- package/dist/assets/provider-icons/speed.png +0 -0
- package/dist/assets/provider-icons/strike.png +0 -0
- package/dist/assets/provider-icons/trocador.png +0 -0
- package/dist/assets/provider-icons/walletofsatoshi.png +0 -0
- package/dist/assets/provider-icons/zeus.png +0 -0
- package/dist/country-map.d.ts +0 -5
- package/dist/country-map.js +0 -17
- package/dist/internal.d.ts +0 -834
- package/dist/internal.js +0 -2617
- package/dist/pay-tutorials.d.ts +0 -1
- package/dist/pay-tutorials.js +0 -42
- package/dist/provider-icons.d.ts +0 -1
- package/dist/provider-icons.js +0 -84
- package/dist/qrcode.d.ts +0 -11
- package/dist/status.d.ts +0 -9
- package/dist/status.js +0 -25
package/dist/internal.d.ts
DELETED
|
@@ -1,834 +0,0 @@
|
|
|
1
|
-
import { type AssetIndexEntry, type Country, type FiatRailId, type PaymentWizardRoute, type Provider } from "@openreceive/provider-data";
|
|
2
|
-
export { status, type Status, type StatusInvoiceLike } from "./status.js";
|
|
3
|
-
export declare const OPENRECEIVE_QR_QUIET_ZONE_MODULES: 4;
|
|
4
|
-
export declare const OPENRECEIVE_QR_DARK_COLOR: "#000000";
|
|
5
|
-
export declare const OPENRECEIVE_QR_LIGHT_COLOR: "#FFFFFFFF";
|
|
6
|
-
export declare const OPENRECEIVE_QR_ERROR_CORRECTION: "M";
|
|
7
|
-
export declare const OPENRECEIVE_COUNTRY_STORAGE_KEY: "openreceive.checkout.country";
|
|
8
|
-
export declare const OPENRECEIVE_LEGACY_DEMO_COUNTRY_STORAGE_KEY: "openreceive-demo.country";
|
|
9
|
-
export declare const OPENRECEIVE_THEME_STORAGE_KEY: "openreceive.theme";
|
|
10
|
-
export declare const OPENRECEIVE_DEFAULT_POLL_INTERVAL_MS: 3000;
|
|
11
|
-
export declare const OPENRECEIVE_COPY_FEEDBACK_MS: 1800;
|
|
12
|
-
export declare const OPENRECEIVE_PROVIDER_PREVIEW_LIMIT: 4;
|
|
13
|
-
export declare const OPENRECEIVE_CHECKOUT_ELEMENT_TAG_NAME: "openreceive-checkout";
|
|
14
|
-
export declare const OPENRECEIVE_THEME_TOGGLE_ELEMENT_TAG_NAME: "openreceive-theme-toggle";
|
|
15
|
-
export declare const OPENRECEIVE_COUNTRY_MAP_WIDTH: 820;
|
|
16
|
-
export declare const OPENRECEIVE_COUNTRY_MAP_HEIGHT: 420;
|
|
17
|
-
export declare const OPENRECEIVE_COUNTRY_MAP_VIEW_BOX: "0 0 820 420";
|
|
18
|
-
export declare const OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS: {
|
|
19
|
-
readonly copy: "openreceive-copy";
|
|
20
|
-
readonly openWallet: "openreceive-open-wallet";
|
|
21
|
-
readonly state: "openreceive-state";
|
|
22
|
-
readonly settled: "openreceive-settled";
|
|
23
|
-
readonly providerCopy: "openreceive-provider-copy";
|
|
24
|
-
readonly startOver: "openreceive-start-over";
|
|
25
|
-
readonly error: "openreceive-error";
|
|
26
|
-
};
|
|
27
|
-
export declare const OPENRECEIVE_THEME_TOGGLE_ELEMENT_EVENTS: {
|
|
28
|
-
readonly change: "openreceive-theme-change";
|
|
29
|
-
};
|
|
30
|
-
export declare const OPENRECEIVE_PAYMENT_WIZARD_ATTRIBUTES: {
|
|
31
|
-
readonly root: "data-openreceive-wizard";
|
|
32
|
-
readonly breadcrumb: "data-or-breadcrumb";
|
|
33
|
-
readonly method: "data-or-method";
|
|
34
|
-
readonly region: "data-or-region";
|
|
35
|
-
readonly regionShape: "data-or-region-shape";
|
|
36
|
-
readonly country: "data-or-country";
|
|
37
|
-
readonly switchCountry: "data-or-switch-country";
|
|
38
|
-
readonly route: "data-or-route";
|
|
39
|
-
readonly providerCopy: "data-or-provider-copy";
|
|
40
|
-
readonly providerTutorial: "data-or-provider-tutorial";
|
|
41
|
-
readonly providerTutorialIndex: "data-or-provider-tutorial-index";
|
|
42
|
-
};
|
|
43
|
-
export declare const OPENRECEIVE_PAYMENT_WIZARD_SELECTORS: {
|
|
44
|
-
readonly root: "[data-openreceive-wizard]";
|
|
45
|
-
readonly breadcrumb: "[data-or-breadcrumb]";
|
|
46
|
-
readonly method: "[data-or-method]";
|
|
47
|
-
readonly region: "[data-or-region]";
|
|
48
|
-
readonly regionShape: "[data-or-region-shape]";
|
|
49
|
-
readonly country: "[data-or-country]";
|
|
50
|
-
readonly switchCountry: "[data-or-switch-country]";
|
|
51
|
-
readonly route: "[data-or-route]";
|
|
52
|
-
readonly providerCopy: "[data-or-provider-copy]";
|
|
53
|
-
readonly providerTutorial: "[data-or-provider-tutorial]";
|
|
54
|
-
readonly providerTutorialIndex: "[data-or-provider-tutorial-index]";
|
|
55
|
-
};
|
|
56
|
-
export declare const OPENRECEIVE_CHECKOUT_DATA_ATTRIBUTES: {
|
|
57
|
-
readonly root: "data-openreceive-checkout";
|
|
58
|
-
readonly qr: "data-openreceive-qr";
|
|
59
|
-
readonly meta: "data-openreceive-meta";
|
|
60
|
-
readonly state: "data-openreceive-state";
|
|
61
|
-
readonly actions: "data-openreceive-actions";
|
|
62
|
-
readonly theme: "data-openreceive-theme";
|
|
63
|
-
readonly themeToggle: "data-openreceive-theme-toggle";
|
|
64
|
-
};
|
|
65
|
-
export declare const OPENRECEIVE_CHECKOUT_DATA_SELECTORS: {
|
|
66
|
-
readonly root: "[data-openreceive-checkout]";
|
|
67
|
-
readonly qr: "[data-openreceive-qr]";
|
|
68
|
-
readonly meta: "[data-openreceive-meta]";
|
|
69
|
-
readonly state: "[data-openreceive-state]";
|
|
70
|
-
readonly actions: "[data-openreceive-actions]";
|
|
71
|
-
readonly theme: "[data-openreceive-theme]";
|
|
72
|
-
readonly themeToggle: "[data-openreceive-theme-toggle]";
|
|
73
|
-
};
|
|
74
|
-
export declare const OPENRECEIVE_CHECKOUT_ELEMENT_PARTS: {
|
|
75
|
-
readonly copy: "copy";
|
|
76
|
-
readonly open: "open";
|
|
77
|
-
readonly startOver: "start-over";
|
|
78
|
-
};
|
|
79
|
-
export declare const OPENRECEIVE_CHECKOUT_ELEMENT_PART_SELECTORS: {
|
|
80
|
-
readonly copy: "[part=\"copy\"]";
|
|
81
|
-
readonly open: "[part=\"open\"]";
|
|
82
|
-
readonly startOver: "[part=\"start-over\"]";
|
|
83
|
-
};
|
|
84
|
-
export declare const OPENRECEIVE_THEME_TOGGLE_ELEMENT_PARTS: {
|
|
85
|
-
readonly button: "button";
|
|
86
|
-
};
|
|
87
|
-
export declare const OPENRECEIVE_THEME_TOGGLE_ELEMENT_PART_SELECTORS: {
|
|
88
|
-
readonly button: "[part=\"button\"]";
|
|
89
|
-
};
|
|
90
|
-
export type CheckoutElementEventName = (typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS)[keyof typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS];
|
|
91
|
-
export type OpenReceiveThemeToggleElementEventName = (typeof OPENRECEIVE_THEME_TOGGLE_ELEMENT_EVENTS)[keyof typeof OPENRECEIVE_THEME_TOGGLE_ELEMENT_EVENTS];
|
|
92
|
-
export interface CheckoutProviderCopyEventDetail {
|
|
93
|
-
readonly providerId: string;
|
|
94
|
-
}
|
|
95
|
-
export interface CheckoutStateEventDetail {
|
|
96
|
-
readonly state: CheckoutState;
|
|
97
|
-
}
|
|
98
|
-
export interface CheckoutErrorEventDetail {
|
|
99
|
-
readonly error: unknown;
|
|
100
|
-
}
|
|
101
|
-
export interface OpenReceiveThemeChangeEventDetail {
|
|
102
|
-
readonly theme: OpenReceiveThemePreference;
|
|
103
|
-
readonly resolvedTheme: OpenReceiveResolvedTheme;
|
|
104
|
-
}
|
|
105
|
-
export declare function createCheckoutProviderCopyEvent(providerId: string): CustomEvent<CheckoutProviderCopyEventDetail>;
|
|
106
|
-
export declare function createCheckoutActionEvent(eventName: typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS.copy | typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS.openWallet | typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS.startOver): CustomEvent;
|
|
107
|
-
export declare function createCheckoutStateEvent(eventName: typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS.state | typeof OPENRECEIVE_CHECKOUT_ELEMENT_EVENTS.settled, state: CheckoutState): CustomEvent<CheckoutStateEventDetail>;
|
|
108
|
-
export declare function createCheckoutErrorEvent(error: unknown): CustomEvent<CheckoutErrorEventDetail>;
|
|
109
|
-
export declare function createOpenReceiveThemeChangeEvent(theme: OpenReceiveThemeModel): CustomEvent<OpenReceiveThemeChangeEventDetail>;
|
|
110
|
-
export interface OpenReceiveTransientFeedbackOptions<T> {
|
|
111
|
-
readonly resetValue: T;
|
|
112
|
-
readonly delayMs?: number;
|
|
113
|
-
readonly setTimeout?: typeof globalThis.setTimeout;
|
|
114
|
-
readonly clearTimeout?: typeof globalThis.clearTimeout;
|
|
115
|
-
readonly onValue: (value: T) => void;
|
|
116
|
-
}
|
|
117
|
-
export interface OpenReceiveTransientFeedbackController<T> {
|
|
118
|
-
show(value: T): void;
|
|
119
|
-
clear(): void;
|
|
120
|
-
}
|
|
121
|
-
export type OpenReceivePaymentIconId = "bank" | "bnb" | "btc" | "card" | "crypto" | "doge" | "eth" | "lightning" | "ltc" | "sol" | "trx" | "usdc" | "usdt" | "xmr" | "xrp";
|
|
122
|
-
export declare const openReceivePaymentIconUrls: Readonly<Record<OpenReceivePaymentIconId, string>>;
|
|
123
|
-
export declare const openReceivePaymentMethodIconIds: Readonly<Record<OpenReceivePaymentMethod, OpenReceivePaymentIconId>>;
|
|
124
|
-
export declare const openReceiveAssetIconIds: Readonly<Record<string, OpenReceivePaymentIconId>>;
|
|
125
|
-
export interface OpenReceiveQrEncoder {
|
|
126
|
-
toString(payload: string, options: Record<string, unknown>): Promise<string> | string;
|
|
127
|
-
toDataURL?(payload: string, options: Record<string, unknown>): Promise<string> | string;
|
|
128
|
-
}
|
|
129
|
-
export interface OpenReceiveQrOptions {
|
|
130
|
-
encoder?: OpenReceiveQrEncoder;
|
|
131
|
-
width?: number;
|
|
132
|
-
}
|
|
133
|
-
export interface CopyInvoiceOptions {
|
|
134
|
-
invoice: string;
|
|
135
|
-
clipboard?: Pick<Clipboard, "writeText">;
|
|
136
|
-
logger?: OpenReceiveBrowserLogger;
|
|
137
|
-
logContext?: OpenReceiveBrowserLogContext;
|
|
138
|
-
}
|
|
139
|
-
export interface OpenWalletOptions {
|
|
140
|
-
invoice: string;
|
|
141
|
-
open?: (uri: string) => void;
|
|
142
|
-
logger?: OpenReceiveBrowserLogger;
|
|
143
|
-
logContext?: OpenReceiveBrowserLogContext;
|
|
144
|
-
}
|
|
145
|
-
export type OpenReceiveBrowserLogLevel = "debug" | "info" | "warn" | "error";
|
|
146
|
-
export interface OpenReceiveBrowserLogEntry {
|
|
147
|
-
readonly level: OpenReceiveBrowserLogLevel;
|
|
148
|
-
readonly event: string;
|
|
149
|
-
readonly message: string;
|
|
150
|
-
readonly [key: string]: unknown;
|
|
151
|
-
}
|
|
152
|
-
export type OpenReceiveBrowserLogger = (entry: OpenReceiveBrowserLogEntry) => void;
|
|
153
|
-
export interface OpenReceiveBrowserLogContext {
|
|
154
|
-
readonly invoice_id?: string;
|
|
155
|
-
readonly payment_hash?: string;
|
|
156
|
-
readonly amount_msats?: number;
|
|
157
|
-
readonly transaction_state?: string;
|
|
158
|
-
readonly workflow_state?: string;
|
|
159
|
-
readonly [key: string]: unknown;
|
|
160
|
-
}
|
|
161
|
-
export type CheckoutPhase = "invoice_created" | "verifying" | "settled" | "expired" | "failed" | "cancelled";
|
|
162
|
-
export interface CheckoutSnapshot {
|
|
163
|
-
readonly invoice_id: string;
|
|
164
|
-
readonly invoice: string;
|
|
165
|
-
readonly payment_hash?: string;
|
|
166
|
-
readonly amount_msats?: number;
|
|
167
|
-
readonly fiat_quote?: {
|
|
168
|
-
readonly fiat?: {
|
|
169
|
-
readonly currency?: string;
|
|
170
|
-
readonly value?: string;
|
|
171
|
-
};
|
|
172
|
-
} | null;
|
|
173
|
-
readonly transaction_state?: string;
|
|
174
|
-
readonly workflow_state?: string;
|
|
175
|
-
readonly expires_at?: number;
|
|
176
|
-
readonly settled_at?: number;
|
|
177
|
-
}
|
|
178
|
-
export interface CheckoutDisplayData {
|
|
179
|
-
readonly invoice_id?: string;
|
|
180
|
-
readonly invoice: string;
|
|
181
|
-
readonly payment_hash?: string;
|
|
182
|
-
readonly amount_msats?: number;
|
|
183
|
-
readonly fiat_quote?: {
|
|
184
|
-
readonly fiat?: {
|
|
185
|
-
readonly currency?: string;
|
|
186
|
-
readonly value?: string;
|
|
187
|
-
};
|
|
188
|
-
} | null;
|
|
189
|
-
readonly transaction_state?: string;
|
|
190
|
-
readonly workflow_state?: string;
|
|
191
|
-
readonly expires_at?: number;
|
|
192
|
-
readonly settled_at?: number;
|
|
193
|
-
}
|
|
194
|
-
export interface CheckoutDisplayModel extends CheckoutDisplayData {
|
|
195
|
-
readonly lightningUri: string;
|
|
196
|
-
readonly amountLabel?: string;
|
|
197
|
-
readonly fiatLabel?: string;
|
|
198
|
-
readonly paymentHashLabel?: string;
|
|
199
|
-
readonly transactionStateLabel?: string;
|
|
200
|
-
}
|
|
201
|
-
export declare const OPENRECEIVE_CHECKOUT_ELEMENT_ATTRIBUTES: {
|
|
202
|
-
readonly invoiceId: "invoice-id";
|
|
203
|
-
readonly invoice: "invoice";
|
|
204
|
-
readonly paymentHash: "payment-hash";
|
|
205
|
-
readonly amountMsats: "amount-msats";
|
|
206
|
-
readonly fiatCurrency: "fiat-currency";
|
|
207
|
-
readonly fiatValue: "fiat-value";
|
|
208
|
-
readonly status: "status";
|
|
209
|
-
readonly expiresAt: "expires-at";
|
|
210
|
-
readonly lookupUrl: "lookup-url";
|
|
211
|
-
readonly theme: "theme";
|
|
212
|
-
readonly paymentWizard: "payment-wizard";
|
|
213
|
-
};
|
|
214
|
-
export declare const OPENRECEIVE_THEME_TOGGLE_ELEMENT_ATTRIBUTES: {
|
|
215
|
-
readonly rootSelector: "root-selector";
|
|
216
|
-
readonly checkoutSelector: "checkout-selector";
|
|
217
|
-
readonly defaultTheme: "default-theme";
|
|
218
|
-
readonly storageKey: "storage-key";
|
|
219
|
-
};
|
|
220
|
-
export interface CheckoutElementAttributeOptions {
|
|
221
|
-
readonly lookupUrl?: string;
|
|
222
|
-
readonly theme?: OpenReceiveResolvedTheme;
|
|
223
|
-
readonly paymentWizard?: boolean;
|
|
224
|
-
}
|
|
225
|
-
export interface OpenReceiveThemeToggleElementAttributeOptions {
|
|
226
|
-
readonly rootSelector?: string;
|
|
227
|
-
readonly checkoutSelector?: string;
|
|
228
|
-
readonly defaultTheme?: OpenReceiveThemePreference;
|
|
229
|
-
readonly storageKey?: string;
|
|
230
|
-
}
|
|
231
|
-
export type CheckoutElementAttributeName = (typeof OPENRECEIVE_CHECKOUT_ELEMENT_ATTRIBUTES)[keyof typeof OPENRECEIVE_CHECKOUT_ELEMENT_ATTRIBUTES];
|
|
232
|
-
export type CheckoutElementAttributes = Partial<Record<CheckoutElementAttributeName, string>>;
|
|
233
|
-
export type OpenReceiveThemeToggleElementAttributeName = (typeof OPENRECEIVE_THEME_TOGGLE_ELEMENT_ATTRIBUTES)[keyof typeof OPENRECEIVE_THEME_TOGGLE_ELEMENT_ATTRIBUTES];
|
|
234
|
-
export type OpenReceiveThemeToggleElementAttributes = Partial<Record<OpenReceiveThemeToggleElementAttributeName, string>>;
|
|
235
|
-
export interface CheckoutElementEventHandlers {
|
|
236
|
-
readonly onCopy?: (event: Event) => void;
|
|
237
|
-
readonly onOpenWallet?: (event: Event) => void;
|
|
238
|
-
readonly onState?: (event: Event) => void;
|
|
239
|
-
readonly onSettled?: (event: Event) => void;
|
|
240
|
-
readonly onProviderCopy?: (event: Event) => void;
|
|
241
|
-
readonly onStartOver?: (event: Event) => void;
|
|
242
|
-
readonly onError?: (event: Event) => void;
|
|
243
|
-
}
|
|
244
|
-
export type CheckoutElementListeners = Partial<Record<CheckoutElementEventName, (event: Event) => void>>;
|
|
245
|
-
export interface CheckoutShellOptions extends Omit<CheckoutElementAttributeOptions, "theme">, CheckoutElementEventHandlers, OpenReceiveStoredThemeModelOptions {
|
|
246
|
-
readonly rootSelector?: string;
|
|
247
|
-
readonly checkoutSelector?: string;
|
|
248
|
-
}
|
|
249
|
-
export interface CheckoutShellCheckoutBinding {
|
|
250
|
-
readonly tagName: typeof OPENRECEIVE_CHECKOUT_ELEMENT_TAG_NAME;
|
|
251
|
-
readonly attributes: CheckoutElementAttributes;
|
|
252
|
-
readonly listeners: CheckoutElementListeners;
|
|
253
|
-
}
|
|
254
|
-
export interface CheckoutShellThemeToggleBinding {
|
|
255
|
-
readonly tagName: typeof OPENRECEIVE_THEME_TOGGLE_ELEMENT_TAG_NAME;
|
|
256
|
-
readonly attributes: OpenReceiveThemeToggleElementAttributes;
|
|
257
|
-
}
|
|
258
|
-
export interface CheckoutShellModel {
|
|
259
|
-
readonly theme: OpenReceiveThemeModel;
|
|
260
|
-
readonly rootAttributes: OpenReceiveThemeModel["attributes"];
|
|
261
|
-
readonly checkout: CheckoutShellCheckoutBinding;
|
|
262
|
-
readonly themeToggle: CheckoutShellThemeToggleBinding;
|
|
263
|
-
}
|
|
264
|
-
export interface CheckoutElementTarget extends OpenReceiveThemeAttributeTarget {
|
|
265
|
-
addEventListener(name: string, listener: (event: Event) => void): void;
|
|
266
|
-
}
|
|
267
|
-
export interface CheckoutElementDocument {
|
|
268
|
-
createElement(tagName: string): HTMLElement;
|
|
269
|
-
}
|
|
270
|
-
export interface CreateCheckoutElementOptions extends CheckoutElementAttributeOptions, CheckoutElementEventHandlers {
|
|
271
|
-
readonly document?: CheckoutElementDocument;
|
|
272
|
-
}
|
|
273
|
-
export interface CreateOpenReceiveThemeToggleElementOptions extends OpenReceiveThemeToggleElementAttributeOptions {
|
|
274
|
-
readonly document?: CheckoutElementDocument;
|
|
275
|
-
}
|
|
276
|
-
export interface CreateCheckoutShellOptions extends CheckoutShellOptions {
|
|
277
|
-
readonly document?: CheckoutElementDocument;
|
|
278
|
-
readonly root?: OpenReceiveThemeAttributeTarget | null;
|
|
279
|
-
}
|
|
280
|
-
export interface CheckoutShellElements {
|
|
281
|
-
readonly theme: OpenReceiveThemeModel;
|
|
282
|
-
readonly rootAttributes: OpenReceiveThemeModel["attributes"];
|
|
283
|
-
readonly checkout: HTMLElement;
|
|
284
|
-
readonly themeToggle: HTMLElement;
|
|
285
|
-
}
|
|
286
|
-
export interface CheckoutState {
|
|
287
|
-
readonly invoice_id: string;
|
|
288
|
-
readonly invoice: string;
|
|
289
|
-
readonly lightningUri: string;
|
|
290
|
-
readonly payment_hash?: string;
|
|
291
|
-
readonly amount_msats?: number;
|
|
292
|
-
readonly fiat_quote?: CheckoutSnapshot["fiat_quote"];
|
|
293
|
-
readonly transaction_state: string;
|
|
294
|
-
readonly workflow_state: string;
|
|
295
|
-
readonly expires_at?: number;
|
|
296
|
-
readonly expiresInSeconds?: number;
|
|
297
|
-
readonly phase: CheckoutPhase;
|
|
298
|
-
readonly settled: boolean;
|
|
299
|
-
readonly terminal: boolean;
|
|
300
|
-
readonly settled_at?: number;
|
|
301
|
-
}
|
|
302
|
-
export interface CheckoutStatusModelInput {
|
|
303
|
-
readonly phase?: CheckoutPhase;
|
|
304
|
-
readonly waiting?: boolean;
|
|
305
|
-
readonly expiresInSeconds?: number;
|
|
306
|
-
}
|
|
307
|
-
export interface CheckoutStatusModel {
|
|
308
|
-
readonly phase: CheckoutPhase;
|
|
309
|
-
readonly waiting: boolean;
|
|
310
|
-
readonly title: string;
|
|
311
|
-
readonly detail: string;
|
|
312
|
-
readonly countdownPrefix: string;
|
|
313
|
-
readonly expiresInSeconds?: number;
|
|
314
|
-
readonly countdownLabel?: string;
|
|
315
|
-
}
|
|
316
|
-
export type CheckoutLookup = (state: CheckoutState) => Promise<Partial<CheckoutSnapshot>>;
|
|
317
|
-
export type CheckoutRefresh = (state: CheckoutState) => Promise<CheckoutSnapshot | OpenReceiveRefreshInvoiceResult>;
|
|
318
|
-
export interface CreateOpenReceiveInvoiceOptions {
|
|
319
|
-
readonly invoiceUrl?: string;
|
|
320
|
-
readonly orderUuid: string;
|
|
321
|
-
readonly fetch?: typeof globalThis.fetch;
|
|
322
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
323
|
-
readonly amount?: {
|
|
324
|
-
readonly currency: "BTC" | "SAT" | "SATS";
|
|
325
|
-
readonly value: string;
|
|
326
|
-
};
|
|
327
|
-
readonly amountInSatoshis?: number | string;
|
|
328
|
-
readonly amount_msats?: number | string;
|
|
329
|
-
readonly fiat?: {
|
|
330
|
-
readonly currency: string;
|
|
331
|
-
readonly value: string;
|
|
332
|
-
};
|
|
333
|
-
readonly optionalInvoiceDescription?: string;
|
|
334
|
-
readonly description_hash?: string;
|
|
335
|
-
readonly expiry?: number;
|
|
336
|
-
}
|
|
337
|
-
export interface CreateOpenReceiveLookupInvoiceFetcherOptions {
|
|
338
|
-
readonly lookupUrl: string;
|
|
339
|
-
readonly fetch?: typeof globalThis.fetch;
|
|
340
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
341
|
-
}
|
|
342
|
-
export interface OpenReceiveRefreshInvoiceResult {
|
|
343
|
-
readonly old_invoice_id: string;
|
|
344
|
-
readonly new_invoice_id: string;
|
|
345
|
-
readonly reason?: string;
|
|
346
|
-
readonly invoice: CheckoutSnapshot;
|
|
347
|
-
}
|
|
348
|
-
export interface CreateOpenReceiveRefreshInvoiceFetcherOptions {
|
|
349
|
-
readonly refreshUrl: string | ((state: CheckoutState) => string);
|
|
350
|
-
readonly idempotencyKey: string | ((state: CheckoutState) => string);
|
|
351
|
-
readonly fetch?: typeof globalThis.fetch;
|
|
352
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
353
|
-
readonly reason?: string | ((state: CheckoutState) => string);
|
|
354
|
-
}
|
|
355
|
-
export interface CheckoutWatcherOptions {
|
|
356
|
-
readonly snapshot: CheckoutSnapshot;
|
|
357
|
-
readonly lookupInvoice?: CheckoutLookup;
|
|
358
|
-
readonly pollIntervalMs?: number;
|
|
359
|
-
readonly now?: () => number;
|
|
360
|
-
readonly setInterval?: typeof globalThis.setInterval;
|
|
361
|
-
readonly clearInterval?: typeof globalThis.clearInterval;
|
|
362
|
-
readonly logger?: OpenReceiveBrowserLogger;
|
|
363
|
-
readonly onState: (state: CheckoutState) => void;
|
|
364
|
-
readonly onError?: (error: unknown) => void;
|
|
365
|
-
}
|
|
366
|
-
export interface CheckoutControllerOptions extends Omit<CheckoutWatcherOptions, "onState"> {
|
|
367
|
-
readonly onState?: (state: CheckoutState) => void;
|
|
368
|
-
readonly lookupUrl?: string;
|
|
369
|
-
readonly fetch?: typeof globalThis.fetch;
|
|
370
|
-
readonly lookupHeaders?: Readonly<Record<string, string>>;
|
|
371
|
-
readonly refreshInvoice?: CheckoutRefresh;
|
|
372
|
-
readonly refreshUrl?: string | ((state: CheckoutState) => string);
|
|
373
|
-
readonly refreshHeaders?: Readonly<Record<string, string>>;
|
|
374
|
-
readonly refreshIdempotencyKey?: string | ((state: CheckoutState) => string);
|
|
375
|
-
readonly refreshReason?: string | ((state: CheckoutState) => string);
|
|
376
|
-
readonly clipboard?: Pick<Clipboard, "writeText">;
|
|
377
|
-
readonly open?: (uri: string) => void;
|
|
378
|
-
}
|
|
379
|
-
export interface CheckoutController {
|
|
380
|
-
start(): CheckoutState;
|
|
381
|
-
update(options: CheckoutControllerOptions): CheckoutState;
|
|
382
|
-
stop(): void;
|
|
383
|
-
getState(): CheckoutState | undefined;
|
|
384
|
-
reloadState(): Promise<CheckoutState>;
|
|
385
|
-
retry(): Promise<CheckoutState>;
|
|
386
|
-
refreshExpiredInvoice(): Promise<CheckoutState>;
|
|
387
|
-
cancel(): CheckoutState;
|
|
388
|
-
copyInvoice(): Promise<void>;
|
|
389
|
-
openWallet(): string;
|
|
390
|
-
}
|
|
391
|
-
export interface CreateCheckoutStateOptions {
|
|
392
|
-
readonly now?: number;
|
|
393
|
-
readonly logger?: OpenReceiveBrowserLogger;
|
|
394
|
-
}
|
|
395
|
-
export type OpenReceivePaymentMethod = "card" | "bank" | "bitcoin" | "crypto";
|
|
396
|
-
export type OpenReceiveThemePreference = "light" | "dark" | "system";
|
|
397
|
-
export type OpenReceiveResolvedTheme = "light" | "dark";
|
|
398
|
-
export type OpenReceiveRegionId = "north-america" | "latin-america" | "europe" | "africa" | "middle-east" | "asia-pacific";
|
|
399
|
-
export interface OpenReceivePaymentMethodOption {
|
|
400
|
-
readonly id: OpenReceivePaymentMethod;
|
|
401
|
-
readonly title: string;
|
|
402
|
-
readonly detail: string;
|
|
403
|
-
}
|
|
404
|
-
export interface ParseOpenReceiveOptionalIntegerOptions {
|
|
405
|
-
readonly label?: string;
|
|
406
|
-
}
|
|
407
|
-
export interface OpenReceiveCountryMapPin {
|
|
408
|
-
readonly region: OpenReceiveRegionId;
|
|
409
|
-
readonly coordinates: readonly [number, number];
|
|
410
|
-
}
|
|
411
|
-
export interface OpenReceiveCountryPickerRegion {
|
|
412
|
-
readonly id: OpenReceiveRegionId;
|
|
413
|
-
readonly label: string;
|
|
414
|
-
readonly count: number;
|
|
415
|
-
readonly enabled: boolean;
|
|
416
|
-
readonly selected: boolean;
|
|
417
|
-
}
|
|
418
|
-
export interface OpenReceiveCountryDisplay {
|
|
419
|
-
readonly country: Country;
|
|
420
|
-
readonly code: string;
|
|
421
|
-
readonly label: string;
|
|
422
|
-
readonly metaLabel: string;
|
|
423
|
-
readonly selected: boolean;
|
|
424
|
-
}
|
|
425
|
-
export interface OpenReceiveCountryPickerMapCountry {
|
|
426
|
-
readonly country: Country;
|
|
427
|
-
readonly region: OpenReceiveRegionId;
|
|
428
|
-
readonly coordinates: readonly [number, number];
|
|
429
|
-
readonly point: readonly [number, number];
|
|
430
|
-
readonly selected: boolean;
|
|
431
|
-
readonly hovered: boolean;
|
|
432
|
-
readonly label: string;
|
|
433
|
-
readonly metaLabel: string;
|
|
434
|
-
}
|
|
435
|
-
export interface OpenReceiveCountryPickerModel {
|
|
436
|
-
readonly countries: readonly Country[];
|
|
437
|
-
readonly regions: readonly OpenReceiveCountryPickerRegion[];
|
|
438
|
-
readonly selectedCountry?: Country;
|
|
439
|
-
readonly hoveredCountry?: Country;
|
|
440
|
-
readonly selectedCountryDisplay?: OpenReceiveCountryDisplay;
|
|
441
|
-
readonly hoveredCountryDisplay?: OpenReceiveCountryDisplay;
|
|
442
|
-
readonly readoutLabel: string;
|
|
443
|
-
readonly readoutMetaLabel?: string;
|
|
444
|
-
readonly visibleRegionCountries: readonly Country[];
|
|
445
|
-
readonly visibleRegionCountryDisplays: readonly OpenReceiveCountryDisplay[];
|
|
446
|
-
readonly mapCountries: readonly OpenReceiveCountryPickerMapCountry[];
|
|
447
|
-
}
|
|
448
|
-
export interface OpenReceiveCountryPickerModelRequest {
|
|
449
|
-
readonly countries: readonly Country[];
|
|
450
|
-
readonly selectedCountryCode: string;
|
|
451
|
-
readonly selectedRegion: OpenReceiveRegionId;
|
|
452
|
-
readonly hoveredCountryCode?: string | null;
|
|
453
|
-
}
|
|
454
|
-
export interface OpenReceiveThemeModelOptions {
|
|
455
|
-
readonly systemDark?: boolean;
|
|
456
|
-
}
|
|
457
|
-
export interface OpenReceiveThemeStorageOptions {
|
|
458
|
-
readonly storage?: Storage;
|
|
459
|
-
readonly storageKey?: string;
|
|
460
|
-
}
|
|
461
|
-
export interface OpenReceiveReadThemePreferenceOptions extends OpenReceiveThemeStorageOptions {
|
|
462
|
-
readonly defaultTheme?: OpenReceiveThemePreference;
|
|
463
|
-
}
|
|
464
|
-
export interface OpenReceiveStoredThemeModelOptions extends OpenReceiveReadThemePreferenceOptions, OpenReceiveThemeModelOptions {
|
|
465
|
-
}
|
|
466
|
-
export interface OpenReceiveThemeAttributeTarget {
|
|
467
|
-
setAttribute(name: string, value: string): void;
|
|
468
|
-
}
|
|
469
|
-
export interface OpenReceiveThemeLabelTarget {
|
|
470
|
-
textContent: string | null;
|
|
471
|
-
}
|
|
472
|
-
export interface OpenReceiveThemeControlTargets {
|
|
473
|
-
readonly root?: OpenReceiveThemeAttributeTarget | null;
|
|
474
|
-
readonly checkout?: OpenReceiveThemeAttributeTarget | null;
|
|
475
|
-
readonly toggle?: OpenReceiveThemeLabelTarget | null;
|
|
476
|
-
}
|
|
477
|
-
export interface OpenReceiveThemeModel {
|
|
478
|
-
readonly theme: OpenReceiveThemePreference;
|
|
479
|
-
readonly resolvedTheme: OpenReceiveResolvedTheme;
|
|
480
|
-
readonly nextTheme: OpenReceiveThemePreference;
|
|
481
|
-
readonly toggleLabel: string;
|
|
482
|
-
readonly attributes: {
|
|
483
|
-
readonly "data-theme": OpenReceiveResolvedTheme;
|
|
484
|
-
readonly "data-openreceive-theme": OpenReceiveResolvedTheme;
|
|
485
|
-
};
|
|
486
|
-
readonly checkoutElementAttributes: {
|
|
487
|
-
readonly theme: OpenReceiveResolvedTheme;
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
export interface OpenReceivePaymentWizardRequest {
|
|
491
|
-
readonly selectedMethod: OpenReceivePaymentMethod | null;
|
|
492
|
-
readonly selectedCountryCode?: string;
|
|
493
|
-
readonly selectedBitcoinRoute?: string | null;
|
|
494
|
-
readonly selectedCryptoRoute?: string | null;
|
|
495
|
-
}
|
|
496
|
-
export interface OpenReceivePaymentWizardSelection {
|
|
497
|
-
readonly selectedMethod: OpenReceivePaymentMethod | null;
|
|
498
|
-
readonly selectedCountryCode: string;
|
|
499
|
-
readonly selectedBitcoinRoute: string | null;
|
|
500
|
-
readonly selectedCryptoRoute: string | null;
|
|
501
|
-
readonly selectedRegion: OpenReceiveRegionId;
|
|
502
|
-
readonly countryPickerOpen: boolean;
|
|
503
|
-
}
|
|
504
|
-
export type OpenReceivePaymentWizardSelectionAction = {
|
|
505
|
-
readonly type: "select_method";
|
|
506
|
-
readonly method: OpenReceivePaymentMethod;
|
|
507
|
-
readonly storedCountryCode?: string | null;
|
|
508
|
-
} | {
|
|
509
|
-
readonly type: "change_method";
|
|
510
|
-
} | {
|
|
511
|
-
readonly type: "change_route";
|
|
512
|
-
} | {
|
|
513
|
-
readonly type: "select_region";
|
|
514
|
-
readonly region: OpenReceiveRegionId;
|
|
515
|
-
} | {
|
|
516
|
-
readonly type: "select_country";
|
|
517
|
-
readonly countryCode: string;
|
|
518
|
-
} | {
|
|
519
|
-
readonly type: "open_country_picker";
|
|
520
|
-
} | {
|
|
521
|
-
readonly type: "select_route";
|
|
522
|
-
readonly route: string;
|
|
523
|
-
};
|
|
524
|
-
export interface OpenReceivePaymentWizardState {
|
|
525
|
-
readonly selectedRail: FiatRailId | null;
|
|
526
|
-
readonly selectedCountry?: Country;
|
|
527
|
-
readonly railCountries: readonly Country[];
|
|
528
|
-
readonly selectedRouteId: string | null;
|
|
529
|
-
readonly routes: readonly PaymentWizardRoute[];
|
|
530
|
-
}
|
|
531
|
-
export interface OpenReceivePaymentWizardModel {
|
|
532
|
-
readonly selection: OpenReceivePaymentWizardSelection;
|
|
533
|
-
readonly wizard: OpenReceivePaymentWizardState;
|
|
534
|
-
readonly countryPicker: OpenReceiveCountryPickerModel;
|
|
535
|
-
readonly countryDisplays: readonly OpenReceiveCountryDisplay[];
|
|
536
|
-
readonly visibleRegionCountries: readonly Country[];
|
|
537
|
-
readonly visibleRegionCountryDisplays: readonly OpenReceiveCountryDisplay[];
|
|
538
|
-
readonly selectedCountryDisplay?: OpenReceiveCountryDisplay;
|
|
539
|
-
readonly routeAssets: readonly AssetIndexEntry[];
|
|
540
|
-
readonly selectedRoute: string | null;
|
|
541
|
-
}
|
|
542
|
-
export interface OpenReceivePaymentWizardControllerOptions {
|
|
543
|
-
readonly selection?: OpenReceivePaymentWizardSelection;
|
|
544
|
-
readonly storedCountryCode?: string | null;
|
|
545
|
-
readonly defaultCountryCode?: string;
|
|
546
|
-
readonly storage?: Storage;
|
|
547
|
-
readonly storageKey?: string;
|
|
548
|
-
readonly onSelection?: (selection: OpenReceivePaymentWizardSelection) => void;
|
|
549
|
-
}
|
|
550
|
-
export interface OpenReceivePaymentWizardController {
|
|
551
|
-
getSelection(): OpenReceivePaymentWizardSelection;
|
|
552
|
-
getModel(): OpenReceivePaymentWizardModel;
|
|
553
|
-
update(action: OpenReceivePaymentWizardSelectionAction): OpenReceivePaymentWizardSelection;
|
|
554
|
-
selectMethod(method: OpenReceivePaymentMethod): OpenReceivePaymentWizardSelection;
|
|
555
|
-
changeMethod(): OpenReceivePaymentWizardSelection;
|
|
556
|
-
selectRegion(region: OpenReceiveRegionId): OpenReceivePaymentWizardSelection;
|
|
557
|
-
selectCountry(countryCode: string): OpenReceivePaymentWizardSelection;
|
|
558
|
-
openCountryPicker(): OpenReceivePaymentWizardSelection;
|
|
559
|
-
selectRoute(route: string): OpenReceivePaymentWizardSelection;
|
|
560
|
-
}
|
|
561
|
-
export interface OpenReceiveWizardRouteAssetDisplay {
|
|
562
|
-
readonly id: string;
|
|
563
|
-
readonly label: string;
|
|
564
|
-
readonly subtitle: string;
|
|
565
|
-
readonly icon: string;
|
|
566
|
-
readonly selected: boolean;
|
|
567
|
-
}
|
|
568
|
-
export interface OpenReceiveWizardProviderTutorialDisplay {
|
|
569
|
-
readonly index: number;
|
|
570
|
-
readonly path: string;
|
|
571
|
-
readonly image: string;
|
|
572
|
-
readonly caption: string;
|
|
573
|
-
}
|
|
574
|
-
export interface OpenReceiveWizardProviderDisplay {
|
|
575
|
-
readonly id: string;
|
|
576
|
-
readonly name: string;
|
|
577
|
-
readonly kind: string;
|
|
578
|
-
readonly url: string;
|
|
579
|
-
readonly icon: string;
|
|
580
|
-
readonly tutorials: readonly OpenReceiveWizardProviderTutorialDisplay[];
|
|
581
|
-
readonly recommended: boolean;
|
|
582
|
-
readonly recommendedLabel: string | null;
|
|
583
|
-
readonly usBadge: string | null;
|
|
584
|
-
readonly copyLabel: string;
|
|
585
|
-
readonly copiedLabel: string;
|
|
586
|
-
readonly openLabel: string;
|
|
587
|
-
}
|
|
588
|
-
export interface OpenReceiveWizardRouteDisplay {
|
|
589
|
-
readonly key: string;
|
|
590
|
-
readonly title: string;
|
|
591
|
-
readonly subtitle: string;
|
|
592
|
-
readonly providers: readonly OpenReceiveWizardProviderDisplay[];
|
|
593
|
-
}
|
|
594
|
-
export declare const openReceiveCheckoutLabels: {
|
|
595
|
-
readonly copyInvoice: "Copy invoice";
|
|
596
|
-
readonly copied: "Copied!";
|
|
597
|
-
readonly openWallet: "Open Wallet";
|
|
598
|
-
readonly paymentStatus: {
|
|
599
|
-
readonly waitingTitle: "Waiting for payment";
|
|
600
|
-
readonly waitingDetail: "Keep this page open while we verify settlement.";
|
|
601
|
-
readonly settledTitle: "Payment received";
|
|
602
|
-
readonly settledDetail: "Backend settlement verified.";
|
|
603
|
-
readonly expiredTitle: "Invoice expired";
|
|
604
|
-
readonly expiredDetail: "Create a fresh invoice to keep going.";
|
|
605
|
-
};
|
|
606
|
-
readonly countdownPrefix: "Invoice expires in";
|
|
607
|
-
readonly startOver: "Start over";
|
|
608
|
-
readonly wizardTitle: "Pay this invoice";
|
|
609
|
-
readonly wizardSubtitle: "Choose how you want to pay.";
|
|
610
|
-
readonly paymentMethod: "Payment method";
|
|
611
|
-
readonly emptyBitcoin: "Choose Bitcoin Lightning.";
|
|
612
|
-
readonly emptyCrypto: "Choose an altcoin.";
|
|
613
|
-
readonly emptyFiat: "No providers found for this country yet.";
|
|
614
|
-
readonly recommended: "Recommended";
|
|
615
|
-
readonly openProvider: "How To Pay";
|
|
616
|
-
readonly tutorialTitlePrefix: "Pay a Lightning invoice with";
|
|
617
|
-
readonly tutorialIntroPrefix: "It's easy to make this payment using";
|
|
618
|
-
readonly tutorialIntroCopy: "The first step is to copy the invoice to your clipboard.";
|
|
619
|
-
readonly tutorialCopiedContinue: "Copied! Click next below to continue with tutorial.";
|
|
620
|
-
readonly tutorialExit: "Exit";
|
|
621
|
-
readonly lightningNetwork: "Lightning Network";
|
|
622
|
-
readonly chooseCountry: "Choose a country";
|
|
623
|
-
};
|
|
624
|
-
export declare const openReceiveCheckoutElementStyles = "\n :host {\n --or-bg: #ffffff;\n --or-bg-soft: #fafafa;\n --or-text: #171717;\n --or-muted: #525252;\n --or-border: #d4d4d4;\n --or-warm: #f97316;\n --or-good-bg: #e8f5ee;\n --or-good: #11613b;\n color: var(--or-text);\n display: block;\n font: 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n }\n\n :host([theme=\"dark\"]),\n [part=\"root\"][data-theme=\"dark\"] {\n --or-bg: #1c2230;\n --or-bg-soft: #121620;\n --or-text: #f7f8fb;\n --or-muted: #b7c0cf;\n --or-border: #333c4d;\n --or-warm: #ff9f1c;\n --or-good-bg: #173828;\n --or-good: #86efac;\n }\n\n [part=\"root\"] {\n background: var(--or-bg);\n border: 1px solid var(--or-border);\n border-radius: 8px;\n display: grid;\n gap: 12px;\n padding: 12px;\n }\n\n [part=\"qr\"] {\n aspect-ratio: 1;\n align-items: center;\n background: #ffffff;\n border: 1px solid var(--or-border);\n border-radius: 6px;\n display: flex;\n justify-content: center;\n justify-self: center;\n min-width: 0;\n overflow: hidden;\n width: min(100%, 420px);\n }\n\n [part=\"qr\"] svg {\n display: block;\n height: 100%;\n width: 100%;\n }\n\n [part=\"meta\"] {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n [part=\"state\"] {\n background: var(--or-good-bg);\n border-radius: 999px;\n color: var(--or-good);\n padding: 2px 8px;\n }\n\n [part=\"payment-hash\"] {\n color: var(--or-muted);\n font-size: 12px;\n }\n\n [part=\"invoice\"] {\n background: var(--or-bg-soft);\n border: 1px solid var(--or-border);\n border-radius: 6px;\n box-sizing: border-box;\n color: var(--or-text);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n min-height: 68px;\n overflow-wrap: anywhere;\n padding: 8px;\n resize: vertical;\n width: 100%;\n }\n\n [part=\"status\"] {\n align-items: center;\n background: var(--or-bg-soft);\n border: 1px solid var(--or-border);\n border-radius: 6px;\n display: flex;\n gap: 10px;\n padding: 8px;\n }\n\n [part=\"status\"] p {\n color: var(--or-muted);\n margin: 2px 0 0;\n }\n\n [part=\"spinner\"] {\n border: 3px solid var(--or-border);\n border-radius: 999px;\n border-top-color: var(--or-text);\n flex: 0 0 auto;\n height: 22px;\n width: 22px;\n animation: openreceive-spin 850ms linear infinite;\n }\n\n [part=\"countdown\"] {\n color: var(--or-muted);\n }\n\n [part=\"actions\"] {\n display: grid;\n gap: 8px;\n }\n\n [part=\"wizard\"] {\n border-top: 1px solid var(--or-border);\n display: grid;\n gap: 12px;\n padding-top: 12px;\n }\n\n [part=\"wizard\"] h2,\n [part=\"wizard\"] h3,\n [part=\"wizard\"] h4,\n [part=\"wizard\"] p {\n margin: 0;\n }\n\n [part=\"wizard\"] p,\n [part=\"wizard\"] small {\n color: var(--or-muted);\n }\n\n\t [part=\"method-grid\"],\n\t [part=\"route-picker\"],\n\t [part=\"country-grid\"],\n\t [part=\"provider-grid\"],\n\t [part=\"provider-actions\"] {\n display: grid;\n gap: 8px;\n }\n\n [part=\"method-grid\"],\n [part=\"route-picker\"],\n [part=\"country-grid\"],\n [part=\"provider-grid\"],\n [part=\"provider-actions\"] {\n grid-template-columns: 1fr 1fr;\n }\n\n\t [part=\"method\"],\n\t [part=\"route\"],\n\t [part=\"country\"],\n [part=\"provider\"] {\n background: var(--or-bg);\n border: 1px solid var(--or-border);\n border-radius: 6px;\n box-sizing: border-box;\n color: var(--or-text);\n }\n\n [part=\"method\"],\n [part=\"route\"],\n [part=\"country\"],\n [part=\"provider\"] {\n display: grid;\n gap: 4px;\n min-height: 64px;\n padding: 8px;\n text-align: left;\n }\n\n [part=\"method\"] img,\n [part=\"route\"] img {\n height: 28px;\n width: 28px;\n }\n\n [part~=\"selected\"] {\n border-color: var(--or-text);\n box-shadow: 0 0 0 1px var(--or-text);\n }\n\n [part=\"country-summary\"] {\n align-items: center;\n border: 1px solid var(--or-border);\n border-radius: 6px;\n display: flex;\n gap: 8px;\n justify-content: space-between;\n padding: 8px;\n }\n\n\t [part=\"wizard-results\"] {\n\t display: grid;\n\t gap: 12px;\n\t }\n\n [part=\"wizard-breadcrumbs\"] {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n [part=\"wizard-breadcrumb\"] {\n background: transparent;\n border: 0;\n color: var(--or-muted);\n gap: 6px;\n min-height: 32px;\n padding: 0;\n }\n\n [part=\"wizard-breadcrumb\"]:hover {\n color: var(--or-text);\n }\n\n [part=\"wizard-breadcrumb-current\"] {\n color: var(--or-text);\n font-weight: 700;\n }\n\n [part=\"wizard-breadcrumb-separator\"] {\n color: var(--or-muted);\n }\n\n [part=\"wizard-route\"] {\n display: grid;\n gap: 18px;\n }\n\n [part=\"wizard-route\"] h3 {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n [part=\"country-select\"] {\n align-items: center;\n display: inline-flex;\n font-size: 0.78em;\n gap: 6px;\n }\n\n [part=\"country-select\"] span {\n clip: rect(0 0 0 0);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n [part=\"country-select\"] select {\n background: var(--or-bg);\n border: 1px solid var(--or-border);\n border-radius: 6px;\n color: var(--or-text);\n font: inherit;\n min-height: 34px;\n padding: 0 8px;\n }\n\n\t [part=\"provider\"] {\n\t align-items: center;\n\t column-gap: 10px;\n\t display: grid;\n\t grid-template-columns: minmax(0, 1fr) auto auto;\n\t min-height: 0;\n\t row-gap: 4px;\n\t }\n\n [part=\"provider-badges\"] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n [part=\"provider-heading\"] {\n align-items: center;\n display: flex;\n gap: 8px;\n grid-column: 1;\n justify-content: start;\n min-width: 0;\n }\n\n [part=\"provider-heading\"] img {\n border-radius: 6px;\n flex: 0 0 auto;\n height: 28px;\n width: 28px;\n }\n\n [part=\"provider-heading\"] h4 {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n [part=\"provider-kind\"] {\n grid-column: 1;\n color: var(--or-muted);\n font-size: 0.9em;\n line-height: 1.3;\n margin: -2px 0 0;\n }\n\n [part=\"provider-badges\"] span,\n [part=\"recommended\"] {\n background: var(--or-bg-soft);\n border-radius: 999px;\n color: var(--or-muted);\n font-size: 12px;\n grid-column: 2;\n justify-self: end;\n padding: 2px 7px;\n white-space: nowrap;\n }\n\n button,\n a[part=\"open\"],\n button[part=\"provider-open\"] {\n align-items: center;\n border: 1px solid var(--or-text);\n border-radius: 6px;\n box-sizing: border-box;\n color: var(--or-text);\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n justify-content: center;\n min-height: 40px;\n padding: 8px 10px;\n text-decoration: none;\n }\n\n button {\n background: var(--or-bg);\n }\n\n a[part=\"open\"],\n button[part=\"provider-open\"] {\n background: var(--or-text);\n color: var(--or-bg);\n }\n\n [part=\"provider-actions\"] {\n align-self: center;\n display: flex;\n grid-column: 3;\n grid-row: 1 / span 2;\n justify-self: end;\n }\n\n button[part=\"provider-open\"],\n [part=\"provider-actions\"] a {\n background: var(--or-bg-soft);\n color: var(--or-text);\n min-height: 36px;\n padding: 7px 12px;\n white-space: nowrap;\n }\n\n [part=\"tutorial\"] {\n align-items: center;\n background: rgb(0 0 0 / 0.6);\n display: flex;\n inset: 0;\n justify-content: center;\n padding: 16px;\n position: fixed;\n z-index: 10;\n }\n\n [part=\"tutorial\"][hidden] {\n display: none;\n }\n\n [part=\"tutorial-dialog\"] {\n background: var(--or-bg);\n border: 1px solid var(--or-border);\n border-radius: 8px;\n box-shadow: 0 20px 70px rgb(0 0 0 / 0.32);\n box-sizing: border-box;\n display: grid;\n gap: 12px;\n max-height: min(92vh, 900px);\n max-width: min(440px, 100%);\n min-width: 0;\n overflow: hidden;\n padding: 12px;\n width: 100%;\n }\n\n [part=\"tutorial-header\"],\n [part=\"tutorial-controls\"] {\n align-items: center;\n display: flex;\n gap: 8px;\n justify-content: space-between;\n }\n\n [part=\"tutorial-header\"] h3 {\n font-size: 16px;\n line-height: 1.25;\n min-width: 0;\n }\n\n [part=\"tutorial-title\"] {\n align-items: center;\n display: flex;\n gap: 10px;\n min-width: 0;\n }\n\n [part=\"tutorial-header-logo\"] {\n border-radius: 8px;\n flex: 0 0 auto;\n height: 36px;\n width: 36px;\n }\n\n [part=\"tutorial-close\"] {\n background: var(--or-bg-soft);\n border-color: var(--or-border);\n color: var(--or-text);\n flex: 0 0 auto;\n font-size: 16px;\n font-weight: 700;\n height: 36px;\n min-height: 36px;\n padding: 0;\n width: 36px;\n }\n\n [part=\"tutorial-frame\"] {\n align-items: center;\n background: var(--or-bg-soft);\n border: 1px solid var(--or-border);\n border-radius: 8px;\n display: flex;\n justify-content: center;\n min-height: 0;\n overflow: hidden;\n }\n\n [part=\"tutorial-image\"] {\n display: block;\n height: auto;\n max-height: min(66vh, 720px);\n max-width: 100%;\n object-fit: contain;\n width: auto;\n }\n\n [part=\"tutorial-caption\"] {\n color: var(--or-text);\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n }\n\n [part=\"tutorial-intro\"] {\n display: grid;\n gap: 12px;\n padding: 16px 8px;\n text-align: center;\n }\n\n [part=\"tutorial-provider-logo\"] {\n border-radius: 8px;\n height: 52px;\n justify-self: center;\n width: 52px;\n }\n\n [part=\"tutorial-intro\"] p {\n color: var(--or-text);\n font-size: 15px;\n }\n\n [part=\"tutorial-copy\"] {\n background: var(--or-warm);\n border-color: var(--or-warm);\n color: #111827;\n justify-self: center;\n min-width: min(240px, 100%);\n }\n\n [part=\"tutorial-copy-message\"] {\n color: var(--or-good);\n font-weight: 700;\n }\n\n [part=\"tutorial-progress\"] {\n color: var(--or-muted);\n font-size: 12px;\n text-align: center;\n }\n\n [part=\"tutorial-steps\"] {\n display: flex;\n gap: 6px;\n justify-content: center;\n }\n\n [part=\"tutorial-step\"],\n [part=\"tutorial-step-active\"] {\n background: var(--or-border);\n border-radius: 999px;\n height: 7px;\n width: 7px;\n }\n\n [part=\"tutorial-step-active\"] {\n background: var(--or-text);\n }\n\n [part=\"tutorial-nav\"] {\n flex: 1 1 0;\n }\n\n [part=\"tutorial-controls\"] [part=\"tutorial-nav\"]:last-child:not(:disabled) {\n background: var(--or-warm);\n border-color: var(--or-warm);\n color: #111827;\n }\n\n [part=\"tutorial-nav\"]:disabled {\n background: var(--or-bg-soft);\n border-color: var(--or-border);\n color: var(--or-muted);\n cursor: not-allowed;\n }\n\n\t @media (max-width: 420px) {\n\t [part=\"method-grid\"],\n\t [part=\"route-picker\"],\n\t [part=\"country-grid\"],\n [part=\"provider-grid\"],\n [part=\"provider-actions\"] {\n grid-template-columns: 1fr;\n }\n\n [part=\"tutorial\"] {\n align-items: stretch;\n padding: 8px;\n }\n\n [part=\"tutorial-dialog\"] {\n max-height: calc(100vh - 16px);\n }\n\n [part=\"tutorial-controls\"] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n }\n }\n\n @keyframes openreceive-spin {\n to {\n transform: rotate(360deg);\n }\n }\n";
|
|
625
|
-
export declare const openReceiveThemeToggleElementStyles = "\n :host {\n display: inline-block;\n }\n\n\t button {\n\t align-items: center;\n\t background: var(--or-theme-toggle-bg, transparent);\n\t border: var(--or-theme-toggle-border, 1px solid currentColor);\n\t border-radius: var(--or-theme-toggle-radius, 999px);\n\t color: inherit;\n\t cursor: pointer;\n\t display: inline-flex;\n\t gap: 8px;\n\t font: inherit;\n\t min-height: var(--or-theme-toggle-min-height, 34px);\n\t padding: var(--or-theme-toggle-padding, 4px 12px 4px 4px);\n\t }\n\n\t .or-theme-toggle-track {\n\t align-items: center;\n\t background: transparent;\n\t border: 0;\n\t border-radius: 999px;\n\t display: grid;\n\t flex: 0 0 auto;\n\t grid-template-columns: 1fr;\n\t height: 24px;\n\t padding: 0;\n\t width: 24px;\n\t }\n\n\t .or-theme-toggle-icon {\n\t border-radius: 999px;\n\t display: block;\n\t grid-area: 1 / 1;\n\t height: 24px;\n\t position: relative;\n\t transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;\n\t width: 24px;\n\t }\n\n\t .or-theme-toggle-icon-light {\n\t opacity: 1;\n\t }\n\n\t .or-theme-toggle-dark .or-theme-toggle-icon-light {\n\t background: #94a3b8;\n\t box-shadow: none;\n\t opacity: 0.72;\n\t }\n\n\t .or-theme-toggle-label {\n\t font-size: 14px;\n\t font-weight: 700;\n\t line-height: 1;\n\t white-space: nowrap;\n\t }\n\n .or-theme-toggle-icon-light {\n background: #facc15;\n box-shadow: 0 0 0 2px rgb(250 204 21 / 0.2);\n }\n\n .or-theme-toggle-icon-light::before,\n .or-theme-toggle-icon-light::after {\n content: \"\";\n position: absolute;\n }\n\n .or-theme-toggle-icon-light::before {\n border: 2px solid rgb(255 255 255 / 0.72);\n border-radius: 999px;\n inset: 5px;\n }\n\n .or-theme-toggle-icon-light::after {\n background:\n radial-gradient(circle, transparent 50%, #facc15 52%),\n conic-gradient(\n from 0deg,\n transparent 0 8deg,\n rgb(255 255 255 / 0.75) 8deg 14deg,\n transparent 14deg 45deg,\n rgb(255 255 255 / 0.75) 45deg 51deg,\n transparent 51deg 82deg,\n rgb(255 255 255 / 0.75) 82deg 88deg,\n transparent 88deg 127deg,\n rgb(255 255 255 / 0.75) 127deg 133deg,\n transparent 133deg 172deg,\n rgb(255 255 255 / 0.75) 172deg 178deg,\n transparent 178deg 217deg,\n rgb(255 255 255 / 0.75) 217deg 223deg,\n transparent 223deg 262deg,\n rgb(255 255 255 / 0.75) 262deg 268deg,\n transparent 268deg 307deg,\n rgb(255 255 255 / 0.75) 307deg 313deg,\n transparent 313deg 360deg\n );\n border-radius: 999px;\n inset: 3px;\n }\n\n";
|
|
626
|
-
export declare const openReceivePaymentMethods: readonly OpenReceivePaymentMethodOption[];
|
|
627
|
-
export declare const openReceiveRegionLabels: Readonly<Record<OpenReceiveRegionId, string>>;
|
|
628
|
-
export declare const openReceiveRegionOrder: readonly OpenReceiveRegionId[];
|
|
629
|
-
export declare function parseOpenReceiveOptionalInteger(value: string | null | undefined, options?: ParseOpenReceiveOptionalIntegerOptions): number | undefined;
|
|
630
|
-
export declare function parseOpenReceiveBooleanAttribute(value: string | null | undefined): boolean | undefined;
|
|
631
|
-
export declare function parseOpenReceiveResolvedTheme(value: string | null | undefined): OpenReceiveResolvedTheme | undefined;
|
|
632
|
-
export declare function parseOpenReceiveThemePreference(value: string | null | undefined): OpenReceiveThemePreference | undefined;
|
|
633
|
-
export declare function parseOpenReceivePaymentMethod(value: string | null): OpenReceivePaymentMethod | null;
|
|
634
|
-
export declare function parseOpenReceiveRegion(value: string | null): OpenReceiveRegionId | null;
|
|
635
|
-
export declare const openReceiveCountryMapRegions: readonly [{
|
|
636
|
-
readonly id: "north-america";
|
|
637
|
-
readonly cx: 180;
|
|
638
|
-
readonly cy: 125;
|
|
639
|
-
readonly rx: 150;
|
|
640
|
-
readonly ry: 78;
|
|
641
|
-
}, {
|
|
642
|
-
readonly id: "latin-america";
|
|
643
|
-
readonly cx: 265;
|
|
644
|
-
readonly cy: 260;
|
|
645
|
-
readonly rx: 82;
|
|
646
|
-
readonly ry: 130;
|
|
647
|
-
}, {
|
|
648
|
-
readonly id: "europe";
|
|
649
|
-
readonly cx: 425;
|
|
650
|
-
readonly cy: 145;
|
|
651
|
-
readonly rx: 105;
|
|
652
|
-
readonly ry: 64;
|
|
653
|
-
}, {
|
|
654
|
-
readonly id: "africa";
|
|
655
|
-
readonly cx: 455;
|
|
656
|
-
readonly cy: 255;
|
|
657
|
-
readonly rx: 76;
|
|
658
|
-
readonly ry: 102;
|
|
659
|
-
}, {
|
|
660
|
-
readonly id: "middle-east";
|
|
661
|
-
readonly cx: 535;
|
|
662
|
-
readonly cy: 213;
|
|
663
|
-
readonly rx: 78;
|
|
664
|
-
readonly ry: 58;
|
|
665
|
-
}, {
|
|
666
|
-
readonly id: "asia-pacific";
|
|
667
|
-
readonly cx: 655;
|
|
668
|
-
readonly cy: 215;
|
|
669
|
-
readonly rx: 165;
|
|
670
|
-
readonly ry: 120;
|
|
671
|
-
}];
|
|
672
|
-
export declare const openReceiveCountryPins: Readonly<Record<string, OpenReceiveCountryMapPin>>;
|
|
673
|
-
export declare function getOpenReceiveDefaultCountryCode(): string;
|
|
674
|
-
export declare function getOpenReceiveBitcoinAssets(): readonly AssetIndexEntry[];
|
|
675
|
-
export declare function getOpenReceiveAltcoinAssets(): readonly AssetIndexEntry[];
|
|
676
|
-
export declare function getOpenReceiveRegionForCountry(countryCode: string): OpenReceiveRegionId;
|
|
677
|
-
export declare function getOpenReceiveCoverageLabel(coverage: Country["coverage"]): string;
|
|
678
|
-
export declare function formatOpenReceiveCountryMetaLabel(country: Country): string;
|
|
679
|
-
export declare function createOpenReceiveCountryDisplay(country: Country, options?: {
|
|
680
|
-
readonly selectedCountryCode?: string;
|
|
681
|
-
}): OpenReceiveCountryDisplay;
|
|
682
|
-
export declare function getOpenReceivePaymentStatusText(phase: CheckoutPhase): {
|
|
683
|
-
readonly title: string;
|
|
684
|
-
readonly detail: string;
|
|
685
|
-
};
|
|
686
|
-
export declare function getOpenReceiveWizardEmptyMessage(method: OpenReceivePaymentMethod | null): string;
|
|
687
|
-
export declare function getCheckoutProviderUsBadge(us: boolean | null): string | null;
|
|
688
|
-
export declare function getCheckoutProviderOpenLabel(providerName: string): string;
|
|
689
|
-
export declare function getCheckoutProviderIcon(provider: Pick<Provider, "icon_path">): string;
|
|
690
|
-
export declare function getCheckoutProviderTutorials(provider: Pick<Provider, "tutorials">): readonly OpenReceiveWizardProviderTutorialDisplay[];
|
|
691
|
-
export declare function getOpenReceiveRouteNetworkLabel(routeId: string): string;
|
|
692
|
-
export declare function createOpenReceiveWizardRouteAssetDisplays(assets: readonly AssetIndexEntry[], options?: {
|
|
693
|
-
readonly selectedRoute?: string | null;
|
|
694
|
-
}): readonly OpenReceiveWizardRouteAssetDisplay[];
|
|
695
|
-
export declare function createOpenReceiveWizardRouteDisplays(routes: readonly PaymentWizardRoute[], options?: {
|
|
696
|
-
readonly providerPreviewLimit?: number;
|
|
697
|
-
}): readonly OpenReceiveWizardRouteDisplay[];
|
|
698
|
-
export declare function getOpenReceivePaymentMethodIcon(method: OpenReceivePaymentMethod): string;
|
|
699
|
-
export declare function getOpenReceiveAssetIcon(symbol: string): string;
|
|
700
|
-
export declare function getOpenReceiveRouteIcon(asset: Pick<AssetIndexEntry, "route" | "symbol">): string;
|
|
701
|
-
export declare function getOpenReceiveCountriesForRail(rail: FiatRailId): readonly Country[];
|
|
702
|
-
export declare function projectOpenReceiveCountryMapPoint(coordinates: readonly [number, number], options?: {
|
|
703
|
-
readonly width?: number;
|
|
704
|
-
readonly height?: number;
|
|
705
|
-
}): readonly [number, number];
|
|
706
|
-
export declare function createOpenReceiveCountryPickerModel(request: OpenReceiveCountryPickerModelRequest): OpenReceiveCountryPickerModel;
|
|
707
|
-
export declare function createOpenReceivePaymentWizardState(request: OpenReceivePaymentWizardRequest): OpenReceivePaymentWizardState;
|
|
708
|
-
export declare function createOpenReceivePaymentWizardSelection(options?: {
|
|
709
|
-
readonly storedCountryCode?: string | null;
|
|
710
|
-
readonly defaultCountryCode?: string;
|
|
711
|
-
}): OpenReceivePaymentWizardSelection;
|
|
712
|
-
export declare function createOpenReceivePaymentWizardModel(selection: OpenReceivePaymentWizardSelection): OpenReceivePaymentWizardModel;
|
|
713
|
-
export declare function updateOpenReceivePaymentWizardSelection(selection: OpenReceivePaymentWizardSelection, action: OpenReceivePaymentWizardSelectionAction): OpenReceivePaymentWizardSelection;
|
|
714
|
-
export declare class OpenReceiveBrowserPaymentWizardController implements OpenReceivePaymentWizardController {
|
|
715
|
-
private readonly options;
|
|
716
|
-
private selection;
|
|
717
|
-
constructor(options?: OpenReceivePaymentWizardControllerOptions);
|
|
718
|
-
getSelection(): OpenReceivePaymentWizardSelection;
|
|
719
|
-
getModel(): OpenReceivePaymentWizardModel;
|
|
720
|
-
update(action: OpenReceivePaymentWizardSelectionAction): OpenReceivePaymentWizardSelection;
|
|
721
|
-
selectMethod(method: OpenReceivePaymentMethod): OpenReceivePaymentWizardSelection;
|
|
722
|
-
changeMethod(): OpenReceivePaymentWizardSelection;
|
|
723
|
-
selectRegion(region: OpenReceiveRegionId): OpenReceivePaymentWizardSelection;
|
|
724
|
-
selectCountry(countryCode: string): OpenReceivePaymentWizardSelection;
|
|
725
|
-
openCountryPicker(): OpenReceivePaymentWizardSelection;
|
|
726
|
-
selectRoute(route: string): OpenReceivePaymentWizardSelection;
|
|
727
|
-
}
|
|
728
|
-
export declare function createOpenReceivePaymentWizardController(options?: OpenReceivePaymentWizardControllerOptions): OpenReceivePaymentWizardController;
|
|
729
|
-
export declare function readOpenReceiveStoredCountryCode(options?: {
|
|
730
|
-
readonly storage?: Storage;
|
|
731
|
-
readonly storageKey?: string;
|
|
732
|
-
readonly legacyStorageKey?: string;
|
|
733
|
-
}): string | null;
|
|
734
|
-
export declare function writeOpenReceiveStoredCountryCode(countryCode: string, options?: {
|
|
735
|
-
readonly storage?: Storage;
|
|
736
|
-
readonly storageKey?: string;
|
|
737
|
-
}): void;
|
|
738
|
-
export declare function readOpenReceiveThemePreference(options?: OpenReceiveReadThemePreferenceOptions): OpenReceiveThemePreference;
|
|
739
|
-
export declare function writeOpenReceiveThemePreference(theme: OpenReceiveThemePreference, options?: OpenReceiveThemeStorageOptions): void;
|
|
740
|
-
export declare function resolveOpenReceiveTheme(theme: OpenReceiveThemePreference, options?: {
|
|
741
|
-
readonly systemDark?: boolean;
|
|
742
|
-
}): OpenReceiveResolvedTheme;
|
|
743
|
-
export declare function getOpenReceiveNextThemePreference(theme: OpenReceiveThemePreference, options?: OpenReceiveThemeModelOptions): OpenReceiveThemePreference;
|
|
744
|
-
export declare function getOpenReceiveThemeToggleLabel(resolvedTheme: OpenReceiveResolvedTheme): string;
|
|
745
|
-
export declare function createOpenReceiveThemeModel(theme: OpenReceiveThemePreference, options?: OpenReceiveThemeModelOptions): OpenReceiveThemeModel;
|
|
746
|
-
export declare function createOpenReceiveStoredThemeModel(options?: OpenReceiveStoredThemeModelOptions): OpenReceiveThemeModel;
|
|
747
|
-
export declare function toggleOpenReceiveStoredThemePreference(options?: OpenReceiveStoredThemeModelOptions): OpenReceiveThemeModel;
|
|
748
|
-
export declare function applyOpenReceiveThemeAttributes(target: OpenReceiveThemeAttributeTarget | null | undefined, theme: OpenReceiveThemeModel): void;
|
|
749
|
-
export declare function applyCheckoutThemeAttributes(target: OpenReceiveThemeAttributeTarget | null | undefined, theme: OpenReceiveThemeModel): void;
|
|
750
|
-
export declare function applyOpenReceiveThemeControls(targets: OpenReceiveThemeControlTargets, theme: OpenReceiveThemeModel): void;
|
|
751
|
-
export declare function syncOpenReceiveStoredThemeControls(targets: OpenReceiveThemeControlTargets, options?: OpenReceiveStoredThemeModelOptions): OpenReceiveThemeModel;
|
|
752
|
-
export declare function toggleOpenReceiveStoredThemeControls(targets: OpenReceiveThemeControlTargets, options?: OpenReceiveStoredThemeModelOptions): OpenReceiveThemeModel;
|
|
753
|
-
export declare function createOpenReceiveTransientFeedbackController<T>(options: OpenReceiveTransientFeedbackOptions<T>): OpenReceiveTransientFeedbackController<T>;
|
|
754
|
-
export declare function formatOpenReceiveCountdown(seconds: number): string;
|
|
755
|
-
export declare function escapeOpenReceiveHtml(value: string): string;
|
|
756
|
-
export declare function formatOpenReceiveMsats(amountMsats: number): string;
|
|
757
|
-
export declare function formatOpenReceiveFiatAmount(fiat: {
|
|
758
|
-
readonly currency?: string;
|
|
759
|
-
readonly value?: string;
|
|
760
|
-
} | null | undefined): string | undefined;
|
|
761
|
-
export declare function formatOpenReceivePaymentHashLabel(hash: string): string;
|
|
762
|
-
export declare function assertOpenReceiveDisplayInvoice(invoice: string): void;
|
|
763
|
-
export declare function createCheckoutDisplayModel(data: CheckoutDisplayData): CheckoutDisplayModel;
|
|
764
|
-
export declare function createLightningUri(invoice: string): string;
|
|
765
|
-
export declare function createCheckoutElementAttributes(snapshot: CheckoutSnapshot, options?: CheckoutElementAttributeOptions): CheckoutElementAttributes;
|
|
766
|
-
export declare function createOpenReceiveThemeToggleElementAttributes(options?: OpenReceiveThemeToggleElementAttributeOptions): OpenReceiveThemeToggleElementAttributes;
|
|
767
|
-
export declare function createCheckoutElementListeners(handlers?: CheckoutElementEventHandlers): CheckoutElementListeners;
|
|
768
|
-
export declare function createCheckoutShellModel(snapshot: CheckoutSnapshot, options?: CheckoutShellOptions): CheckoutShellModel;
|
|
769
|
-
export declare function applyCheckoutElementAttributes(target: OpenReceiveThemeAttributeTarget, attributes: CheckoutElementAttributes): void;
|
|
770
|
-
export declare function applyCheckoutElementListeners(target: Pick<CheckoutElementTarget, "addEventListener">, listeners: CheckoutElementListeners): void;
|
|
771
|
-
export declare function applyOpenReceiveThemeToggleElementAttributes(target: OpenReceiveThemeAttributeTarget, attributes: OpenReceiveThemeToggleElementAttributes): void;
|
|
772
|
-
export declare function createCheckoutElement(snapshot: CheckoutSnapshot, options?: CreateCheckoutElementOptions): HTMLElement;
|
|
773
|
-
export declare function createOpenReceiveThemeToggleElement(options?: CreateOpenReceiveThemeToggleElementOptions): HTMLElement;
|
|
774
|
-
export declare function createCheckoutShell(snapshot: CheckoutSnapshot, options?: CreateCheckoutShellOptions): CheckoutShellElements;
|
|
775
|
-
export declare function createInvoice(options: CreateOpenReceiveInvoiceOptions): Promise<CheckoutSnapshot>;
|
|
776
|
-
export declare function createOpenReceiveLookupInvoiceFetcher(options: CreateOpenReceiveLookupInvoiceFetcherOptions): CheckoutLookup;
|
|
777
|
-
export declare function createOpenReceiveRefreshInvoiceFetcher(options: CreateOpenReceiveRefreshInvoiceFetcherOptions): CheckoutRefresh;
|
|
778
|
-
export declare function createCheckoutState(snapshot: CheckoutSnapshot, options?: CreateCheckoutStateOptions): CheckoutState;
|
|
779
|
-
export declare function createCheckoutSnapshotFromDisplayData(data: CheckoutDisplayData): CheckoutSnapshot;
|
|
780
|
-
export declare function createCheckoutStateFromDisplayData(data: CheckoutDisplayData, options?: CreateCheckoutStateOptions): CheckoutState;
|
|
781
|
-
export declare function refreshCheckoutState(state: CheckoutState, options?: CreateCheckoutStateOptions): CheckoutState;
|
|
782
|
-
export declare function mergeCheckoutSnapshot(current: CheckoutState, next: Partial<CheckoutSnapshot>): CheckoutSnapshot;
|
|
783
|
-
export declare function shouldCheckoutShowWaiting(state: CheckoutState, options?: {
|
|
784
|
-
readonly now?: number;
|
|
785
|
-
}): boolean;
|
|
786
|
-
export declare function createCheckoutStatusModel(source?: CheckoutState | CheckoutStatusModelInput, options?: {
|
|
787
|
-
readonly now?: number;
|
|
788
|
-
}): CheckoutStatusModel;
|
|
789
|
-
export declare class CheckoutWatcher {
|
|
790
|
-
private options;
|
|
791
|
-
private state;
|
|
792
|
-
private countdownTimer;
|
|
793
|
-
private pollTimer;
|
|
794
|
-
private running;
|
|
795
|
-
constructor(options: CheckoutWatcherOptions);
|
|
796
|
-
start(): CheckoutState;
|
|
797
|
-
update(options: CheckoutWatcherOptions): CheckoutState;
|
|
798
|
-
stop(): void;
|
|
799
|
-
getState(): CheckoutState | undefined;
|
|
800
|
-
reloadState(): Promise<CheckoutState>;
|
|
801
|
-
private applyState;
|
|
802
|
-
private syncWatchers;
|
|
803
|
-
private poll;
|
|
804
|
-
private stopCountdown;
|
|
805
|
-
private stopPolling;
|
|
806
|
-
private now;
|
|
807
|
-
private setInterval;
|
|
808
|
-
private clearInterval;
|
|
809
|
-
}
|
|
810
|
-
export declare class OpenReceiveBrowserCheckoutController implements CheckoutController {
|
|
811
|
-
private options;
|
|
812
|
-
private watcher;
|
|
813
|
-
private state;
|
|
814
|
-
constructor(options: CheckoutControllerOptions);
|
|
815
|
-
start(): CheckoutState;
|
|
816
|
-
update(options: CheckoutControllerOptions): CheckoutState;
|
|
817
|
-
stop(): void;
|
|
818
|
-
getState(): CheckoutState | undefined;
|
|
819
|
-
copyInvoice(): Promise<void>;
|
|
820
|
-
openWallet(): string;
|
|
821
|
-
reloadState(): Promise<CheckoutState>;
|
|
822
|
-
retry(): Promise<CheckoutState>;
|
|
823
|
-
refreshExpiredInvoice(): Promise<CheckoutState>;
|
|
824
|
-
cancel(): CheckoutState;
|
|
825
|
-
private createWatcher;
|
|
826
|
-
private createRefreshInvoice;
|
|
827
|
-
private currentState;
|
|
828
|
-
}
|
|
829
|
-
export declare function createCheckoutController(options: CheckoutControllerOptions): CheckoutController;
|
|
830
|
-
export declare function createQrSvg(invoice: string, options?: OpenReceiveQrOptions): Promise<string>;
|
|
831
|
-
export declare function createQrPngDataUrl(invoice: string, options?: OpenReceiveQrOptions): Promise<string>;
|
|
832
|
-
export declare const createQrPng: typeof createQrPngDataUrl;
|
|
833
|
-
export declare function copyInvoice(options: CopyInvoiceOptions): Promise<void>;
|
|
834
|
-
export declare function openWallet(options: OpenWalletOptions): string;
|