@coinflowlabs/angular 1.0.7 → 1.1.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 +4 -0
- package/fesm2022/coinflowlabs-angular.mjs +319 -128
- package/fesm2022/coinflowlabs-angular.mjs.map +1 -1
- package/lib/card-form/CardFormService.d.ts +1 -1
- package/lib/common/CoinflowLibMessageHandlers.d.ts +3 -2
- package/lib/common/CoinflowTypes.d.ts +85 -75
- package/lib/common/CoinflowUtils.d.ts +1 -2
- package/lib/common/card-form/TokenEx.d.ts +1 -1
- package/lib/common/index.d.ts +5 -1
- package/lib/common/types/AnyObject.d.ts +5 -0
- package/lib/common/types/CartitemCommon.d.ts +163 -0
- package/lib/common/types/Subtotal.d.ts +172 -0
- package/lib/common/types/cryptoCartItem.d.ts +62 -0
- package/lib/common/types/giftCardCartItem.d.ts +58 -0
- package/lib/common/types/moneyTopUpCartItem.d.ts +44 -0
- package/lib/common/types/nftCartItem.d.ts +99 -0
- package/package.json +1 -1
- package/lib/common/Subtotal.d.ts +0 -37
- package/lib/mobile-wallet/apple-pay-overlay.component.d.ts +0 -7
package/README.md
CHANGED
|
@@ -61,10 +61,277 @@ const base58 = base58Imported;
|
|
|
61
61
|
var Currency;
|
|
62
62
|
(function (Currency) {
|
|
63
63
|
Currency["USD"] = "USD";
|
|
64
|
+
Currency["AED"] = "AED";
|
|
65
|
+
Currency["AFN"] = "AFN";
|
|
66
|
+
Currency["ALL"] = "ALL";
|
|
67
|
+
Currency["ANG"] = "ANG";
|
|
68
|
+
Currency["AOA"] = "AOA";
|
|
69
|
+
Currency["AUD"] = "AUD";
|
|
70
|
+
Currency["AWG"] = "AWG";
|
|
71
|
+
Currency["AZN"] = "AZN";
|
|
72
|
+
Currency["BAM"] = "BAM";
|
|
73
|
+
Currency["BBD"] = "BBD";
|
|
74
|
+
Currency["BDT"] = "BDT";
|
|
75
|
+
Currency["BGN"] = "BGN";
|
|
76
|
+
Currency["BHD"] = "BHD";
|
|
77
|
+
Currency["BIF"] = "BIF";
|
|
78
|
+
Currency["BND"] = "BND";
|
|
79
|
+
Currency["BOB"] = "BOB";
|
|
80
|
+
Currency["BRL"] = "BRL";
|
|
81
|
+
Currency["BTN"] = "BTN";
|
|
82
|
+
Currency["BWP"] = "BWP";
|
|
83
|
+
Currency["BZD"] = "BZD";
|
|
84
|
+
Currency["CAD"] = "CAD";
|
|
85
|
+
Currency["CHF"] = "CHF";
|
|
86
|
+
Currency["CLP"] = "CLP";
|
|
87
|
+
Currency["CNY"] = "CNY";
|
|
88
|
+
Currency["COP"] = "COP";
|
|
89
|
+
Currency["CRC"] = "CRC";
|
|
90
|
+
Currency["CVE"] = "CVE";
|
|
91
|
+
Currency["CZK"] = "CZK";
|
|
92
|
+
Currency["DJF"] = "DJF";
|
|
93
|
+
Currency["DKK"] = "DKK";
|
|
94
|
+
Currency["DOP"] = "DOP";
|
|
95
|
+
Currency["DZD"] = "DZD";
|
|
96
|
+
Currency["EGP"] = "EGP";
|
|
97
|
+
Currency["ETB"] = "ETB";
|
|
64
98
|
Currency["EUR"] = "EUR";
|
|
65
99
|
Currency["GBP"] = "GBP";
|
|
66
|
-
Currency["
|
|
100
|
+
Currency["GEL"] = "GEL";
|
|
101
|
+
Currency["GHS"] = "GHS";
|
|
102
|
+
Currency["GMD"] = "GMD";
|
|
103
|
+
Currency["GNF"] = "GNF";
|
|
104
|
+
Currency["GTQ"] = "GTQ";
|
|
105
|
+
Currency["GYD"] = "GYD";
|
|
106
|
+
Currency["HKD"] = "HKD";
|
|
107
|
+
Currency["HNL"] = "HNL";
|
|
108
|
+
Currency["HTG"] = "HTG";
|
|
109
|
+
Currency["HUF"] = "HUF";
|
|
110
|
+
Currency["IDR"] = "IDR";
|
|
111
|
+
Currency["INR"] = "INR";
|
|
112
|
+
Currency["IQD"] = "IQD";
|
|
113
|
+
Currency["IRR"] = "IRR";
|
|
114
|
+
Currency["ISK"] = "ISK";
|
|
115
|
+
Currency["JMD"] = "JMD";
|
|
116
|
+
Currency["JOD"] = "JOD";
|
|
117
|
+
Currency["JPY"] = "JPY";
|
|
118
|
+
Currency["KES"] = "KES";
|
|
119
|
+
Currency["KGS"] = "KGS";
|
|
120
|
+
Currency["KHR"] = "KHR";
|
|
121
|
+
Currency["KMF"] = "KMF";
|
|
122
|
+
Currency["KRW"] = "KRW";
|
|
123
|
+
Currency["KWD"] = "KWD";
|
|
124
|
+
Currency["KYD"] = "KYD";
|
|
125
|
+
Currency["KZT"] = "KZT";
|
|
126
|
+
Currency["LKR"] = "LKR";
|
|
127
|
+
Currency["LRD"] = "LRD";
|
|
128
|
+
Currency["LSL"] = "LSL";
|
|
129
|
+
Currency["LYD"] = "LYD";
|
|
130
|
+
Currency["MAD"] = "MAD";
|
|
131
|
+
Currency["MDL"] = "MDL";
|
|
132
|
+
Currency["MGA"] = "MGA";
|
|
133
|
+
Currency["MKD"] = "MKD";
|
|
134
|
+
Currency["MMK"] = "MMK";
|
|
135
|
+
Currency["MNT"] = "MNT";
|
|
136
|
+
Currency["MOP"] = "MOP";
|
|
137
|
+
Currency["MRU"] = "MRU";
|
|
138
|
+
Currency["MUR"] = "MUR";
|
|
139
|
+
Currency["MVR"] = "MVR";
|
|
140
|
+
Currency["MXN"] = "MXN";
|
|
141
|
+
Currency["MYR"] = "MYR";
|
|
142
|
+
Currency["NAD"] = "NAD";
|
|
143
|
+
Currency["NGN"] = "NGN";
|
|
144
|
+
Currency["NIO"] = "NIO";
|
|
145
|
+
Currency["NOK"] = "NOK";
|
|
146
|
+
Currency["NPR"] = "NPR";
|
|
147
|
+
Currency["NZD"] = "NZD";
|
|
148
|
+
Currency["OMR"] = "OMR";
|
|
149
|
+
Currency["PAB"] = "PAB";
|
|
150
|
+
Currency["PEN"] = "PEN";
|
|
151
|
+
Currency["PHP"] = "PHP";
|
|
152
|
+
Currency["PKR"] = "PKR";
|
|
153
|
+
Currency["PLN"] = "PLN";
|
|
154
|
+
Currency["PYG"] = "PYG";
|
|
155
|
+
Currency["QAR"] = "QAR";
|
|
156
|
+
Currency["RON"] = "RON";
|
|
157
|
+
Currency["RSD"] = "RSD";
|
|
158
|
+
Currency["RWF"] = "RWF";
|
|
159
|
+
Currency["SAR"] = "SAR";
|
|
160
|
+
Currency["SCR"] = "SCR";
|
|
161
|
+
Currency["SDG"] = "SDG";
|
|
162
|
+
Currency["SEK"] = "SEK";
|
|
163
|
+
Currency["SGD"] = "SGD";
|
|
164
|
+
Currency["SLE"] = "SLE";
|
|
165
|
+
Currency["SLL"] = "SLL";
|
|
166
|
+
Currency["SOS"] = "SOS";
|
|
167
|
+
Currency["STN"] = "STN";
|
|
168
|
+
Currency["SVC"] = "SVC";
|
|
169
|
+
Currency["SYP"] = "SYP";
|
|
170
|
+
Currency["SZL"] = "SZL";
|
|
171
|
+
Currency["THB"] = "THB";
|
|
172
|
+
Currency["TJS"] = "TJS";
|
|
173
|
+
Currency["TMT"] = "TMT";
|
|
174
|
+
Currency["TND"] = "TND";
|
|
175
|
+
Currency["TRY"] = "TRY";
|
|
176
|
+
Currency["TTD"] = "TTD";
|
|
177
|
+
Currency["TWD"] = "TWD";
|
|
178
|
+
Currency["TZS"] = "TZS";
|
|
179
|
+
Currency["UAH"] = "UAH";
|
|
180
|
+
Currency["UGX"] = "UGX";
|
|
181
|
+
Currency["UYU"] = "UYU";
|
|
182
|
+
Currency["UZS"] = "UZS";
|
|
183
|
+
Currency["VND"] = "VND";
|
|
184
|
+
Currency["XAF"] = "XAF";
|
|
185
|
+
Currency["XCD"] = "XCD";
|
|
186
|
+
Currency["XOF"] = "XOF";
|
|
187
|
+
Currency["XPF"] = "XPF";
|
|
188
|
+
Currency["YER"] = "YER";
|
|
189
|
+
Currency["ZAR"] = "ZAR";
|
|
190
|
+
Currency["ZMW"] = "ZMW";
|
|
67
191
|
})(Currency || (Currency = {}));
|
|
192
|
+
const CurrencyToISO4217 = {
|
|
193
|
+
[Currency.AED]: '784',
|
|
194
|
+
[Currency.AFN]: '971',
|
|
195
|
+
[Currency.ALL]: '008',
|
|
196
|
+
[Currency.ANG]: '532',
|
|
197
|
+
[Currency.AOA]: '973',
|
|
198
|
+
[Currency.AUD]: '036',
|
|
199
|
+
[Currency.AWG]: '533',
|
|
200
|
+
[Currency.AZN]: '944',
|
|
201
|
+
[Currency.BAM]: '977',
|
|
202
|
+
[Currency.BBD]: '052',
|
|
203
|
+
[Currency.BDT]: '050',
|
|
204
|
+
[Currency.BGN]: '975',
|
|
205
|
+
[Currency.BHD]: '048',
|
|
206
|
+
[Currency.BIF]: '108',
|
|
207
|
+
[Currency.BND]: '096',
|
|
208
|
+
[Currency.BOB]: '068',
|
|
209
|
+
[Currency.BRL]: '986',
|
|
210
|
+
[Currency.BTN]: '064',
|
|
211
|
+
[Currency.BWP]: '072',
|
|
212
|
+
[Currency.BZD]: '084',
|
|
213
|
+
[Currency.CAD]: '124',
|
|
214
|
+
[Currency.CHF]: '756',
|
|
215
|
+
[Currency.CLP]: '152',
|
|
216
|
+
[Currency.CNY]: '156',
|
|
217
|
+
[Currency.COP]: '170',
|
|
218
|
+
[Currency.CRC]: '188',
|
|
219
|
+
[Currency.CVE]: '132',
|
|
220
|
+
[Currency.CZK]: '203',
|
|
221
|
+
[Currency.DJF]: '262',
|
|
222
|
+
[Currency.DKK]: '208',
|
|
223
|
+
[Currency.DOP]: '214',
|
|
224
|
+
[Currency.DZD]: '012',
|
|
225
|
+
[Currency.EGP]: '818',
|
|
226
|
+
[Currency.ETB]: '230',
|
|
227
|
+
[Currency.EUR]: '978',
|
|
228
|
+
[Currency.GBP]: '826',
|
|
229
|
+
[Currency.GEL]: '981',
|
|
230
|
+
[Currency.GHS]: '936',
|
|
231
|
+
[Currency.GMD]: '270',
|
|
232
|
+
[Currency.GNF]: '324',
|
|
233
|
+
[Currency.GTQ]: '320',
|
|
234
|
+
[Currency.GYD]: '328',
|
|
235
|
+
[Currency.HKD]: '344',
|
|
236
|
+
[Currency.HNL]: '340',
|
|
237
|
+
[Currency.HTG]: '332',
|
|
238
|
+
[Currency.HUF]: '348',
|
|
239
|
+
[Currency.IDR]: '360',
|
|
240
|
+
[Currency.INR]: '356',
|
|
241
|
+
[Currency.IQD]: '368',
|
|
242
|
+
[Currency.IRR]: '364',
|
|
243
|
+
[Currency.ISK]: '352',
|
|
244
|
+
[Currency.JMD]: '388',
|
|
245
|
+
[Currency.JOD]: '400',
|
|
246
|
+
[Currency.JPY]: '392',
|
|
247
|
+
[Currency.KES]: '404',
|
|
248
|
+
[Currency.KGS]: '417',
|
|
249
|
+
[Currency.KHR]: '116',
|
|
250
|
+
[Currency.KMF]: '174',
|
|
251
|
+
[Currency.KRW]: '410',
|
|
252
|
+
[Currency.KWD]: '414',
|
|
253
|
+
[Currency.KYD]: '136',
|
|
254
|
+
[Currency.KZT]: '398',
|
|
255
|
+
[Currency.LKR]: '144',
|
|
256
|
+
[Currency.LRD]: '430',
|
|
257
|
+
[Currency.LSL]: '426',
|
|
258
|
+
[Currency.LYD]: '434',
|
|
259
|
+
[Currency.MAD]: '504',
|
|
260
|
+
[Currency.MDL]: '498',
|
|
261
|
+
[Currency.MGA]: '969',
|
|
262
|
+
[Currency.MKD]: '807',
|
|
263
|
+
[Currency.MMK]: '104',
|
|
264
|
+
[Currency.MNT]: '496',
|
|
265
|
+
[Currency.MOP]: '446',
|
|
266
|
+
[Currency.MRU]: '929',
|
|
267
|
+
[Currency.MUR]: '480',
|
|
268
|
+
[Currency.MVR]: '462',
|
|
269
|
+
[Currency.MXN]: '484',
|
|
270
|
+
[Currency.MYR]: '458',
|
|
271
|
+
[Currency.NAD]: '516',
|
|
272
|
+
[Currency.NGN]: '566',
|
|
273
|
+
[Currency.NIO]: '558',
|
|
274
|
+
[Currency.NOK]: '578',
|
|
275
|
+
[Currency.NPR]: '524',
|
|
276
|
+
[Currency.NZD]: '554',
|
|
277
|
+
[Currency.OMR]: '512',
|
|
278
|
+
[Currency.PAB]: '590',
|
|
279
|
+
[Currency.PEN]: '604',
|
|
280
|
+
[Currency.PHP]: '608',
|
|
281
|
+
[Currency.PKR]: '586',
|
|
282
|
+
[Currency.PLN]: '985',
|
|
283
|
+
[Currency.PYG]: '600',
|
|
284
|
+
[Currency.QAR]: '634',
|
|
285
|
+
[Currency.RON]: '946',
|
|
286
|
+
[Currency.RSD]: '941',
|
|
287
|
+
[Currency.RWF]: '646',
|
|
288
|
+
[Currency.SAR]: '682',
|
|
289
|
+
[Currency.SCR]: '690',
|
|
290
|
+
[Currency.SDG]: '938',
|
|
291
|
+
[Currency.SEK]: '752',
|
|
292
|
+
[Currency.SGD]: '702',
|
|
293
|
+
[Currency.SLE]: '925',
|
|
294
|
+
[Currency.SLL]: '694',
|
|
295
|
+
[Currency.SOS]: '706',
|
|
296
|
+
[Currency.STN]: '930',
|
|
297
|
+
[Currency.SVC]: '222',
|
|
298
|
+
[Currency.SYP]: '760',
|
|
299
|
+
[Currency.SZL]: '748',
|
|
300
|
+
[Currency.THB]: '764',
|
|
301
|
+
[Currency.TJS]: '972',
|
|
302
|
+
[Currency.TMT]: '934',
|
|
303
|
+
[Currency.TND]: '788',
|
|
304
|
+
[Currency.TRY]: '949',
|
|
305
|
+
[Currency.TTD]: '780',
|
|
306
|
+
[Currency.TWD]: '901',
|
|
307
|
+
[Currency.TZS]: '834',
|
|
308
|
+
[Currency.UAH]: '980',
|
|
309
|
+
[Currency.UGX]: '800',
|
|
310
|
+
[Currency.USD]: '840',
|
|
311
|
+
[Currency.UYU]: '858',
|
|
312
|
+
[Currency.UZS]: '860',
|
|
313
|
+
[Currency.VND]: '704',
|
|
314
|
+
[Currency.XAF]: '950',
|
|
315
|
+
[Currency.XCD]: '951',
|
|
316
|
+
[Currency.XOF]: '952',
|
|
317
|
+
[Currency.XPF]: '953',
|
|
318
|
+
[Currency.YER]: '886',
|
|
319
|
+
[Currency.ZAR]: '710',
|
|
320
|
+
[Currency.ZMW]: '967',
|
|
321
|
+
};
|
|
322
|
+
const WithdrawCurrencies = {
|
|
323
|
+
[Currency.USD]: Currency.USD,
|
|
324
|
+
[Currency.EUR]: Currency.EUR,
|
|
325
|
+
[Currency.GBP]: Currency.GBP,
|
|
326
|
+
[Currency.BRL]: Currency.BRL,
|
|
327
|
+
[Currency.CAD]: Currency.CAD,
|
|
328
|
+
};
|
|
329
|
+
function isWithdrawCurrency(currency) {
|
|
330
|
+
return currency in WithdrawCurrencies;
|
|
331
|
+
}
|
|
332
|
+
function isTypedCurrencyCents(cents, currency) {
|
|
333
|
+
return cents.currency === currency;
|
|
334
|
+
}
|
|
68
335
|
|
|
69
336
|
class CoinflowUtils {
|
|
70
337
|
constructor(env) {
|
|
@@ -102,7 +369,7 @@ class CoinflowUtils {
|
|
|
102
369
|
return 'http://localhost:5000';
|
|
103
370
|
return `https://api-${env}.coinflow.cash`;
|
|
104
371
|
}
|
|
105
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, transaction, blockchain = 'solana', webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets,
|
|
372
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain = 'solana', webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }) {
|
|
106
373
|
const prefix = routePrefix
|
|
107
374
|
? `/${routePrefix}/${blockchain}`
|
|
108
375
|
: `/${blockchain}`;
|
|
@@ -129,6 +396,8 @@ class CoinflowUtils {
|
|
|
129
396
|
url.searchParams.append('amount', subtotal.amount.toString());
|
|
130
397
|
}
|
|
131
398
|
}
|
|
399
|
+
if (presentment)
|
|
400
|
+
url.searchParams.append('presentment', presentment);
|
|
132
401
|
if (webhookInfo) {
|
|
133
402
|
url.searchParams.append('webhookInfo', LZString.compressToEncodedURIComponent(JSON.stringify(webhookInfo)));
|
|
134
403
|
}
|
|
@@ -157,8 +426,6 @@ class CoinflowUtils {
|
|
|
157
426
|
}
|
|
158
427
|
if (additionalWallets)
|
|
159
428
|
url.searchParams.append('additionalWallets', LZString.compressToEncodedURIComponent(JSON.stringify(additionalWallets)));
|
|
160
|
-
if (nearDeposit)
|
|
161
|
-
url.searchParams.append('nearDeposit', nearDeposit);
|
|
162
429
|
if (chargebackProtectionData)
|
|
163
430
|
url.searchParams.append('chargebackProtectionData', LZString.compressToEncodedURIComponent(JSON.stringify(chargebackProtectionData)));
|
|
164
431
|
if (deviceId) {
|
|
@@ -254,12 +521,6 @@ class CoinflowUtils {
|
|
|
254
521
|
const { transaction } = props;
|
|
255
522
|
return LZString.compressToEncodedURIComponent(JSON.stringify(transaction));
|
|
256
523
|
},
|
|
257
|
-
near: () => {
|
|
258
|
-
if (!('action' in props))
|
|
259
|
-
return undefined;
|
|
260
|
-
const { action } = props;
|
|
261
|
-
return LZString.compressToEncodedURIComponent(JSON.stringify(action));
|
|
262
|
-
},
|
|
263
524
|
user: () => {
|
|
264
525
|
return undefined;
|
|
265
526
|
},
|
|
@@ -269,8 +530,6 @@ class CoinflowUtils {
|
|
|
269
530
|
switch (blockchain) {
|
|
270
531
|
case 'solana':
|
|
271
532
|
return args.solana;
|
|
272
|
-
case 'near':
|
|
273
|
-
return args.near;
|
|
274
533
|
case 'polygon':
|
|
275
534
|
return args.polygon;
|
|
276
535
|
case 'eth':
|
|
@@ -315,6 +574,7 @@ var IFrameMessageMethods;
|
|
|
315
574
|
IFrameMessageMethods["Success"] = "success";
|
|
316
575
|
IFrameMessageMethods["AuthDeclined"] = "authDeclined";
|
|
317
576
|
IFrameMessageMethods["Loaded"] = "loaded";
|
|
577
|
+
IFrameMessageMethods["AccountLinked"] = "accountLinked";
|
|
318
578
|
})(IFrameMessageMethods || (IFrameMessageMethods = {}));
|
|
319
579
|
function getWalletPubkey(input) {
|
|
320
580
|
let wallet;
|
|
@@ -334,8 +594,6 @@ function getWalletPubkey(input) {
|
|
|
334
594
|
return wallet.publicKey ? wallet.publicKey.toString() : undefined;
|
|
335
595
|
if ('address' in wallet)
|
|
336
596
|
return wallet.address ? wallet.address : undefined;
|
|
337
|
-
if ('accountId' in wallet)
|
|
338
|
-
return wallet.accountId ? wallet.accountId : undefined;
|
|
339
597
|
}
|
|
340
598
|
return null;
|
|
341
599
|
}
|
|
@@ -378,6 +636,8 @@ function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId) {
|
|
|
378
636
|
return;
|
|
379
637
|
case IFrameMessageMethods.Loaded:
|
|
380
638
|
return;
|
|
639
|
+
case IFrameMessageMethods.AccountLinked:
|
|
640
|
+
return;
|
|
381
641
|
}
|
|
382
642
|
console.warn(`Didn't expect to get here, handleIFrameMessage method:${method} is not one of ${Object.values(IFrameMessageMethods)}`);
|
|
383
643
|
}
|
|
@@ -417,11 +677,6 @@ function getHandlers(props) {
|
|
|
417
677
|
onSuccess: props.onSuccess,
|
|
418
678
|
onAuthDeclined: props.onAuthDeclined,
|
|
419
679
|
}),
|
|
420
|
-
near: () => getNearWalletHandlers({
|
|
421
|
-
wallet: wallet,
|
|
422
|
-
onSuccess: props.onSuccess,
|
|
423
|
-
onAuthDeclined: props.onAuthDeclined,
|
|
424
|
-
}),
|
|
425
680
|
eth: () => getEvmWalletHandlers({
|
|
426
681
|
wallet: wallet,
|
|
427
682
|
onSuccess: props.onSuccess,
|
|
@@ -490,20 +745,6 @@ function getSolanaTransaction(data) {
|
|
|
490
745
|
return web3.Transaction.from(parsedUInt8Array);
|
|
491
746
|
return vtx;
|
|
492
747
|
}
|
|
493
|
-
function getNearWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
494
|
-
return {
|
|
495
|
-
handleSendTransaction: async (transaction) => {
|
|
496
|
-
const action = JSON.parse(Buffer.from(transaction, 'base64').toString());
|
|
497
|
-
const executionOutcome = await wallet.signAndSendTransaction(action);
|
|
498
|
-
if (!executionOutcome)
|
|
499
|
-
throw new Error('Transaction did not send');
|
|
500
|
-
const { transaction: transactionResult } = executionOutcome;
|
|
501
|
-
return transactionResult.hash;
|
|
502
|
-
},
|
|
503
|
-
onSuccess,
|
|
504
|
-
onAuthDeclined,
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
748
|
function getEvmWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
508
749
|
return {
|
|
509
750
|
handleSendTransaction: async (transaction) => {
|
|
@@ -693,6 +934,50 @@ function CSSPropertiesToComponent(dict) {
|
|
|
693
934
|
return str;
|
|
694
935
|
}
|
|
695
936
|
|
|
937
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
938
|
+
/* istanbul ignore file */
|
|
939
|
+
/* tslint:disable */
|
|
940
|
+
/* eslint-disable */
|
|
941
|
+
var nftCartItem;
|
|
942
|
+
(function (nftCartItem) {
|
|
943
|
+
/**
|
|
944
|
+
* Denotes the cart item class. The item schema is chosen based on this value
|
|
945
|
+
*/
|
|
946
|
+
let itemClass;
|
|
947
|
+
(function (itemClass) {
|
|
948
|
+
itemClass["NFT"] = "nft";
|
|
949
|
+
})(itemClass = nftCartItem.itemClass || (nftCartItem.itemClass = {}));
|
|
950
|
+
/**
|
|
951
|
+
* The product type. Possible values include: inGameProduct, gameOfSkill, dataStorage, computingResources, sportsTicket, eSportsTicket, musicTicket, conferenceTicket, virtualSportsTicket, virtualESportsTicket, virtualMusicTicket, virtualConferenceTicket, alcohol, DLC, subscription, fundACause, realEstate, computingContract, digitalArt, topUp
|
|
952
|
+
*/
|
|
953
|
+
let productType;
|
|
954
|
+
(function (productType) {
|
|
955
|
+
productType["IN_GAME_PRODUCT"] = "inGameProduct";
|
|
956
|
+
productType["GAME_OF_SKILL"] = "gameOfSkill";
|
|
957
|
+
productType["DATA_STORAGE"] = "dataStorage";
|
|
958
|
+
productType["COMPUTING_RESOURCES"] = "computingResources";
|
|
959
|
+
productType["SPORTS_TICKET"] = "sportsTicket";
|
|
960
|
+
productType["E_SPORTS_TICKET"] = "eSportsTicket";
|
|
961
|
+
productType["MUSIC_TICKET"] = "musicTicket";
|
|
962
|
+
productType["CONFERENCE_TICKET"] = "conferenceTicket";
|
|
963
|
+
productType["VIRTUAL_SPORTS_TICKET"] = "virtualSportsTicket";
|
|
964
|
+
productType["VIRTUAL_ESPORTS_TICKET"] = "virtualESportsTicket";
|
|
965
|
+
productType["VIRTUAL_MUSIC_TICKET"] = "virtualMusicTicket";
|
|
966
|
+
productType["VIRTUAL_CONFERENCE_TICKET"] = "virtualConferenceTicket";
|
|
967
|
+
productType["ALCOHOL"] = "alcohol";
|
|
968
|
+
productType["DLC"] = "DLC";
|
|
969
|
+
productType["SUBSCRIPTION"] = "subscription";
|
|
970
|
+
productType["FUND_ACAUSE"] = "fundACause";
|
|
971
|
+
productType["REAL_ESTATE"] = "realEstate";
|
|
972
|
+
productType["COMPUTING_CONTRACT"] = "computingContract";
|
|
973
|
+
productType["DIGITAL_ART"] = "digitalArt";
|
|
974
|
+
productType["TOP_UP"] = "topUp";
|
|
975
|
+
productType["OWNERSHIP_CONTRACT"] = "ownershipContract";
|
|
976
|
+
productType["IN_GAME_CURRENCY"] = "inGameCurrency";
|
|
977
|
+
productType["MONEY_TOP_UP_CART_ITEM"] = "moneyTopUpCartItem";
|
|
978
|
+
})(productType = nftCartItem.productType || (nftCartItem.productType = {}));
|
|
979
|
+
})(nftCartItem || (nftCartItem = {}));
|
|
980
|
+
|
|
696
981
|
class CoinflowIFrameComponent {
|
|
697
982
|
constructor(sanitizer) {
|
|
698
983
|
this.sanitizer = sanitizer;
|
|
@@ -1202,97 +1487,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
1202
1487
|
type: Input
|
|
1203
1488
|
}] } });
|
|
1204
1489
|
|
|
1205
|
-
class CoinflowApplePayOverlayComponent {
|
|
1206
|
-
fill() {
|
|
1207
|
-
return this.color === 'white' ? '#000' : '#FFF';
|
|
1208
|
-
}
|
|
1209
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CoinflowApplePayOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1210
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.1", type: CoinflowApplePayOverlayComponent, isStandalone: true, selector: "coinflow-apple-pay-overlay", inputs: { color: "color" }, ngImport: i0, template: `
|
|
1211
|
-
<svg id="svg-logo" viewBox="0 0 35 15">
|
|
1212
|
-
<svg
|
|
1213
|
-
id="svg-logo"
|
|
1214
|
-
x="0"
|
|
1215
|
-
y="3.85"
|
|
1216
|
-
height="7.3"
|
|
1217
|
-
width="35"
|
|
1218
|
-
className="logo"
|
|
1219
|
-
viewBox="0 0 105 43"
|
|
1220
|
-
version="1.1"
|
|
1221
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1222
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
1223
|
-
>
|
|
1224
|
-
<title>Apple Logo</title>
|
|
1225
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
1226
|
-
<g fill="#000">
|
|
1227
|
-
<path
|
|
1228
|
-
d="M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674"
|
|
1229
|
-
></path>
|
|
1230
|
-
<path
|
|
1231
|
-
d="M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926"
|
|
1232
|
-
></path>
|
|
1233
|
-
<path
|
|
1234
|
-
d="M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381"
|
|
1235
|
-
></path>
|
|
1236
|
-
<path
|
|
1237
|
-
d="M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z"
|
|
1238
|
-
></path>
|
|
1239
|
-
<path
|
|
1240
|
-
d="M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345"
|
|
1241
|
-
></path>
|
|
1242
|
-
</g>
|
|
1243
|
-
</g>
|
|
1244
|
-
</svg>
|
|
1245
|
-
</svg>
|
|
1246
|
-
`, isInline: true }); }
|
|
1247
|
-
}
|
|
1248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CoinflowApplePayOverlayComponent, decorators: [{
|
|
1249
|
-
type: Component,
|
|
1250
|
-
args: [{
|
|
1251
|
-
selector: 'coinflow-apple-pay-overlay',
|
|
1252
|
-
standalone: true,
|
|
1253
|
-
imports: [],
|
|
1254
|
-
template: `
|
|
1255
|
-
<svg id="svg-logo" viewBox="0 0 35 15">
|
|
1256
|
-
<svg
|
|
1257
|
-
id="svg-logo"
|
|
1258
|
-
x="0"
|
|
1259
|
-
y="3.85"
|
|
1260
|
-
height="7.3"
|
|
1261
|
-
width="35"
|
|
1262
|
-
className="logo"
|
|
1263
|
-
viewBox="0 0 105 43"
|
|
1264
|
-
version="1.1"
|
|
1265
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1266
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
1267
|
-
>
|
|
1268
|
-
<title>Apple Logo</title>
|
|
1269
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
1270
|
-
<g fill="#000">
|
|
1271
|
-
<path
|
|
1272
|
-
d="M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674"
|
|
1273
|
-
></path>
|
|
1274
|
-
<path
|
|
1275
|
-
d="M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926"
|
|
1276
|
-
></path>
|
|
1277
|
-
<path
|
|
1278
|
-
d="M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381"
|
|
1279
|
-
></path>
|
|
1280
|
-
<path
|
|
1281
|
-
d="M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z"
|
|
1282
|
-
></path>
|
|
1283
|
-
<path
|
|
1284
|
-
d="M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345"
|
|
1285
|
-
></path>
|
|
1286
|
-
</g>
|
|
1287
|
-
</g>
|
|
1288
|
-
</svg>
|
|
1289
|
-
</svg>
|
|
1290
|
-
`,
|
|
1291
|
-
}]
|
|
1292
|
-
}], propDecorators: { color: [{
|
|
1293
|
-
type: Input
|
|
1294
|
-
}] } });
|
|
1295
|
-
|
|
1296
1490
|
class CoinflowApplePayButtonComponent {
|
|
1297
1491
|
fill() {
|
|
1298
1492
|
return this.purchaseProps.color === 'white' ? '#000' : '#FFF';
|
|
@@ -1345,10 +1539,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
1345
1539
|
args: [{
|
|
1346
1540
|
selector: 'lib-coinflow-apple-pay-button',
|
|
1347
1541
|
standalone: true,
|
|
1348
|
-
imports: [
|
|
1349
|
-
CoinflowMobileWalletButtonComponent,
|
|
1350
|
-
CoinflowApplePayOverlayComponent,
|
|
1351
|
-
],
|
|
1542
|
+
imports: [CoinflowMobileWalletButtonComponent],
|
|
1352
1543
|
template: ` <lib-coinflow-mobile-wallet-button
|
|
1353
1544
|
ng-if="iframeProps && messageHandlers"
|
|
1354
1545
|
[purchaseProps]="purchaseProps"
|