@ic-pay/icpay-widget 1.1.1 → 1.1.5
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/amount-input-B399OwiA.d.ts +630 -0
- package/dist/chunk-PK6L5TPW.js +1028 -0
- package/dist/chunk-PK6L5TPW.js.map +1 -0
- package/dist/index.d.ts +4 -627
- package/dist/index.js +1 -1038
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +2 -0
- package/dist/react/index.js.map +1 -0
- package/package.json +9 -3
- package/dist/index.global.js +0 -6073
- package/dist/index.global.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { T as ThemeConfig, C as CommonConfig } from './amount-input-B399OwiA.js';
|
|
2
|
+
export { g as AmountInputConfig, A as ArticlePaywallConfig, e as CoffeeShopConfig, b as CryptoOption, D as DonationThermometerConfig, m as ICPayAmountInput, i as ICPayArticlePaywall, j as ICPayCoffeeShop, k as ICPayDonationThermometer, l as ICPayPayButton, I as ICPayPremiumContent, h as ICPayTipJar, O as OnrampConfig, f as PayButtonConfig, P as PlugNPlayConfig, c as PremiumContentConfig, a as ProgressBarConfig, d as TipJarConfig } from './amount-input-B399OwiA.js';
|
|
1
3
|
import * as lit from 'lit';
|
|
2
|
-
import {
|
|
4
|
+
import { TemplateResult } from 'lit';
|
|
3
5
|
import { Icpay, PriceCalculationResult } from '@ic-pay/icpay-sdk';
|
|
4
6
|
|
|
5
7
|
declare global {
|
|
@@ -18,160 +20,6 @@ declare global {
|
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
type ThemeConfig = {
|
|
22
|
-
primaryColor?: string;
|
|
23
|
-
secondaryColor?: string;
|
|
24
|
-
accentColor?: string;
|
|
25
|
-
textColor?: string;
|
|
26
|
-
mutedTextColor?: string;
|
|
27
|
-
surfaceColor?: string;
|
|
28
|
-
surfaceAltColor?: string;
|
|
29
|
-
borderColor?: string;
|
|
30
|
-
fontFamily?: string;
|
|
31
|
-
};
|
|
32
|
-
type PlugNPlayConfig = {
|
|
33
|
-
enabled?: boolean;
|
|
34
|
-
providers?: {
|
|
35
|
-
internetIdentity?: boolean;
|
|
36
|
-
oisy?: boolean;
|
|
37
|
-
plug?: boolean;
|
|
38
|
-
};
|
|
39
|
-
theme?: {
|
|
40
|
-
modalBackground?: string;
|
|
41
|
-
modalBorderRadius?: string;
|
|
42
|
-
buttonBackground?: string;
|
|
43
|
-
buttonHoverBackground?: string;
|
|
44
|
-
textColor?: string;
|
|
45
|
-
primaryColor?: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
type ProgressBarConfig = {
|
|
49
|
-
enabled?: boolean;
|
|
50
|
-
mode?: 'modal' | 'horizontal' | 'vertical' | 'inline';
|
|
51
|
-
};
|
|
52
|
-
type CommonConfig = {
|
|
53
|
-
publishableKey: string;
|
|
54
|
-
apiUrl?: string;
|
|
55
|
-
icHost?: string;
|
|
56
|
-
actorProvider?: (canisterId: string, idl: any) => any;
|
|
57
|
-
connectedWallet?: any;
|
|
58
|
-
useOwnWallet?: boolean;
|
|
59
|
-
plugNPlay?: PlugNPlayConfig;
|
|
60
|
-
theme?: ThemeConfig;
|
|
61
|
-
debug?: boolean;
|
|
62
|
-
progressBar?: ProgressBarConfig;
|
|
63
|
-
disablePaymentButton?: boolean;
|
|
64
|
-
disableAfterSuccess?: boolean;
|
|
65
|
-
showLedgerDropdown?: 'buttons' | 'dropdown' | 'none';
|
|
66
|
-
onramp?: OnrampConfig;
|
|
67
|
-
};
|
|
68
|
-
type CryptoOption = {
|
|
69
|
-
symbol: string;
|
|
70
|
-
label: string;
|
|
71
|
-
canisterId?: string;
|
|
72
|
-
};
|
|
73
|
-
type PremiumContentConfig = CommonConfig & {
|
|
74
|
-
priceUsd: number;
|
|
75
|
-
cryptoOptions?: CryptoOption[];
|
|
76
|
-
imageUrl?: string;
|
|
77
|
-
buttonLabel?: string;
|
|
78
|
-
defaultSymbol?: string;
|
|
79
|
-
onSuccess?: (tx: {
|
|
80
|
-
id: number;
|
|
81
|
-
status: string;
|
|
82
|
-
}) => void;
|
|
83
|
-
};
|
|
84
|
-
type TipJarConfig = CommonConfig & {
|
|
85
|
-
amountsUsd?: number[];
|
|
86
|
-
defaultAmountUsd?: number;
|
|
87
|
-
cryptoOptions?: CryptoOption[];
|
|
88
|
-
defaultSymbol?: string;
|
|
89
|
-
showLedgerDropdown?: boolean;
|
|
90
|
-
buttonLabel?: string;
|
|
91
|
-
onSuccess?: (tx: {
|
|
92
|
-
id: number;
|
|
93
|
-
status: string;
|
|
94
|
-
total?: number;
|
|
95
|
-
}) => void;
|
|
96
|
-
};
|
|
97
|
-
type ArticlePaywallConfig = CommonConfig & {
|
|
98
|
-
priceUsd: number;
|
|
99
|
-
cryptoOptions?: CryptoOption[];
|
|
100
|
-
title?: string;
|
|
101
|
-
preview?: string;
|
|
102
|
-
lockedContent?: string;
|
|
103
|
-
buttonLabel?: string;
|
|
104
|
-
defaultSymbol?: string;
|
|
105
|
-
onSuccess?: (tx: {
|
|
106
|
-
id: number;
|
|
107
|
-
status: string;
|
|
108
|
-
}) => void;
|
|
109
|
-
};
|
|
110
|
-
type CoffeeShopConfig = CommonConfig & {
|
|
111
|
-
items: Array<{
|
|
112
|
-
name: string;
|
|
113
|
-
priceUsd: number;
|
|
114
|
-
}>;
|
|
115
|
-
defaultItemIndex?: number;
|
|
116
|
-
cryptoOptions?: CryptoOption[];
|
|
117
|
-
buttonLabel?: string;
|
|
118
|
-
defaultSymbol?: string;
|
|
119
|
-
onSuccess?: (tx: {
|
|
120
|
-
id: number;
|
|
121
|
-
status: string;
|
|
122
|
-
item: string;
|
|
123
|
-
}) => void;
|
|
124
|
-
};
|
|
125
|
-
type DonationThermometerConfig = CommonConfig & {
|
|
126
|
-
goalUsd: number;
|
|
127
|
-
defaultAmountUsd?: number;
|
|
128
|
-
amountsUsd?: number[];
|
|
129
|
-
cryptoOptions?: CryptoOption[];
|
|
130
|
-
buttonLabel?: string;
|
|
131
|
-
defaultSymbol?: string;
|
|
132
|
-
onSuccess?: (tx: {
|
|
133
|
-
id: number;
|
|
134
|
-
status: string;
|
|
135
|
-
raised: number;
|
|
136
|
-
}) => void;
|
|
137
|
-
};
|
|
138
|
-
type OnrampConfig = {
|
|
139
|
-
environment?: 'STAGING' | 'PRODUCTION';
|
|
140
|
-
apiKey?: string | null;
|
|
141
|
-
width?: number | string;
|
|
142
|
-
height?: number | string;
|
|
143
|
-
autoOpen?: boolean;
|
|
144
|
-
creditCardLabel?: string;
|
|
145
|
-
enabled?: boolean;
|
|
146
|
-
};
|
|
147
|
-
type PayButtonConfig = CommonConfig & {
|
|
148
|
-
amountUsd?: number;
|
|
149
|
-
cryptoOptions?: CryptoOption[];
|
|
150
|
-
showLedgerDropdown?: boolean;
|
|
151
|
-
defaultSymbol?: string;
|
|
152
|
-
buttonLabel?: string;
|
|
153
|
-
onSuccess?: (tx: {
|
|
154
|
-
id: number;
|
|
155
|
-
status: string;
|
|
156
|
-
}) => void;
|
|
157
|
-
};
|
|
158
|
-
type AmountInputConfig = CommonConfig & {
|
|
159
|
-
placeholder?: string;
|
|
160
|
-
defaultAmountUsd?: number;
|
|
161
|
-
cryptoOptions?: CryptoOption[];
|
|
162
|
-
showLedgerDropdown?: boolean;
|
|
163
|
-
defaultSymbol?: string;
|
|
164
|
-
minUsd?: number;
|
|
165
|
-
maxUsd?: number;
|
|
166
|
-
stepUsd?: number;
|
|
167
|
-
buttonLabel?: string;
|
|
168
|
-
onSuccess?: (tx: {
|
|
169
|
-
id: number;
|
|
170
|
-
status: string;
|
|
171
|
-
amountUsd: number;
|
|
172
|
-
}) => void;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
23
|
declare const baseStyles: lit.CSSResult;
|
|
176
24
|
declare function applyThemeVars(host: HTMLElement, theme?: ThemeConfig | null): void;
|
|
177
25
|
|
|
@@ -186,477 +34,6 @@ type WidgetSdk = {
|
|
|
186
34
|
};
|
|
187
35
|
declare function createSdk(config: CommonConfig): WidgetSdk;
|
|
188
36
|
|
|
189
|
-
type StepStatus = 'pending' | 'loading' | 'completed' | 'error';
|
|
190
|
-
type Step = {
|
|
191
|
-
key: string;
|
|
192
|
-
label: string;
|
|
193
|
-
tooltip: string;
|
|
194
|
-
status: StepStatus;
|
|
195
|
-
timestamp?: string;
|
|
196
|
-
errorMessage?: string;
|
|
197
|
-
};
|
|
198
|
-
declare class ICPayProgressBar extends LitElement {
|
|
199
|
-
static styles: lit.CSSResult;
|
|
200
|
-
open: boolean;
|
|
201
|
-
steps: Step[];
|
|
202
|
-
amount: number;
|
|
203
|
-
currency: string;
|
|
204
|
-
ledgerSymbol: string;
|
|
205
|
-
debug: boolean;
|
|
206
|
-
private activeIndex;
|
|
207
|
-
private completed;
|
|
208
|
-
private failed;
|
|
209
|
-
private errorMessage;
|
|
210
|
-
private showSuccess;
|
|
211
|
-
private showConfetti;
|
|
212
|
-
private currentSteps;
|
|
213
|
-
private currentAmount;
|
|
214
|
-
private currentCurrency;
|
|
215
|
-
private currentLedgerSymbol;
|
|
216
|
-
private confirmLoadingStartedAt;
|
|
217
|
-
private progressionTimer;
|
|
218
|
-
theme?: {
|
|
219
|
-
primaryColor?: string;
|
|
220
|
-
secondaryColor?: string;
|
|
221
|
-
};
|
|
222
|
-
connectedCallback(): void;
|
|
223
|
-
disconnectedCallback(): void;
|
|
224
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
225
|
-
private attachSDKEventListeners;
|
|
226
|
-
private detachSDKEventListeners;
|
|
227
|
-
private onMethodStart;
|
|
228
|
-
private startAutomaticProgression;
|
|
229
|
-
private stopAutomaticProgression;
|
|
230
|
-
private onMethodSuccess;
|
|
231
|
-
private onTransactionCreated;
|
|
232
|
-
private onTransactionUpdated;
|
|
233
|
-
private onTransactionCompleted;
|
|
234
|
-
private onTransactionFailed;
|
|
235
|
-
private onTransactionMismatched;
|
|
236
|
-
private onMethodError;
|
|
237
|
-
private onSDKError;
|
|
238
|
-
private onWalletConnected;
|
|
239
|
-
private onWalletDisconnected;
|
|
240
|
-
private onBalanceCheck;
|
|
241
|
-
private onLedgerVerified;
|
|
242
|
-
private onWidgetPayment;
|
|
243
|
-
private onWidgetError;
|
|
244
|
-
private onWidgetUnlock;
|
|
245
|
-
private onWidgetTip;
|
|
246
|
-
private onWidgetDonation;
|
|
247
|
-
private onWidgetCoffee;
|
|
248
|
-
private updateStepStatus;
|
|
249
|
-
private getCurrentTime;
|
|
250
|
-
private progressPercent;
|
|
251
|
-
private verticalPercent;
|
|
252
|
-
private getStepIcon;
|
|
253
|
-
private getStepIndexByKey;
|
|
254
|
-
private setLoadingByKey;
|
|
255
|
-
private completeByKey;
|
|
256
|
-
private transformErrorMessage;
|
|
257
|
-
private renderConfetti;
|
|
258
|
-
private renderSuccessState;
|
|
259
|
-
private renderErrorState;
|
|
260
|
-
private renderProgressContent;
|
|
261
|
-
private renderConfirmTip;
|
|
262
|
-
private retryTransaction;
|
|
263
|
-
private closeProgress;
|
|
264
|
-
private renderStep;
|
|
265
|
-
private get isWalletConnectLoading();
|
|
266
|
-
render(): lit.TemplateResult<1>;
|
|
267
|
-
}
|
|
268
|
-
declare global {
|
|
269
|
-
interface HTMLElementTagNameMap {
|
|
270
|
-
'icpay-progress-bar': ICPayProgressBar;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
declare class ICPayTokenSelector extends LitElement {
|
|
275
|
-
static styles: lit.CSSResult;
|
|
276
|
-
options: CryptoOption[];
|
|
277
|
-
value: string | null;
|
|
278
|
-
defaultSymbol: string;
|
|
279
|
-
mode: 'buttons' | 'dropdown' | 'none';
|
|
280
|
-
theme?: {
|
|
281
|
-
primaryColor?: string;
|
|
282
|
-
secondaryColor?: string;
|
|
283
|
-
};
|
|
284
|
-
open: boolean;
|
|
285
|
-
showLabel: boolean;
|
|
286
|
-
private triggerEl?;
|
|
287
|
-
private wrapperEl?;
|
|
288
|
-
private menuPos;
|
|
289
|
-
connectedCallback(): void;
|
|
290
|
-
updated(changed: Map<string, unknown>): void;
|
|
291
|
-
firstUpdated(): void;
|
|
292
|
-
disconnectedCallback(): void;
|
|
293
|
-
private get effectiveSymbol();
|
|
294
|
-
private getOptionBySymbol;
|
|
295
|
-
private getLogoUrl;
|
|
296
|
-
private onSelect;
|
|
297
|
-
private toggleDropdown;
|
|
298
|
-
private closeDropdown;
|
|
299
|
-
render(): lit.TemplateResult<1>;
|
|
300
|
-
}
|
|
301
|
-
declare global {
|
|
302
|
-
interface HTMLElementTagNameMap {
|
|
303
|
-
'icpay-token-selector': ICPayTokenSelector;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
declare class ICPayPremiumContent extends LitElement {
|
|
308
|
-
static styles: lit.CSSResult[];
|
|
309
|
-
config: PremiumContentConfig;
|
|
310
|
-
private selectedSymbol;
|
|
311
|
-
private unlocked;
|
|
312
|
-
private succeeded;
|
|
313
|
-
private processing;
|
|
314
|
-
private availableLedgers;
|
|
315
|
-
private errorMessage;
|
|
316
|
-
private errorSeverity;
|
|
317
|
-
private errorAction;
|
|
318
|
-
private walletConnected;
|
|
319
|
-
private pendingAction;
|
|
320
|
-
private showWalletModal;
|
|
321
|
-
private pnp;
|
|
322
|
-
private showOnrampModal;
|
|
323
|
-
private onrampSessionId;
|
|
324
|
-
private onrampPaymentIntentId;
|
|
325
|
-
private onrampErrorMessage;
|
|
326
|
-
private transakMessageHandlerBound;
|
|
327
|
-
private onrampPollTimer;
|
|
328
|
-
private onrampPollingActive;
|
|
329
|
-
private onrampNotifyController;
|
|
330
|
-
private tryAutoConnectPNP;
|
|
331
|
-
private get cryptoOptions();
|
|
332
|
-
connectedCallback(): void;
|
|
333
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
334
|
-
private loadVerifiedLedgers;
|
|
335
|
-
private onPay;
|
|
336
|
-
private attachTransakMessageListener;
|
|
337
|
-
private detachTransakMessageListener;
|
|
338
|
-
private onTransakMessage;
|
|
339
|
-
private startOnramp;
|
|
340
|
-
private createOnrampIntent;
|
|
341
|
-
private startOnrampPolling;
|
|
342
|
-
private select;
|
|
343
|
-
private getWalletId;
|
|
344
|
-
private getWalletLabel;
|
|
345
|
-
private getWalletIcon;
|
|
346
|
-
private connectWithWallet;
|
|
347
|
-
render(): lit.TemplateResult<1>;
|
|
348
|
-
}
|
|
349
|
-
declare global {
|
|
350
|
-
interface HTMLElementTagNameMap {
|
|
351
|
-
'icpay-premium-content': ICPayPremiumContent;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
declare class ICPayTipJar extends LitElement {
|
|
356
|
-
static styles: lit.CSSResult[];
|
|
357
|
-
config: TipJarConfig;
|
|
358
|
-
private selectedAmount;
|
|
359
|
-
private selectedSymbol;
|
|
360
|
-
private total;
|
|
361
|
-
private processing;
|
|
362
|
-
private succeeded;
|
|
363
|
-
private availableLedgers;
|
|
364
|
-
private errorMessage;
|
|
365
|
-
private errorSeverity;
|
|
366
|
-
private errorAction;
|
|
367
|
-
private walletConnected;
|
|
368
|
-
private pendingAction;
|
|
369
|
-
private showWalletModal;
|
|
370
|
-
private pnp;
|
|
371
|
-
private showOnrampModal;
|
|
372
|
-
private onrampSessionId;
|
|
373
|
-
private onrampPaymentIntentId;
|
|
374
|
-
private onrampErrorMessage;
|
|
375
|
-
private transakMessageHandlerBound;
|
|
376
|
-
private onrampPollTimer;
|
|
377
|
-
private onrampPollingActive;
|
|
378
|
-
private onrampNotifyController;
|
|
379
|
-
private tryAutoConnectPNP;
|
|
380
|
-
private get amounts();
|
|
381
|
-
private get cryptoOptions();
|
|
382
|
-
connectedCallback(): void;
|
|
383
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
384
|
-
private loadVerifiedLedgers;
|
|
385
|
-
private selectAmount;
|
|
386
|
-
private selectSymbol;
|
|
387
|
-
private get fillPercentage();
|
|
388
|
-
private tip;
|
|
389
|
-
private attachTransakMessageListener;
|
|
390
|
-
private detachTransakMessageListener;
|
|
391
|
-
private onTransakMessage;
|
|
392
|
-
private startOnramp;
|
|
393
|
-
private createOnrampIntent;
|
|
394
|
-
private startOnrampPolling;
|
|
395
|
-
private getWalletId;
|
|
396
|
-
private getWalletLabel;
|
|
397
|
-
private getWalletIcon;
|
|
398
|
-
private connectWithWallet;
|
|
399
|
-
render(): lit.TemplateResult<1>;
|
|
400
|
-
}
|
|
401
|
-
declare global {
|
|
402
|
-
interface HTMLElementTagNameMap {
|
|
403
|
-
'icpay-tip-jar': ICPayTipJar;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
declare class ICPayArticlePaywall extends LitElement {
|
|
408
|
-
static styles: lit.CSSResult[];
|
|
409
|
-
config: ArticlePaywallConfig;
|
|
410
|
-
title: string;
|
|
411
|
-
preview: string;
|
|
412
|
-
lockedContent: string;
|
|
413
|
-
private get obfuscatedLockedContent();
|
|
414
|
-
private selectedSymbol;
|
|
415
|
-
private unlocked;
|
|
416
|
-
private succeeded;
|
|
417
|
-
private processing;
|
|
418
|
-
private availableLedgers;
|
|
419
|
-
private errorMessage;
|
|
420
|
-
private errorSeverity;
|
|
421
|
-
private errorAction;
|
|
422
|
-
private walletConnected;
|
|
423
|
-
private pendingAction;
|
|
424
|
-
private showWalletModal;
|
|
425
|
-
private pnp;
|
|
426
|
-
private showOnrampModal;
|
|
427
|
-
private onrampSessionId;
|
|
428
|
-
private onrampPaymentIntentId;
|
|
429
|
-
private onrampErrorMessage;
|
|
430
|
-
private transakMessageHandlerBound;
|
|
431
|
-
private onrampPollTimer;
|
|
432
|
-
private onrampPollingActive;
|
|
433
|
-
private onrampNotifyController;
|
|
434
|
-
private tryAutoConnectPNP;
|
|
435
|
-
private attachTransakMessageListener;
|
|
436
|
-
private detachTransakMessageListener;
|
|
437
|
-
private onTransakMessage;
|
|
438
|
-
private startOnramp;
|
|
439
|
-
private createOnrampIntent;
|
|
440
|
-
private startOnrampPolling;
|
|
441
|
-
private get cryptoOptions();
|
|
442
|
-
connectedCallback(): void;
|
|
443
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
444
|
-
private loadVerifiedLedgers;
|
|
445
|
-
private selectSymbol;
|
|
446
|
-
private unlock;
|
|
447
|
-
private getWalletId;
|
|
448
|
-
private getWalletLabel;
|
|
449
|
-
private getWalletIcon;
|
|
450
|
-
private connectWithWallet;
|
|
451
|
-
render(): lit.TemplateResult<1>;
|
|
452
|
-
}
|
|
453
|
-
declare global {
|
|
454
|
-
interface HTMLElementTagNameMap {
|
|
455
|
-
'icpay-article-paywall': ICPayArticlePaywall;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
declare class ICPayCoffeeShop extends LitElement {
|
|
460
|
-
static styles: lit.CSSResult[];
|
|
461
|
-
config: CoffeeShopConfig;
|
|
462
|
-
private selectedIndex;
|
|
463
|
-
private selectedSymbol;
|
|
464
|
-
private processing;
|
|
465
|
-
private availableLedgers;
|
|
466
|
-
private errorMessage;
|
|
467
|
-
private errorSeverity;
|
|
468
|
-
private errorAction;
|
|
469
|
-
private walletConnected;
|
|
470
|
-
private pendingAction;
|
|
471
|
-
private showWalletModal;
|
|
472
|
-
private pnp;
|
|
473
|
-
private showOnrampModal;
|
|
474
|
-
private onrampSessionId;
|
|
475
|
-
private onrampPaymentIntentId;
|
|
476
|
-
private onrampErrorMessage;
|
|
477
|
-
private transakMessageHandlerBound;
|
|
478
|
-
private onrampPollTimer;
|
|
479
|
-
private onrampPollingActive;
|
|
480
|
-
private onrampNotifyController;
|
|
481
|
-
private get cryptoOptions();
|
|
482
|
-
connectedCallback(): void;
|
|
483
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
484
|
-
private loadVerifiedLedgers;
|
|
485
|
-
private selectItem;
|
|
486
|
-
private selectSymbol;
|
|
487
|
-
private get selectedItem();
|
|
488
|
-
private order;
|
|
489
|
-
private attachTransakMessageListener;
|
|
490
|
-
private detachTransakMessageListener;
|
|
491
|
-
private onTransakMessage;
|
|
492
|
-
private startOnramp;
|
|
493
|
-
private createOnrampIntent;
|
|
494
|
-
private startOnrampPolling;
|
|
495
|
-
private getWalletId;
|
|
496
|
-
private getWalletLabel;
|
|
497
|
-
private getWalletIcon;
|
|
498
|
-
private connectWithWallet;
|
|
499
|
-
render(): lit.TemplateResult<1>;
|
|
500
|
-
}
|
|
501
|
-
declare global {
|
|
502
|
-
interface HTMLElementTagNameMap {
|
|
503
|
-
'icpay-coffee-shop': ICPayCoffeeShop;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
declare class ICPayDonationThermometer extends LitElement {
|
|
508
|
-
static styles: lit.CSSResult[];
|
|
509
|
-
config: DonationThermometerConfig;
|
|
510
|
-
private selectedAmount;
|
|
511
|
-
private selectedSymbol;
|
|
512
|
-
private raised;
|
|
513
|
-
private processing;
|
|
514
|
-
private succeeded;
|
|
515
|
-
private availableLedgers;
|
|
516
|
-
private errorMessage;
|
|
517
|
-
private errorSeverity;
|
|
518
|
-
private errorAction;
|
|
519
|
-
private walletConnected;
|
|
520
|
-
private pendingAction;
|
|
521
|
-
private showWalletModal;
|
|
522
|
-
private pnp;
|
|
523
|
-
private showOnrampModal;
|
|
524
|
-
private onrampSessionId;
|
|
525
|
-
private onrampPaymentIntentId;
|
|
526
|
-
private onrampErrorMessage;
|
|
527
|
-
private transakMessageHandlerBound;
|
|
528
|
-
private onrampPollTimer;
|
|
529
|
-
private onrampPollingActive;
|
|
530
|
-
private onrampNotifyController;
|
|
531
|
-
private tryAutoConnectPNP;
|
|
532
|
-
private get amounts();
|
|
533
|
-
private get cryptoOptions();
|
|
534
|
-
connectedCallback(): void;
|
|
535
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
536
|
-
private loadVerifiedLedgers;
|
|
537
|
-
private selectAmount;
|
|
538
|
-
private selectSymbol;
|
|
539
|
-
private get fillPercentage();
|
|
540
|
-
private donate;
|
|
541
|
-
private attachTransakMessageListener;
|
|
542
|
-
private detachTransakMessageListener;
|
|
543
|
-
private onTransakMessage;
|
|
544
|
-
private startOnramp;
|
|
545
|
-
private createOnrampIntent;
|
|
546
|
-
private startOnrampPolling;
|
|
547
|
-
private getWalletId;
|
|
548
|
-
private getWalletLabel;
|
|
549
|
-
private getWalletIcon;
|
|
550
|
-
private connectWithWallet;
|
|
551
|
-
render(): lit.TemplateResult<1>;
|
|
552
|
-
}
|
|
553
|
-
declare global {
|
|
554
|
-
interface HTMLElementTagNameMap {
|
|
555
|
-
'icpay-donation-thermometer': ICPayDonationThermometer;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
declare class ICPayPayButton extends LitElement {
|
|
560
|
-
static styles: lit.CSSResult[];
|
|
561
|
-
config: PayButtonConfig;
|
|
562
|
-
private selectedSymbol;
|
|
563
|
-
private processing;
|
|
564
|
-
private succeeded;
|
|
565
|
-
private availableLedgers;
|
|
566
|
-
private errorMessage;
|
|
567
|
-
private errorSeverity;
|
|
568
|
-
private errorAction;
|
|
569
|
-
private walletConnected;
|
|
570
|
-
private pendingAction;
|
|
571
|
-
private showWalletModal;
|
|
572
|
-
private showOnrampModal;
|
|
573
|
-
private onrampSessionId;
|
|
574
|
-
private onrampPaymentIntentId;
|
|
575
|
-
private onrampErrorMessage;
|
|
576
|
-
private onrampPollTimer;
|
|
577
|
-
private transakMessageHandlerBound;
|
|
578
|
-
private pnp;
|
|
579
|
-
private sdk;
|
|
580
|
-
private onrampPollingActive;
|
|
581
|
-
private onrampNotifyController;
|
|
582
|
-
private getSdk;
|
|
583
|
-
private get cryptoOptions();
|
|
584
|
-
connectedCallback(): void;
|
|
585
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
586
|
-
private loadVerifiedLedgers;
|
|
587
|
-
private selectSymbol;
|
|
588
|
-
private ensureWallet;
|
|
589
|
-
private getWalletId;
|
|
590
|
-
private getWalletLabel;
|
|
591
|
-
private getWalletIcon;
|
|
592
|
-
private connectWithWallet;
|
|
593
|
-
private renderWalletModal;
|
|
594
|
-
private startOnramp;
|
|
595
|
-
private createOnrampIntent;
|
|
596
|
-
private attachTransakMessageListener;
|
|
597
|
-
private detachTransakMessageListener;
|
|
598
|
-
private onTransakMessage;
|
|
599
|
-
private startOnrampPolling;
|
|
600
|
-
private pay;
|
|
601
|
-
render(): lit.TemplateResult<1>;
|
|
602
|
-
}
|
|
603
|
-
declare global {
|
|
604
|
-
interface HTMLElementTagNameMap {
|
|
605
|
-
'icpay-pay-button': ICPayPayButton;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
declare class ICPayAmountInput extends LitElement {
|
|
610
|
-
static styles: lit.CSSResult[];
|
|
611
|
-
config: AmountInputConfig;
|
|
612
|
-
private amountUsd;
|
|
613
|
-
private hasUserAmount;
|
|
614
|
-
private selectedSymbol;
|
|
615
|
-
private processing;
|
|
616
|
-
private succeeded;
|
|
617
|
-
private availableLedgers;
|
|
618
|
-
private errorMessage;
|
|
619
|
-
private errorSeverity;
|
|
620
|
-
private errorAction;
|
|
621
|
-
private walletConnected;
|
|
622
|
-
private pendingAction;
|
|
623
|
-
private showWalletModal;
|
|
624
|
-
private showOnrampModal;
|
|
625
|
-
private onrampSessionId;
|
|
626
|
-
private onrampPaymentIntentId;
|
|
627
|
-
private onrampErrorMessage;
|
|
628
|
-
private pnp;
|
|
629
|
-
private transakMessageHandlerBound;
|
|
630
|
-
private onrampPollTimer;
|
|
631
|
-
private onrampPollingActive;
|
|
632
|
-
private onrampNotifyController;
|
|
633
|
-
private get cryptoOptions();
|
|
634
|
-
connectedCallback(): void;
|
|
635
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
636
|
-
private loadVerifiedLedgers;
|
|
637
|
-
private onInputChange;
|
|
638
|
-
private selectSymbol;
|
|
639
|
-
private isValidAmount;
|
|
640
|
-
private ensureWallet;
|
|
641
|
-
private getWalletId;
|
|
642
|
-
private getWalletLabel;
|
|
643
|
-
private getWalletIcon;
|
|
644
|
-
private connectWithWallet;
|
|
645
|
-
private attachTransakMessageListener;
|
|
646
|
-
private detachTransakMessageListener;
|
|
647
|
-
private onTransakMessage;
|
|
648
|
-
private startOnramp;
|
|
649
|
-
private createOnrampIntent;
|
|
650
|
-
private startOnrampPolling;
|
|
651
|
-
private pay;
|
|
652
|
-
render(): lit.TemplateResult<1>;
|
|
653
|
-
}
|
|
654
|
-
declare global {
|
|
655
|
-
interface HTMLElementTagNameMap {
|
|
656
|
-
'icpay-amount-input': ICPayAmountInput;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
37
|
type Environment = 'STAGING' | 'PRODUCTION';
|
|
661
38
|
type TransakOnrampOptions = {
|
|
662
39
|
visible: boolean;
|
|
@@ -686,4 +63,4 @@ type TransakOnrampOptions = {
|
|
|
686
63
|
*/
|
|
687
64
|
declare function renderTransakOnrampModal(opts: TransakOnrampOptions): TemplateResult | null;
|
|
688
65
|
|
|
689
|
-
export {
|
|
66
|
+
export { CommonConfig, ThemeConfig, type WidgetSdk, applyThemeVars, baseStyles, createSdk, renderTransakOnrampModal };
|