@coinflowlabs/react-native 1.2.8 → 1.3.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
CHANGED
package/build/CoinflowTypes.d.ts
CHANGED
|
@@ -122,6 +122,9 @@ export interface CoinflowIFrameProps {
|
|
|
122
122
|
wallet: string;
|
|
123
123
|
blockchain: 'solana' | 'eth' | 'near' | 'polygon';
|
|
124
124
|
}[];
|
|
125
|
+
rent?: {
|
|
126
|
+
lamports: string | number;
|
|
127
|
+
};
|
|
125
128
|
}
|
|
126
129
|
/** Transactions **/
|
|
127
130
|
export type NearFtTransferCallAction = {
|
|
@@ -166,6 +169,9 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
166
169
|
blockchain: 'solana';
|
|
167
170
|
token?: PublicKey | string;
|
|
168
171
|
supportsVersionedTransactions?: boolean;
|
|
172
|
+
rent?: {
|
|
173
|
+
lamports: string | number;
|
|
174
|
+
};
|
|
169
175
|
}
|
|
170
176
|
export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
171
177
|
wallet: NearWallet;
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PublicKey } from '@solana/web3.js';
|
|
1
|
+
import { CoinflowEnvs, CoinflowWebViewProps } from './CoinflowTypes';
|
|
3
2
|
export declare class ReactNativeCoinflowUtils {
|
|
4
3
|
env: CoinflowEnvs;
|
|
5
4
|
url: string;
|
|
6
5
|
constructor(env?: CoinflowEnvs);
|
|
7
6
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
|
-
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, webhookInfo, deviceId, chargebackProtectionData, }:
|
|
9
|
-
blockchain: CoinflowBlockchain;
|
|
10
|
-
token?: string | PublicKey;
|
|
11
|
-
route: string;
|
|
12
|
-
publicKey: string | null | undefined;
|
|
13
|
-
env?: CoinflowEnvs;
|
|
14
|
-
amount?: number;
|
|
15
|
-
transaction?: string;
|
|
16
|
-
bankAccountLinkRedirect?: string;
|
|
17
|
-
additionalWallets?: {
|
|
18
|
-
wallet: string;
|
|
19
|
-
blockchain: 'solana' | 'eth' | 'near' | 'polygon';
|
|
20
|
-
}[];
|
|
21
|
-
webhookInfo?: object;
|
|
22
|
-
deviceId?: string;
|
|
23
|
-
chargebackProtectionData?: ChargebackProtectionData;
|
|
24
|
-
}): string;
|
|
7
|
+
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, webhookInfo, deviceId, chargebackProtectionData, rent, }: CoinflowWebViewProps): string;
|
|
25
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, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData;
|
|
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, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent;
|
|
20
20
|
if (!publicKey)
|
|
21
21
|
return '';
|
|
22
22
|
var url = new URL("/".concat(blockchain) + route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
|
|
@@ -40,6 +40,8 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
40
40
|
url.searchParams.append('deviceId', deviceId);
|
|
41
41
|
if (chargebackProtectionData)
|
|
42
42
|
url.searchParams.append('chargebackProtectionData', JSON.stringify(chargebackProtectionData));
|
|
43
|
+
if (rent)
|
|
44
|
+
url.searchParams.append('rent', rent.lamports.toString());
|
|
43
45
|
return url.toString();
|
|
44
46
|
};
|
|
45
47
|
return ReactNativeCoinflowUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeCoinflowUtils.js","sourceRoot":"","sources":["../src/ReactNativeCoinflowUtils.ts"],"names":[],"mappings":"
|
|
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,EAcC;YAbrB,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,GAAG,SAAA,EACH,MAAM,YAAA,EACN,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,uBAAuB,6BAAA,EACvB,iBAAiB,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,CAAC,YAAY,CAAC,MAAM,CACrB,0BAA0B,EAC1B,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,CACzC,CAAC;QAEJ,IAAI,IAAI;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEpE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AA9ED,IA8EC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"react-native-get-random-values": "^1.9.0",
|
|
34
34
|
"bs58": "^5.0.0",
|
|
35
35
|
"bn.js": "^5.2.1",
|
|
36
|
-
"@solana/web3.js": "^1.
|
|
36
|
+
"@solana/web3.js": "^1.87.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/react": "^18.2.
|
|
40
|
-
"@types/react-native": "^0.72.
|
|
39
|
+
"@types/react": "^18.2.36",
|
|
40
|
+
"@types/react-native": "^0.72.5",
|
|
41
41
|
"eslint-config-react-app": "^7.0.1",
|
|
42
42
|
"typescript": "^5.2.2",
|
|
43
43
|
"@solana/wallet-adapter-react": "^0.15.32"
|