@coinflowlabs/react-native 3.1.3 → 3.1.5-SNAPSHOT1
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 -3
- package/build/CoinflowWebView.js +1 -1
- package/build/CoinflowWebView.js.map +1 -1
- package/build/common/CoinflowTypes.d.ts +26 -5
- package/build/common/CoinflowTypes.js +7 -0
- package/build/common/CoinflowTypes.js.map +1 -1
- package/build/common/CoinflowUtils.d.ts +1 -1
- package/build/common/CoinflowUtils.js +9 -12
- package/build/common/CoinflowUtils.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,6 @@ Props:
|
|
|
22
22
|
* `lockDefaultToken` (optional): Only allow the default token to be used
|
|
23
23
|
* `email` (optional): Set the default email to be used in entry fields
|
|
24
24
|
* `bankAccountLinkRedirect` (optional): The URL to be used for bank account setup
|
|
25
|
-
* `supportsVersionedTransactions` (optional): Instruct the system that versioned transactions are supported
|
|
26
25
|
* `additionalWallets` (optional): Define additional wallets to assign to the user
|
|
27
26
|
* `usePermit` (optional): Pass as false to disable permit message signing for EVM and use approve transactions
|
|
28
27
|
* `transactionSigner` (optional): Public Key of the wallet which will actually execute the withdrawal transaction. Must be associated with the same withdrawer as the main wallet.
|
|
@@ -56,10 +55,13 @@ Props:
|
|
|
56
55
|
* `disableApplePay` (optional): Ability to disable Apple Pay
|
|
57
56
|
* `disableGooglePay` (optional): Ability to disable Google Pay
|
|
58
57
|
* `customerInfo` (optional): Additional information about the customer
|
|
59
|
-
* `supportsVersionedTransactions` (optional): Instruct the system that you support versioned transactions
|
|
60
58
|
* `rent` (optional, Solana only): Specify the blockchain rent amount to add to the total
|
|
61
59
|
* `nativeSolToConvert` (optional, Solana only): Specify the amount of native SOL to convert wSOL for the purchase
|
|
62
60
|
|
|
61
|
+
## 3.1.4
|
|
62
|
+
|
|
63
|
+
- Fix redirect bug on checkout component
|
|
64
|
+
|
|
63
65
|
## 3.1.0
|
|
64
66
|
|
|
65
67
|
- Added base blockchain support
|
|
@@ -113,7 +115,6 @@ Props:
|
|
|
113
115
|
|
|
114
116
|
**Breaking Changes**
|
|
115
117
|
|
|
116
|
-
- Added supportsVersionedTransactions to CoinflowWithdraw allowing platforms with wallets that support versioned transactions to Withdraw non-USDC/EuroE tokens in a single transaction with better prices.
|
|
117
118
|
- This is enabled to true by default. If you are using a wallet that does not support versioned transactions, you must set `supportsVersionedTransactions` in `CoinflowWithdraw` to `false`.
|
|
118
119
|
|
|
119
120
|
### 1.3.1
|
package/build/CoinflowWebView.js
CHANGED
|
@@ -30,7 +30,7 @@ export function CoinflowWebView(props) {
|
|
|
30
30
|
'plaid',
|
|
31
31
|
'coinflow.cash',
|
|
32
32
|
];
|
|
33
|
-
var blacklist = ['pay.google.com'];
|
|
33
|
+
var blacklist = ['pay.google.com', 'tokenex.com'];
|
|
34
34
|
var shouldRedirect = (request.url.includes('https') || request.url.includes('http')) &&
|
|
35
35
|
whitelist.some(function (item) { return request.url.includes(item); }) &&
|
|
36
36
|
!blacklist.some(function (item) { return request.url.includes(item); });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWebView.js","sourceRoot":"","sources":["../src/CoinflowWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAuB,MAAM,cAAc,CAAC;AAErE,OAAO,EAEL,aAAa,EACb,mBAAmB,GAEpB,MAAM,UAAU,CAAC;AAWlB,MAAM,UAAU,eAAe,CAC7B,KAAgE;IAEhE,IAAM,UAAU,GAAG,MAAM,CAAU,IAAI,CAAC,CAAC;IAEzC,IAAM,GAAG,GAAG,OAAO,CAAC;QAClB,OAAO,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IA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E,KAAK,EACxC,4BAA4B,EAAE,KAAK,EACnC,4BAA4B,EAAE,4BAA4B,EAC1D,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,EAClB,SAAS,EAAE,UAAA,KAAK;gBACd,OAAA,oBAAoB,CAAC,EAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAC,CAAC;YAApD,CAAoD,EAEtD,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -35,7 +35,7 @@ export interface CustomerInfo {
|
|
|
35
35
|
}
|
|
36
36
|
/** Coinflow Types **/
|
|
37
37
|
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base';
|
|
38
|
-
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
38
|
+
export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
|
|
39
39
|
export interface CoinflowTypes {
|
|
40
40
|
merchantId: string;
|
|
41
41
|
env?: CoinflowEnvs;
|
|
@@ -162,6 +162,15 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
162
162
|
authOnly?: boolean;
|
|
163
163
|
deviceId?: string;
|
|
164
164
|
jwtToken?: string;
|
|
165
|
+
/**
|
|
166
|
+
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
167
|
+
*
|
|
168
|
+
* Example:
|
|
169
|
+
* Primary origin that will be interacting with the Coinflow iFrame: foo.com
|
|
170
|
+
* Subsequent origins that will render foo.com: bar.com
|
|
171
|
+
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
172
|
+
*/
|
|
173
|
+
origins?: string[];
|
|
165
174
|
}
|
|
166
175
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
167
176
|
wallet: SolanaWallet;
|
|
@@ -171,7 +180,6 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
171
180
|
connection: Connection;
|
|
172
181
|
blockchain: 'solana';
|
|
173
182
|
token?: PublicKey | string;
|
|
174
|
-
supportsVersionedTransactions?: boolean;
|
|
175
183
|
rent?: {
|
|
176
184
|
lamports: string | number;
|
|
177
185
|
};
|
|
@@ -212,9 +220,17 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
212
220
|
wallet: string;
|
|
213
221
|
blockchain: 'solana' | 'eth' | 'near' | 'polygon';
|
|
214
222
|
}[];
|
|
215
|
-
supportsVersionedTransactions?: boolean;
|
|
216
223
|
lockAmount?: boolean;
|
|
217
224
|
transactionSigner?: string;
|
|
225
|
+
/**
|
|
226
|
+
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
227
|
+
*
|
|
228
|
+
* Example:
|
|
229
|
+
* Primary origin that will be interacting with the Coinflow iFrame: foo.com
|
|
230
|
+
* Subsequent origins that will render foo.com: bar.com
|
|
231
|
+
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
232
|
+
*/
|
|
233
|
+
origins?: string[];
|
|
218
234
|
}
|
|
219
235
|
export interface CoinflowSolanaWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
220
236
|
wallet: SolanaWallet;
|
|
@@ -272,13 +288,12 @@ export interface ReservoirRedeem extends CommonEvmRedeem {
|
|
|
272
288
|
items: ReservoirItems;
|
|
273
289
|
}
|
|
274
290
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem;
|
|
275
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
291
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
276
292
|
walletPubkey: string | null | undefined;
|
|
277
293
|
route: string;
|
|
278
294
|
routePrefix?: string;
|
|
279
295
|
transaction?: string;
|
|
280
296
|
tokens?: string[] | PublicKey[];
|
|
281
|
-
supportsVersionedTransactions?: boolean;
|
|
282
297
|
nearDeposit?: string;
|
|
283
298
|
merchantCss?: string;
|
|
284
299
|
color?: 'white' | 'black';
|
|
@@ -287,4 +302,10 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>,
|
|
|
287
302
|
theme?: MerchantTheme;
|
|
288
303
|
usePermit?: boolean;
|
|
289
304
|
}
|
|
305
|
+
export declare enum CardType {
|
|
306
|
+
VISA = "VISA",
|
|
307
|
+
MASTERCARD = "MSTR",
|
|
308
|
+
AMEX = "AMEX",
|
|
309
|
+
DISCOVER = "DISC"
|
|
310
|
+
}
|
|
290
311
|
export {};
|
|
@@ -10,4 +10,11 @@ export var MerchantStyle;
|
|
|
10
10
|
MerchantStyle["Sharp"] = "sharp";
|
|
11
11
|
MerchantStyle["Pill"] = "pill";
|
|
12
12
|
})(MerchantStyle || (MerchantStyle = {}));
|
|
13
|
+
export var CardType;
|
|
14
|
+
(function (CardType) {
|
|
15
|
+
CardType["VISA"] = "VISA";
|
|
16
|
+
CardType["MASTERCARD"] = "MSTR";
|
|
17
|
+
CardType["AMEX"] = "AMEX";
|
|
18
|
+
CardType["DISCOVER"] = "DISC";
|
|
19
|
+
})(CardType || (CardType = {}));
|
|
13
20
|
//# sourceMappingURL=CoinflowTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../src/common/CoinflowTypes.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
|
|
1
|
+
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../src/common/CoinflowTypes.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAiaD,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,6BAAiB,CAAA;AACnB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB"}
|
|
@@ -9,7 +9,7 @@ export declare class CoinflowUtils {
|
|
|
9
9
|
}>;
|
|
10
10
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
11
11
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
12
|
-
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain,
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, }: CoinflowIFrameProps): string;
|
|
13
13
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
14
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
15
|
solana: T;
|
|
@@ -62,7 +62,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
62
62
|
};
|
|
63
63
|
CoinflowUtils.getCoinflowUrl = function (_a) {
|
|
64
64
|
var _b;
|
|
65
|
-
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain,
|
|
65
|
+
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert, theme = _a.theme, usePermit = _a.usePermit, transactionSigner = _a.transactionSigner, authOnly = _a.authOnly, deviceId = _a.deviceId, jwtToken = _a.jwtToken, origins = _a.origins;
|
|
66
66
|
var prefix = routePrefix
|
|
67
67
|
? "/".concat(routePrefix, "/").concat(blockchain)
|
|
68
68
|
: "/".concat(blockchain);
|
|
@@ -74,9 +74,6 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
74
74
|
if (amount) {
|
|
75
75
|
url.searchParams.append('amount', amount.toString());
|
|
76
76
|
}
|
|
77
|
-
if (supportsVersionedTransactions) {
|
|
78
|
-
url.searchParams.append('supportsVersionedTransactions', 'true');
|
|
79
|
-
}
|
|
80
77
|
if (webhookInfo) {
|
|
81
78
|
url.searchParams.append('webhookInfo', LZString.compressToEncodedURIComponent(JSON.stringify(webhookInfo)));
|
|
82
79
|
}
|
|
@@ -150,6 +147,8 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
150
147
|
url.searchParams.append('authOnly', 'true');
|
|
151
148
|
if (jwtToken)
|
|
152
149
|
url.searchParams.append('jwtToken', jwtToken);
|
|
150
|
+
if (origins)
|
|
151
|
+
url.searchParams.append('origins', LZString.compressToEncodedURIComponent(JSON.stringify(origins)));
|
|
153
152
|
return url.toString();
|
|
154
153
|
};
|
|
155
154
|
CoinflowUtils.getTransaction = function (props) {
|
|
@@ -162,14 +161,12 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
162
161
|
throw new Error('@solana/web3.js dependency is required for Solana');
|
|
163
162
|
if (!base58)
|
|
164
163
|
throw new Error('bs58 dependency is required for Solana');
|
|
165
|
-
if (transaction
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return base58.encode(transaction.serialize());
|
|
172
|
-
return undefined;
|
|
164
|
+
if (!transaction)
|
|
165
|
+
return undefined;
|
|
166
|
+
return base58.encode(transaction.serialize({
|
|
167
|
+
requireAllSignatures: false,
|
|
168
|
+
verifySignatures: false,
|
|
169
|
+
}));
|
|
173
170
|
},
|
|
174
171
|
polygon: function () {
|
|
175
172
|
if (!('transaction' in props))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/common/CoinflowUtils.ts"],"names":[],"mappings":";AAMA,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,QAAQ,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/common/CoinflowUtils.ts"],"names":[],"mappings":";AAMA,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,QAAQ,MAAM,WAAW,CAAC;AAGjC;IAIE,uBAAY,GAAkB;QAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,MAAM,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM;YAAE,IAAI,CAAC,GAAG,GAAG,2BAA2B,CAAC;aAC3D,IAAI,IAAI,CAAC,GAAG,KAAK,OAAO;YAAE,IAAI,CAAC,GAAG,GAAG,uBAAuB,CAAC;;YAC7D,IAAI,CAAC,GAAG,GAAG,sBAAe,IAAI,CAAC,GAAG,mBAAgB,CAAC;IAC1D,CAAC;IAEK,yCAAiB,GAAvB,UAAwB,UAAkB;;;gBACxC,sBAAO,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,yBAAkB,UAAU,CAAE,CAAC;yBACpD,IAAI,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,IAAI,EAAE,EAAf,CAAe,CAAC;yBACjC,IAAI,CACH,UAAC,IAGA,YAAK,OAAA,CAAA,MAAA,IAAI,CAAC,aAAa,0CA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