@coinflowlabs/angular 0.2.2 → 0.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.
@@ -34,13 +34,13 @@ export interface CustomerInfo {
34
34
  lng?: string;
35
35
  }
36
36
  /** Coinflow Types **/
37
- export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum';
37
+ export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
38
38
  export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
39
39
  export interface CoinflowTypes {
40
40
  merchantId: string;
41
41
  env?: CoinflowEnvs;
42
42
  loaderBackground?: string;
43
- blockchain: CoinflowBlockchain;
43
+ blockchain?: CoinflowBlockchain | undefined;
44
44
  handleHeightChange?: (height: string) => void;
45
45
  theme?: MerchantTheme;
46
46
  }
@@ -169,6 +169,10 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
169
169
  authOnly?: boolean;
170
170
  deviceId?: string;
171
171
  jwtToken?: string;
172
+ /**
173
+ * Your company email address that the customer can contact.
174
+ */
175
+ supportEmail?: string;
172
176
  /**
173
177
  * If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
174
178
  *
@@ -195,6 +199,11 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
195
199
  lamports: string | number;
196
200
  };
197
201
  }
202
+ export interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseProps {
203
+ sessionKey: string;
204
+ wallet?: undefined;
205
+ blockchain?: CoinflowBlockchain | undefined;
206
+ }
198
207
  export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
199
208
  wallet: NearWallet;
200
209
  blockchain: 'near';
@@ -218,7 +227,7 @@ export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
218
227
  export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
219
228
  blockchain: 'arbitrum';
220
229
  }
221
- export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
230
+ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
222
231
  /** Withdraw **/
223
232
  export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
224
233
  onSuccess?: OnSuccessMethod;
@@ -307,8 +316,9 @@ export interface TokenRedeem extends CommonEvmRedeem {
307
316
  destination: string;
308
317
  }
309
318
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
310
- export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
319
+ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
311
320
  walletPubkey: string | null | undefined;
321
+ sessionKey?: string;
312
322
  route: string;
313
323
  routePrefix?: string;
314
324
  transaction?: string;
@@ -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, 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, threeDsChallengePreference, }: CoinflowIFrameProps): string;
12
+ static getCoinflowUrl({ walletPubkey, sessionKey, 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, threeDsChallengePreference, supportEmail, }: CoinflowIFrameProps): string;
13
13
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
14
14
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
15
15
  solana: T;
@@ -18,6 +18,7 @@ export declare class CoinflowUtils {
18
18
  polygon: T;
19
19
  base: T;
20
20
  arbitrum: T;
21
+ user: T;
21
22
  }): T;
22
23
  static getWalletFromUserId({ userId, merchantId, env, }: {
23
24
  userId: string;
@@ -3,6 +3,7 @@ import * as i0 from "@angular/core";
3
3
  export declare class CoinflowApplePayButtonComponent {
4
4
  purchaseProps: CoinflowPurchaseProps & {
5
5
  color: 'white' | 'black';
6
+ onError?: (message: string) => void;
6
7
  };
7
8
  fill(): "#000" | "#FFF";
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowApplePayButtonComponent, never>;
@@ -3,6 +3,7 @@ import * as i0 from "@angular/core";
3
3
  export declare class CoinflowGooglePayButtonComponent {
4
4
  purchaseProps: CoinflowPurchaseProps & {
5
5
  color: 'white' | 'black';
6
+ onError?: (message: string) => void;
6
7
  };
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowGooglePayButtonComponent, never>;
8
9
  static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowGooglePayButtonComponent, "lib-coinflow-google-pay-button", never, { "purchaseProps": { "alias": "purchaseProps"; "required": false; }; }, {}, never, never, true, never>;
@@ -3,6 +3,7 @@ import * as i0 from "@angular/core";
3
3
  export declare class CoinflowMobileWalletButtonComponent {
4
4
  purchaseProps: CoinflowPurchaseProps & {
5
5
  color: 'white' | 'black';
6
+ onError?: (message: string) => void;
6
7
  };
7
8
  route: string;
8
9
  overlayDisplayOverride: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinflowlabs/angular",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",
@@ -11,7 +11,7 @@
11
11
  "tweetnacl": "^1.0.3"
12
12
  },
13
13
  "dependencies": {
14
- "tslib": "^2.7.0"
14
+ "tslib": "^2.8.0"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "@coinflowlabs/lib-common": {