@coinflowlabs/react-native 1.2.3 → 1.2.5

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
@@ -41,10 +41,20 @@ Props:
41
41
 
42
42
  `CoinflowUtils`
43
43
 
44
+ # 1.2.5
45
+
46
+ * Fixing Webhook Info
47
+
48
+ # 1.2.3
49
+
44
50
  * `getFeePayer` - Return the `PublicKey` of the Coinflow Fee Payer
45
51
 
46
52
  # Changelog
47
53
 
54
+ ### 1.2.4
55
+
56
+ - Added `token` prop for `CoinflowPurchase` with polygon
57
+
48
58
  ### 1.2.3
49
59
 
50
60
  - Fixing nSure redirect error
@@ -146,6 +146,7 @@ export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
146
146
  }
147
147
  export interface CoinflowPolygonPurchaseProps extends CoinflowCommonPurchaseProps {
148
148
  transaction?: EvmTransaction;
149
+ token?: string;
149
150
  wallet: EthWallet;
150
151
  blockchain: 'polygon';
151
152
  }
@@ -1,11 +1,13 @@
1
1
  import { CoinflowBlockchain, CoinflowEnvs } from './CoinflowTypes';
2
+ import { PublicKey } from '@solana/web3.js';
2
3
  export declare class ReactNativeCoinflowUtils {
3
4
  env: CoinflowEnvs;
4
5
  url: string;
5
6
  constructor(env?: CoinflowEnvs);
6
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
7
- static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, }: {
8
+ static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, webhookInfo, }: {
8
9
  blockchain: CoinflowBlockchain;
10
+ token?: string | PublicKey;
9
11
  route: string;
10
12
  publicKey: string | null | undefined;
11
13
  env?: CoinflowEnvs;
@@ -16,5 +18,6 @@ export declare class ReactNativeCoinflowUtils {
16
18
  wallet: string;
17
19
  blockchain: 'solana' | 'eth' | 'near' | 'polygon';
18
20
  }[];
21
+ webhookInfo?: object;
19
22
  }): string;
20
23
  }
@@ -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;
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;
20
20
  if (!publicKey)
21
21
  return '';
22
22
  var url = new URL("/".concat(blockchain) + route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
@@ -32,6 +32,10 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
32
32
  }
33
33
  if (additionalWallets)
34
34
  url.searchParams.append('additionalWallets', JSON.stringify(additionalWallets));
35
+ if (token)
36
+ url.searchParams.append('token', token.toString());
37
+ if (webhookInfo)
38
+ url.searchParams.append('webhookInfo', Buffer.from(JSON.stringify(webhookInfo)).toString('base64'));
35
39
  return url.toString();
36
40
  };
37
41
  return ReactNativeCoinflowUtils;
@@ -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,uBAA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C,IAAI,WAAW,EAAE;YACf,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;SACrD;QACD,IAAI,MAAM,EAAE;YACV,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;SACtD;QACD,IAAI,uBAAuB,EAAE;YAC3B,GAAG,CAAC,YAAY,CAAC,MAAM,CACrB,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;SACH;QACD,IAAI,iBAAiB;YACnB,GAAG,CAAC,YAAY,CAAC,MAAM,CACrB,mBAAmB,EACnB,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAClC,CAAC;QAEJ,IAAI,KAAK;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE9D,IAAI,WAAW;YACb,GAAG,CAAC,YAAY,CAAC,MAAM,CACrB,aAAa,EACb,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAC5D,CAAC;QAEJ,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AAhFD,IAgFC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinflowlabs/react-native",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "React Native Component for Coinflow",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "@solana/web3.js": "^1.78.4"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/react": "^18.2.20",
39
+ "@types/react": "^18.2.21",
40
40
  "@types/react-native": "^0.72.2",
41
41
  "eslint-config-react-app": "^7.0.1",
42
42
  "typescript": "^5.0.4",