@coinflowlabs/angular 0.3.1 → 0.3.2
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 +4 -0
- package/esm2022/lib/card-form/coinflow-card-number-input.component.mjs +12 -2
- package/esm2022/lib/card-form/coinflow-card-number-only-input.component.mjs +12 -2
- package/esm2022/lib/card-form/coinflow-cvv-only-input.component.mjs +12 -2
- package/esm2022/lib/common/CoinflowTypes.mjs +1 -1
- package/esm2022/lib/common/CoinflowUtils.mjs +4 -66
- package/fesm2022/coinflowlabs-angular.mjs +36 -68
- package/fesm2022/coinflowlabs-angular.mjs.map +1 -1
- package/lib/card-form/coinflow-card-number-input.component.d.ts +5 -1
- package/lib/card-form/coinflow-card-number-only-input.component.d.ts +5 -1
- package/lib/card-form/coinflow-cvv-only-input.component.d.ts +5 -1
- package/lib/common/CoinflowTypes.d.ts +12 -3
- package/lib/common/CoinflowUtils.d.ts +2 -15
- package/package.json +2 -2
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
1
2
|
import { CoinflowCardNumberInputProps } from '../common';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CoinflowCardNumberOnlyInput {
|
|
4
|
+
export declare class CoinflowCardNumberOnlyInput implements OnDestroy {
|
|
4
5
|
private cardFormService;
|
|
5
6
|
args: CoinflowCardNumberInputProps;
|
|
6
7
|
private iframe;
|
|
7
8
|
private onScriptLoaded;
|
|
9
|
+
private initializeTokenEx;
|
|
10
|
+
reinitialize(): void;
|
|
8
11
|
ngOnInit(): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
9
13
|
tokenize(): Promise<import("../common").TokenizationResponse>;
|
|
10
14
|
protected readonly TokenExCardNumberIframeId = "tokenExCardNumber";
|
|
11
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowCardNumberOnlyInput, never>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
1
2
|
import { CoinflowCvvOnlyInputProps } from '../common';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CoinflowCvvOnlyInputComponent {
|
|
4
|
+
export declare class CoinflowCvvOnlyInputComponent implements OnDestroy {
|
|
4
5
|
private cardFormService;
|
|
5
6
|
args: CoinflowCvvOnlyInputProps;
|
|
6
7
|
private iframe;
|
|
7
8
|
private onScriptLoaded;
|
|
9
|
+
private initializeTokenEx;
|
|
10
|
+
reinitialize(): void;
|
|
8
11
|
ngOnInit(): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
9
13
|
tokenize(): Promise<import("../common").TokenizationResponse>;
|
|
10
14
|
protected readonly TokenExCvvContainerID = "tokenExCardCvv";
|
|
11
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowCvvOnlyInputComponent, never>;
|
|
@@ -131,7 +131,7 @@ export type NearFtTransferCallAction = {
|
|
|
131
131
|
};
|
|
132
132
|
type Bytes = ArrayLike<number>;
|
|
133
133
|
type BytesLike = Bytes | string;
|
|
134
|
-
type RawProductData =
|
|
134
|
+
type RawProductData = any;
|
|
135
135
|
/** Purchase **/
|
|
136
136
|
export type ChargebackProtectionData = ChargebackProtectionItem[];
|
|
137
137
|
export interface ChargebackProtectionItem {
|
|
@@ -163,7 +163,9 @@ export declare enum ThreeDsChallengePreference {
|
|
|
163
163
|
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
164
164
|
amount?: number | string;
|
|
165
165
|
onSuccess?: OnSuccessMethod;
|
|
166
|
-
webhookInfo?:
|
|
166
|
+
webhookInfo?: {
|
|
167
|
+
[key: string]: any;
|
|
168
|
+
};
|
|
167
169
|
email?: string;
|
|
168
170
|
chargebackProtectionData?: ChargebackProtectionData;
|
|
169
171
|
planCode?: string;
|
|
@@ -172,6 +174,12 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
172
174
|
customerInfo?: CustomerInfo;
|
|
173
175
|
settlementType?: SettlementType;
|
|
174
176
|
authOnly?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The DeviceID gotten from the Coinflow SDK:
|
|
179
|
+
* https://docs.coinflow.cash/docs/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
180
|
+
*
|
|
181
|
+
* window?.nSureSDK?.getDeviceId()
|
|
182
|
+
*/
|
|
175
183
|
deviceId?: string;
|
|
176
184
|
jwtToken?: string;
|
|
177
185
|
/**
|
|
@@ -188,6 +196,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
188
196
|
*/
|
|
189
197
|
origins?: string[];
|
|
190
198
|
threeDsChallengePreference?: ThreeDsChallengePreference;
|
|
199
|
+
destinationAuthKey?: string;
|
|
191
200
|
}
|
|
192
201
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
193
202
|
wallet: SolanaWallet;
|
|
@@ -333,7 +342,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
|
|
|
333
342
|
destination: string;
|
|
334
343
|
}
|
|
335
344
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
|
|
336
|
-
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'> {
|
|
345
|
+
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' | 'destinationAuthKey'> {
|
|
337
346
|
walletPubkey: string | null | undefined;
|
|
338
347
|
sessionKey?: string;
|
|
339
348
|
route: string;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps
|
|
1
|
+
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps } from './CoinflowTypes';
|
|
2
2
|
export declare class CoinflowUtils {
|
|
3
3
|
env: CoinflowEnvs;
|
|
4
4
|
url: string;
|
|
5
5
|
constructor(env?: CoinflowEnvs);
|
|
6
6
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
7
|
-
getCreditBalance(publicKey: string, merchantId: string, blockchain: 'solana' | 'near'): Promise<{
|
|
8
|
-
cents: number;
|
|
9
|
-
}>;
|
|
10
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
11
8
|
static getCoinflowApiUrl(env?: CoinflowEnvs): 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;
|
|
9
|
+
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, destinationAuthKey, }: CoinflowIFrameProps): string;
|
|
13
10
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
11
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
12
|
solana: T;
|
|
@@ -20,14 +17,4 @@ export declare class CoinflowUtils {
|
|
|
20
17
|
arbitrum: T;
|
|
21
18
|
user: T;
|
|
22
19
|
}): T;
|
|
23
|
-
static getWalletFromUserId({ userId, merchantId, env, }: {
|
|
24
|
-
userId: string;
|
|
25
|
-
merchantId: string;
|
|
26
|
-
env: CoinflowEnvs;
|
|
27
|
-
}): Promise<SolanaWallet>;
|
|
28
|
-
static getWalletFromEmail({ email, merchantId, env, }: {
|
|
29
|
-
email: string;
|
|
30
|
-
merchantId: string;
|
|
31
|
-
env: CoinflowEnvs;
|
|
32
|
-
}): Promise<SolanaWallet>;
|
|
33
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/angular",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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.8.
|
|
14
|
+
"tslib": "^2.8.1"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"@coinflowlabs/lib-common": {
|