@coinflowlabs/angular 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/fesm2022/coinflowlabs-angular.mjs +99 -59
- package/fesm2022/coinflowlabs-angular.mjs.map +1 -1
- package/package.json +5 -5
- package/types/coinflowlabs-angular.d.ts +1529 -0
- package/index.d.ts +0 -5
- package/lib/card-form/CardFormService.d.ts +0 -14
- package/lib/card-form/coinflow-card-number-input.component.d.ts +0 -17
- package/lib/card-form/coinflow-card-number-only-input.component.d.ts +0 -17
- package/lib/card-form/coinflow-cvv-input.component.d.ts +0 -6
- package/lib/card-form/coinflow-cvv-only-input.component.d.ts +0 -19
- package/lib/coinflow-iframe.component.d.ts +0 -22
- package/lib/coinflow-purchase-history.component.d.ts +0 -5
- package/lib/coinflow-purchase-protection.component.d.ts +0 -5
- package/lib/coinflow-purchase.component.d.ts +0 -11
- package/lib/coinflow-withdraw-history.component.d.ts +0 -5
- package/lib/coinflow-withdraw.component.d.ts +0 -11
- package/lib/common/CoinflowLibMessageHandlers.d.ts +0 -35
- package/lib/common/CoinflowTypes.d.ts +0 -547
- package/lib/common/CoinflowUtils.d.ts +0 -24
- package/lib/common/EventBus.d.ts +0 -6
- package/lib/common/SolanaPeerDeps.d.ts +0 -5
- package/lib/common/card-form/TokenEx.d.ts +0 -171
- package/lib/common/card-form/tokenexHelpers.d.ts +0 -35
- package/lib/common/index.d.ts +0 -11
- package/lib/common/types/AnyObject.d.ts +0 -5
- package/lib/common/types/CartitemCommon.d.ts +0 -163
- package/lib/common/types/Subtotal.d.ts +0 -210
- package/lib/common/types/cryptoCartItem.d.ts +0 -63
- package/lib/common/types/giftCardCartItem.d.ts +0 -58
- package/lib/common/types/moneyTopUpCartItem.d.ts +0 -44
- package/lib/common/types/nftCartItem.d.ts +0 -108
- package/lib/mobile-wallet/coinflow-apple-pay-button.component.d.ts +0 -11
- package/lib/mobile-wallet/coinflow-google-pay-button.component.d.ts +0 -10
- package/lib/mobile-wallet/coinflow-mobile-wallet-button.component.d.ts +0 -22
- package/lib/mobile-wallet/google-pay-overlay.component.d.ts +0 -6
- package/public-api.d.ts +0 -16
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
import type { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
|
|
2
|
-
import { Currency, Subtotal } from './types/Subtotal';
|
|
3
|
-
import { GiftCardCartItem } from './types/giftCardCartItem';
|
|
4
|
-
import { nftCartItem } from './types/nftCartItem';
|
|
5
|
-
import { CryptoCartItem } from './types/cryptoCartItem';
|
|
6
|
-
import { MoneyTopUpCartItem } from './types/moneyTopUpCartItem';
|
|
7
|
-
export declare enum WithdrawCategory {
|
|
8
|
-
USER = "user",
|
|
9
|
-
BUSINESS = "business"
|
|
10
|
-
}
|
|
11
|
-
export declare enum WithdrawSpeed {
|
|
12
|
-
ASAP = "asap",
|
|
13
|
-
SAME_DAY = "same_day",
|
|
14
|
-
STANDARD = "standard",
|
|
15
|
-
CARD = "card",
|
|
16
|
-
IBAN = "iban",
|
|
17
|
-
PIX = "pix",
|
|
18
|
-
EFT = "eft",
|
|
19
|
-
VENMO = "venmo",
|
|
20
|
-
PAYPAL = "paypal",
|
|
21
|
-
WIRE = "wire",
|
|
22
|
-
INTERAC = "interac"
|
|
23
|
-
}
|
|
24
|
-
export declare enum SettlementType {
|
|
25
|
-
Credits = "Credits",
|
|
26
|
-
USDC = "USDC",
|
|
27
|
-
Bank = "Bank"
|
|
28
|
-
}
|
|
29
|
-
export declare enum MerchantStyle {
|
|
30
|
-
Rounded = "rounded",
|
|
31
|
-
Sharp = "sharp",
|
|
32
|
-
Pill = "pill"
|
|
33
|
-
}
|
|
34
|
-
export type MerchantTheme = {
|
|
35
|
-
primary?: string;
|
|
36
|
-
background?: string;
|
|
37
|
-
backgroundAccent?: string;
|
|
38
|
-
backgroundAccent2?: string;
|
|
39
|
-
textColor?: string;
|
|
40
|
-
textColorAccent?: string;
|
|
41
|
-
textColorAction?: string;
|
|
42
|
-
ctaColor?: string;
|
|
43
|
-
font?: string;
|
|
44
|
-
style?: MerchantStyle;
|
|
45
|
-
};
|
|
46
|
-
interface BaseCustomerInfo {
|
|
47
|
-
verificationId?: string;
|
|
48
|
-
displayName?: string;
|
|
49
|
-
address?: string;
|
|
50
|
-
city?: string;
|
|
51
|
-
state?: string;
|
|
52
|
-
zip?: string;
|
|
53
|
-
country?: string;
|
|
54
|
-
ip?: string;
|
|
55
|
-
lat?: string;
|
|
56
|
-
lng?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Date of birth in YYYY-MM-DD format
|
|
59
|
-
*/
|
|
60
|
-
dob?: string;
|
|
61
|
-
email?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface NameCustomerInfo extends BaseCustomerInfo {
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
name?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface SplitNameCustomerInfo extends BaseCustomerInfo {
|
|
70
|
-
/**
|
|
71
|
-
* @minLength 1
|
|
72
|
-
*/
|
|
73
|
-
firstName: string;
|
|
74
|
-
/**
|
|
75
|
-
* @minLength 1
|
|
76
|
-
*/
|
|
77
|
-
lastName: string;
|
|
78
|
-
}
|
|
79
|
-
export type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
|
|
80
|
-
/** Coinflow Types **/
|
|
81
|
-
export type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
|
|
82
|
-
export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
|
|
83
|
-
export interface CoinflowTypes {
|
|
84
|
-
merchantId: string;
|
|
85
|
-
env?: CoinflowEnvs;
|
|
86
|
-
loaderBackground?: string;
|
|
87
|
-
blockchain?: CoinflowBlockchain | undefined;
|
|
88
|
-
handleHeightChange?: (height: string) => void;
|
|
89
|
-
theme?: MerchantTheme;
|
|
90
|
-
}
|
|
91
|
-
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
92
|
-
export type OnSuccessMethod = (args: {
|
|
93
|
-
paymentId: string;
|
|
94
|
-
hash?: string | undefined;
|
|
95
|
-
} | string) => void | Promise<void>;
|
|
96
|
-
export type AuthDeclinedWalletCallInfo = {
|
|
97
|
-
title: string;
|
|
98
|
-
code: string;
|
|
99
|
-
action: string;
|
|
100
|
-
message: string;
|
|
101
|
-
total: string;
|
|
102
|
-
};
|
|
103
|
-
export type OnAuthDeclinedMethod = (args: AuthDeclinedWalletCallInfo) => void | Promise<void>;
|
|
104
|
-
/** Wallets **/
|
|
105
|
-
export interface SolanaWallet {
|
|
106
|
-
publicKey: PublicKey | null;
|
|
107
|
-
signTransaction?: <T extends Transaction | VersionedTransaction>(transaction: T) => Promise<T>;
|
|
108
|
-
sendTransaction: <T extends Transaction | VersionedTransaction>(transaction: T) => Promise<string>;
|
|
109
|
-
signMessage?: (message: Uint8Array) => Promise<Uint8Array>;
|
|
110
|
-
}
|
|
111
|
-
type AccessList = Array<{
|
|
112
|
-
address: string;
|
|
113
|
-
storageKeys: Array<string>;
|
|
114
|
-
}>;
|
|
115
|
-
type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
116
|
-
export type EthWallet = {
|
|
117
|
-
address: string | null | undefined;
|
|
118
|
-
sendTransaction: (transaction: {
|
|
119
|
-
to: string;
|
|
120
|
-
from?: string;
|
|
121
|
-
nonce?: Bytes | bigint | string | number;
|
|
122
|
-
gasLimit?: Bytes | bigint | string | number;
|
|
123
|
-
gasPrice?: Bytes | bigint | string | number;
|
|
124
|
-
data?: BytesLike;
|
|
125
|
-
value?: Bytes | bigint | string | number;
|
|
126
|
-
chainId?: number;
|
|
127
|
-
type?: number;
|
|
128
|
-
accessList?: AccessListish;
|
|
129
|
-
maxPriorityFeePerGas?: Bytes | bigint | string | number;
|
|
130
|
-
maxFeePerGas?: Bytes | bigint | string | number;
|
|
131
|
-
customData?: Record<string, any>;
|
|
132
|
-
ccipReadEnabled?: boolean;
|
|
133
|
-
}) => Promise<{
|
|
134
|
-
hash: string;
|
|
135
|
-
}>;
|
|
136
|
-
signMessage: (message: string) => Promise<string>;
|
|
137
|
-
};
|
|
138
|
-
/** History **/
|
|
139
|
-
export interface CoinflowSolanaHistoryProps extends CoinflowTypes {
|
|
140
|
-
wallet: SolanaWallet;
|
|
141
|
-
connection: Connection;
|
|
142
|
-
blockchain: 'solana';
|
|
143
|
-
}
|
|
144
|
-
export interface CoinflowSessionKeyHistoryProps extends CoinflowTypes {
|
|
145
|
-
sessionKey: string;
|
|
146
|
-
blockchain?: undefined;
|
|
147
|
-
}
|
|
148
|
-
export interface CoinflowEvmHistoryProps extends CoinflowTypes {
|
|
149
|
-
wallet: EthWallet;
|
|
150
|
-
blockchain: 'eth' | 'polygon' | 'base' | 'arbitrum';
|
|
151
|
-
}
|
|
152
|
-
export interface CoinflowEthHistoryProps extends CoinflowEvmHistoryProps {
|
|
153
|
-
blockchain: 'eth';
|
|
154
|
-
}
|
|
155
|
-
export interface CoinflowPolygonHistoryProps extends CoinflowEvmHistoryProps {
|
|
156
|
-
blockchain: 'polygon';
|
|
157
|
-
}
|
|
158
|
-
export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
|
|
159
|
-
blockchain: 'base';
|
|
160
|
-
}
|
|
161
|
-
export interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
|
|
162
|
-
blockchain: 'arbitrum';
|
|
163
|
-
}
|
|
164
|
-
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowSessionKeyHistoryProps;
|
|
165
|
-
type Bytes = ArrayLike<number>;
|
|
166
|
-
type BytesLike = Bytes | string;
|
|
167
|
-
/** Purchase **/
|
|
168
|
-
export type CartClassOmitted = CartItemClassOmitted[];
|
|
169
|
-
export type ChargebackProtectionData = CartClassOmitted;
|
|
170
|
-
export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
|
|
171
|
-
export type ChargebackProtectionItem = CartItemClassOmitted;
|
|
172
|
-
export type NftCartItemClassOmitted = Omit<nftCartItem, 'listPrice' | 'sellingPrice' | 'itemClass'>;
|
|
173
|
-
export type Cart = CartItem[];
|
|
174
|
-
export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
|
|
175
|
-
export declare enum ThreeDsChallengePreference {
|
|
176
|
-
NoPreference = "NoPreference",
|
|
177
|
-
Frictionless = "Frictionless",
|
|
178
|
-
Challenge = "Challenge"
|
|
179
|
-
}
|
|
180
|
-
export declare enum PaymentMethods {
|
|
181
|
-
card = "card",
|
|
182
|
-
ach = "ach",
|
|
183
|
-
fasterPayments = "fasterPayments",
|
|
184
|
-
sepa = "sepa",
|
|
185
|
-
pix = "pix",
|
|
186
|
-
usdc = "usdc",
|
|
187
|
-
googlePay = "googlePay",
|
|
188
|
-
applePay = "applePay",
|
|
189
|
-
credits = "credits",
|
|
190
|
-
crypto = "crypto",
|
|
191
|
-
instantBankTransfer = "instantBankTransfer",
|
|
192
|
-
wire = "wire"
|
|
193
|
-
}
|
|
194
|
-
export declare const paymentMethodLabels: Record<PaymentMethods, string>;
|
|
195
|
-
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
196
|
-
subtotal?: Subtotal;
|
|
197
|
-
presentment?: Currency;
|
|
198
|
-
onSuccess?: OnSuccessMethod;
|
|
199
|
-
onAuthDeclined?: OnAuthDeclinedMethod;
|
|
200
|
-
webhookInfo?: {
|
|
201
|
-
[key: string]: any;
|
|
202
|
-
};
|
|
203
|
-
email?: string;
|
|
204
|
-
chargebackProtectionData?: ChargebackProtectionData;
|
|
205
|
-
planCode?: string;
|
|
206
|
-
/**
|
|
207
|
-
* The payment methods displayed on the UI. If omitted, all available payment methods will be displayed.
|
|
208
|
-
*/
|
|
209
|
-
allowedPaymentMethods?: PaymentMethods[];
|
|
210
|
-
customerInfo?: CustomerInfo;
|
|
211
|
-
settlementType?: SettlementType;
|
|
212
|
-
authOnly?: boolean;
|
|
213
|
-
isZeroAuthorization?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* If true, pre-checks the partial USDC payment checkbox when USDC balance is available.
|
|
216
|
-
* If false or undefined, maintains default behavior (unchecked).
|
|
217
|
-
*/
|
|
218
|
-
partialUsdcChecked?: boolean;
|
|
219
|
-
/**
|
|
220
|
-
* The DeviceID gotten from the Coinflow SDK:
|
|
221
|
-
* https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
222
|
-
*
|
|
223
|
-
* nSureSDK.getDeviceId()
|
|
224
|
-
*/
|
|
225
|
-
deviceId?: string;
|
|
226
|
-
jwtToken?: string;
|
|
227
|
-
/**
|
|
228
|
-
* Your company email address that the customer can contact.
|
|
229
|
-
*/
|
|
230
|
-
supportEmail?: string;
|
|
231
|
-
/**
|
|
232
|
-
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
233
|
-
*
|
|
234
|
-
* Example:
|
|
235
|
-
* Primary origin that will be interacting with the Coinflow iFrame: foo.com
|
|
236
|
-
* Subsequent origins that will render foo.com: bar.com
|
|
237
|
-
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
238
|
-
*/
|
|
239
|
-
origins?: string[];
|
|
240
|
-
threeDsChallengePreference?: ThreeDsChallengePreference;
|
|
241
|
-
destinationAuthKey?: string;
|
|
242
|
-
accountFundingTransaction?: AccountFundingTransaction;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Used for Account Funding Transactions
|
|
246
|
-
*/
|
|
247
|
-
export interface AccountFundingTransaction {
|
|
248
|
-
/**
|
|
249
|
-
* Recipient information for Account Funding Transactions (AFT).
|
|
250
|
-
* Required when AFT is enabled and type requires it.
|
|
251
|
-
*/
|
|
252
|
-
recipientAftInfo?: RecipientAftInfo;
|
|
253
|
-
}
|
|
254
|
-
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
255
|
-
wallet: SolanaWallet;
|
|
256
|
-
transaction?: Transaction | VersionedTransaction;
|
|
257
|
-
partialSigners?: Signer[];
|
|
258
|
-
debugTx?: boolean;
|
|
259
|
-
connection: Connection;
|
|
260
|
-
blockchain: 'solana';
|
|
261
|
-
rent?: {
|
|
262
|
-
lamports: string | number;
|
|
263
|
-
};
|
|
264
|
-
nativeSolToConvert?: {
|
|
265
|
-
lamports: string | number;
|
|
266
|
-
};
|
|
267
|
-
redemptionCheck?: boolean;
|
|
268
|
-
}
|
|
269
|
-
export interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
270
|
-
sessionKey: string;
|
|
271
|
-
wallet?: undefined;
|
|
272
|
-
blockchain?: CoinflowBlockchain | undefined;
|
|
273
|
-
}
|
|
274
|
-
export interface CoinflowEvmPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
275
|
-
transaction?: EvmTransactionData;
|
|
276
|
-
wallet: EthWallet;
|
|
277
|
-
}
|
|
278
|
-
export interface CoinflowPolygonPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
279
|
-
blockchain: 'polygon';
|
|
280
|
-
}
|
|
281
|
-
export interface CoinflowEthPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
282
|
-
blockchain: 'eth';
|
|
283
|
-
}
|
|
284
|
-
export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
|
|
285
|
-
blockchain: 'base';
|
|
286
|
-
}
|
|
287
|
-
export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
288
|
-
blockchain: 'arbitrum';
|
|
289
|
-
}
|
|
290
|
-
export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
|
|
291
|
-
/** Withdraw **/
|
|
292
|
-
export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
293
|
-
onSuccess?: OnSuccessMethod;
|
|
294
|
-
tokens?: string[];
|
|
295
|
-
lockDefaultToken?: boolean;
|
|
296
|
-
amount?: number;
|
|
297
|
-
email?: string;
|
|
298
|
-
bankAccountLinkRedirect?: string;
|
|
299
|
-
additionalWallets?: {
|
|
300
|
-
wallet: string;
|
|
301
|
-
blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum';
|
|
302
|
-
}[];
|
|
303
|
-
lockAmount?: boolean;
|
|
304
|
-
transactionSigner?: string;
|
|
305
|
-
/**
|
|
306
|
-
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
307
|
-
*
|
|
308
|
-
* Example:
|
|
309
|
-
* Primary origin that will be interacting with the Coinflow iFrame: foo.com
|
|
310
|
-
* Subsequent origins that will render foo.com: bar.com
|
|
311
|
-
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
312
|
-
*/
|
|
313
|
-
origins?: string[];
|
|
314
|
-
/**
|
|
315
|
-
* If the withdrawer is authenticated with a sessionKey pass it here.
|
|
316
|
-
*/
|
|
317
|
-
sessionKey?: string;
|
|
318
|
-
/**
|
|
319
|
-
* Array of allowed withdrawal speeds. If not provided, all speeds are allowed.
|
|
320
|
-
*/
|
|
321
|
-
allowedWithdrawSpeeds?: WithdrawSpeed[];
|
|
322
|
-
}
|
|
323
|
-
export type WalletTypes = SolanaWallet | EthWallet;
|
|
324
|
-
export interface SolanaWalletProps {
|
|
325
|
-
wallet: SolanaWallet;
|
|
326
|
-
connection: Connection;
|
|
327
|
-
blockchain: 'solana';
|
|
328
|
-
}
|
|
329
|
-
export type CoinflowSolanaWithdrawProps = CoinflowCommonWithdrawProps & SolanaWalletProps;
|
|
330
|
-
interface EvmWalletProps {
|
|
331
|
-
wallet: EthWallet;
|
|
332
|
-
usePermit?: boolean;
|
|
333
|
-
}
|
|
334
|
-
type CoinflowEvmWithdrawProps = CoinflowCommonWithdrawProps & EvmWalletProps;
|
|
335
|
-
export interface EthWalletProps {
|
|
336
|
-
blockchain: 'eth';
|
|
337
|
-
}
|
|
338
|
-
export type CoinflowEthWithdrawProps = CoinflowEvmWithdrawProps & EthWalletProps;
|
|
339
|
-
export interface PolygonWalletProps {
|
|
340
|
-
blockchain: 'polygon';
|
|
341
|
-
}
|
|
342
|
-
export type CoinflowPolygonWithdrawProps = CoinflowEvmWithdrawProps & PolygonWalletProps;
|
|
343
|
-
export interface BaseWalletProps {
|
|
344
|
-
blockchain: 'base';
|
|
345
|
-
}
|
|
346
|
-
export type CoinflowBaseWithdrawProps = CoinflowEvmWithdrawProps & BaseWalletProps;
|
|
347
|
-
export interface ArbitrumWalletProps {
|
|
348
|
-
blockchain: 'arbitrum';
|
|
349
|
-
}
|
|
350
|
-
export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
|
|
351
|
-
export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
|
|
352
|
-
export interface CommonEvmRedeem {
|
|
353
|
-
/**
|
|
354
|
-
* Whether the UI should wait
|
|
355
|
-
* for the transaction to be sent and
|
|
356
|
-
* the hash to be returned.
|
|
357
|
-
*/
|
|
358
|
-
waitForHash?: boolean;
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* (EVM only) If your contract sends the item/service being purchased via a custom "receiver" field, then utilize this object.
|
|
362
|
-
*
|
|
363
|
-
* The coinflow contract calls the "to" contract, which transfers the NFT/item to the "receiver" address defined in the contract function arguments.
|
|
364
|
-
*/
|
|
365
|
-
export interface NormalRedeem extends CommonEvmRedeem {
|
|
366
|
-
/**
|
|
367
|
-
* Transaction to be called.
|
|
368
|
-
*/
|
|
369
|
-
transaction: {
|
|
370
|
-
/**
|
|
371
|
-
* The merchant's whitelisted contract
|
|
372
|
-
*/
|
|
373
|
-
to: string;
|
|
374
|
-
/**
|
|
375
|
-
* The data to call this contract with, HEX encoded.
|
|
376
|
-
*
|
|
377
|
-
* The coinflow contract calls the "to" contract, contract pulls USDC from msg.sender, and transfers the NFT/item to the "receiver" address defined in the contract function arguments.
|
|
378
|
-
*/
|
|
379
|
-
data: string;
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* (EVM only) If your know the ID of the NFT being purchased, then utilize this object.
|
|
384
|
-
*
|
|
385
|
-
* The contract transfers the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract fwd's the NFT to the end user's wallet.
|
|
386
|
-
*/
|
|
387
|
-
export interface KnownTokenIdRedeem extends NormalRedeem {
|
|
388
|
-
/**
|
|
389
|
-
* The address of the Nft's Contract
|
|
390
|
-
*
|
|
391
|
-
* @minLength 42 Please provide a valid EVM Address (42 Characters Long)
|
|
392
|
-
* @maxLength 42 Please provide a valid EVM Address (42 Characters Long)
|
|
393
|
-
*/
|
|
394
|
-
nftContract: string;
|
|
395
|
-
/**
|
|
396
|
-
* The ID of the NFT being purchased. Will be forwarded by the Coinflow contract to the customer's wallet.
|
|
397
|
-
*
|
|
398
|
-
* @minLength 1 Please provide a valid Nft Id
|
|
399
|
-
*/
|
|
400
|
-
nftId: string;
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* (EVM only) If your contract mints an NFT via a OpenZeppelin Safe Mint Call, then utilize this object.
|
|
404
|
-
*
|
|
405
|
-
* The contract mints the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract picks up the SafeMint event, and fwd's the NFT to the end user's wallet.
|
|
406
|
-
*/
|
|
407
|
-
export interface SafeMintRedeem extends NormalRedeem {
|
|
408
|
-
type: 'safeMint';
|
|
409
|
-
nftContract?: string;
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* (EVM only) If your contract returns the NFT ID, then utilize this object.
|
|
413
|
-
*
|
|
414
|
-
* The contract mints the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract picks up the returned NFT ID, and fwd's the NFT to the end user's wallet.
|
|
415
|
-
*/
|
|
416
|
-
export interface ReturnedTokenIdRedeem extends NormalRedeem {
|
|
417
|
-
type: 'returned';
|
|
418
|
-
nftContract?: string;
|
|
419
|
-
}
|
|
420
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
421
|
-
export type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
|
|
422
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
423
|
-
export interface ReservoirOrderIdItem {
|
|
424
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
425
|
-
orderId: string;
|
|
426
|
-
}
|
|
427
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
428
|
-
export type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
|
|
429
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
430
|
-
export type ReservoirItems = ReservoirItem | ReservoirItem[];
|
|
431
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
432
|
-
export interface ReservoirRedeem extends CommonEvmRedeem {
|
|
433
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
434
|
-
type: 'reservoir';
|
|
435
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
436
|
-
items: ReservoirItems;
|
|
437
|
-
/** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
|
|
438
|
-
taker?: string;
|
|
439
|
-
}
|
|
440
|
-
export interface TokenRedeem extends CommonEvmRedeem {
|
|
441
|
-
type: 'token';
|
|
442
|
-
destination: string;
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* If your contract exists on a chain supported by Decent, pass this object in order to call it.
|
|
446
|
-
*/
|
|
447
|
-
export interface DecentRedeem extends CommonEvmRedeem {
|
|
448
|
-
type: 'decent';
|
|
449
|
-
/**
|
|
450
|
-
* ID of the destination chain you will be using
|
|
451
|
-
* Find your chain ID here: https://chainlist.org/
|
|
452
|
-
*/
|
|
453
|
-
dstChainId: number;
|
|
454
|
-
/**
|
|
455
|
-
* Address on that chain of the token you will be receiving
|
|
456
|
-
*/
|
|
457
|
-
dstToken: string;
|
|
458
|
-
/**
|
|
459
|
-
* The contract address which will be called on the destination chain
|
|
460
|
-
*/
|
|
461
|
-
contractAddress: string;
|
|
462
|
-
contractData: string;
|
|
463
|
-
/**
|
|
464
|
-
* Amount of the token on the destination chain you will be receiving
|
|
465
|
-
*/
|
|
466
|
-
cost: {
|
|
467
|
-
/**
|
|
468
|
-
* This is the raw amount of the token
|
|
469
|
-
* ex: 50000000000000n
|
|
470
|
-
*/
|
|
471
|
-
amount: string;
|
|
472
|
-
/**
|
|
473
|
-
* Whether or not the token is the native token for the chain (ex: Ethereum - ETH, Polygon - POL).
|
|
474
|
-
* If native dstToken should be the 0 address (0x00...)
|
|
475
|
-
*/
|
|
476
|
-
isNative: boolean;
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* (EVM only) if you want to execute an EVM transaction on a successful purchase, you can pass a transaction request here.
|
|
481
|
-
*
|
|
482
|
-
* Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
|
|
483
|
-
*/
|
|
484
|
-
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem | ReservoirRedeem;
|
|
485
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'> {
|
|
486
|
-
walletPubkey: string | null | undefined;
|
|
487
|
-
sessionKey?: string;
|
|
488
|
-
route: string;
|
|
489
|
-
routePrefix?: string;
|
|
490
|
-
transaction?: string;
|
|
491
|
-
tokens?: string[] | PublicKey[];
|
|
492
|
-
merchantCss?: string;
|
|
493
|
-
color?: 'white' | 'black';
|
|
494
|
-
disableApplePay?: boolean;
|
|
495
|
-
disableGooglePay?: boolean;
|
|
496
|
-
theme?: MerchantTheme;
|
|
497
|
-
usePermit?: boolean;
|
|
498
|
-
handleHeightChangeId: string | number;
|
|
499
|
-
}
|
|
500
|
-
export declare enum CardType {
|
|
501
|
-
VISA = "VISA",
|
|
502
|
-
MASTERCARD = "MSTR",
|
|
503
|
-
AMEX = "AMEX",
|
|
504
|
-
DISCOVER = "DISC"
|
|
505
|
-
}
|
|
506
|
-
export interface RecipientAftInfo {
|
|
507
|
-
/**
|
|
508
|
-
* @minLength 2
|
|
509
|
-
*/
|
|
510
|
-
firstName: string;
|
|
511
|
-
/**
|
|
512
|
-
* @minLength 2
|
|
513
|
-
*/
|
|
514
|
-
lastName: string;
|
|
515
|
-
/**
|
|
516
|
-
* @minLength 2
|
|
517
|
-
*/
|
|
518
|
-
address1: string;
|
|
519
|
-
/**
|
|
520
|
-
* @minLength 2
|
|
521
|
-
*/
|
|
522
|
-
city: string;
|
|
523
|
-
/**
|
|
524
|
-
* @minLength 2
|
|
525
|
-
*/
|
|
526
|
-
postalCode: string;
|
|
527
|
-
/**
|
|
528
|
-
* @minLength 2
|
|
529
|
-
*/
|
|
530
|
-
state?: string;
|
|
531
|
-
/**
|
|
532
|
-
* @minLength 2
|
|
533
|
-
* @maxLength 2
|
|
534
|
-
*/
|
|
535
|
-
countryCode: string;
|
|
536
|
-
/**
|
|
537
|
-
* Recipients Date Of Birth in YYYMMDD format.
|
|
538
|
-
* @pattern ^\d{8}$
|
|
539
|
-
*/
|
|
540
|
-
dateOfBirth?: string;
|
|
541
|
-
/**
|
|
542
|
-
* @pattern ^\d+$
|
|
543
|
-
*/
|
|
544
|
-
phoneNumber?: string;
|
|
545
|
-
documentReference?: string;
|
|
546
|
-
}
|
|
547
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, CustomerInfo } from './CoinflowTypes';
|
|
2
|
-
export declare class CoinflowUtils {
|
|
3
|
-
env: CoinflowEnvs;
|
|
4
|
-
url: string;
|
|
5
|
-
constructor(env?: CoinflowEnvs);
|
|
6
|
-
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
7
|
-
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
|
-
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
9
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, 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, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, }: CoinflowIFrameProps): string;
|
|
10
|
-
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
11
|
-
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
12
|
-
solana: T;
|
|
13
|
-
eth: T;
|
|
14
|
-
polygon: T;
|
|
15
|
-
base: T;
|
|
16
|
-
arbitrum: T;
|
|
17
|
-
user: T;
|
|
18
|
-
}): T;
|
|
19
|
-
}
|
|
20
|
-
export interface FullName {
|
|
21
|
-
firstName: string;
|
|
22
|
-
lastName: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function getCustomerName(info: CustomerInfo | undefined): FullName | undefined;
|
package/lib/common/EventBus.d.ts
DELETED