@coinflowlabs/react 7.0.0 → 7.1.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/build/cjs/common/CoinflowProtectionInit.js +4 -0
- package/build/cjs/common/CoinflowProtectionInit.js.map +1 -1
- package/build/cjs/common/CoinflowProtectionInit.native.d.ts +5 -1
- package/build/cjs/common/CoinflowProtectionInit.native.js +2 -1
- package/build/cjs/common/CoinflowProtectionInit.native.js.map +1 -1
- package/build/cjs/common/CoinflowProtectionSession.native.d.ts +5 -1
- package/build/cjs/common/CoinflowProtectionSession.native.js +2 -1
- package/build/cjs/common/CoinflowProtectionSession.native.js.map +1 -1
- package/build/cjs/common/CoinflowPurchaseHeaders.d.ts +11 -0
- package/build/cjs/common/CoinflowPurchaseHeaders.js +27 -0
- package/build/cjs/common/CoinflowPurchaseHeaders.js.map +1 -0
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.d.ts +3 -9
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.js +14 -20
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.js.map +1 -1
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.native.d.ts +10 -0
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.native.js +26 -0
- package/build/cjs/common/CoinflowPurchaseProtectionHeaders.native.js.map +1 -0
- package/build/cjs/common/Forter.js +2 -2
- package/build/cjs/common/Forter.js.map +1 -1
- package/build/cjs/common/ForterSnippet.d.ts +6 -0
- package/build/cjs/common/ForterSnippet.js +44 -0
- package/build/cjs/common/ForterSnippet.js.map +1 -0
- package/build/cjs/common/index.d.ts +1 -0
- package/build/cjs/common/index.js +1 -0
- package/build/cjs/common/index.js.map +1 -1
- package/build/cjs/common/types/Subtotal.js +1 -0
- package/build/cjs/common/types/Subtotal.js.map +1 -1
- package/build/esm/common/CoinflowProtectionInit.js +4 -0
- package/build/esm/common/CoinflowProtectionInit.js.map +1 -1
- package/build/esm/common/CoinflowProtectionInit.native.d.ts +5 -1
- package/build/esm/common/CoinflowProtectionInit.native.js +2 -1
- package/build/esm/common/CoinflowProtectionInit.native.js.map +1 -1
- package/build/esm/common/CoinflowProtectionSession.native.d.ts +5 -1
- package/build/esm/common/CoinflowProtectionSession.native.js +2 -1
- package/build/esm/common/CoinflowProtectionSession.native.js.map +1 -1
- package/build/esm/common/CoinflowPurchaseHeaders.d.ts +11 -0
- package/build/esm/common/CoinflowPurchaseHeaders.js +23 -0
- package/build/esm/common/CoinflowPurchaseHeaders.js.map +1 -0
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.d.ts +3 -9
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.js +9 -19
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.js.map +1 -1
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.native.d.ts +10 -0
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.native.js +16 -0
- package/build/esm/common/CoinflowPurchaseProtectionHeaders.native.js.map +1 -0
- package/build/esm/common/Forter.js +2 -2
- package/build/esm/common/Forter.js.map +1 -1
- package/build/esm/common/ForterSnippet.d.ts +6 -0
- package/build/esm/common/ForterSnippet.js +40 -0
- package/build/esm/common/ForterSnippet.js.map +1 -0
- package/build/esm/common/index.d.ts +1 -0
- package/build/esm/common/index.js +1 -0
- package/build/esm/common/index.js.map +1 -1
- package/build/esm/common/types/Subtotal.js +1 -0
- package/build/esm/common/types/Subtotal.js.map +1 -1
- package/build/tsconfig.cjs.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const web_client_sdk_1 = tslib_1.__importDefault(require("@nsure-ai/web-client-sdk"));
|
|
6
6
|
const CoinflowUtils_1 = require("./CoinflowUtils");
|
|
7
7
|
const CoinflowProtectionSession_1 = require("./CoinflowProtectionSession");
|
|
8
|
+
const ForterSnippet_1 = require("./ForterSnippet");
|
|
9
|
+
const Forter_1 = require("./Forter");
|
|
8
10
|
const NSURE_APP_ID = '9JBW2RHC7JNJN8ZQ';
|
|
9
11
|
const PROTECTION_SESSION_PROJECT_IDS = {
|
|
10
12
|
prod: '315da543-c486-435a-aa21-53844c469822',
|
|
@@ -12,6 +14,8 @@ const PROTECTION_SESSION_PROJECT_IDS = {
|
|
|
12
14
|
};
|
|
13
15
|
async function initCoinflowProtection({ coinflowEnv, merchantId, }) {
|
|
14
16
|
const env = coinflowEnv === 'prod' ? 'prod' : 'sandbox';
|
|
17
|
+
ForterSnippet_1.ForterSnippet.load(ForterSnippet_1.ForterSnippet.siteIdFor(coinflowEnv));
|
|
18
|
+
(0, Forter_1.captureForterToken)();
|
|
15
19
|
const hasUrlDeviceId = typeof window !== 'undefined' &&
|
|
16
20
|
new URLSearchParams(window.location.search).has('deviceId');
|
|
17
21
|
if (!hasUrlDeviceId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionInit.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.ts"],"names":[],"mappings":";;;;AAAA,sFAAgD;AAChD,mDAAmE;AACnE,2EAAkE;
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionInit.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.ts"],"names":[],"mappings":";;;;AAAA,sFAAgD;AAChD,mDAAmE;AACnE,2EAAkE;AAElE,mDAA8C;AAC9C,qCAA4C;AAE5C,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAExC,MAAM,8BAA8B,GAA2B;IAC7D,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,sCAAsC;CAChD,CAAC;AAEK,KAAK,iCAAiC,EAC3C,WAAW,EACX,UAAU,GAIX;IACC,MAAM,GAAG,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAExD,6BAAa,CAAC,IAAI,CAAC,6BAAa,CAAC,SAAS,CAA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MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;oBACpB,MAAM,CAAC,YAAY,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;oBACtD,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE;wBACnB,IAAA,iDAAqB,EAAC,EAAC,UAAU,EAAE,GAAG,EAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACtE,CAAC,CAAC;oBACF,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE;wBACnB,IAAA,mCAAmB,EAAC;4BAClB,KAAK,EAAE,iBAAiB;4BACxB,KAAK,EAAE,CAAC;4BACR,GAAG,EAAE,WAAW;4BAChB,UAAU;yBACX,CAAC,CAAC;wBACH,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC;oBACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initCoinflowProtection = initCoinflowProtection;
|
|
4
|
-
|
|
4
|
+
// Same signature as the web build, so either file type-checks against shared callers.
|
|
5
|
+
async function initCoinflowProtection(_args) {
|
|
5
6
|
return;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=CoinflowProtectionInit.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionInit.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.native.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionInit.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.native.ts"],"names":[],"mappings":";;;AAEA,sFAAsF;AAC/E,KAAK,iCAAiC,KAG5C;IACC,OAAO;AACT,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { CoinflowEnvs } from './CoinflowTypes';
|
|
2
|
+
export declare function initProtectionSession(_args: {
|
|
3
|
+
merchantId: string;
|
|
4
|
+
env: CoinflowEnvs;
|
|
5
|
+
}): Promise<void>;
|
|
2
6
|
export declare function getProtectionSessionId(): string | null;
|
|
3
7
|
export default getProtectionSessionId;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initProtectionSession = initProtectionSession;
|
|
4
4
|
exports.getProtectionSessionId = getProtectionSessionId;
|
|
5
|
-
|
|
5
|
+
// Same signature as the web build, so either file type-checks against shared callers.
|
|
6
|
+
async function initProtectionSession(_args) {
|
|
6
7
|
return;
|
|
7
8
|
}
|
|
8
9
|
function getProtectionSessionId() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionSession.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionSession.native.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionSession.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionSession.native.ts"],"names":[],"mappings":";;;;AAEA,sFAAsF;AAC/E,KAAK,gCAAgC,KAG3C;IACC,OAAO;AACT,CAAC;AAED;IACE,OAAO,IAAI,CAAC;AACd,CAAC;kBAEc,sBAAsB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEVICE_ID_HEADER = "x-device-id";
|
|
2
|
+
export declare const REFERRER_HEADER = "x-coinflow-referrer";
|
|
3
|
+
export declare const SESSION_ID_HEADER = "x-session-id";
|
|
4
|
+
export declare const FORTER_TOKEN_HEADER = "x-forter-token";
|
|
5
|
+
export type WithReferrerHeader<T> = T & {
|
|
6
|
+
[REFERRER_HEADER]: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare class CoinflowPurchaseHeaders {
|
|
9
|
+
static withReferrer<T extends object>(protectionHeaders: T): WithReferrerHeader<T>;
|
|
10
|
+
private static getReferrer;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoinflowPurchaseHeaders = exports.FORTER_TOKEN_HEADER = exports.SESSION_ID_HEADER = exports.REFERRER_HEADER = exports.DEVICE_ID_HEADER = void 0;
|
|
4
|
+
exports.DEVICE_ID_HEADER = 'x-device-id';
|
|
5
|
+
exports.REFERRER_HEADER = 'x-coinflow-referrer';
|
|
6
|
+
// Per-provider headers. The web SDKs pack every token into `x-device-id`; React Native and older
|
|
7
|
+
// integrations still send these, and the API reads them as a fallback.
|
|
8
|
+
exports.SESSION_ID_HEADER = 'x-session-id';
|
|
9
|
+
exports.FORTER_TOKEN_HEADER = 'x-forter-token';
|
|
10
|
+
class CoinflowPurchaseHeaders {
|
|
11
|
+
static withReferrer(protectionHeaders) {
|
|
12
|
+
return {
|
|
13
|
+
...protectionHeaders,
|
|
14
|
+
[exports.REFERRER_HEADER]: this.getReferrer(),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static getReferrer() {
|
|
18
|
+
try {
|
|
19
|
+
return document.referrer || null;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.CoinflowPurchaseHeaders = CoinflowPurchaseHeaders;
|
|
27
|
+
//# sourceMappingURL=CoinflowPurchaseHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseHeaders.js","sourceRoot":"","sources":["../../../src/common/CoinflowPurchaseHeaders.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,aAAa,CAAC;AACjC,QAAA,eAAe,GAAG,qBAAqB,CAAC;AACrD,iGAAiG;AACjG,uEAAuE;AAC1D,QAAA,iBAAiB,GAAG,cAAc,CAAC;AACnC,QAAA,mBAAmB,GAAG,gBAAgB,CAAC;AAIpD;IACE,MAAM,CAAC,YAAY,CACjB,iBAAoB;QAEpB,OAAO;YACL,GAAG,iBAAiB;YACpB,CAAC,QAAA,eAAe,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE;SACtC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC;YACH,OAAO,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const REFERRER_HEADER = "x-coinflow-referrer";
|
|
4
|
-
export declare const FORTER_TOKEN_HEADER = "x-forter-token";
|
|
1
|
+
import { DEVICE_ID_HEADER, WithReferrerHeader } from './CoinflowPurchaseHeaders';
|
|
2
|
+
export { DEVICE_ID_HEADER, REFERRER_HEADER, SESSION_ID_HEADER, FORTER_TOKEN_HEADER, } from './CoinflowPurchaseHeaders';
|
|
5
3
|
export type CoinflowProtectionHeadersType = {
|
|
6
4
|
[DEVICE_ID_HEADER]: string | null;
|
|
7
|
-
[SESSION_ID_HEADER]: string | null;
|
|
8
|
-
[FORTER_TOKEN_HEADER]: string | null;
|
|
9
5
|
};
|
|
10
6
|
export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
|
|
11
|
-
export type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType
|
|
12
|
-
[REFERRER_HEADER]: string | null;
|
|
13
|
-
};
|
|
7
|
+
export type CoinflowPurchaseHeadersType = WithReferrerHeader<CoinflowProtectionHeadersType>;
|
|
14
8
|
export declare function getCoinflowPurchaseHeaders(): CoinflowPurchaseHeadersType;
|
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FORTER_TOKEN_HEADER = exports.
|
|
3
|
+
exports.FORTER_TOKEN_HEADER = exports.SESSION_ID_HEADER = exports.REFERRER_HEADER = exports.DEVICE_ID_HEADER = void 0;
|
|
4
4
|
exports.getCoinflowProtectionHeaders = getCoinflowProtectionHeaders;
|
|
5
5
|
exports.getCoinflowPurchaseHeaders = getCoinflowPurchaseHeaders;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const NSure_1 = tslib_1.__importDefault(require("./NSure"));
|
|
8
8
|
const CoinflowProtectionSession_1 = require("./CoinflowProtectionSession");
|
|
9
9
|
const Forter_1 = tslib_1.__importDefault(require("./Forter"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.
|
|
10
|
+
const CoinflowFraudProtectionHeader_1 = require("./CoinflowFraudProtectionHeader");
|
|
11
|
+
const CoinflowPurchaseHeaders_1 = require("./CoinflowPurchaseHeaders");
|
|
12
|
+
var CoinflowPurchaseHeaders_2 = require("./CoinflowPurchaseHeaders");
|
|
13
|
+
Object.defineProperty(exports, "DEVICE_ID_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.DEVICE_ID_HEADER; } });
|
|
14
|
+
Object.defineProperty(exports, "REFERRER_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.REFERRER_HEADER; } });
|
|
15
|
+
Object.defineProperty(exports, "SESSION_ID_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.SESSION_ID_HEADER; } });
|
|
16
|
+
Object.defineProperty(exports, "FORTER_TOKEN_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.FORTER_TOKEN_HEADER; } });
|
|
14
17
|
function getCoinflowProtectionHeaders() {
|
|
15
18
|
return {
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
[CoinflowPurchaseHeaders_1.DEVICE_ID_HEADER]: CoinflowFraudProtectionHeader_1.CoinflowFraudProtectionHeader.encode({
|
|
20
|
+
deviceId: (0, NSure_1.default)(),
|
|
21
|
+
sessionId: (0, CoinflowProtectionSession_1.getProtectionSessionId)(),
|
|
22
|
+
purchaseToken: (0, Forter_1.default)(),
|
|
23
|
+
}),
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
|
-
function getReferrer() {
|
|
22
|
-
try {
|
|
23
|
-
return document.referrer || null;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
26
|
function getCoinflowPurchaseHeaders() {
|
|
30
|
-
return
|
|
31
|
-
...getCoinflowProtectionHeaders(),
|
|
32
|
-
[exports.REFERRER_HEADER]: getReferrer(),
|
|
33
|
-
};
|
|
27
|
+
return CoinflowPurchaseHeaders_1.CoinflowPurchaseHeaders.withReferrer(getCoinflowProtectionHeaders());
|
|
34
28
|
}
|
|
35
29
|
//# sourceMappingURL=CoinflowPurchaseProtectionHeaders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowPurchaseProtectionHeaders.js","sourceRoot":"","sources":["../../../src/common/CoinflowPurchaseProtectionHeaders.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAuC;AACvC,2EAAmE;AACnE,8DAAsC;
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseProtectionHeaders.js","sourceRoot":"","sources":["../../../src/common/CoinflowPurchaseProtectionHeaders.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAuC;AACvC,2EAAmE;AACnE,8DAAsC;AACtC,mFAA8E;AAC9E,uEAImC;AAEnC,qEAKmC;AAJjC,2HAAA,gBAAgB,OAAA;AAChB,0HAAA,eAAe,OAAA;AACf,4HAAA,iBAAiB,OAAA;AACjB,8HAAA,mBAAmB,OAAA;AAOrB;IACE,OAAO;QACL,CAAC,0CAAgB,CAAC,EAAE,6DAA6B,CAAC,MAAM,CAAC;YACvD,QAAQ,EAAE,IAAA,eAAgB,GAAE;YAC5B,SAAS,EAAE,IAAA,kDAAsB,GAAE;YACnC,aAAa,EAAE,IAAA,gBAAc,GAAE;SAChC,CAAC;KACH,CAAC;AACJ,CAAC;AAKD;IACE,OAAO,iDAAuB,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DEVICE_ID_HEADER, FORTER_TOKEN_HEADER, SESSION_ID_HEADER, WithReferrerHeader } from './CoinflowPurchaseHeaders';
|
|
2
|
+
export { DEVICE_ID_HEADER, REFERRER_HEADER, SESSION_ID_HEADER, FORTER_TOKEN_HEADER, } from './CoinflowPurchaseHeaders';
|
|
3
|
+
export type CoinflowProtectionHeadersType = {
|
|
4
|
+
[DEVICE_ID_HEADER]: string | null;
|
|
5
|
+
[SESSION_ID_HEADER]: string | null;
|
|
6
|
+
[FORTER_TOKEN_HEADER]: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
|
|
9
|
+
export type CoinflowPurchaseHeadersType = WithReferrerHeader<CoinflowProtectionHeadersType>;
|
|
10
|
+
export declare function getCoinflowPurchaseHeaders(): CoinflowPurchaseHeadersType;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FORTER_TOKEN_HEADER = exports.SESSION_ID_HEADER = exports.REFERRER_HEADER = exports.DEVICE_ID_HEADER = void 0;
|
|
4
|
+
exports.getCoinflowProtectionHeaders = getCoinflowProtectionHeaders;
|
|
5
|
+
exports.getCoinflowPurchaseHeaders = getCoinflowPurchaseHeaders;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const NSure_1 = tslib_1.__importDefault(require("./NSure"));
|
|
8
|
+
const CoinflowProtectionSession_1 = require("./CoinflowProtectionSession");
|
|
9
|
+
const Forter_1 = tslib_1.__importDefault(require("./Forter"));
|
|
10
|
+
const CoinflowPurchaseHeaders_1 = require("./CoinflowPurchaseHeaders");
|
|
11
|
+
var CoinflowPurchaseHeaders_2 = require("./CoinflowPurchaseHeaders");
|
|
12
|
+
Object.defineProperty(exports, "DEVICE_ID_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.DEVICE_ID_HEADER; } });
|
|
13
|
+
Object.defineProperty(exports, "REFERRER_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.REFERRER_HEADER; } });
|
|
14
|
+
Object.defineProperty(exports, "SESSION_ID_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.SESSION_ID_HEADER; } });
|
|
15
|
+
Object.defineProperty(exports, "FORTER_TOKEN_HEADER", { enumerable: true, get: function () { return CoinflowPurchaseHeaders_2.FORTER_TOKEN_HEADER; } });
|
|
16
|
+
function getCoinflowProtectionHeaders() {
|
|
17
|
+
return {
|
|
18
|
+
[CoinflowPurchaseHeaders_1.DEVICE_ID_HEADER]: (0, NSure_1.default)(),
|
|
19
|
+
[CoinflowPurchaseHeaders_1.SESSION_ID_HEADER]: (0, CoinflowProtectionSession_1.getProtectionSessionId)(),
|
|
20
|
+
[CoinflowPurchaseHeaders_1.FORTER_TOKEN_HEADER]: (0, Forter_1.default)(),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function getCoinflowPurchaseHeaders() {
|
|
24
|
+
return CoinflowPurchaseHeaders_1.CoinflowPurchaseHeaders.withReferrer(getCoinflowProtectionHeaders());
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=CoinflowPurchaseProtectionHeaders.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseProtectionHeaders.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowPurchaseProtectionHeaders.native.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAuC;AACvC,2EAAmE;AACnE,8DAAsC;AACtC,uEAMmC;AAEnC,qEAKmC;AAJjC,2HAAA,gBAAgB,OAAA;AAChB,0HAAA,eAAe,OAAA;AACf,4HAAA,iBAAiB,OAAA;AACjB,8HAAA,mBAAmB,OAAA;AAYrB;IACE,OAAO;QACL,CAAC,0CAAgB,CAAC,EAAE,IAAA,eAAgB,GAAE;QACtC,CAAC,2CAAiB,CAAC,EAAE,IAAA,kDAAsB,GAAE;QAC7C,CAAC,6CAAmB,CAAC,EAAE,IAAA,gBAAc,GAAE;KACxC,CAAC;AACJ,CAAC;AAKD;IACE,OAAO,iDAAuB,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.getForterToken = getForterToken;
|
|
|
4
4
|
exports.captureForterToken = captureForterToken;
|
|
5
5
|
exports.awaitForterToken = awaitForterToken;
|
|
6
6
|
const FORTER_COOKIE_NAME = 'forterToken';
|
|
7
|
-
// Defense-in-depth: the attacker-influenceable cookie is later sent as the `x-
|
|
7
|
+
// Defense-in-depth: the attacker-influenceable cookie is later sent as the `purchaseToken` in the `x-device-id` header / Forter `forterTokenCookie`; since tokens are opaque, long, uncontrolled-alphabet strings, don't use a narrow allowlist — just bound the length and reject control / CR / LF chars that could enable header injection.
|
|
8
8
|
const MAX_FORTER_TOKEN_LENGTH = 1024;
|
|
9
9
|
// eslint-disable-next-line no-control-regex
|
|
10
10
|
const FORTER_TOKEN_UNSAFE_PATTERN = /[\x00-\x1F\x7F]/;
|
|
@@ -106,7 +106,7 @@ function logForterTokenMissing() {
|
|
|
106
106
|
: [];
|
|
107
107
|
console.warn('[forter] token never surfaced after init.', 'cookieNames:', cookieNames, 'forterGlobals:', forterGlobals);
|
|
108
108
|
}
|
|
109
|
-
// Resolve once a Forter token is available, or after `timeoutMs` if it never surfaces: Forter issues its device token asynchronously (~1s after the SDK loads, via `ftr:tokenReady` / forterToken cookie), so a fast charge — notably saved-card / "1-click" purchases — can read getForterToken() before it exists and send
|
|
109
|
+
// Resolve once a Forter token is available, or after `timeoutMs` if it never surfaces: Forter issues its device token asynchronously (~1s after the SDK loads, via `ftr:tokenReady` / forterToken cookie), so a fast charge — notably saved-card / "1-click" purchases — can read getForterToken() before it exists and send no purchaseToken in x-device-id, so await this at charge time to populate the header; fail-open by resolving to whatever getForterToken() returns at the deadline (possibly null) rather than blocking the purchase, and return immediately when a token is already cached so it adds no latency in the common case.
|
|
110
110
|
async function awaitForterToken({ timeoutMs = 2000, intervalMs = 100, } = {}) {
|
|
111
111
|
const existing = getForterToken();
|
|
112
112
|
if (existing)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Forter.js","sourceRoot":"","sources":["../../../src/common/Forter.ts"],"names":[],"mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"Forter.js","sourceRoot":"","sources":["../../../src/common/Forter.ts"],"names":[],"mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEzC,+UAA+U;AAC/U,MAAM,uBAAuB,GAAG,IAAI,CAAC;AACrC,4CAA4C;AAC5C,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAEtD,ghBAAghB;AAChhB,IAAI,iBAAiB,GAAkB,IAAI,CAAC;AAC5C,+OAA+O;AAC/O,IAAI,eAAe,GAAG,KAAK,CAAC;AAC5B,kIAAkI;AAClI,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB,SAAS,mBAAmB,CAAC,GAA8B;IACzD,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,IAAI,KAAK,GAAG,GAAG,CAAC;IAChB,IAAI,CAAC;QACH,KAAK,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,8CAA8C;IAChD,CAAC;IACD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,KAAK,CAAC,MAAM,GAAG,uBAAuB;QAAE,OAAO,IAAI,CAAC;IACxD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AAI,EAAE,UAAU,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;kBAEc,cAAc"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForterSnippet = void 0;
|
|
4
|
+
// Vendor Forter device-fingerprinting snippet, generated by the Forter dashboard and kept
|
|
5
|
+
// verbatim; only the site id is parameterized.
|
|
6
|
+
const FORTER_SCRIPT_ID = 'ftr__snippet';
|
|
7
|
+
// The minified snippet body (everything after its own `var siteId = ...` declaration), left exactly as Forter ships it.
|
|
8
|
+
const FORTER_SNIPPET_BODY = 'function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-_).replace(/%SN%/g,siteId)}function n(t){try{if("number"==typeof t&&window.location&&window.location.pathname){for(var e=window.location.pathname.split("/"),n=[],r=0;r<=Math.min(e.length-1,Math.abs(t));r++)n.push(e[r]);return n.join("/")||"/"}}catch(t){}return"/"}function r(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function o(){return!(!navigator.brave||"function"!=typeof navigator.brave.isBrave)}function i(){return document.currentScript&&document.currentScript.src}function a(t){try{$.ex=t,r()&&-1===$.ex.indexOf(z.uB)&&($.ex+=z.uB),o()&&-1===$.ex.indexOf(z.uBr)&&($.ex+=z.uBr),i()&&-1===$.ex.indexOf(z.nIL)&&($.ex+=z.nIL),window.ftr__snp_cwc||($.ex+=z.s),H($)}catch(t){}}function c(t,e){function n(i){try{i.blockedURI===t&&i.disposition===o&&(e(),document.removeEventListener(r,n))}catch(t){document.removeEventListener(r,n)}}var r="securitypolicyviolation",o="enforce";document.addEventListener(r,n),setTimeout(function(){document.removeEventListener(r,n)},2*60*1e3)}function f(t,e,n,r){var o=!1;t="https://"+t,c(t,function(){r(!0),o=!0});var i=document.createElement("script");if(i.onerror=function(){if(!o)try{r(!1),o=!0}catch(t){}},i.onload=n,i.type="text/javascript",i.id="ftr__script",i.async=!0,i.src=t,window.ftr__config&&window.ftr__config.m&&!0===window.ftr__config.m.ptb&&document.body)document.body.appendChild(i);else{var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a)}}function u(){setTimeout(l,B,z.uDF)}function s(t,e,n,r){var o=!1,i=new XMLHttpRequest;if(c("https:"+t,function(){n(new Error("CSP Violation"),!0),o=!0}),"//"===t.slice(0,2)&&(t="https:"+t),"withCredentials"in i)i.open("GET",t,!0);else{if("undefined"==typeof XDomainRequest)return;i=new XDomainRequest,i.open("GET",t)}Object.keys(r).forEach(function(t){i.setRequestHeader(t,r[t])}),i.onload=function(){"function"==typeof e&&e(i)},i.onerror=function(t){if("function"==typeof n&&!o)try{n(t,!1),o=!0}catch(t){}},i.onprogress=function(){},i.ontimeout=function(){"function"==typeof n&&n("tim"+"eo"+"ut",!1)},setTimeout(function(){i.send()},0)}function d(t,siteId,e){function n(t){var e=t.toString(16);return e.length%2?"0"+e:e}function r(t){if(t<=0)return"";for(var e="0123456789abcdef",n="",r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function o(t){for(var e="",r=0;r<t.length;r++)e+=n(t.charCodeAt(r));return e}function i(t){for(var e=t.split(""),n=0;n<e.length;++n)e[n]=String.fromCharCode(255^e[n].charCodeAt(0));return e.join("")}e=e?"1":"0";var a=[];return a.push(t),a.push(siteId),a.push(e),function(t){var e=40,n="";return t.length<e/2&&(n=","+r(e/2-t.length-1)),o(i(t+n))}(a.join(","))}function h(){function t(){M&&setTimeout(l,B,z.dUAL)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,z.uAS)}window.ftr__fdad(t,e)}function w(){function t(){M&&setTimeout(l,B,z.uDAD)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,z.uDS)}window.ftr__radd(t,e)}function l(t){function e(){for(var t=0;t<=z.tmosSecs.length;t++)clearTimeout(et[t])}function n(){try{e(),a(t+z.uS)}catch(t){}}function r(n){try{e(),$.td=1*new Date-$.ts,a(n?t+z.uF+z.cP:t+z.uF),t===z.uFP&&u(),t===z.uDF&&(j?w():h()),t!==z.uAS&&t!==z.dUAL||j||w(),t!==z.uDS&&t!==z.uDAD||j&&h()}catch(t){a(z.eUoe)}}try{!function(t){for(var e=0;e<=z.tmosSecs.length;e++)e===z.tmosSecs.length?et[e]=setTimeout(r,1e3*z.tmosSecs[e-1]+1e3):et[e]=setTimeout(a,1e3*z.tmosSecs[e],t+z.tmos[e])}(t);var o;switch(t){case z.uFP:o=N;break;case z.uDF:o=I;break;default:o=M}if(!o)return;if(o==="F"+"T"+"R"+"A"+"U"+"C")return void r(!0);if(o==="F"+"T"+"R"+"A"+"U")return void r(!1);f(o,void 0,n,r)}catch(e){a(t+z.eTlu)}}var g="22g5iz6v:uihsv}w1forxgiurqw1qhw2vwdwxv",v="fort",p="erTo",m="ken",_=3;window.ftr__config={m:merchantConfig,s:"31",si:siteId};var y=!1,U=!1,T,x,A=v+p+m,S=400*24*60,D,C=10;D={write:function(t,e,r,o){void 0===o&&(o=!0);var i=0;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.ckDepth&&(i=window.ftr__config.m.ckDepth);var a,c,f=n(i);if(r?(a=new Date,a.setTime(a.getTime()+60*r*1e3),c="; expires="+a.toGMTString()):c="",!o)return void(document.cookie=escape(t)+"="+escape(e)+c+"; path="+f);for(var u=1,s=document.domain.split("."),d=C,h=!0;h&&s.length>=u&&d>0;){var w=s.slice(-u).join(".");document.cookie=escape(t)+"="+escape(e)+c+"; path="+f+"; domain="+w;var l=D.read(t);null!=l&&l==e||(w="."+w,document.cookie=escape(t)+"="+escape(e)+c+"; path="+f+"; domain="+w),h=-1===document.cookie.indexOf(t+"="+e),u++,d--}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=32,i=0;i<r.length;i++){for(var a=r[i];a.charCodeAt(0)===o;)a=a.substring(1,a.length);0===a.indexOf(n)&&(e=unescape(a.substring(n.length,a.length)))}}finally{return e}}};var R=window.ftr__config.s;R+="ck";var L=function(t){var e=!1,n=null,r=function(){try{if(!n||!e)return;n.remove&&"function"==typeof n.remove?n.remove():document.head.removeChild(n),e=!1}catch(t){}};document.head&&(!function(){n=document.createElement("link"),n.setAttribute("rel","pre"+"con"+"nect"),n.setAttribute("cros"+"sori"+"gin","anonymous"),n.onload=r,n.onerror=r,n.setAttribute("href",t),document.head.appendChild(n),e=!0}(),setTimeout(r,3e3))},E=e(g||"22g5iz6v:uihsv}w1forxgiurqw1qhw2vwdwxv"),q=t("[0Uhtxhvw0LG",-_),b=t("[0Fruuhodwlrq0LG",-_),P=t("Li0Qrqh0Pdwfk",-_),k=e("dss1vlwhshuirupdqfhwhvw1qhw"),F=e("2241414142gqv0txhu|"),M,O="fgq71iruwhu1frp",I,V;I=e("(VQ(1"+O+"2vq2(VQ(2vfulsw1mv"),V=e("(VQ(1"+O+"2vqV2(VQ(2vfulsw1mv");var N;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.fpi&&(N=e("fgq71")+window.ftr__config.m.fpi+e("2vq2(VQ(2vfulsw1mv"));var j=!1;j=!1;var B=10;window.ftr__startScriptLoad=1*new Date;var G=function(t){var e="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var n=document.createEvent("Event");n.initEvent(e,!1,!1),n.detail=t,document.dispatchEvent(n)}catch(t){}},1e3)},H=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(R),r=S;!isNaN(window.ftr__config.m.ckTTL)&&window.ftr__config.m.ckTTL&&(r=window.ftr__config.m.ckTTL),D.write(A,n,r,!0),G(n),window.ftr__gt=n},X=function(){var t=D.read(A)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},Q=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var a=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+a+n[255&e]+n[e>>8&255]+a+n[e>>16&15|64]+n[e>>24&255]+a+n[63&r|128]+n[r>>8&255]+a+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},a=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(t){try{return e+a()}catch(t){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),z={uDF:"UDF",dUAL:"dUAL",uAS:"UAS",uDS:"UDS",uDAD:"UDAD",uFP:"UFP",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15"],tmosSecs:[5,10,15],bIR:"43",uB:"u",uBr:"b",cP:"c",nIL:"i",s:"s"};try{var $=X();try{$.id&&(Q.isValidNumericalToken($.id)||Q.isValidUUIDToken($.id)||Q.isValidFGUToken($.id))?window.ftr__ncd=!1:($.id=Q.safeGenerateNoDash(),window.ftr__ncd=!0),$.ts=window.ftr__startScriptLoad,H($),window.ftr__snp_cwc=!!D.read(A),window.ftr__snp_cwc||(I=V);for(var J="for"+"ter"+".co"+"m",K="ht"+"tps://c"+"dn9."+J,W="ht"+"tps://"+$.id+"-"+siteId+".cd"+"n."+J,Y="http"+"s://cd"+"n3."+J,Z=[K,W,Y],tt=0;tt<Z.length;tt++)L(Z[tt]);var et=new Array(z.tmosSecs.length);window.ftr__fdad=function(e,n){if(y)return window.ftr__altd2=x,void e();y=!0;var r={};r[P]=d(window.ftr__config.s,siteId,window.ftr__config.m.csp),s(E,function(n){try{var r=n.getAllResponseHeaders().toLowerCase();if(r.indexOf(b.toLowerCase())>=0){var o=n.getResponseHeader(b);x=window.ftr__altd2=t(atob(o),-_-1)}if(r.indexOf(q.toLowerCase())<0)return;var i=n.getResponseHeader(q),a=t(atob(i),-_-1);if(a){var c=a.split(":");if(c&&2===c.length){for(var f=c[0],u=c[1],s="",d=0,h=0;d<20;++d)s+=d%3>0&&h<12?siteId.charAt(h++):$.id.charAt(d);var w=u.split(",");if(w.length>1){var l=w[0],g=w[1];M=f+"/"+l+"."+s+"."+g}}}e()}catch(t){}},function(t,e){n&&n(t,e)},r)},window.ftr__radd=function(t,e){function n(e){try{var n=e.response,r=function(t){function e(t,n,i){try{if(i>=r)return{name:"",nextOffsetToProcess:n,error:"Max pointer dereference depth exceeded"};for(var a=[],c=n,f=t.getUint8(c),u=0;u<o;){if(u++,192==(192&f)){var s=(63&f)<<8|t.getUint8(c+1),d=e(t,s,i+1);if(d.error)return d;var h=d.name;return a.push(h),{name:a.join("."),nextOffsetToProcess:c+2}}if(!(f>0)){if(0!==f)return{name:"",nextOffsetToProcess:c,error:"Unexpected length at the end of name: "+f.toString()};return{name:a.join("."),nextOffsetToProcess:c+1}}for(var w="",l=1;l<=f;l++)w+=String.fromCharCode(t.getUint8(c+l));a.push(w),c+=f+1,f=t.getUint8(c)}return{name:"",nextOffsetToProcess:c,error:"Max iterations exceeded"}}catch(t){return{name:"",nextOffsetToProcess:n,error:"Unexpected error while parsing response: "+t.toString()}}}var n,r=4,o=100,i=16,a=new DataView(t),c=a.getUint16(0),f=a.getUint16(2),u=a.getUint16(4),s=a.getUint16(6),d=a.getUint16(8),h=a.getUint16(10),w=12,l=[],g=0;for(g=0;g<u;g++){if(n=e(a,w,0),n.error)throw new Error(n.error);if(w=n.nextOffsetToProcess,!Number.isInteger(w))throw new Error("invalid returned offset");var v=n.name,p=a.getUint16(w);w+=2;var m=a.getUint16(w);w+=2,l.push({qname:v,qtype:p,qclass:m})}var _=[];for(g=0;g<s;g++){if(n=e(a,w,0),n.error)throw new Error(n.error);if(w=n.nextOffsetToProcess,!Number.isInteger(w))throw new Error("invalid returned offset");var y=n.name,U=a.getUint16(w);if(U!==i)throw new Error("Unexpected record type: "+U.toString());w+=2;var T=a.getUint16(w);w+=2;var x=a.getUint32(w);w+=4;var A=a.getUint16(w);w+=2;for(var S="",D=w,C=0;D<w+A&&C<o;){C++;var R=a.getUint8(D);D+=1;S+=(new TextDecoder).decode(t.slice(D,D+R)),D+=R}if(C>=o)throw new Error("Max iterations exceeded while reading TXT data");w+=A,_.push({name:y,type:U,class:T,ttl:x,data:S})}return{transactionId:c,flags:f,questionCount:u,answerCount:s,authorityCount:d,additionalCount:h,questions:l,answers:_}}(n);if(!r)throw new Error("Error parsing DNS response");if(!("answers"in r))throw new Error("Unexpected response");var o=r.answers;if(0===o.length)throw new Error("No answers found");var i=o[0].data;i=i.replace(/^"(.*)"$/,"$1");var a=function(t){var e=40,n=32,r=126;try{for(var o=atob(t),i="",a=0;a<o.length;a++)i+=function(t){var o=t.charCodeAt(0),i=o-e;return i<n&&(i=r-(n-i)+1),String.fromCharCode(i)}(o[a]);return atob(i)}catch(t){return}}(i);if(!a)throw new Error("failed to decode the value");var c=function(t){var e="_"+"D"+"L"+"M"+"_",n=t.split(e);if(!(n.length<2)){var r=n[0],o=n[1];if(!(r.split(".").length-1<1))return{jURL:r,eURL:o}}}(a);if(!c)throw new Error("failed to parse the value");var f=c.jURL,u=c.eURL;M=function(t){for(var e="",n=0,r=0;n<20;++n)e+=n%3>0&&r<12?siteId.charAt(r++):$.id.charAt(n);return t.replace("/PRM1","").replace("/PRM2","/main.").replace("/PRM3",e).replace("/PRM4",".js")}(f),T=window.ftr__altd3=u,t()}catch(t){}}function r(t,n){e&&e(t,n)}if(U)return window.ftr__altd3=T,void t();window.ftr__config.m.dr==="N"+"D"+"R"&&e(new Error("N"+"D"+"R"),!1),F&&k||e(new Error("D"+"P"+"P"),!1),U=!0;try{var o=function(t){for(var e=new Uint8Array([0,0]),n=new Uint8Array([1,0]),r=new Uint8Array([0,1]),o=new Uint8Array([0,0]),i=new Uint8Array([0,0]),a=new Uint8Array([0,0]),c=t.split("."),f=[],u=0;u<c.length;u++){var s=c[u];f.push(s.length);for(var d=0;d<s.length;d++)f.push(s.charCodeAt(d))}f.push(0);var h=16,w=new Uint8Array([0,h]),l=new Uint8Array([0,1]),g=new Uint8Array(e.length+n.length+r.length+o.length+i.length+a.length+f.length+w.length+l.length);return g.set(e,0),g.set(n,e.length),g.set(r,e.length+n.length),g.set(o,e.length+n.length+r.length),g.set(i,e.length+n.length+r.length+o.length),g.set(a,e.length+n.length+r.length+o.length+i.length),g.set(f,e.length+n.length+r.length+o.length+i.length+a.length),g.set(w,e.length+n.length+r.length+o.length+i.length+a.length+f.length),g.set(l,e.length+n.length+r.length+o.length+i.length+a.length+f.length+w.length),g}(k);!function(t,e,n,r,o){var i=!1,a=new XMLHttpRequest;if(c("https:"+t,function(){o(new Error("CSP Violation"),!0),i=!0}),"//"===t.slice(0,2)&&(t="https:"+t),"withCredentials"in a)a.open("POST",t,!0);else{if("undefined"==typeof XDomainRequest)return;a=new XDomainRequest,a.open("POST",t)}a.responseType="arraybuffer",a.setRequestHeader("Content-Type",e),a.onload=function(){"function"==typeof r&&r(a)},a.onerror=function(t){if("function"==typeof o&&!i)try{o(t,!1),i=!0}catch(t){}},a.onprogress=function(){},a.ontimeout=function(){"function"==typeof o&&o("tim"+"eo"+"ut",!1)},setTimeout(function(){a.send(n)},0)}(F,"application/dns-message",o,n,r)}catch(t){e(t,!1)}};var nt=N?z.uFP:z.uDF;setTimeout(l,B,nt)}catch(t){a(z.mLd)}}catch(t){}})();';
|
|
9
|
+
class ForterSnippet {
|
|
10
|
+
// Public values: they ship in the snippet on every page that loads it.
|
|
11
|
+
static siteIds = {
|
|
12
|
+
prod: 'eb77dd3f5be4',
|
|
13
|
+
staging: '550084f08541',
|
|
14
|
+
sandbox: '550084f08541',
|
|
15
|
+
local: '550084f08541',
|
|
16
|
+
};
|
|
17
|
+
static siteIdFor(env) {
|
|
18
|
+
return this.siteIds[env];
|
|
19
|
+
}
|
|
20
|
+
// Injects the snippet once; no-ops on the server, without a site id, or if Forter is already on the
|
|
21
|
+
// page (ours, or the merchant's own integration, whose `ftr__config` and cookie ours would overwrite).
|
|
22
|
+
static load(siteId) {
|
|
23
|
+
if (typeof document === 'undefined')
|
|
24
|
+
return;
|
|
25
|
+
if (!siteId)
|
|
26
|
+
return;
|
|
27
|
+
if (document.getElementById(FORTER_SCRIPT_ID))
|
|
28
|
+
return;
|
|
29
|
+
if (window.ftr__config)
|
|
30
|
+
return;
|
|
31
|
+
const script = document.createElement('script');
|
|
32
|
+
script.type = 'text/javascript';
|
|
33
|
+
script.id = FORTER_SCRIPT_ID;
|
|
34
|
+
script.text = [
|
|
35
|
+
'(function () {',
|
|
36
|
+
' var merchantConfig = {csp: false};',
|
|
37
|
+
' var siteId = ' + JSON.stringify(siteId) + ';',
|
|
38
|
+
FORTER_SNIPPET_BODY,
|
|
39
|
+
].join('\n');
|
|
40
|
+
(document.head || document.documentElement).appendChild(script);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.ForterSnippet = ForterSnippet;
|
|
44
|
+
//# sourceMapping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ClE,CAAC;CACF"}
|
|
@@ -18,6 +18,7 @@ export * from './types/lodgingCartItem';
|
|
|
18
18
|
export * from './CoinflowPurchaseProtectionHeaders';
|
|
19
19
|
export * from './CoinflowFraudProtectionHeader';
|
|
20
20
|
export * from './CoinflowProtectionInit';
|
|
21
|
+
export * from './ForterSnippet';
|
|
21
22
|
export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
|
|
22
23
|
export * from './plaidLinkTokenCache';
|
|
23
24
|
export * from './bankLinkCallback';
|
|
@@ -22,6 +22,7 @@ tslib_1.__exportStar(require("./types/lodgingCartItem"), exports);
|
|
|
22
22
|
tslib_1.__exportStar(require("./CoinflowPurchaseProtectionHeaders"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./CoinflowFraudProtectionHeader"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./CoinflowProtectionInit"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./ForterSnippet"), exports);
|
|
25
26
|
var Forter_1 = require("./Forter");
|
|
26
27
|
Object.defineProperty(exports, "getForterToken", { enumerable: true, get: function () { return tslib_1.__importDefault(Forter_1).default; } });
|
|
27
28
|
Object.defineProperty(exports, "captureForterToken", { enumerable: true, get: function () { return Forter_1.captureForterToken; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAgC;AAChC,0DAAgC;AAChC,uEAA6C;AAC7C,qDAA2B;AAC3B,sEAA4C;AAC5C,uEAA6C;AAC7C,+EAAqD;AACrD,2DAAiC;AACjC,2DAAiC;AACjC,4DAAkC;AAClC,mEAAyC;AACzC,8DAAoC;AACpC,iEAAuC;AACvC,iEAAuC;AACvC,uEAA6C;AAC7C,wEAA8C;AAC9C,kEAAwC;AACxC,8EAAoD;AACpD,0EAAgD;AAChD,mEAAyC;AACzC,mCAIkB;AAHhB,iIAAA,OAAO,OAAkB;AACzB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAElB,gEAAsC;AACtC,6DAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAgC;AAChC,0DAAgC;AAChC,uEAA6C;AAC7C,qDAA2B;AAC3B,sEAA4C;AAC5C,uEAA6C;AAC7C,+EAAqD;AACrD,2DAAiC;AACjC,2DAAiC;AACjC,4DAAkC;AAClC,mEAAyC;AACzC,8DAAoC;AACpC,iEAAuC;AACvC,iEAAuC;AACvC,uEAA6C;AAC7C,wEAA8C;AAC9C,kEAAwC;AACxC,8EAAoD;AACpD,0EAAgD;AAChD,mEAAyC;AACzC,0DAAgC;AAChC,mCAIkB;AAHhB,iIAAA,OAAO,OAAkB;AACzB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAElB,gEAAsC;AACtC,6DAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subtotal.js","sourceRoot":"","sources":["../../../../src/common/types/Subtotal.ts"],"names":[],"mappings":";;;;;;;;AAAA,IAAY,QA8JX;AA9JD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBA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":3,"file":"Subtotal.js","sourceRoot":"","sources":["../../../../src/common/types/Subtotal.ts"],"names":[],"mappings":";;;;;;;;AAAA,IAAY,QA8JX;AA9JD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW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AG;IACZ,QAAQ,CAAC,GAAG;IACZ,QAAQ,CAAC,GAAG;CACb,CAAC,CAAC;AAEH,6BAAoC,QAAkB;IACpD,IAAI,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,CAAC;IAClD,IAAI,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,CAAC;IACnD,IAAI,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,CAAC;IAClD,OAAO,CAAC,CAAC;AACX,CAAC;AAiCD,8BACE,KAAoB,EACpB,QAAW;IAEX,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACrC,CAAC;AAOD,oBAA0D,EAIzD;IACC,OAAO;QACL,IAAI,EAAE,EAAE,CAAC,EAAE;QACX,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI;QACjB,EAAE,EAAE,EAAE,CAAC,IAAI;KACO,CAAC;AACvB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import nsureSDK from '@nsure-ai/web-client-sdk';
|
|
2
2
|
import { CoinflowUtils, recordFrontendError } from './CoinflowUtils';
|
|
3
3
|
import { initProtectionSession } from './CoinflowProtectionSession';
|
|
4
|
+
import { ForterSnippet } from './ForterSnippet';
|
|
5
|
+
import { captureForterToken } from './Forter';
|
|
4
6
|
const NSURE_APP_ID = '9JBW2RHC7JNJN8ZQ';
|
|
5
7
|
const PROTECTION_SESSION_PROJECT_IDS = {
|
|
6
8
|
prod: '315da543-c486-435a-aa21-53844c469822',
|
|
@@ -8,6 +10,8 @@ const PROTECTION_SESSION_PROJECT_IDS = {
|
|
|
8
10
|
};
|
|
9
11
|
export async function initCoinflowProtection({ coinflowEnv, merchantId, }) {
|
|
10
12
|
const env = coinflowEnv === 'prod' ? 'prod' : 'sandbox';
|
|
13
|
+
ForterSnippet.load(ForterSnippet.siteIdFor(coinflowEnv));
|
|
14
|
+
captureForterToken();
|
|
11
15
|
const hasUrlDeviceId = typeof window !== 'undefined' &&
|
|
12
16
|
new URLSearchParams(window.location.search).has('deviceId');
|
|
13
17
|
if (!hasUrlDeviceId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionInit.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionInit.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAE5C,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAExC,MAAM,8BAA8B,GAA2B;IAC7D,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,sCAAsC;CAChD,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,WAAW,EACX,UAAU,GAIX;IACC,MAAM,GAAG,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAExD,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IACzD,kBAAkB,EAAE,CAAC;IAErB,MAAM,cAAc,GAClB,OAAO,MAAM,KAAK,WAAW;QAC7B,IAAI,eAAe,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G,EAAE;wBACnB,qBAAqB,CAAC,EAAC,UAAU,EAAE,GAAG,EAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACtE,CAAC,CAAC;oBACF,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE;wBACnB,mBAAmB,CAAC;4BAClB,KAAK,EAAE,iBAAiB;4BACxB,KAAK,EAAE,CAAC;4BACR,GAAG,EAAE,WAAW;4BAChB,UAAU;yBACX,CAAC,CAAC;wBACH,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC;oBACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionInit.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionInit.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionInit.native.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAG5C;IACC,OAAO;AACT,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { CoinflowEnvs } from './CoinflowTypes';
|
|
2
|
+
export declare function initProtectionSession(_args: {
|
|
3
|
+
merchantId: string;
|
|
4
|
+
env: CoinflowEnvs;
|
|
5
|
+
}): Promise<void>;
|
|
2
6
|
export declare function getProtectionSessionId(): string | null;
|
|
3
7
|
export default getProtectionSessionId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowProtectionSession.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionSession.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoinflowProtectionSession.native.js","sourceRoot":"","sources":["../../../src/common/CoinflowProtectionSession.native.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAG3C;IACC,OAAO;AACT,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEVICE_ID_HEADER = "x-device-id";
|
|
2
|
+
export declare const REFERRER_HEADER = "x-coinflow-referrer";
|
|
3
|
+
export declare const SESSION_ID_HEADER = "x-session-id";
|
|
4
|
+
export declare const FORTER_TOKEN_HEADER = "x-forter-token";
|
|
5
|
+
export type WithReferrerHeader<T> = T & {
|
|
6
|
+
[REFERRER_HEADER]: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare class CoinflowPurchaseHeaders {
|
|
9
|
+
static withReferrer<T extends object>(protectionHeaders: T): WithReferrerHeader<T>;
|
|
10
|
+
private static getReferrer;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const DEVICE_ID_HEADER = 'x-device-id';
|
|
2
|
+
export const REFERRER_HEADER = 'x-coinflow-referrer';
|
|
3
|
+
// Per-provider headers. The web SDKs pack every token into `x-device-id`; React Native and older
|
|
4
|
+
// integrations still send these, and the API reads them as a fallback.
|
|
5
|
+
export const SESSION_ID_HEADER = 'x-session-id';
|
|
6
|
+
export const FORTER_TOKEN_HEADER = 'x-forter-token';
|
|
7
|
+
export class CoinflowPurchaseHeaders {
|
|
8
|
+
static withReferrer(protectionHeaders) {
|
|
9
|
+
return {
|
|
10
|
+
...protectionHeaders,
|
|
11
|
+
[REFERRER_HEADER]: this.getReferrer(),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
static getReferrer() {
|
|
15
|
+
try {
|
|
16
|
+
return document.referrer || null;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=CoinflowPurchaseHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseHeaders.js","sourceRoot":"","sources":["../../../src/common/CoinflowPurchaseHeaders.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACrD,iGAAiG;AACjG,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAIpD,MAAM,OAAO,uBAAuB;IAClC,MAAM,CAAC,YAAY,CACjB,iBAAoB;QAEpB,OAAO;YACL,GAAG,iBAAiB;YACpB,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE;SACtC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC;YACH,OAAO,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|