@coinflowlabs/angular 0.1.0 → 0.1.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/esm2022/lib/coinflow-iframe.component.mjs +3 -3
- package/esm2022/lib/coinflow-purchase-history.component.mjs +3 -3
- package/esm2022/lib/coinflow-purchase-protection.component.mjs +3 -3
- package/esm2022/lib/coinflow-purchase.component.mjs +3 -3
- package/esm2022/lib/coinflow-withdraw-history.component.mjs +3 -3
- package/esm2022/lib/coinflow-withdraw.component.mjs +3 -3
- package/esm2022/lib/common/CoinflowLibMessageHandlers.mjs +20 -11
- package/esm2022/lib/common/CoinflowTypes.mjs +1 -1
- package/esm2022/lib/common/CoinflowUtils.mjs +51 -28
- package/fesm2022/coinflowlabs-angular.mjs +87 -55
- package/fesm2022/coinflowlabs-angular.mjs.map +1 -1
- package/lib/common/CoinflowLibMessageHandlers.d.ts +13 -3
- package/lib/common/CoinflowTypes.d.ts +7 -3
- package/lib/common/CoinflowUtils.d.ts +2 -2
- package/package.json +3 -2
|
@@ -45,7 +45,10 @@ export interface CoinflowTypes {
|
|
|
45
45
|
theme?: MerchantTheme;
|
|
46
46
|
}
|
|
47
47
|
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
48
|
-
export type OnSuccessMethod = (
|
|
48
|
+
export type OnSuccessMethod = (args: {
|
|
49
|
+
paymentId: string;
|
|
50
|
+
hash?: string | undefined;
|
|
51
|
+
} | string) => void | Promise<void>;
|
|
49
52
|
/** Wallets **/
|
|
50
53
|
export interface SolanaWallet {
|
|
51
54
|
publicKey: PublicKey | null;
|
|
@@ -146,7 +149,7 @@ export interface ChargebackProtectionItem {
|
|
|
146
149
|
};
|
|
147
150
|
}
|
|
148
151
|
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
149
|
-
amount?: number;
|
|
152
|
+
amount?: number | string;
|
|
150
153
|
onSuccess?: OnSuccessMethod;
|
|
151
154
|
webhookInfo?: object;
|
|
152
155
|
email?: string;
|
|
@@ -158,6 +161,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
158
161
|
settlementType?: SettlementType;
|
|
159
162
|
authOnly?: boolean;
|
|
160
163
|
deviceId?: string;
|
|
164
|
+
jwtToken?: string;
|
|
161
165
|
}
|
|
162
166
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
163
167
|
wallet: SolanaWallet;
|
|
@@ -268,7 +272,7 @@ export interface ReservoirRedeem extends CommonEvmRedeem {
|
|
|
268
272
|
items: ReservoirItems;
|
|
269
273
|
}
|
|
270
274
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem;
|
|
271
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
275
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
272
276
|
walletPubkey: string | null | undefined;
|
|
273
277
|
route: string;
|
|
274
278
|
routePrefix?: string;
|
|
@@ -9,12 +9,12 @@ 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, supportsVersionedTransactions, 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, }: CoinflowIFrameProps): string;
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, supportsVersionedTransactions, 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, }: CoinflowIFrameProps): string;
|
|
13
13
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
14
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
15
|
solana: T;
|
|
16
16
|
near: T;
|
|
17
|
-
eth
|
|
17
|
+
eth: T;
|
|
18
18
|
polygon: T;
|
|
19
19
|
base: T;
|
|
20
20
|
}): T;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/angular",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.3.0",
|
|
6
6
|
"@angular/core": "^17.3.0",
|
|
7
7
|
"@coinflowlabs/lib-common": "*",
|
|
8
8
|
"@solana/web3.js": ">=1.54.0",
|
|
9
|
-
"bs58": "~5.0.0"
|
|
9
|
+
"bs58": "~5.0.0",
|
|
10
|
+
"lz-string": "^1.5.0"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
12
13
|
"tslib": "^2.6.2"
|