@ledgerhq/context-module 0.0.0-develop-20260423152505 → 0.0.0-develop-20260425002051
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/lib/cjs/package.json +1 -1
- package/lib/cjs/src/account-ownership/data/HttpAccountOwnershipDataSource.js +1 -1
- package/lib/cjs/src/account-ownership/data/HttpAccountOwnershipDataSource.js.map +3 -3
- package/lib/cjs/src/account-ownership/data/HttpAccountOwnershipDataSource.test.js +1 -1
- package/lib/cjs/src/account-ownership/data/HttpAccountOwnershipDataSource.test.js.map +3 -3
- package/lib/cjs/src/reporter/data/BlindSigningReporterDatasource.js +1 -1
- package/lib/cjs/src/reporter/data/BlindSigningReporterDatasource.js.map +1 -1
- package/lib/cjs/src/reporter/data/HttpBlindSigningReporterDatasource.test.js +1 -1
- package/lib/cjs/src/reporter/data/HttpBlindSigningReporterDatasource.test.js.map +3 -3
- package/lib/esm/package.json +1 -1
- package/lib/esm/src/account-ownership/data/HttpAccountOwnershipDataSource.js +1 -1
- package/lib/esm/src/account-ownership/data/HttpAccountOwnershipDataSource.js.map +3 -3
- package/lib/esm/src/account-ownership/data/HttpAccountOwnershipDataSource.test.js +1 -1
- package/lib/esm/src/account-ownership/data/HttpAccountOwnershipDataSource.test.js.map +3 -3
- package/lib/esm/src/reporter/data/HttpBlindSigningReporterDatasource.test.js +1 -1
- package/lib/esm/src/reporter/data/HttpBlindSigningReporterDatasource.test.js.map +3 -3
- package/lib/types/src/account-ownership/data/HttpAccountOwnershipDataSource.d.ts +13 -1
- package/lib/types/src/account-ownership/data/HttpAccountOwnershipDataSource.d.ts.map +1 -1
- package/lib/types/src/reporter/data/BlindSigningReporterDatasource.d.ts +7 -1
- package/lib/types/src/reporter/data/BlindSigningReporterDatasource.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"axios";import{Left as
|
|
1
|
+
import t from"axios";import{Left as i,Right as s}from"purify-ts";import{HttpBlindSigningReporterDatasource as n}from"../../reporter/data/HttpBlindSigningReporterDatasource";import{BlindSigningMethod as c,BlindSigningPlatform as d,BlindSignReason as l,ClearSigningType as p}from"../../reporter/model/BlindSigningEvent";import{BlindSigningModelId as u}from"../../reporter/model/BlindSigningModelId";import{LEDGER_CLIENT_VERSION_HEADER as g,LEDGER_ORIGIN_TOKEN_HEADER as m}from"../../shared/constant/HttpHeaders";import S from"../../../package.json";vi.mock("axios");describe("HttpBlindSigningReporterDatasource",()=>{const e={reporter:{url:"https://reporter.test"},originToken:"originToken",appSource:"third-party"},o={signatureId:"a3f8Kb-1738850400000",signingMethod:c.ETH_SIGN_TRANSACTION,isBlindSign:!0,chainId:1,targetAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7",blindSignReason:l.NO_CLEAR_SIGNING_CONTEXT,modelId:u.NANO_X,signerAppVersion:"1.12.1",deviceVersion:"2.2.3",ethContext:{clearSigningType:p.EIP7730,partialContextErrors:0}};beforeEach(()=>{vi.resetAllMocks()}),describe("report",()=>{it("should return Right(undefined) on success",async()=>{vi.spyOn(t,"request").mockResolvedValueOnce({data:{}});const a=await new n(e).report(o);expect(a).toEqual(s(void 0))}),it("should return Left(Error) when the request fails",async()=>{vi.spyOn(t,"request").mockRejectedValueOnce(new Error("network error"));const a=await new n(e).report(o);expect(a).toEqual(i(new Error("[ContextModule] HttpBlindSigningReporterDatasource: Failed to report blind signing event")))}),it("should call axios with the correct URL and method",async()=>{vi.spyOn(t,"request").mockResolvedValueOnce({data:{}}),await new n(e).report(o),expect(t.request).toHaveBeenCalledWith(expect.objectContaining({method:"POST",url:`${e.reporter.url}/blind-signing-events`}))}),it("should call axios with the correct headers",async()=>{vi.spyOn(t,"request").mockResolvedValueOnce({data:{}}),await new n(e).report(o),expect(t.request).toHaveBeenCalledWith(expect.objectContaining({headers:{[g]:`context-module/${S.version}`,[m]:e.originToken}}))}),it("should call axios with the event payload and injected source as data",async()=>{vi.spyOn(t,"request").mockResolvedValueOnce({data:{}}),await new n(e).report(o),expect(t.request).toHaveBeenCalledWith(expect.objectContaining({data:{...o,source:e.appSource}}))}),it("should forward optional DTO fields when provided",async()=>{vi.spyOn(t,"request").mockResolvedValueOnce({data:{}});const r={...o,platform:d.DESKTOP,appVersion:"2.80.0",platformOS:"macOS",platformVersion:"14.5",liveAppContext:"swap",sessionId:"session-123"};await new n(e).report(r),expect(t.request).toHaveBeenCalledWith(expect.objectContaining({data:{...r,source:e.appSource}}))})})});
|
|
2
2
|
//# sourceMappingURL=HttpBlindSigningReporterDatasource.test.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/reporter/data/HttpBlindSigningReporterDatasource.test.ts"],
|
|
4
|
-
"sourcesContent": ["import axios from \"axios\";\nimport { Left, Right } from \"purify-ts\";\n\nimport { type ContextModuleServiceConfig } from \"@/config/model/ContextModuleConfig\";\nimport { type BlindSigningReportParams } from \"@/reporter/data/BlindSigningReporterDatasource\";\nimport { HttpBlindSigningReporterDatasource } from \"@/reporter/data/HttpBlindSigningReporterDatasource\";\nimport {\n BlindSigningMethod,\n BlindSignReason,\n ClearSigningType,\n} from \"@/reporter/model/BlindSigningEvent\";\nimport { BlindSigningModelId } from \"@/reporter/model/BlindSigningModelId\";\nimport {\n LEDGER_CLIENT_VERSION_HEADER,\n LEDGER_ORIGIN_TOKEN_HEADER,\n} from \"@/shared/constant/HttpHeaders\";\nimport PACKAGE from \"@root/package.json\";\n\nvi.mock(\"axios\");\n\ndescribe(\"HttpBlindSigningReporterDatasource\", () => {\n const config = {\n reporter: {\n url: \"https://reporter.test\",\n },\n originToken: \"originToken\",\n appSource: \"third-party\",\n } as ContextModuleServiceConfig;\n\n const params: BlindSigningReportParams = {\n signatureId: \"a3f8Kb-1738850400000\",\n signingMethod: BlindSigningMethod.ETH_SIGN_TRANSACTION,\n isBlindSign: true,\n chainId: 1,\n targetAddress: \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n blindSignReason: BlindSignReason.NO_CLEAR_SIGNING_CONTEXT,\n modelId: BlindSigningModelId.NANO_X,\n signerAppVersion: \"1.12.1\",\n deviceVersion: \"2.2.3\",\n ethContext: {\n clearSigningType: ClearSigningType.EIP7730,\n partialContextErrors: 0,\n },\n };\n\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n describe(\"report\", () => {\n it(\"should return Right(undefined) on success\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n const result = await dataSource.report(params);\n\n // THEN\n expect(result).toEqual(Right(undefined));\n });\n\n it(\"should return Left(Error) when the request fails\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockRejectedValueOnce(\n new Error(\"network error\"),\n );\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n const result = await dataSource.report(params);\n\n // THEN\n expect(result).toEqual(\n Left(\n new Error(\n \"[ContextModule] HttpBlindSigningReporterDatasource: Failed to report blind signing event\",\n ),\n ),\n );\n });\n\n it(\"should call axios with the correct URL and method\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n method: \"POST\",\n url: `${config.reporter!.url}/blind-signing-events`,\n }),\n );\n });\n\n it(\"should call axios with the correct headers\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n headers: {\n [LEDGER_CLIENT_VERSION_HEADER]: `context-module/${PACKAGE.version}`,\n [LEDGER_ORIGIN_TOKEN_HEADER]: config.originToken,\n },\n }),\n );\n });\n\n it(\"should call axios with the event payload and injected source as data\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n data: { ...params, source: config.appSource },\n }),\n );\n });\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAW,QAClB,OAAS,QAAAC,EAAM,SAAAC,MAAa,YAI5B,OAAS,sCAAAC,MAA0C,qDACnD,OACE,sBAAAC,EACA,mBAAAC,EACA,oBAAAC,MACK,qCACP,OAAS,uBAAAC,MAA2B,uCACpC,OACE,gCAAAC,EACA,8BAAAC,MACK,gCACP,OAAOC,MAAa,qBAEpB,GAAG,KAAK,OAAO,EAEf,SAAS,qCAAsC,IAAM,CACnD,MAAMC,EAAS,CACb,SAAU,CACR,IAAK,uBACP,EACA,YAAa,cACb,UAAW,aACb,EAEMC,EAAmC,CACvC,YAAa,uBACb,
|
|
6
|
-
"names": ["axios", "Left", "Right", "HttpBlindSigningReporterDatasource", "BlindSigningMethod", "BlindSignReason", "ClearSigningType", "BlindSigningModelId", "LEDGER_CLIENT_VERSION_HEADER", "LEDGER_ORIGIN_TOKEN_HEADER", "PACKAGE", "config", "params", "result"]
|
|
4
|
+
"sourcesContent": ["import axios from \"axios\";\nimport { Left, Right } from \"purify-ts\";\n\nimport { type ContextModuleServiceConfig } from \"@/config/model/ContextModuleConfig\";\nimport { type BlindSigningReportParams } from \"@/reporter/data/BlindSigningReporterDatasource\";\nimport { HttpBlindSigningReporterDatasource } from \"@/reporter/data/HttpBlindSigningReporterDatasource\";\nimport {\n BlindSigningMethod,\n BlindSigningPlatform,\n BlindSignReason,\n ClearSigningType,\n} from \"@/reporter/model/BlindSigningEvent\";\nimport { BlindSigningModelId } from \"@/reporter/model/BlindSigningModelId\";\nimport {\n LEDGER_CLIENT_VERSION_HEADER,\n LEDGER_ORIGIN_TOKEN_HEADER,\n} from \"@/shared/constant/HttpHeaders\";\nimport PACKAGE from \"@root/package.json\";\n\nvi.mock(\"axios\");\n\ndescribe(\"HttpBlindSigningReporterDatasource\", () => {\n const config = {\n reporter: {\n url: \"https://reporter.test\",\n },\n originToken: \"originToken\",\n appSource: \"third-party\",\n } as ContextModuleServiceConfig;\n\n const params: BlindSigningReportParams = {\n signatureId: \"a3f8Kb-1738850400000\",\n signingMethod: BlindSigningMethod.ETH_SIGN_TRANSACTION,\n isBlindSign: true,\n chainId: 1,\n targetAddress: \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n blindSignReason: BlindSignReason.NO_CLEAR_SIGNING_CONTEXT,\n modelId: BlindSigningModelId.NANO_X,\n signerAppVersion: \"1.12.1\",\n deviceVersion: \"2.2.3\",\n ethContext: {\n clearSigningType: ClearSigningType.EIP7730,\n partialContextErrors: 0,\n },\n };\n\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n describe(\"report\", () => {\n it(\"should return Right(undefined) on success\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n const result = await dataSource.report(params);\n\n // THEN\n expect(result).toEqual(Right(undefined));\n });\n\n it(\"should return Left(Error) when the request fails\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockRejectedValueOnce(\n new Error(\"network error\"),\n );\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n const result = await dataSource.report(params);\n\n // THEN\n expect(result).toEqual(\n Left(\n new Error(\n \"[ContextModule] HttpBlindSigningReporterDatasource: Failed to report blind signing event\",\n ),\n ),\n );\n });\n\n it(\"should call axios with the correct URL and method\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n method: \"POST\",\n url: `${config.reporter!.url}/blind-signing-events`,\n }),\n );\n });\n\n it(\"should call axios with the correct headers\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n headers: {\n [LEDGER_CLIENT_VERSION_HEADER]: `context-module/${PACKAGE.version}`,\n [LEDGER_ORIGIN_TOKEN_HEADER]: config.originToken,\n },\n }),\n );\n });\n\n it(\"should call axios with the event payload and injected source as data\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(params);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n data: { ...params, source: config.appSource },\n }),\n );\n });\n\n it(\"should forward optional DTO fields when provided\", async () => {\n // GIVEN\n vi.spyOn(axios, \"request\").mockResolvedValueOnce({ data: {} });\n const paramsWithOptionalFields: BlindSigningReportParams = {\n ...params,\n platform: BlindSigningPlatform.DESKTOP,\n appVersion: \"2.80.0\",\n platformOS: \"macOS\",\n platformVersion: \"14.5\",\n liveAppContext: \"swap\",\n sessionId: \"session-123\",\n };\n\n // WHEN\n const dataSource = new HttpBlindSigningReporterDatasource(config);\n await dataSource.report(paramsWithOptionalFields);\n\n // THEN\n expect(axios.request).toHaveBeenCalledWith(\n expect.objectContaining({\n data: { ...paramsWithOptionalFields, source: config.appSource },\n }),\n );\n });\n });\n});\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["axios", "Left", "Right", "HttpBlindSigningReporterDatasource", "BlindSigningMethod", "BlindSigningPlatform", "BlindSignReason", "ClearSigningType", "BlindSigningModelId", "LEDGER_CLIENT_VERSION_HEADER", "LEDGER_ORIGIN_TOKEN_HEADER", "PACKAGE", "config", "params", "result", "paramsWithOptionalFields"]
|
|
7
7
|
}
|
|
@@ -9,9 +9,21 @@ export declare class HttpAccountOwnershipDataSource implements AccountOwnershipD
|
|
|
9
9
|
* Classifies a caught request error into an {@link AccountOwnershipError}:
|
|
10
10
|
* HTTP 4xx responses carry the backend's `message` verbatim and are marked
|
|
11
11
|
* as `verification_failed`; everything else (network failure, 5xx,
|
|
12
|
-
*
|
|
12
|
+
* unrecognized errors) is marked as `service_unavailable`.
|
|
13
|
+
*
|
|
14
|
+
* Two shapes are recognized:
|
|
15
|
+
* - Vanilla {@link AxiosError} with `.response` (standalone axios usage).
|
|
16
|
+
* - Any error carrying a numeric `.status` field. Consumers may install a
|
|
17
|
+
* global axios interceptor that replaces {@link AxiosError} with a
|
|
18
|
+
* custom class, typically stripping `.response` but preserving the HTTP
|
|
19
|
+
* status on a top-level `.status` field. The duck-typed branch keeps
|
|
20
|
+
* classification correct on those paths without coupling to any
|
|
21
|
+
* host-specific class.
|
|
13
22
|
*/
|
|
14
23
|
private classifyError;
|
|
24
|
+
private classifyFromStatus;
|
|
25
|
+
private hasNumericStatus;
|
|
26
|
+
private extractErrorMessage;
|
|
15
27
|
private extractBackendMessage;
|
|
16
28
|
private isAccountOwnershipDto;
|
|
17
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpAccountOwnershipDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/account-ownership/data/HttpAccountOwnershipDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,WAAW,CAAC;AAErD,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC/B,MAAM,qDAAqD,CAAC;AAI7D,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAOrF,qBACa,8BACX,YAAW,0BAA0B;IAInC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,0BAA0B;IAG/C,aAAa,CAAC,EAClB,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GACR,EAAE,yBAAyB,GAAG,OAAO,CACpC,MAAM,CAAC,KAAK,EAAE,0BAA0B,CAAC,CAC1C;IA2CD
|
|
1
|
+
{"version":3,"file":"HttpAccountOwnershipDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/account-ownership/data/HttpAccountOwnershipDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,WAAW,CAAC;AAErD,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC/B,MAAM,qDAAqD,CAAC;AAI7D,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAOrF,qBACa,8BACX,YAAW,0BAA0B;IAInC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,0BAA0B;IAG/C,aAAa,CAAC,EAClB,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GACR,EAAE,yBAAyB,GAAG,OAAO,CACpC,MAAM,CAAC,KAAK,EAAE,0BAA0B,CAAC,CAC1C;IA2CD;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,qBAAqB;CAY9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Either } from "purify-ts";
|
|
2
|
-
import { type BlindSigningMethod, type BlindSignReason, type ClearSigningType } from "../../reporter/model/BlindSigningEvent";
|
|
2
|
+
import { type BlindSigningMethod, type BlindSigningPlatform, type BlindSignReason, type ClearSigningType } from "../../reporter/model/BlindSigningEvent";
|
|
3
3
|
import { type BlindSigningModelId } from "../../reporter/model/BlindSigningModelId";
|
|
4
4
|
export type BlindSigningReportEthContext = {
|
|
5
5
|
clearSigningType: ClearSigningType;
|
|
@@ -16,6 +16,12 @@ export type BlindSigningReportParams = {
|
|
|
16
16
|
signerAppVersion: string;
|
|
17
17
|
deviceVersion: string | null;
|
|
18
18
|
ethContext: BlindSigningReportEthContext | null;
|
|
19
|
+
platform?: BlindSigningPlatform;
|
|
20
|
+
appVersion?: string;
|
|
21
|
+
platformOS?: string;
|
|
22
|
+
platformVersion?: string;
|
|
23
|
+
liveAppContext?: string | null;
|
|
24
|
+
sessionId?: string | null;
|
|
19
25
|
};
|
|
20
26
|
export interface BlindSigningReporterDatasource {
|
|
21
27
|
report(params: BlindSigningReportParams): Promise<Either<Error, void>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlindSigningReporterDatasource.d.ts","sourceRoot":"","sources":["../../../../../src/reporter/data/BlindSigningReporterDatasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,MAAM,MAAM,4BAA4B,GAAG;IACzC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,4BAA4B,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"BlindSigningReporterDatasource.d.ts","sourceRoot":"","sources":["../../../../../src/reporter/data/BlindSigningReporterDatasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,MAAM,MAAM,4BAA4B,GAAG;IACzC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;CACxE"}
|