@zkp2p/pay-shared 4.0.0 → 4.0.1
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 +1 -1
- package/dist/onboarding.js +1 -1
- package/dist/tiers.d.ts +10 -1
- package/dist/tiers.js +8 -0
- package/dist/types.d.ts +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/onboarding.js
CHANGED
|
@@ -31,7 +31,7 @@ export const TIER_COPY = {
|
|
|
31
31
|
price: '2.95% fiat / 1% crypto per successful payment',
|
|
32
32
|
features: [
|
|
33
33
|
formatTierMonthlyLimitsCopy(TIER_DEFINITIONS.BASE.monthlyLimits),
|
|
34
|
-
'Every platform included; Venmo
|
|
34
|
+
'Every platform included; Venmo and PayPal require staking',
|
|
35
35
|
'Verify payments with the Peer app or extension',
|
|
36
36
|
'Instant settlement, merchant-funded refunds',
|
|
37
37
|
],
|
package/dist/tiers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FeeTranche, type MerchantPaymentFlowModeType, type MerchantTierName } from './types.js';
|
|
1
|
+
import { type FeeTranche, type MerchantEnvironmentType, type MerchantPaymentFlowModeType, type MerchantTierName } from './types.js';
|
|
2
2
|
export type { MerchantTierName } from './types.js';
|
|
3
3
|
export declare const TierChangeSource: {
|
|
4
4
|
readonly SELF_SERVE: "SELF_SERVE";
|
|
@@ -50,6 +50,15 @@ export type TierDefinition = TierFeeDefinition & {
|
|
|
50
50
|
export declare const TIER_DEFINITIONS: Readonly<Record<MerchantTierName, TierDefinition>>;
|
|
51
51
|
/** Server-side allowlist for self-serve tier selection — the only authority; `features` copy gates nothing. */
|
|
52
52
|
export declare const SELF_SERVE_TIERS: readonly MerchantTierName[];
|
|
53
|
+
/**
|
|
54
|
+
* Scan to Pay depends on seller automated release, which is available to Pro and Concierge merchants.
|
|
55
|
+
* Sandbox stays available so merchants can complete the no-value onboarding demo
|
|
56
|
+
* before choosing a live plan.
|
|
57
|
+
*/
|
|
58
|
+
export declare function canUseScanToPay(input: {
|
|
59
|
+
readonly tier: MerchantTierName | null | undefined;
|
|
60
|
+
readonly environment: MerchantEnvironmentType;
|
|
61
|
+
}): boolean;
|
|
53
62
|
/**
|
|
54
63
|
* Formats a tier's monthly caps for display. `volumeUsdc` is a whole-USDC decimal string;
|
|
55
64
|
* exact thousands render as `$10K`, anything else as `$2,500`.
|
package/dist/tiers.js
CHANGED
|
@@ -41,6 +41,14 @@ export const TIER_DEFINITIONS = {
|
|
|
41
41
|
};
|
|
42
42
|
/** Server-side allowlist for self-serve tier selection — the only authority; `features` copy gates nothing. */
|
|
43
43
|
export const SELF_SERVE_TIERS = ['BASE', 'PRO'];
|
|
44
|
+
/**
|
|
45
|
+
* Scan to Pay depends on seller automated release, which is available to Pro and Concierge merchants.
|
|
46
|
+
* Sandbox stays available so merchants can complete the no-value onboarding demo
|
|
47
|
+
* before choosing a live plan.
|
|
48
|
+
*/
|
|
49
|
+
export function canUseScanToPay(input) {
|
|
50
|
+
return input.environment === 'SANDBOX' || input.tier === 'PRO' || input.tier === 'CONCIERGE';
|
|
51
|
+
}
|
|
44
52
|
/**
|
|
45
53
|
* Formats a tier's monthly caps for display. `volumeUsdc` is a whole-USDC decimal string;
|
|
46
54
|
* exact thousands render as `$10K`, anything else as `$2,500`.
|
package/dist/types.d.ts
CHANGED
|
@@ -275,6 +275,8 @@ export type CheckoutNearbySuggestions = {
|
|
|
275
275
|
export type QuoteAvailabilityRequest = {
|
|
276
276
|
amount: string;
|
|
277
277
|
quoteMode: CheckoutModeType;
|
|
278
|
+
/** Match the checkout's enabledRails override. Defaults to merchant rails; any matching rail suffices. */
|
|
279
|
+
enabledRails?: string[];
|
|
278
280
|
fiatCurrency?: string;
|
|
279
281
|
destinationChainId: string | number;
|
|
280
282
|
destinationToken: string;
|
|
@@ -385,7 +387,6 @@ export type MerchantConfig = {
|
|
|
385
387
|
destinationChainId: string;
|
|
386
388
|
destinationToken: string;
|
|
387
389
|
sweepEnabled: boolean;
|
|
388
|
-
recipientOverrideEnabled: boolean;
|
|
389
390
|
disableBranding: boolean;
|
|
390
391
|
dynamicOrdersEnabled: boolean;
|
|
391
392
|
merchantCheckoutTheme: MerchantCheckoutTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkp2p/pay-shared",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Shared TypeScript types, enums, and chain utilities used by ZKP2P Pay API, SDK, and frontend apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint": "eslint . --ext .ts,.tsx",
|
|
40
40
|
"test": "vitest run",
|
|
41
41
|
"prepack": "npm run build",
|
|
42
|
-
"prepublishOnly": "npm
|
|
42
|
+
"prepublishOnly": "npm run lint"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"vitest": "^1.6.1"
|