@coinflowlabs/angular 0.2.1 → 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.
- package/README.md +8 -1
- package/esm2022/lib/coinflow-iframe.component.mjs +7 -3
- package/esm2022/lib/coinflow-purchase.component.mjs +3 -3
- package/esm2022/lib/coinflow-withdraw.component.mjs +1 -1
- package/esm2022/lib/common/CoinflowLibMessageHandlers.mjs +37 -10
- package/esm2022/lib/common/CoinflowTypes.mjs +1 -1
- package/esm2022/lib/common/CoinflowUtils.mjs +15 -3
- package/esm2022/lib/mobile-wallet/apple-pay-overlay.component.mjs +93 -0
- package/esm2022/lib/mobile-wallet/coinflow-apple-pay-button.component.mjs +106 -0
- package/esm2022/lib/mobile-wallet/coinflow-google-pay-button.component.mjs +43 -0
- package/esm2022/lib/mobile-wallet/coinflow-mobile-wallet-button.component.mjs +96 -0
- package/esm2022/lib/mobile-wallet/google-pay-overlay.component.mjs +124 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/coinflowlabs-angular.mjs +506 -17
- package/fesm2022/coinflowlabs-angular.mjs.map +1 -1
- package/lib/coinflow-iframe.component.d.ts +3 -2
- package/lib/common/CoinflowLibMessageHandlers.d.ts +4 -3
- package/lib/common/CoinflowTypes.d.ts +14 -4
- package/lib/common/CoinflowUtils.d.ts +2 -1
- package/lib/mobile-wallet/apple-pay-overlay.component.d.ts +7 -0
- package/lib/mobile-wallet/coinflow-apple-pay-button.component.d.ts +11 -0
- package/lib/mobile-wallet/coinflow-google-pay-button.component.d.ts +10 -0
- package/lib/mobile-wallet/coinflow-mobile-wallet-button.component.d.ts +21 -0
- package/lib/mobile-wallet/google-pay-overlay.component.d.ts +6 -0
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
|
@@ -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
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CoinflowApplePayOverlayComponent {
|
|
3
|
+
color: 'white' | 'black';
|
|
4
|
+
fill(): "#000" | "#FFF";
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowApplePayOverlayComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowApplePayOverlayComponent, "coinflow-apple-pay-overlay", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CoinflowPurchaseProps } from '../common';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CoinflowApplePayButtonComponent {
|
|
4
|
+
purchaseProps: CoinflowPurchaseProps & {
|
|
5
|
+
color: 'white' | 'black';
|
|
6
|
+
onError?: (message: string) => void;
|
|
7
|
+
};
|
|
8
|
+
fill(): "#000" | "#FFF";
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowApplePayButtonComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowApplePayButtonComponent, "lib-coinflow-apple-pay-button", never, { "purchaseProps": { "alias": "purchaseProps"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CoinflowPurchaseProps } from '../common';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CoinflowGooglePayButtonComponent {
|
|
4
|
+
purchaseProps: CoinflowPurchaseProps & {
|
|
5
|
+
color: 'white' | 'black';
|
|
6
|
+
onError?: (message: string) => void;
|
|
7
|
+
};
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowGooglePayButtonComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowGooglePayButtonComponent, "lib-coinflow-google-pay-button", never, { "purchaseProps": { "alias": "purchaseProps"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CoinflowIFrameProps, CoinflowPurchaseProps, IFrameMessageHandlers } from '../common';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CoinflowMobileWalletButtonComponent {
|
|
4
|
+
purchaseProps: CoinflowPurchaseProps & {
|
|
5
|
+
color: 'white' | 'black';
|
|
6
|
+
onError?: (message: string) => void;
|
|
7
|
+
};
|
|
8
|
+
route: string;
|
|
9
|
+
overlayDisplayOverride: string | undefined;
|
|
10
|
+
alignItems: string | undefined;
|
|
11
|
+
opacity: number;
|
|
12
|
+
display: string;
|
|
13
|
+
iframeProps?: CoinflowIFrameProps;
|
|
14
|
+
messageHandlers?: IFrameMessageHandlers;
|
|
15
|
+
handleMessage({ data }: {
|
|
16
|
+
data: string;
|
|
17
|
+
}): void;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowMobileWalletButtonComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowMobileWalletButtonComponent, "lib-coinflow-mobile-wallet-button", never, { "purchaseProps": { "alias": "purchaseProps"; "required": false; }; "route": { "alias": "route"; "required": false; }; "overlayDisplayOverride": { "alias": "overlayDisplayOverride"; "required": false; }; "alignItems": { "alias": "alignItems"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CoinflowGooglePayOverlayComponent {
|
|
3
|
+
color: 'white' | 'black';
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowGooglePayOverlayComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowGooglePayOverlayComponent, "coinflow-google-pay-overlay", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/angular",
|
|
3
|
-
"version": "0.
|
|
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.
|
|
14
|
+
"tslib": "^2.8.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"@coinflowlabs/lib-common": {
|
package/public-api.d.ts
CHANGED
|
@@ -8,3 +8,5 @@ export * from './lib/card-form/coinflow-card-number-input.component';
|
|
|
8
8
|
export * from './lib/card-form/coinflow-card-number-only-input.component';
|
|
9
9
|
export * from './lib/card-form/coinflow-cvv-input.component';
|
|
10
10
|
export * from './lib/card-form/coinflow-cvv-only-input.component';
|
|
11
|
+
export * from './lib/mobile-wallet/coinflow-apple-pay-button.component';
|
|
12
|
+
export * from './lib/mobile-wallet/coinflow-google-pay-button.component';
|