@reclaimprotocol/inapp-rn-sdk 0.3.0 → 0.6.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/InappRnSdk.podspec +2 -1
- package/README.md +19 -17
- package/android/build.gradle +3 -3
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI.h +45 -35
- package/android/src/main/java/com/reclaimprotocol/inapp_rn_sdk/InappRnSdkModule.kt +18 -12
- package/ios/InappRnSdk.mm +8 -13
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec.h +18 -12
- package/ios/generated/RNInappRnSdkSpecJSI.h +45 -35
- package/ios/inapp_rn_sdk/Api.swift +32 -21
- package/lib/commonjs/index.js +327 -32
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeInappRnSdk.js.map +1 -1
- package/lib/module/index.js +324 -14
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeInappRnSdk.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +170 -9
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts +18 -11
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +170 -9
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts +18 -11
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/index.ts +566 -21
- package/src/specs/NativeInappRnSdk.ts +22 -13
- package/lib/commonjs/ReclaimVerificationPlatformChannel.js +0 -306
- package/lib/commonjs/ReclaimVerificationPlatformChannel.js.map +0 -1
- package/lib/commonjs/types/proof.js +0 -16
- package/lib/commonjs/types/proof.js.map +0 -1
- package/lib/module/ReclaimVerificationPlatformChannel.js +0 -299
- package/lib/module/ReclaimVerificationPlatformChannel.js.map +0 -1
- package/lib/module/types/proof.js +0 -12
- package/lib/module/types/proof.js.map +0 -1
- package/lib/typescript/commonjs/src/ReclaimVerificationPlatformChannel.d.ts +0 -115
- package/lib/typescript/commonjs/src/ReclaimVerificationPlatformChannel.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/proof.d.ts +0 -33
- package/lib/typescript/commonjs/src/types/proof.d.ts.map +0 -1
- package/lib/typescript/module/src/ReclaimVerificationPlatformChannel.d.ts +0 -115
- package/lib/typescript/module/src/ReclaimVerificationPlatformChannel.d.ts.map +0 -1
- package/lib/typescript/module/src/types/proof.d.ts +0 -33
- package/lib/typescript/module/src/types/proof.d.ts.map +0 -1
- package/src/ReclaimVerificationPlatformChannel.ts +0 -408
- package/src/types/proof.ts +0 -44
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
export let ReclaimResult;
|
|
4
|
-
(function (_ReclaimResult) {
|
|
5
|
-
const isProof = _ReclaimResult.isProof = value => {
|
|
6
|
-
return typeof value === 'object' && value !== null && 'identifier' in value && 'signatures' in value && 'witnesses' in value;
|
|
7
|
-
};
|
|
8
|
-
const asProofs = _ReclaimResult.asProofs = proofs => {
|
|
9
|
-
return proofs.filter(isProof);
|
|
10
|
-
};
|
|
11
|
-
})(ReclaimResult || (ReclaimResult = {}));
|
|
12
|
-
//# sourceMappingURL=proof.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ReclaimResult","_ReclaimResult","isProof","value","asProofs","proofs","filter"],"sourceRoot":"../../../src","sources":["types/proof.ts"],"mappings":";;WAMiBA,aAAa;AAAA,WAAAC,cAAA;EAanB,MAAMC,OAAO,GAAAD,cAAA,CAAAC,OAAA,GAAIC,KAA0B,IAAqB;IACnE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,YAAY,IAAIA,KAAK,IAAI,YAAY,IAAIA,KAAK,IAAI,WAAW,IAAIA,KAAK;EAChI,CAAC;EAEM,MAAMC,QAAQ,GAAAH,cAAA,CAAAG,QAAA,GAAIC,MAA6B,IAAc;IAChE,OAAOA,MAAM,CAACC,MAAM,CAACJ,OAAO,CAAC;EACjC,CAAC;AAAA,GAnBYF,aAAa,KAAbA,aAAa","ignoreList":[]}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import * as NativeReclaimInappModuleTypes from "./specs/NativeInappRnSdk";
|
|
2
|
-
import { type ReclaimVerificationResponse } from "./types/proof";
|
|
3
|
-
export type { ReclaimVerificationResponse, ReclaimResult } from "./types/proof";
|
|
4
|
-
/**
|
|
5
|
-
* This namespace provides types involved in initiating and managing the verification process
|
|
6
|
-
* for proving claims about user data through various providers.
|
|
7
|
-
*/
|
|
8
|
-
export declare namespace ReclaimVerificationApi {
|
|
9
|
-
/**
|
|
10
|
-
* Represents user's session information for a verification attempt.
|
|
11
|
-
* This data class contains the necessary data to identify and validate a verification session.
|
|
12
|
-
*/
|
|
13
|
-
type SessionInformation = NativeReclaimInappModuleTypes.SessionInformation;
|
|
14
|
-
/**
|
|
15
|
-
* Represents a request for a verification attempt.
|
|
16
|
-
*
|
|
17
|
-
* You can create a request using the [ReclaimVerification.Request] constructor or the [ReclaimVerification.Request.fromManifestMetaData] factory method.
|
|
18
|
-
*/
|
|
19
|
-
type Request = NativeReclaimInappModuleTypes.Request;
|
|
20
|
-
/**
|
|
21
|
-
* Contains the proof and response data after verification
|
|
22
|
-
*/
|
|
23
|
-
type Response = ReclaimVerificationResponse;
|
|
24
|
-
interface VerificationOptions {
|
|
25
|
-
canDeleteCookiesBeforeVerificationStarts: boolean;
|
|
26
|
-
fetchAttestorAuthenticationRequest: (reclaimHttpProviderJsonString: string) => Promise<string>;
|
|
27
|
-
}
|
|
28
|
-
namespace Overrides {
|
|
29
|
-
interface ProviderInformation {
|
|
30
|
-
url?: string;
|
|
31
|
-
jsonString?: string;
|
|
32
|
-
callback?: (request: NativeReclaimInappModuleTypes.ProviderInformationRequest) => Promise<string>;
|
|
33
|
-
}
|
|
34
|
-
type FeatureOptions = NativeReclaimInappModuleTypes.FeatureOptions;
|
|
35
|
-
interface LogConsumer {
|
|
36
|
-
/**
|
|
37
|
-
* Handler for consuming logs exported from the SDK.
|
|
38
|
-
* Defaults to false.
|
|
39
|
-
*/
|
|
40
|
-
onLogs?: (logJsonString: String, cancel: () => void) => void;
|
|
41
|
-
/**
|
|
42
|
-
* When enabled, logs are sent to reclaim that can be used to help you.
|
|
43
|
-
* Defaults to true.
|
|
44
|
-
*/
|
|
45
|
-
canSdkCollectTelemetry?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Defaults to enabled when not in release mode.
|
|
48
|
-
*/
|
|
49
|
-
canSdkPrintLogs?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface SessionManagement {
|
|
52
|
-
onLog: (event: NativeReclaimInappModuleTypes.SessionLogEvent) => void;
|
|
53
|
-
onSessionCreateRequest: (event: NativeReclaimInappModuleTypes.SessionCreateRequestEvent) => Promise<boolean>;
|
|
54
|
-
onSessionUpdateRequest: (event: NativeReclaimInappModuleTypes.SessionUpdateRequestEvent) => Promise<boolean>;
|
|
55
|
-
}
|
|
56
|
-
type ReclaimAppInfo = NativeReclaimInappModuleTypes.ReclaimAppInfo;
|
|
57
|
-
}
|
|
58
|
-
type OverrideConfig = {
|
|
59
|
-
provider?: Overrides.ProviderInformation;
|
|
60
|
-
featureOptions?: Overrides.FeatureOptions;
|
|
61
|
-
logConsumer?: Overrides.LogConsumer;
|
|
62
|
-
sessionManagement?: Overrides.SessionManagement;
|
|
63
|
-
appInfo?: Overrides.ReclaimAppInfo;
|
|
64
|
-
capabilityAccessToken?: string | null;
|
|
65
|
-
};
|
|
66
|
-
enum ExceptionType {
|
|
67
|
-
Cancelled = "Cancelled",
|
|
68
|
-
Dismissed = "Dismissed",
|
|
69
|
-
SessionExpired = "SessionExpired",
|
|
70
|
-
Failed = "Failed"
|
|
71
|
-
}
|
|
72
|
-
class ReclaimPlatformException extends Error {
|
|
73
|
-
readonly innerError: Error;
|
|
74
|
-
readonly reason?: string;
|
|
75
|
-
readonly details?: any;
|
|
76
|
-
constructor(message: string, innerError: Error);
|
|
77
|
-
static isReclaimPlatformException(error: Error): error is ReclaimPlatformException;
|
|
78
|
-
}
|
|
79
|
-
class ReclaimVerificationException extends Error {
|
|
80
|
-
readonly innerError: Error;
|
|
81
|
-
readonly type: ExceptionType;
|
|
82
|
-
readonly sessionId: string;
|
|
83
|
-
readonly "didSubmitManualVerification": boolean;
|
|
84
|
-
readonly "reason": string;
|
|
85
|
-
constructor(message: string, innerError: Error, type: ExceptionType, sessionId: string, didSubmitManualVerification: boolean, reason: string);
|
|
86
|
-
private static fromTypeName;
|
|
87
|
-
static fromError(error: Error, sessionIdHint: string): ReclaimVerificationException;
|
|
88
|
-
static isReclaimVerificationException(error: Error): error is ReclaimVerificationException;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export declare abstract class ReclaimVerificationPlatformChannel {
|
|
92
|
-
abstract startVerification(request: ReclaimVerificationApi.Request): Promise<ReclaimVerificationApi.Response>;
|
|
93
|
-
abstract startVerificationFromUrl(requestUrl: string): Promise<ReclaimVerificationApi.Response>;
|
|
94
|
-
abstract ping(): Promise<boolean>;
|
|
95
|
-
abstract setOverrides(config: ReclaimVerificationApi.OverrideConfig): Promise<void>;
|
|
96
|
-
abstract clearAllOverrides(): Promise<void>;
|
|
97
|
-
abstract setVerificationOptions(options?: ReclaimVerificationApi.VerificationOptions | null): Promise<void>;
|
|
98
|
-
}
|
|
99
|
-
export declare class ReclaimVerificationPlatformChannelImpl extends ReclaimVerificationPlatformChannel {
|
|
100
|
-
startVerification(request: ReclaimVerificationApi.Request): Promise<ReclaimVerificationApi.Response>;
|
|
101
|
-
startVerificationFromUrl(requestUrl: string): Promise<ReclaimVerificationApi.Response>;
|
|
102
|
-
ping(): Promise<boolean>;
|
|
103
|
-
private previousSessionManagementCancelCallback;
|
|
104
|
-
disposeSessionManagement(): void;
|
|
105
|
-
private previousLogSubscription;
|
|
106
|
-
disposeLogListener(): void;
|
|
107
|
-
private previousProviderRequestCancelCallback;
|
|
108
|
-
private disposeProviderRequestListener;
|
|
109
|
-
setOverrides({ provider, featureOptions, logConsumer, sessionManagement, appInfo, capabilityAccessToken }: ReclaimVerificationApi.OverrideConfig): Promise<void>;
|
|
110
|
-
clearAllOverrides(): Promise<void>;
|
|
111
|
-
private previousAttestorAuthRequestCancelCallback;
|
|
112
|
-
disposeAttestorAuthRequestListener(): void;
|
|
113
|
-
setVerificationOptions(options?: ReclaimVerificationApi.VerificationOptions | null): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=ReclaimVerificationPlatformChannel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReclaimVerificationPlatformChannel.d.ts","sourceRoot":"","sources":["../../../../src/ReclaimVerificationPlatformChannel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,6BAA6B,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAiB,KAAK,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAChF,YAAY,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEhF;;;GAGG;AACH,yBAAiB,sBAAsB,CAAC;IACpC;;;OAGG;IACH,KAAY,kBAAkB,GAAG,6BAA6B,CAAC,kBAAkB,CAAC;IAElF;;;;OAIG;IACH,KAAY,OAAO,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAE5D;;OAEG;IACH,KAAY,QAAQ,GAAG,2BAA2B,CAAC;IAEnD,UAAiB,mBAAmB;QAChC,wCAAwC,EAAE,OAAO,CAAC;QAClD,kCAAkC,EAAE,CAAC,6BAA6B,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;KAClG;IAED,UAAiB,SAAS,CAAC;QACvB,UAAiB,mBAAmB;YAChC,GAAG,CAAC,EAAE,MAAM,CAAC;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,YAAY,CAAC,MAAM,EAAE,sBAAsB,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnF,QAAQ,CAAC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAE3C,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAC9G;AAED,qBAAa,sCAAuC,SAAQ,kCAAkC;IAC3E,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC;IAkBpG,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC;IAkBtF,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAIvC,OAAO,CAAC,uCAAuC,CAA6B;IAC5E,wBAAwB;IAQxB,OAAO,CAAC,uBAAuB,CAAkC;IACjE,kBAAkB;IAKlB,OAAO,CAAC,qCAAqC,CAA6B;IAC1E,OAAO,CAAC,8BAA8B;IAQvB,YAAY,CAAC,EACxB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,qBAAqB,EACxB,EAAE,sBAAsB,CAAC,cAAc;IAgGzB,iBAAiB;IAOhC,OAAO,CAAC,yCAAyC,CAA6B;IAC9E,kCAAkC;IAQnB,sBAAsB,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA4BpH"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as NativeReclaimInappModuleTypes from "./../specs/NativeInappRnSdk";
|
|
2
|
-
export interface ReclaimVerificationResponse extends NativeReclaimInappModuleTypes.Response {
|
|
3
|
-
proofs: ReclaimResult.Proof[];
|
|
4
|
-
}
|
|
5
|
-
export declare namespace ReclaimResult {
|
|
6
|
-
interface Proof {
|
|
7
|
-
identifier: string;
|
|
8
|
-
signatures: string[];
|
|
9
|
-
/**
|
|
10
|
-
* A data associated with this [Proof].
|
|
11
|
-
* The data type of this object is dynamic and can be any JSON serializable Javascript object.
|
|
12
|
-
*/
|
|
13
|
-
publicData?: any | null;
|
|
14
|
-
witnesses: WitnessData[];
|
|
15
|
-
claimData: ProviderClaimData;
|
|
16
|
-
}
|
|
17
|
-
const isProof: (value: Record<string, any>) => value is Proof;
|
|
18
|
-
const asProofs: (proofs: Record<string, any>[]) => Proof[];
|
|
19
|
-
interface ProviderClaimData {
|
|
20
|
-
owner: string;
|
|
21
|
-
provider: string;
|
|
22
|
-
timestampS: number;
|
|
23
|
-
epoch: number;
|
|
24
|
-
context: string;
|
|
25
|
-
identifier: string;
|
|
26
|
-
parameters: string;
|
|
27
|
-
}
|
|
28
|
-
interface WitnessData {
|
|
29
|
-
id: string;
|
|
30
|
-
url: string;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=proof.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../../../../../src/types/proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,6BAA6B,MAAM,6BAA6B,CAAC;AAE7E,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B,CAAC,QAAQ;IACvF,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC;CACjC;AAED,yBAAiB,aAAa,CAAC;IAC3B,UAAiB,KAAK;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB;;;WAGG;QACH,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;QACxB,SAAS,EAAE,WAAW,EAAE,CAAC;QACzB,SAAS,EAAE,iBAAiB,CAAC;KAChC;IAEM,MAAM,OAAO,GAAI,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,KAAK,IAAI,KAE7D,CAAA;IAEM,MAAM,QAAQ,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAG,KAAK,EAE7D,CAAA;IAED,UAAiB,iBAAiB;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QAEjB,UAAU,EAAE,MAAM,CAAC;QAEnB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACtB;IAED,UAAiB,WAAW;QACxB,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACf;CACJ"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import * as NativeReclaimInappModuleTypes from "./specs/NativeInappRnSdk";
|
|
2
|
-
import { type ReclaimVerificationResponse } from "./types/proof";
|
|
3
|
-
export type { ReclaimVerificationResponse, ReclaimResult } from "./types/proof";
|
|
4
|
-
/**
|
|
5
|
-
* This namespace provides types involved in initiating and managing the verification process
|
|
6
|
-
* for proving claims about user data through various providers.
|
|
7
|
-
*/
|
|
8
|
-
export declare namespace ReclaimVerificationApi {
|
|
9
|
-
/**
|
|
10
|
-
* Represents user's session information for a verification attempt.
|
|
11
|
-
* This data class contains the necessary data to identify and validate a verification session.
|
|
12
|
-
*/
|
|
13
|
-
type SessionInformation = NativeReclaimInappModuleTypes.SessionInformation;
|
|
14
|
-
/**
|
|
15
|
-
* Represents a request for a verification attempt.
|
|
16
|
-
*
|
|
17
|
-
* You can create a request using the [ReclaimVerification.Request] constructor or the [ReclaimVerification.Request.fromManifestMetaData] factory method.
|
|
18
|
-
*/
|
|
19
|
-
type Request = NativeReclaimInappModuleTypes.Request;
|
|
20
|
-
/**
|
|
21
|
-
* Contains the proof and response data after verification
|
|
22
|
-
*/
|
|
23
|
-
type Response = ReclaimVerificationResponse;
|
|
24
|
-
interface VerificationOptions {
|
|
25
|
-
canDeleteCookiesBeforeVerificationStarts: boolean;
|
|
26
|
-
fetchAttestorAuthenticationRequest: (reclaimHttpProviderJsonString: string) => Promise<string>;
|
|
27
|
-
}
|
|
28
|
-
namespace Overrides {
|
|
29
|
-
interface ProviderInformation {
|
|
30
|
-
url?: string;
|
|
31
|
-
jsonString?: string;
|
|
32
|
-
callback?: (request: NativeReclaimInappModuleTypes.ProviderInformationRequest) => Promise<string>;
|
|
33
|
-
}
|
|
34
|
-
type FeatureOptions = NativeReclaimInappModuleTypes.FeatureOptions;
|
|
35
|
-
interface LogConsumer {
|
|
36
|
-
/**
|
|
37
|
-
* Handler for consuming logs exported from the SDK.
|
|
38
|
-
* Defaults to false.
|
|
39
|
-
*/
|
|
40
|
-
onLogs?: (logJsonString: String, cancel: () => void) => void;
|
|
41
|
-
/**
|
|
42
|
-
* When enabled, logs are sent to reclaim that can be used to help you.
|
|
43
|
-
* Defaults to true.
|
|
44
|
-
*/
|
|
45
|
-
canSdkCollectTelemetry?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Defaults to enabled when not in release mode.
|
|
48
|
-
*/
|
|
49
|
-
canSdkPrintLogs?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface SessionManagement {
|
|
52
|
-
onLog: (event: NativeReclaimInappModuleTypes.SessionLogEvent) => void;
|
|
53
|
-
onSessionCreateRequest: (event: NativeReclaimInappModuleTypes.SessionCreateRequestEvent) => Promise<boolean>;
|
|
54
|
-
onSessionUpdateRequest: (event: NativeReclaimInappModuleTypes.SessionUpdateRequestEvent) => Promise<boolean>;
|
|
55
|
-
}
|
|
56
|
-
type ReclaimAppInfo = NativeReclaimInappModuleTypes.ReclaimAppInfo;
|
|
57
|
-
}
|
|
58
|
-
type OverrideConfig = {
|
|
59
|
-
provider?: Overrides.ProviderInformation;
|
|
60
|
-
featureOptions?: Overrides.FeatureOptions;
|
|
61
|
-
logConsumer?: Overrides.LogConsumer;
|
|
62
|
-
sessionManagement?: Overrides.SessionManagement;
|
|
63
|
-
appInfo?: Overrides.ReclaimAppInfo;
|
|
64
|
-
capabilityAccessToken?: string | null;
|
|
65
|
-
};
|
|
66
|
-
enum ExceptionType {
|
|
67
|
-
Cancelled = "Cancelled",
|
|
68
|
-
Dismissed = "Dismissed",
|
|
69
|
-
SessionExpired = "SessionExpired",
|
|
70
|
-
Failed = "Failed"
|
|
71
|
-
}
|
|
72
|
-
class ReclaimPlatformException extends Error {
|
|
73
|
-
readonly innerError: Error;
|
|
74
|
-
readonly reason?: string;
|
|
75
|
-
readonly details?: any;
|
|
76
|
-
constructor(message: string, innerError: Error);
|
|
77
|
-
static isReclaimPlatformException(error: Error): error is ReclaimPlatformException;
|
|
78
|
-
}
|
|
79
|
-
class ReclaimVerificationException extends Error {
|
|
80
|
-
readonly innerError: Error;
|
|
81
|
-
readonly type: ExceptionType;
|
|
82
|
-
readonly sessionId: string;
|
|
83
|
-
readonly "didSubmitManualVerification": boolean;
|
|
84
|
-
readonly "reason": string;
|
|
85
|
-
constructor(message: string, innerError: Error, type: ExceptionType, sessionId: string, didSubmitManualVerification: boolean, reason: string);
|
|
86
|
-
private static fromTypeName;
|
|
87
|
-
static fromError(error: Error, sessionIdHint: string): ReclaimVerificationException;
|
|
88
|
-
static isReclaimVerificationException(error: Error): error is ReclaimVerificationException;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export declare abstract class ReclaimVerificationPlatformChannel {
|
|
92
|
-
abstract startVerification(request: ReclaimVerificationApi.Request): Promise<ReclaimVerificationApi.Response>;
|
|
93
|
-
abstract startVerificationFromUrl(requestUrl: string): Promise<ReclaimVerificationApi.Response>;
|
|
94
|
-
abstract ping(): Promise<boolean>;
|
|
95
|
-
abstract setOverrides(config: ReclaimVerificationApi.OverrideConfig): Promise<void>;
|
|
96
|
-
abstract clearAllOverrides(): Promise<void>;
|
|
97
|
-
abstract setVerificationOptions(options?: ReclaimVerificationApi.VerificationOptions | null): Promise<void>;
|
|
98
|
-
}
|
|
99
|
-
export declare class ReclaimVerificationPlatformChannelImpl extends ReclaimVerificationPlatformChannel {
|
|
100
|
-
startVerification(request: ReclaimVerificationApi.Request): Promise<ReclaimVerificationApi.Response>;
|
|
101
|
-
startVerificationFromUrl(requestUrl: string): Promise<ReclaimVerificationApi.Response>;
|
|
102
|
-
ping(): Promise<boolean>;
|
|
103
|
-
private previousSessionManagementCancelCallback;
|
|
104
|
-
disposeSessionManagement(): void;
|
|
105
|
-
private previousLogSubscription;
|
|
106
|
-
disposeLogListener(): void;
|
|
107
|
-
private previousProviderRequestCancelCallback;
|
|
108
|
-
private disposeProviderRequestListener;
|
|
109
|
-
setOverrides({ provider, featureOptions, logConsumer, sessionManagement, appInfo, capabilityAccessToken }: ReclaimVerificationApi.OverrideConfig): Promise<void>;
|
|
110
|
-
clearAllOverrides(): Promise<void>;
|
|
111
|
-
private previousAttestorAuthRequestCancelCallback;
|
|
112
|
-
disposeAttestorAuthRequestListener(): void;
|
|
113
|
-
setVerificationOptions(options?: ReclaimVerificationApi.VerificationOptions | null): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=ReclaimVerificationPlatformChannel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReclaimVerificationPlatformChannel.d.ts","sourceRoot":"","sources":["../../../../src/ReclaimVerificationPlatformChannel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,6BAA6B,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAiB,KAAK,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAChF,YAAY,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEhF;;;GAGG;AACH,yBAAiB,sBAAsB,CAAC;IACpC;;;OAGG;IACH,KAAY,kBAAkB,GAAG,6BAA6B,CAAC,kBAAkB,CAAC;IAElF;;;;OAIG;IACH,KAAY,OAAO,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAE5D;;OAEG;IACH,KAAY,QAAQ,GAAG,2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H"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as NativeReclaimInappModuleTypes from "./../specs/NativeInappRnSdk";
|
|
2
|
-
export interface ReclaimVerificationResponse extends NativeReclaimInappModuleTypes.Response {
|
|
3
|
-
proofs: ReclaimResult.Proof[];
|
|
4
|
-
}
|
|
5
|
-
export declare namespace ReclaimResult {
|
|
6
|
-
interface Proof {
|
|
7
|
-
identifier: string;
|
|
8
|
-
signatures: string[];
|
|
9
|
-
/**
|
|
10
|
-
* A data associated with this [Proof].
|
|
11
|
-
* The data type of this object is dynamic and can be any JSON serializable Javascript object.
|
|
12
|
-
*/
|
|
13
|
-
publicData?: any | null;
|
|
14
|
-
witnesses: WitnessData[];
|
|
15
|
-
claimData: ProviderClaimData;
|
|
16
|
-
}
|
|
17
|
-
const isProof: (value: Record<string, any>) => value is Proof;
|
|
18
|
-
const asProofs: (proofs: Record<string, any>[]) => Proof[];
|
|
19
|
-
interface ProviderClaimData {
|
|
20
|
-
owner: string;
|
|
21
|
-
provider: string;
|
|
22
|
-
timestampS: number;
|
|
23
|
-
epoch: number;
|
|
24
|
-
context: string;
|
|
25
|
-
identifier: string;
|
|
26
|
-
parameters: string;
|
|
27
|
-
}
|
|
28
|
-
interface WitnessData {
|
|
29
|
-
id: string;
|
|
30
|
-
url: string;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=proof.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../../../../../src/types/proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,6BAA6B,MAAM,6BAA6B,CAAC;AAE7E,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B,CAAC,QAAQ;IACvF,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC;CACjC;AAED,yBAAiB,aAAa,CAAC;IAC3B,UAAiB,KAAK;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB;;;WAGG;QACH,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;QACxB,SAAS,EAAE,WAAW,EAAE,CAAC;QACzB,SAAS,EAAE,iBAAiB,CAAC;KAChC;IAEM,MAAM,OAAO,GAAI,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,KAAK,IAAI,KAE7D,CAAA;IAEM,MAAM,QAAQ,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAG,KAAK,EAE7D,CAAA;IAED,UAAiB,iBAAiB;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QAEjB,UAAU,EAAE,MAAM,CAAC;QAEnB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACtB;IAED,UAAiB,WAAW;QACxB,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACf;CACJ"}
|