@coinflowlabs/react-native 2.1.8 → 2.1.10
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
CHANGED
|
@@ -55,7 +55,16 @@ Props:
|
|
|
55
55
|
* `disableGooglePay` (optional): Ability to disable Google Pay
|
|
56
56
|
* `customerInfo` (optional): Additional information about the customer
|
|
57
57
|
* `supportsVersionedTransactions` (optional): Instruct the system that you support versioned transactions
|
|
58
|
-
* `rent` (optional): Specify the blockchain rent amount to add to the total
|
|
58
|
+
* `rent` (optional, Solana only): Specify the blockchain rent amount to add to the total
|
|
59
|
+
* `nativeSolToConvert` (optional, Solana only): Specify the amount of native SOL to convert wSOL for the purchase
|
|
60
|
+
|
|
61
|
+
## 2.1.10
|
|
62
|
+
|
|
63
|
+
- Added `orderId` option for reservoir items
|
|
64
|
+
|
|
65
|
+
## 2.1.9
|
|
66
|
+
|
|
67
|
+
- Added `nativeSolToConvert` for Solana transactions
|
|
59
68
|
|
|
60
69
|
## 2.1.7
|
|
61
70
|
|
package/build/CoinflowTypes.d.ts
CHANGED
|
@@ -131,6 +131,9 @@ export interface CoinflowIFrameProps {
|
|
|
131
131
|
rent?: {
|
|
132
132
|
lamports: string | number;
|
|
133
133
|
};
|
|
134
|
+
nativeSolToConvert?: {
|
|
135
|
+
lamports: string | number;
|
|
136
|
+
};
|
|
134
137
|
disableApplePay?: boolean;
|
|
135
138
|
disableGooglePay?: boolean;
|
|
136
139
|
planCode?: string;
|
|
@@ -170,6 +173,9 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
170
173
|
rent?: {
|
|
171
174
|
lamports: string | number;
|
|
172
175
|
};
|
|
176
|
+
nativeSolToConvert?: {
|
|
177
|
+
lamports: string | number;
|
|
178
|
+
};
|
|
173
179
|
}
|
|
174
180
|
export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
175
181
|
wallet: NearWallet;
|
|
@@ -239,8 +245,15 @@ export interface ReturnedTokenIdRedeem extends NormalRedeem {
|
|
|
239
245
|
type: 'returned';
|
|
240
246
|
nftContract?: string;
|
|
241
247
|
}
|
|
242
|
-
|
|
248
|
+
type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
|
|
249
|
+
interface ReservoirOrderIdItem {
|
|
250
|
+
orderId: string;
|
|
251
|
+
}
|
|
252
|
+
type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
|
|
253
|
+
type ReservoirItems = ReservoirItem | ReservoirItem[];
|
|
254
|
+
export interface ReservoirRedeem {
|
|
243
255
|
type: 'reservoir';
|
|
256
|
+
items: ReservoirItems;
|
|
244
257
|
}
|
|
245
258
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem;
|
|
246
259
|
export {};
|
|
@@ -4,5 +4,5 @@ export declare class ReactNativeCoinflowUtils {
|
|
|
4
4
|
url: string;
|
|
5
5
|
constructor(env?: CoinflowEnvs);
|
|
6
6
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
7
|
-
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, tokens, webhookInfo, deviceId, chargebackProtectionData, rent, lockDefaultToken, supportsVersionedTransactions, disableApplePay, disableGooglePay, customerInfo, planCode, settlementType, lockAmount, }: CoinflowWebViewProps): string;
|
|
7
|
+
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, tokens, webhookInfo, deviceId, chargebackProtectionData, rent, lockDefaultToken, supportsVersionedTransactions, disableApplePay, disableGooglePay, customerInfo, planCode, settlementType, lockAmount, nativeSolToConvert, }: CoinflowWebViewProps): string;
|
|
8
8
|
}
|
|
@@ -16,7 +16,7 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
16
16
|
return "https://".concat(env, ".coinflow.cash");
|
|
17
17
|
};
|
|
18
18
|
ReactNativeCoinflowUtils.getCoinflowUrl = function (_a) {
|
|
19
|
-
var blockchain = _a.blockchain, route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, token = _a.token, tokens = _a.tokens, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, supportsVersionedTransactions = _a.supportsVersionedTransactions, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, planCode = _a.planCode, settlementType = _a.settlementType, lockAmount = _a.lockAmount;
|
|
19
|
+
var blockchain = _a.blockchain, route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, token = _a.token, tokens = _a.tokens, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, supportsVersionedTransactions = _a.supportsVersionedTransactions, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, planCode = _a.planCode, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert;
|
|
20
20
|
if (!publicKey)
|
|
21
21
|
return '';
|
|
22
22
|
var url = new URL("/".concat(blockchain) + route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
|
|
@@ -49,6 +49,8 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
49
49
|
url.searchParams.append('chargebackProtectionData', JSON.stringify(chargebackProtectionData));
|
|
50
50
|
if (rent)
|
|
51
51
|
url.searchParams.append('rent', rent.lamports.toString());
|
|
52
|
+
if (nativeSolToConvert)
|
|
53
|
+
url.searchParams.append('nativeSolToConvert', nativeSolToConvert.lamports.toString());
|
|
52
54
|
if (lockDefaultToken)
|
|
53
55
|
url.searchParams.append('lockDefaultToken', 'true');
|
|
54
56
|
if (disableApplePay)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeCoinflowUtils.js","sourceRoot":"","sources":["../src/ReactNativeCoinflowUtils.ts"],"names":[],"mappings":"AAEA;IAIE,kCAAY,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;IAEM,2CAAkB,GAAzB,UAA0B,GAAkB;QAC1C,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,MAAM;YAAE,OAAO,uBAAuB,CAAC;QAC3D,IAAI,GAAG,KAAK,OAAO;YAAE,OAAO,uBAAuB,CAAC;QAEpD,OAAO,kBAAW,GAAG,mBAAgB,CAAC;IACxC,CAAC;IAEM,uCAAc,GAArB,UAAsB,
|
|
1
|
+
{"version":3,"file":"ReactNativeCoinflowUtils.js","sourceRoot":"","sources":["../src/ReactNativeCoinflowUtils.ts"],"names":[],"mappings":"AAEA;IAIE,kCAAY,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,GAA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CACzC,CAAC;QAEJ,IAAI,IAAI;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpE,IAAI,kBAAkB;YACpB,GAAG,CAAC,YAAY,CAAC,MAAM,CACrB,oBAAoB,EACpB,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,EAAE,CACvC,CAAC;QACJ,IAAI,gBAAgB;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAE1E,IAAI,eAAe;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QACxE,IAAI,gBAAgB;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC1E,IAAI,QAAQ;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC5D,IAAI,cAAc;YAChB,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAC5D,IAAI,UAAU;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAE9D,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AAhHD,IAgHC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"react-native-get-random-values": "^1.10.0",
|
|
34
34
|
"bs58": "^5.0.0",
|
|
35
35
|
"bn.js": "^5.2.1",
|
|
36
|
-
"@solana/web3.js": "^1.
|
|
36
|
+
"@solana/web3.js": "^1.90.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/react": "^18.2.
|
|
39
|
+
"@types/react": "^18.2.56",
|
|
40
40
|
"@types/react-native": "^0.72.7",
|
|
41
41
|
"eslint-config-react-app": "^7.0.1",
|
|
42
42
|
"typescript": "^5.3.2",
|
|
43
43
|
"@solana/wallet-adapter-react": "^0.15.32",
|
|
44
|
-
"@near-wallet-selector/core": "^8.9.
|
|
44
|
+
"@near-wallet-selector/core": "^8.9.3"
|
|
45
45
|
}
|
|
46
46
|
}
|