@reclaimprotocol/js-sdk 0.0.2 → 0.0.3
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/dist/index.d.ts +143 -0
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/readme/depemdency-diagram.svg +0 -4
- package/readme/usage-flow-2.svg +0 -1
- package/readme/usage-flow-3.svg +0 -1
- package/readme/usage-flow.svg +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
interface ProviderV2 {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
logoUrl: string;
|
|
5
|
+
url: string;
|
|
6
|
+
urlType: string;
|
|
7
|
+
method: 'GET' | 'POST';
|
|
8
|
+
Body: Object | null;
|
|
9
|
+
loginUrl: string;
|
|
10
|
+
loginCookies: string[];
|
|
11
|
+
loginHeaders: string[];
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
responseSelections: ResponseSelection[];
|
|
14
|
+
completedTrigger: string;
|
|
15
|
+
customInjection: string;
|
|
16
|
+
bodySniff: BodySniff;
|
|
17
|
+
userAgent: string | null;
|
|
18
|
+
isApproved: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ResponseSelection {
|
|
21
|
+
JSONPath: string;
|
|
22
|
+
XPath: string;
|
|
23
|
+
responseMatch: string;
|
|
24
|
+
}
|
|
25
|
+
interface BodySniff {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
regex: string;
|
|
28
|
+
}
|
|
29
|
+
interface Proof {
|
|
30
|
+
identifier: string;
|
|
31
|
+
claimData: ProviderClaimData;
|
|
32
|
+
signatures: string[];
|
|
33
|
+
witnesses: WitnessData[];
|
|
34
|
+
extractedParameterValues: any;
|
|
35
|
+
}
|
|
36
|
+
interface WitnessData {
|
|
37
|
+
id: string;
|
|
38
|
+
url: string;
|
|
39
|
+
}
|
|
40
|
+
interface ProviderClaimData {
|
|
41
|
+
provider: string;
|
|
42
|
+
parameters: string;
|
|
43
|
+
owner: string;
|
|
44
|
+
timestampS: number;
|
|
45
|
+
context: string;
|
|
46
|
+
/**
|
|
47
|
+
* identifier of the claim;
|
|
48
|
+
* Hash of (provider, parameters, context)
|
|
49
|
+
*
|
|
50
|
+
* This is different from the claimId returned
|
|
51
|
+
* from the smart contract
|
|
52
|
+
*/
|
|
53
|
+
identifier: string;
|
|
54
|
+
epoch: number;
|
|
55
|
+
}
|
|
56
|
+
interface RequestedProofs {
|
|
57
|
+
id: string;
|
|
58
|
+
sessionId: string;
|
|
59
|
+
name: string;
|
|
60
|
+
callbackUrl: string;
|
|
61
|
+
statusUrl: string;
|
|
62
|
+
claims: RequestedClaim[];
|
|
63
|
+
}
|
|
64
|
+
interface RequestedClaim {
|
|
65
|
+
provider: string;
|
|
66
|
+
context: string;
|
|
67
|
+
templateClaimId: string;
|
|
68
|
+
payload: Payload;
|
|
69
|
+
}
|
|
70
|
+
interface Payload {
|
|
71
|
+
metadata: {
|
|
72
|
+
name: string;
|
|
73
|
+
logoUrl: string;
|
|
74
|
+
};
|
|
75
|
+
url: string;
|
|
76
|
+
urlType: 'CONSTANT' | 'REGEX';
|
|
77
|
+
method: 'GET' | 'POST';
|
|
78
|
+
login: {
|
|
79
|
+
url: string;
|
|
80
|
+
};
|
|
81
|
+
responseSelections: {
|
|
82
|
+
responseMatch: string;
|
|
83
|
+
xPath?: string;
|
|
84
|
+
jsonPath?: string;
|
|
85
|
+
}[];
|
|
86
|
+
parameters: {
|
|
87
|
+
[key: string]: string;
|
|
88
|
+
};
|
|
89
|
+
headers?: {
|
|
90
|
+
[key: string]: string;
|
|
91
|
+
};
|
|
92
|
+
customInjection?: string;
|
|
93
|
+
bodySniff?: {
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
regex?: string;
|
|
96
|
+
};
|
|
97
|
+
userAgent?: {
|
|
98
|
+
ios?: string;
|
|
99
|
+
android?: string;
|
|
100
|
+
};
|
|
101
|
+
useZk?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface Context {
|
|
104
|
+
contextAddress: string;
|
|
105
|
+
contextMessage: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare class ReclaimClient {
|
|
109
|
+
applicationId: string;
|
|
110
|
+
signature?: string;
|
|
111
|
+
appCallbackUrl?: string;
|
|
112
|
+
statusUrl?: string;
|
|
113
|
+
sessionId: string;
|
|
114
|
+
requestedProofs?: RequestedProofs;
|
|
115
|
+
context: Context;
|
|
116
|
+
verificationRequest?: ReclaimVerficationRequest;
|
|
117
|
+
constructor(applicationId: string, sessionId?: string);
|
|
118
|
+
createVerificationRequest(providers: string[]): Promise<ReclaimVerficationRequest>;
|
|
119
|
+
createLinkRequest(providers: string[]): Promise<string>;
|
|
120
|
+
setAppCallbackUrl(url: string): void;
|
|
121
|
+
getAppCallbackUrl(): Promise<string>;
|
|
122
|
+
setStatusUrl(url: string): void;
|
|
123
|
+
getStatusUrl(): string;
|
|
124
|
+
setSignature(signature: string): void;
|
|
125
|
+
getSignature(requestedProofs: RequestedProofs, applicationSecret: string): Promise<string>;
|
|
126
|
+
buildHttpProviderV2ByID(providerIds: string[]): Promise<ProviderV2[]>;
|
|
127
|
+
buildRequestedProofs(providers: ProviderV2[], callbackUrl: string, statusUrl?: string): RequestedProofs;
|
|
128
|
+
addContext(address: string, message: string): Context;
|
|
129
|
+
static verifySignedProof(proof: Proof): Promise<boolean>;
|
|
130
|
+
}
|
|
131
|
+
declare class ReclaimVerficationRequest {
|
|
132
|
+
onSuccessCallback?: (data: Proof | Error | unknown) => void | unknown;
|
|
133
|
+
onFailureCallback?: (data: Proof | Error | unknown) => void | unknown;
|
|
134
|
+
sessionId: string;
|
|
135
|
+
template: string;
|
|
136
|
+
statusUrl: string;
|
|
137
|
+
intervals: Map<string, NodeJS.Timer>;
|
|
138
|
+
constructor(sessionId: string, statusUrl: string, template: string);
|
|
139
|
+
on(event: string, callback: (data: Proof | Error | unknown) => void | unknown): this;
|
|
140
|
+
start(): Promise<string | undefined>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { ReclaimClient, ReclaimVerficationRequest };
|
package/dist/index.js
CHANGED
|
@@ -67,7 +67,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
67
67
|
// src/index.ts
|
|
68
68
|
var src_exports = {};
|
|
69
69
|
__export(src_exports, {
|
|
70
|
-
ReclaimClient: () => ReclaimClient
|
|
70
|
+
ReclaimClient: () => ReclaimClient,
|
|
71
|
+
ReclaimVerficationRequest: () => ReclaimVerficationRequest
|
|
71
72
|
});
|
|
72
73
|
module.exports = __toCommonJS(src_exports);
|
|
73
74
|
|
|
@@ -818,7 +819,7 @@ var ReclaimClient = class {
|
|
|
818
819
|
createLinkRequest(providers) {
|
|
819
820
|
return __async(this, null, function* () {
|
|
820
821
|
const appCallbackUrl = yield this.getAppCallbackUrl();
|
|
821
|
-
const providersV2 = yield this.
|
|
822
|
+
const providersV2 = yield this.buildHttpProviderV2ByID(providers);
|
|
822
823
|
if (!this.requestedProofs) {
|
|
823
824
|
yield this.buildRequestedProofs(providersV2, appCallbackUrl);
|
|
824
825
|
}
|
|
@@ -842,6 +843,7 @@ var ReclaimClient = class {
|
|
|
842
843
|
)}`;
|
|
843
844
|
template = replaceAll(template, "(", "%28");
|
|
844
845
|
template = replaceAll(template, ")", "%29");
|
|
846
|
+
console.log("Reclaim Client template created with callback url: ", templateData.callbackUrl);
|
|
845
847
|
return template;
|
|
846
848
|
});
|
|
847
849
|
}
|
|
@@ -884,7 +886,7 @@ var ReclaimClient = class {
|
|
|
884
886
|
return signature;
|
|
885
887
|
});
|
|
886
888
|
}
|
|
887
|
-
|
|
889
|
+
buildHttpProviderV2ByID(providerIds) {
|
|
888
890
|
return __async(this, null, function* () {
|
|
889
891
|
try {
|
|
890
892
|
const reclaimServerUrl = "https://api.reclaimprotocol.org/get/httpsproviders";
|
|
@@ -897,7 +899,7 @@ var ReclaimClient = class {
|
|
|
897
899
|
const allProviders = (yield response.json()).providers;
|
|
898
900
|
const appProviders = (yield appResponse.json()).result.providers;
|
|
899
901
|
const filteredProviders = allProviders.filter((provider) => {
|
|
900
|
-
return
|
|
902
|
+
return providerIds.includes(provider.id);
|
|
901
903
|
});
|
|
902
904
|
if (filteredProviders.length == 0) {
|
|
903
905
|
throw new Error(`Providers is not available for this application`);
|
|
@@ -909,7 +911,7 @@ var ReclaimClient = class {
|
|
|
909
911
|
}
|
|
910
912
|
return filteredProviders;
|
|
911
913
|
} catch (error) {
|
|
912
|
-
console.error(
|
|
914
|
+
console.error(`Error fetching HTTP providers ${providerIds}:`, error);
|
|
913
915
|
throw error;
|
|
914
916
|
}
|
|
915
917
|
});
|
|
@@ -1001,6 +1003,7 @@ var ReclaimVerficationRequest = class {
|
|
|
1001
1003
|
this.sessionId = sessionId;
|
|
1002
1004
|
this.statusUrl = statusUrl;
|
|
1003
1005
|
this.template = template;
|
|
1006
|
+
console.log(`ReclaimVerficationRequest created with statusUrl: ${this.statusUrl}, template: ${this.template}, sessionId: ${this.sessionId}`);
|
|
1004
1007
|
}
|
|
1005
1008
|
on(event, callback) {
|
|
1006
1009
|
if (event === "success") {
|
|
@@ -1015,6 +1018,8 @@ var ReclaimVerficationRequest = class {
|
|
|
1015
1018
|
return __async(this, null, function* () {
|
|
1016
1019
|
if (this.statusUrl && this.sessionId) {
|
|
1017
1020
|
const interval = setInterval(() => __async(this, null, function* () {
|
|
1021
|
+
console.log("session id: ", this.sessionId);
|
|
1022
|
+
console.log("Checking status...with status url: ", this.statusUrl);
|
|
1018
1023
|
try {
|
|
1019
1024
|
const res = yield fetch(this.statusUrl);
|
|
1020
1025
|
const data = yield res.json();
|
|
@@ -1030,14 +1035,21 @@ var ReclaimVerficationRequest = class {
|
|
|
1030
1035
|
this.onSuccessCallback(data.session.proofs);
|
|
1031
1036
|
}
|
|
1032
1037
|
clearInterval(this.intervals.get(this.sessionId));
|
|
1038
|
+
this.intervals.delete(this.sessionId);
|
|
1033
1039
|
} catch (e) {
|
|
1034
1040
|
if (this.onFailureCallback) {
|
|
1035
1041
|
this.onFailureCallback(e);
|
|
1036
1042
|
}
|
|
1037
1043
|
clearInterval(this.intervals.get(this.sessionId));
|
|
1044
|
+
this.intervals.delete(this.sessionId);
|
|
1038
1045
|
}
|
|
1039
1046
|
}), 3e3);
|
|
1040
1047
|
this.intervals.set(this.sessionId, interval);
|
|
1048
|
+
setTimeout(() => {
|
|
1049
|
+
if (this.intervals.has(this.sessionId)) {
|
|
1050
|
+
clearInterval(this.intervals.get(this.sessionId));
|
|
1051
|
+
}
|
|
1052
|
+
}, 1e3 * 60 * 5);
|
|
1041
1053
|
return this.template;
|
|
1042
1054
|
}
|
|
1043
1055
|
});
|
|
@@ -1045,6 +1057,7 @@ var ReclaimVerficationRequest = class {
|
|
|
1045
1057
|
};
|
|
1046
1058
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1047
1059
|
0 && (module.exports = {
|
|
1048
|
-
ReclaimClient
|
|
1060
|
+
ReclaimClient,
|
|
1061
|
+
ReclaimVerficationRequest
|
|
1049
1062
|
});
|
|
1050
1063
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/witness.ts","../src/Reclaim.ts","../src/utils.ts","../src/contract-types/contracts/factories/Reclaim__factory.ts","../src/contract-types/config.json","../src/smart-contract.ts"],"sourcesContent":["export { ReclaimClient } from './Reclaim';","import { ethers } from 'ethers';\nimport type { WitnessData } from './interfaces';\nimport type { ClaimID, ClaimInfo, CompleteClaimData } from './types';\n\ntype BeaconState = {\n witnesses: WitnessData[];\n epoch: number;\n witnessesRequiredForClaim: number;\n nextEpochTimestampS: number;\n};\n\nexport function fetchWitnessListForClaim(\n { witnesses, witnessesRequiredForClaim, epoch }: BeaconState,\n params: string | ClaimInfo,\n timestampS: number\n) {\n const identifier =\n typeof params === 'string' ? params : getIdentifierFromClaimInfo(params);\n const completeInput = [\n identifier,\n epoch.toString(),\n witnessesRequiredForClaim.toString(),\n timestampS.toString(),\n ].join('\\n');\n const completeHashStr = ethers.keccak256(strToUint8Array(completeInput));\n const completeHash = ethers.getBytes(completeHashStr);\n const completeHashView = uint8ArrayToDataView(completeHash);\n const witnessesLeft = [...witnesses];\n const selectedWitnesses: WitnessData[] = [];\n // we'll use 32 bits of the hash to select\n // each witness\n let byteOffset = 0;\n for (let i = 0; i < witnessesRequiredForClaim; i++) {\n const randomSeed = completeHashView.getUint32(byteOffset);\n const witnessIndex = randomSeed % witnessesLeft.length;\n const witness = witnessesLeft[witnessIndex] as WitnessData;\n selectedWitnesses.push(witness);\n\n // Remove the selected witness from the list of witnesses left\n witnessesLeft[witnessIndex] = witnessesLeft[\n witnessesLeft.length - 1\n ] as WitnessData;\n witnessesLeft.pop();\n byteOffset = (byteOffset + 4) % completeHash.length;\n }\n\n return selectedWitnesses;\n}\n\nexport function getIdentifierFromClaimInfo(info: ClaimInfo): ClaimID {\n const str = `${info.provider}\\n${info.parameters}\\n${info.context || ''}`;\n return ethers.keccak256(strToUint8Array(str)).toLowerCase();\n}\n\nexport function strToUint8Array(str: string) {\n return new TextEncoder().encode(str);\n}\n\nexport function uint8ArrayToDataView(arr: Uint8Array) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\nexport function createSignDataForClaim(data: CompleteClaimData) {\n const identifier =\n 'identifier' in data ? data.identifier : getIdentifierFromClaimInfo(data);\n const lines = [\n identifier,\n data.owner.toLowerCase(),\n data.timestampS.toString(),\n data.epoch.toString(),\n ];\n\n return lines.join('\\n');\n}\n","import type { ProviderV2, Proof, RequestedProofs, Context, RequestedClaim } from './interfaces'\nimport { getIdentifierFromClaimInfo } from './witness'\nimport type { SignedClaim } from './types'\nimport { v4 } from 'uuid'\nimport { ethers } from 'ethers'\nimport canonicalize from 'canonicalize'\nimport { getWitnessesForClaim, assertValidSignedClaim } from './utils'\n\nconst DEFAULT_RECLAIM_CALLBACK_URL =\n 'https://api.reclaimprotocol.org/v2/callback?callbackId='\nconst DEFAULT_RECLAIM_STATUS_URL =\n 'https://api.reclaimprotocol.org/v2/session/'\nconst RECLAIM_SHARE_URL = 'https://share.reclaimprotocol.org/instant/?template='\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\nfunction replaceAll(str: string, find: string, replace: string) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);\n}\n\n\n\nexport class ReclaimClient {\n applicationId: string\n signature?: string\n appCallbackUrl?: string\n statusUrl?: string\n sessionId: string = ''\n requestedProofs?: RequestedProofs\n context: Context = { contextAddress: '0x0', contextMessage: '' }\n verificationRequest?: ReclaimVerficationRequest\n\n constructor(applicationId: string, sessionId?: string) {\n this.applicationId = applicationId\n if (sessionId) {\n this.sessionId = sessionId\n } else {\n this.sessionId = v4().toString()\n }\n }\n\n async createVerificationRequest(providers: string[]) {\n const template = await this.createLinkRequest(providers)\n this.verificationRequest = new ReclaimVerficationRequest(\n this.sessionId,\n this.getStatusUrl(),\n template\n )\n\n return this.verificationRequest\n }\n\n async createLinkRequest(providers: string[]) {\n const appCallbackUrl = await this.getAppCallbackUrl()\n const providersV2 = await this.buildHttpProviderV2ByName(providers)\n if (!this.requestedProofs) {\n await this.buildRequestedProofs(providersV2, appCallbackUrl)\n }\n\n if (!this.signature) {\n throw new Error('Signature is not set')\n }\n\n const appId = ethers\n .verifyMessage(\n ethers.getBytes(\n ethers.keccak256(\n new TextEncoder().encode(canonicalize(this.requestedProofs)!)\n )\n ),\n ethers.hexlify(this.signature)\n )\n .toLowerCase()\n\n if (ethers.getAddress(appId) !== ethers.getAddress(this.applicationId)) {\n throw new Error('Invalid signature')\n }\n\n\n const templateData = { ...this.requestedProofs, signature: this.signature }\n let template = `${RECLAIM_SHARE_URL}${encodeURIComponent(\n JSON.stringify(templateData)\n )}`\n template = replaceAll(template, '(', '%28')\n template = replaceAll(template, ')', '%29')\n\n return template\n }\n\n setAppCallbackUrl(url: string) {\n this.appCallbackUrl = url\n }\n\n async getAppCallbackUrl() {\n let appCallbackUrl = this.appCallbackUrl\n if (!appCallbackUrl) {\n appCallbackUrl = `${DEFAULT_RECLAIM_CALLBACK_URL}${this.sessionId}`\n }\n return appCallbackUrl\n }\n\n setStatusUrl(url: string) {\n this.statusUrl = url\n }\n\n getStatusUrl() {\n let statusUrl = this.statusUrl\n if (!statusUrl) {\n statusUrl = `${DEFAULT_RECLAIM_STATUS_URL}${this.sessionId}`\n }\n return statusUrl\n }\n\n setSignature(signature: string) {\n this.signature = signature\n }\n\n // @dev Use this function only in development environments\n async getSignature(\n requestedProofs: RequestedProofs,\n applicationSecret: string\n ): Promise<string> {\n const wallet = new ethers.Wallet(applicationSecret)\n const signature = await wallet.signMessage(\n ethers.getBytes(\n ethers.keccak256(\n new TextEncoder().encode(canonicalize(requestedProofs)!)\n )\n )\n )\n\n return signature\n }\n\n async buildHttpProviderV2ByName(\n providerNames: string[]\n ): Promise<ProviderV2[]> {\n try {\n\n const reclaimServerUrl =\n 'https://api.reclaimprotocol.org/get/httpsproviders'\n\n const appProvidersUrl = `https://api.reclaimprotocol.org/v2/app-http-providers/${this.applicationId}`\n\n\n const response = await fetch(reclaimServerUrl)\n const appResponse = await fetch(appProvidersUrl)\n\n\n if (!response.ok || !appResponse.ok) {\n throw new Error('Failed to fetch HTTP providers')\n }\n\n const allProviders = (await response.json()).providers as ProviderV2[]\n const appProviders = (await appResponse.json()).result.providers as string[]\n const filteredProviders = allProviders.filter(provider => {\n return providerNames.includes(provider.name)\n })\n if (filteredProviders.length == 0) {\n throw new Error(`Providers is not available for this application`)\n }\n for (let provider of filteredProviders) {\n if (!appProviders.includes(provider.name)) {\n throw new Error(`Provider ${provider.name} is not available for this application`)\n }\n }\n return filteredProviders\n } catch (error) {\n console.error('Error fetching HTTP providers:', error)\n throw error\n }\n }\n\n buildRequestedProofs(\n providers: ProviderV2[],\n callbackUrl: string,\n statusUrl?: string\n ): RequestedProofs {\n const claims = providers.map(provider => {\n return {\n provider: encodeURIComponent(provider.name),\n context: JSON.stringify(this.context),\n templateClaimId: provider.id,\n payload: {\n metadata: {\n name: encodeURIComponent(provider.name),\n logoUrl: provider.logoUrl\n },\n url: provider.url,\n urlType: provider.urlType as \"CONSTANT\" | \"REGEX\",\n method: provider.method as \"GET\" | \"POST\",\n login: {\n url: provider.loginUrl\n },\n parameters: {},\n responseSelections: provider.responseSelections,\n customInjection: provider.customInjection,\n bodySniff: provider.bodySniff,\n userAgent: provider.userAgent,\n useZk: true\n }\n } as RequestedClaim;\n });\n\n this.requestedProofs = {\n id: v4().toString(),\n sessionId: this.sessionId,\n name: 'web-SDK',\n callbackUrl: callbackUrl,\n statusUrl: statusUrl ? statusUrl : this.getStatusUrl(),\n claims: claims\n };\n\n return this.requestedProofs!;\n }\n\n addContext(address: string, message: string) {\n // TODO: sync data on backend\n this.context = {\n contextAddress: address,\n contextMessage: message\n }\n return this.context\n }\n\n static async verifySignedProof(proof: Proof) {\n if (!proof.signatures.length) {\n throw new Error('No signatures')\n }\n const witnesses = await getWitnessesForClaim(\n proof.claimData.epoch,\n proof.identifier,\n proof.claimData.timestampS\n )\n\n try {\n // then hash the claim info with the encoded ctx to get the identifier\n const calculatedIdentifier = getIdentifierFromClaimInfo({\n parameters: JSON.parse(\n canonicalize(proof.claimData.parameters) as string\n ),\n provider: proof.claimData.provider,\n context: proof.claimData.context\n })\n proof.identifier = proof.identifier.replace('\"', '')\n proof.identifier = proof.identifier.replace('\"', '')\n // check if the identifier matches the one in the proof\n if (calculatedIdentifier !== proof.identifier) {\n throw new Error('Identifier Mismatch')\n }\n\n const signedClaim: SignedClaim = {\n claim: {\n ...proof.claimData\n },\n signatures: proof.signatures.map(signature => {\n return ethers.getBytes(signature)\n })\n }\n\n // verify the witness signature\n assertValidSignedClaim(signedClaim, witnesses)\n } catch (e: Error | unknown) {\n console.error(e)\n return false\n }\n\n return true\n }\n}\n\nclass ReclaimVerficationRequest {\n onSuccessCallback?: (data: Proof | Error | unknown) => void | unknown\n onFailureCallback?: (data: Proof | Error | unknown) => void | unknown\n sessionId: string\n template: string\n statusUrl: string\n intervals: Map<string, NodeJS.Timer> = new Map()\n\n constructor(sessionId: string, statusUrl: string, template: string) {\n this.sessionId = sessionId\n this.statusUrl = statusUrl\n this.template = template\n }\n\n on(\n event: string,\n callback: (data: Proof | Error | unknown) => void | unknown\n ) {\n if (event === 'success') {\n this.onSuccessCallback = callback\n }\n if (event === 'error') {\n this.onFailureCallback = callback\n }\n return this\n }\n\n async start() {\n if (this.statusUrl && this.sessionId) {\n const interval = setInterval(async () => {\n try {\n const res = await fetch(this.statusUrl)\n const data = await res.json()\n\n if (!data.session) return\n\n data.session.proofs.forEach(async (proof: Proof) => {\n const verified = await ReclaimClient.verifySignedProof(proof)\n if (!verified) {\n throw new Error('Proof not verified')\n }\n })\n if (this.onSuccessCallback) {\n this.onSuccessCallback(data.session.proofs)\n }\n clearInterval(this.intervals.get(this.sessionId!))\n } catch (e: Error | unknown) {\n if (this.onFailureCallback) {\n this.onFailureCallback(e)\n }\n clearInterval(this.intervals.get(this.sessionId!))\n }\n }, 3000)\n this.intervals.set(this.sessionId, interval)\n return this.template\n }\n }\n}\n","import URL from 'url-parse';\nimport type { ParsedURL, SignedClaim } from './types';\nimport type { WitnessData } from './interfaces';\nimport { ethers } from 'ethers';\nimport { makeBeacon } from './smart-contract';\nimport { fetchWitnessListForClaim, createSignDataForClaim } from './witness';\n\n/*\n URL utils\n*/\nexport function parse(url: string): ParsedURL {\n validateURL(url);\n\n const parsed = URL(url, /* parseQueryString */ true);\n\n for (const param in parsed.query) {\n parsed.query[param] = decodeURIComponent(parsed.query[param]!);\n }\n const queryParams = parsed.query;\n\n let path = parsed.pathname || null;\n let hostname = parsed.hostname || null;\n let scheme = parsed.protocol || null;\n\n if (scheme) {\n // Remove colon at end\n scheme = scheme.substring(0, scheme.length - 1);\n }\n\n return {\n hostname,\n path,\n queryParams,\n scheme,\n };\n}\n\nfunction validateURL(url: string): void {\n if (typeof url !== 'string') {\n throw new Error(`Invalid URL: ${url}. URL must be a string.`);\n }\n if (!url) {\n throw new Error(`Invalid URL: ${url}. URL cannot be empty`);\n }\n}\n\n/*\n Witness Utils\n*/\n\nexport async function getWitnessesForClaim(\n epoch: number,\n identifier: string,\n timestampS: number\n) {\n const beacon = makeBeacon();\n if (!beacon) throw new Error('No beacon');\n const state = await beacon.getState(epoch);\n const witnessList = fetchWitnessListForClaim(state, identifier, timestampS);\n return witnessList.map((w: WitnessData) => w.id.toLowerCase());\n}\n\n/*\n Proof Utils\n*/\n\n/** recovers the addresses of those that signed the claim */\nexport function recoverSignersOfSignedClaim({\n claim,\n signatures,\n}: SignedClaim) {\n const dataStr = createSignDataForClaim({ ...claim });\n return signatures.map((signature) =>\n ethers.verifyMessage(dataStr, ethers.hexlify(signature)).toLowerCase()\n );\n}\n\n/**\n * Asserts that the claim is signed by the expected witnesses\n * @param claim\n * @param expectedWitnessAddresses\n */\nexport function assertValidSignedClaim(\n claim: SignedClaim,\n expectedWitnessAddresses: string[]\n) {\n const witnessAddresses = recoverSignersOfSignedClaim(claim);\n // set of witnesses whose signatures we've not seen\n const witnessesNotSeen = new Set(expectedWitnessAddresses);\n for (const witness of witnessAddresses) {\n if (witnessesNotSeen.has(witness)) {\n witnessesNotSeen.delete(witness);\n }\n }\n\n // check if all witnesses have signed\n if (witnessesNotSeen.size > 0) {\n throw new Error(\n `Missing signatures from ${expectedWitnessAddresses.join(', ')}`\n );\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n\nimport { Contract } from 'ethers';\n\nconst _abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: 'address',\n name: 'previousAdmin',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'address',\n name: 'newAdmin',\n type: 'address',\n },\n ],\n name: 'AdminChanged',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'beacon',\n type: 'address',\n },\n ],\n name: 'BeaconUpgraded',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: 'witnesses',\n type: 'tuple[]',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n indexed: false,\n internalType: 'struct Reclaim.Epoch',\n name: 'epoch',\n type: 'tuple',\n },\n ],\n name: 'EpochAdded',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: 'uint8',\n name: 'version',\n type: 'uint8',\n },\n ],\n name: 'Initialized',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'previousOwner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'newOwner',\n type: 'address',\n },\n ],\n name: 'OwnershipTransferred',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'implementation',\n type: 'address',\n },\n ],\n name: 'Upgraded',\n type: 'event',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'witnessAddress',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n name: 'addAsWitness',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'addNewEpoch',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epochNum',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'string',\n name: 'provider',\n type: 'string',\n },\n {\n internalType: 'string',\n name: 'parameters',\n type: 'string',\n },\n {\n internalType: 'string',\n name: 'context',\n type: 'string',\n },\n ],\n internalType: 'struct Claims.ClaimInfo',\n name: 'claimInfo',\n type: 'tuple',\n },\n {\n components: [\n {\n internalType: 'bytes32',\n name: 'identifier',\n type: 'bytes32',\n },\n {\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n internalType: 'uint32',\n name: 'timestampS',\n type: 'uint32',\n },\n {\n internalType: 'uint256',\n name: 'epoch',\n type: 'uint256',\n },\n ],\n internalType: 'struct Claims.CompleteClaimData',\n name: 'claimData',\n type: 'tuple',\n },\n {\n internalType: 'bytes[]',\n name: 'signatures',\n type: 'bytes[]',\n },\n ],\n name: 'assertValidEpochAndSignedClaim',\n outputs: [],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'currentEpoch',\n outputs: [\n {\n internalType: 'uint32',\n name: '',\n type: 'uint32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'epochDurationS',\n outputs: [\n {\n internalType: 'uint32',\n name: '',\n type: 'uint32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n name: 'epochs',\n outputs: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epoch',\n type: 'uint32',\n },\n ],\n name: 'fetchEpoch',\n outputs: [\n {\n components: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: 'witnesses',\n type: 'tuple[]',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n internalType: 'struct Reclaim.Epoch',\n name: '',\n type: 'tuple',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epoch',\n type: 'uint32',\n },\n {\n internalType: 'bytes32',\n name: 'identifier',\n type: 'bytes32',\n },\n {\n internalType: 'uint32',\n name: 'timestampS',\n type: 'uint32',\n },\n ],\n name: 'fetchWitnessesForClaim',\n outputs: [\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: '',\n type: 'tuple[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'initialize',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'minimumWitnessesForClaimCreation',\n outputs: [\n {\n internalType: 'uint8',\n name: '',\n type: 'uint8',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'owner',\n outputs: [\n {\n internalType: 'address',\n name: '',\n type: 'address',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'proxiableUUID',\n outputs: [\n {\n internalType: 'bytes32',\n name: '',\n type: 'bytes32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'witnessAddress',\n type: 'address',\n },\n ],\n name: 'removeAsWitness',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'renounceOwnership',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newOwner',\n type: 'address',\n },\n ],\n name: 'transferOwnership',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'bool',\n name: 'isWhitelisted',\n type: 'bool',\n },\n ],\n name: 'updateWitnessWhitelist',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newImplementation',\n type: 'address',\n },\n ],\n name: 'upgradeTo',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newImplementation',\n type: 'address',\n },\n {\n internalType: 'bytes',\n name: 'data',\n type: 'bytes',\n },\n ],\n name: 'upgradeToAndCall',\n outputs: [],\n stateMutability: 'payable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n name: 'witnesses',\n outputs: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n] as const;\n\nexport class Reclaim__factory {\n static readonly abi = _abi;\n\n static connect(address: string, signerOrProvider: any): Contract {\n return new Contract(address, _abi, signerOrProvider);\n }\n}\n","{\n \"0x1a4\": {\n \"chainName\": \"opt-goerli\",\n \"address\": \"0xF93F605142Fb1Efad7Aa58253dDffF67775b4520\",\n \"rpcUrl\": \"https://opt-goerli.g.alchemy.com/v2/rksDkSUXd2dyk2ANy_zzODknx_AAokui\"\n }\n}\n","import type { Beacon, BeaconState } from './interfaces';\nimport { Reclaim__factory as ReclaimFactory } from './contract-types';\nimport CONTRACTS_CONFIG from './contract-types/config.json';\nimport { Contract, ethers } from 'ethers';\n\nconst DEFAULT_CHAIN_ID = 420;\n\nexport function makeBeacon(chainId?: number): Beacon | undefined {\n chainId = chainId || DEFAULT_CHAIN_ID;\n const contract = getContract(chainId);\n if (contract) {\n return makeBeaconCacheable({\n async getState(epochId: number | undefined): Promise<BeaconState> {\n //@ts-ignore\n const epoch = await contract.fetchEpoch(epochId || 0);\n if (!epoch.id) {\n throw new Error(`Invalid epoch ID: ${epochId}`);\n }\n\n return {\n epoch: epoch.id,\n witnesses: epoch.witnesses.map((w: any) => ({\n id: w.addr.toLowerCase(),\n url: w.host,\n })),\n witnessesRequiredForClaim: epoch.minimumWitnessesForClaimCreation,\n nextEpochTimestampS: epoch.timestampEnd,\n };\n },\n });\n } else {\n return undefined;\n }\n}\n\nexport function makeBeaconCacheable(beacon: Beacon): Beacon {\n const cache: { [epochId: number]: Promise<BeaconState> } = {};\n\n return {\n ...beacon,\n async getState(epochId: number | undefined): Promise<BeaconState> {\n if (!epochId) {\n // TODO: add cache here\n const state = await beacon.getState();\n return state;\n }\n\n const key = epochId;\n\n if (!cache[key]) {\n cache[key] = beacon.getState(epochId);\n }\n\n return cache[key] as unknown as BeaconState;\n },\n };\n}\n\nconst existingContractsMap: { [chain: string]: Contract } = {};\n\nfunction getContract(chainId: number): Contract {\n const chainKey = `0x${chainId.toString(16)}`;\n if (!existingContractsMap[chainKey]) {\n const contractData =\n CONTRACTS_CONFIG[chainKey as keyof typeof CONTRACTS_CONFIG];\n if (!contractData) {\n throw new Error(`Unsupported chain: \"${chainKey}\"`);\n }\n\n const rpcProvider = new ethers.JsonRpcProvider(contractData.rpcUrl);\n existingContractsMap[chainKey] = ReclaimFactory.connect(\n contractData.address,\n rpcProvider\n );\n }\n\n return existingContractsMap[chainKey] as Contract;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;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AS;AACnB,WAAK,oBAAoB;AAAA,IAC7B;AACA,WAAO;AAAA,EACX;AAAA,EAEM,QAAQ;AAAA;AACV,UAAI,KAAK,aAAa,KAAK,WAAW;AAClC,cAAM,WAAW,YAAY,MAAY;AACrC,cAAI;AACA,kBAAM,MAAM,MAAM,MAAM,KAAK,SAAS;AACtC,kBAAM,OAAO,MAAM,IAAI,KAAK;AAE5B,gBAAI,CAAC,KAAK;AAAS;AAEnB,iBAAK,QAAQ,OAAO,QAAQ,CAAO,UAAiB;AAChD,oBAAM,WAAW,MAAM,cAAc,kBAAkB,KAAK;AAC5D,kBAAI,CAAC,UAAU;AACX,sBAAM,IAAI,MAAM,oBAAoB;AAAA,cACxC;AAAA,YACJ,EAAC;AACD,gBAAI,KAAK,mBAAmB;AACxB,mBAAK,kBAAkB,KAAK,QAAQ,MAAM;AAAA,YAC9C;AACA,0BAAc,KAAK,UAAU,IAAI,KAAK,SAAU,CAAC;AAAA,UACrD,SAAS,GAAoB;AACzB,gBAAI,KAAK,mBAAmB;AACxB,mBAAK,kBAAkB,CAAC;AAAA,YAC5B;AACA,0BAAc,KAAK,UAAU,IAAI,KAAK,SAAU,CAAC;AAAA,UACrD;AAAA,QACJ,IAAG,GAAI;AACP,aAAK,UAAU,IAAI,KAAK,WAAW,QAAQ;AAC3C,eAAO,KAAK;AAAA,MAChB;AAAA,IACJ;AAAA;AACJ;","names":["import_ethers","import_ethers","import_ethers","import_ethers","canonicalize"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/witness.ts","../src/Reclaim.ts","../src/utils.ts","../src/contract-types/contracts/factories/Reclaim__factory.ts","../src/contract-types/config.json","../src/smart-contract.ts"],"sourcesContent":["export * from './Reclaim';","import { ethers } from 'ethers';\nimport type { WitnessData } from './interfaces';\nimport type { ClaimID, ClaimInfo, CompleteClaimData } from './types';\n\ntype BeaconState = {\n witnesses: WitnessData[];\n epoch: number;\n witnessesRequiredForClaim: number;\n nextEpochTimestampS: number;\n};\n\nexport function fetchWitnessListForClaim(\n { witnesses, witnessesRequiredForClaim, epoch }: BeaconState,\n params: string | ClaimInfo,\n timestampS: number\n) {\n const identifier =\n typeof params === 'string' ? params : getIdentifierFromClaimInfo(params);\n const completeInput = [\n identifier,\n epoch.toString(),\n witnessesRequiredForClaim.toString(),\n timestampS.toString(),\n ].join('\\n');\n const completeHashStr = ethers.keccak256(strToUint8Array(completeInput));\n const completeHash = ethers.getBytes(completeHashStr);\n const completeHashView = uint8ArrayToDataView(completeHash);\n const witnessesLeft = [...witnesses];\n const selectedWitnesses: WitnessData[] = [];\n // we'll use 32 bits of the hash to select\n // each witness\n let byteOffset = 0;\n for (let i = 0; i < witnessesRequiredForClaim; i++) {\n const randomSeed = completeHashView.getUint32(byteOffset);\n const witnessIndex = randomSeed % witnessesLeft.length;\n const witness = witnessesLeft[witnessIndex] as WitnessData;\n selectedWitnesses.push(witness);\n\n // Remove the selected witness from the list of witnesses left\n witnessesLeft[witnessIndex] = witnessesLeft[\n witnessesLeft.length - 1\n ] as WitnessData;\n witnessesLeft.pop();\n byteOffset = (byteOffset + 4) % completeHash.length;\n }\n\n return selectedWitnesses;\n}\n\nexport function getIdentifierFromClaimInfo(info: ClaimInfo): ClaimID {\n const str = `${info.provider}\\n${info.parameters}\\n${info.context || ''}`;\n return ethers.keccak256(strToUint8Array(str)).toLowerCase();\n}\n\nexport function strToUint8Array(str: string) {\n return new TextEncoder().encode(str);\n}\n\nexport function uint8ArrayToDataView(arr: Uint8Array) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\nexport function createSignDataForClaim(data: CompleteClaimData) {\n const identifier =\n 'identifier' in data ? data.identifier : getIdentifierFromClaimInfo(data);\n const lines = [\n identifier,\n data.owner.toLowerCase(),\n data.timestampS.toString(),\n data.epoch.toString(),\n ];\n\n return lines.join('\\n');\n}\n","import type { ProviderV2, Proof, RequestedProofs, Context, RequestedClaim } from './interfaces'\nimport { getIdentifierFromClaimInfo } from './witness'\nimport type { SignedClaim } from './types'\nimport { v4 } from 'uuid'\nimport { ethers } from 'ethers'\nimport canonicalize from 'canonicalize'\nimport { getWitnessesForClaim, assertValidSignedClaim } from './utils'\n\nconst DEFAULT_RECLAIM_CALLBACK_URL =\n 'https://api.reclaimprotocol.org/v2/callback?callbackId='\nconst DEFAULT_RECLAIM_STATUS_URL =\n 'https://api.reclaimprotocol.org/v2/session/'\nconst RECLAIM_SHARE_URL = 'https://share.reclaimprotocol.org/instant/?template='\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\nfunction replaceAll(str: string, find: string, replace: string) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);\n}\n\n\n\nexport class ReclaimClient {\n applicationId: string\n signature?: string\n appCallbackUrl?: string\n statusUrl?: string\n sessionId: string = ''\n requestedProofs?: RequestedProofs\n context: Context = { contextAddress: '0x0', contextMessage: '' }\n verificationRequest?: ReclaimVerficationRequest\n\n constructor(applicationId: string, sessionId?: string) {\n this.applicationId = applicationId\n if (sessionId) {\n this.sessionId = sessionId\n } else {\n this.sessionId = v4().toString()\n }\n }\n\n async createVerificationRequest(providers: string[]) {\n const template = await this.createLinkRequest(providers)\n this.verificationRequest = new ReclaimVerficationRequest(\n this.sessionId,\n this.getStatusUrl(),\n template\n )\n\n\n return this.verificationRequest\n }\n\n async createLinkRequest(providers: string[]) {\n const appCallbackUrl = await this.getAppCallbackUrl()\n const providersV2 = await this.buildHttpProviderV2ByID(providers)\n if (!this.requestedProofs) {\n await this.buildRequestedProofs(providersV2, appCallbackUrl)\n }\n\n if (!this.signature) {\n throw new Error('Signature is not set')\n }\n\n const appId = ethers\n .verifyMessage(\n ethers.getBytes(\n ethers.keccak256(\n new TextEncoder().encode(canonicalize(this.requestedProofs)!)\n )\n ),\n ethers.hexlify(this.signature)\n )\n .toLowerCase()\n\n if (ethers.getAddress(appId) !== ethers.getAddress(this.applicationId)) {\n throw new Error('Invalid signature')\n }\n\n\n const templateData = { ...this.requestedProofs, signature: this.signature }\n let template = `${RECLAIM_SHARE_URL}${encodeURIComponent(\n JSON.stringify(templateData)\n )}`\n template = replaceAll(template, '(', '%28')\n template = replaceAll(template, ')', '%29')\n \n console.log('Reclaim Client template created with callback url: ', templateData.callbackUrl)\n\n return template\n }\n\n setAppCallbackUrl(url: string) {\n this.appCallbackUrl = url\n }\n\n async getAppCallbackUrl() {\n let appCallbackUrl = this.appCallbackUrl\n if (!appCallbackUrl) {\n appCallbackUrl = `${DEFAULT_RECLAIM_CALLBACK_URL}${this.sessionId}`\n }\n return appCallbackUrl\n }\n\n setStatusUrl(url: string) {\n this.statusUrl = url\n }\n\n getStatusUrl() {\n let statusUrl = this.statusUrl\n if (!statusUrl) {\n statusUrl = `${DEFAULT_RECLAIM_STATUS_URL}${this.sessionId}`\n }\n return statusUrl\n }\n\n setSignature(signature: string) {\n this.signature = signature\n }\n\n // @dev Use this function only in development environments\n async getSignature(\n requestedProofs: RequestedProofs,\n applicationSecret: string\n ): Promise<string> {\n const wallet = new ethers.Wallet(applicationSecret)\n const signature = await wallet.signMessage(\n ethers.getBytes(\n ethers.keccak256(\n new TextEncoder().encode(canonicalize(requestedProofs)!)\n )\n )\n )\n\n return signature\n }\n\n async buildHttpProviderV2ByID(\n providerIds: string[]\n ): Promise<ProviderV2[]> {\n try {\n\n const reclaimServerUrl =\n 'https://api.reclaimprotocol.org/get/httpsproviders'\n\n const appProvidersUrl = `https://api.reclaimprotocol.org/v2/app-http-providers/${this.applicationId}`\n\n\n const response = await fetch(reclaimServerUrl)\n const appResponse = await fetch(appProvidersUrl)\n\n\n if (!response.ok || !appResponse.ok) {\n throw new Error('Failed to fetch HTTP providers')\n }\n\n const allProviders = (await response.json()).providers as ProviderV2[]\n const appProviders = (await appResponse.json()).result.providers as string[]\n const filteredProviders = allProviders.filter(provider => {\n return providerIds.includes(provider.id)\n })\n if (filteredProviders.length == 0) {\n throw new Error(`Providers is not available for this application`)\n }\n for (let provider of filteredProviders) {\n if (!appProviders.includes(provider.name)) {\n throw new Error(`Provider ${provider.name} is not available for this application`)\n }\n }\n return filteredProviders\n } catch (error) {\n console.error(`Error fetching HTTP providers ${providerIds}:`, error)\n throw error\n }\n }\n\n buildRequestedProofs(\n providers: ProviderV2[],\n callbackUrl: string,\n statusUrl?: string\n ): RequestedProofs {\n const claims = providers.map(provider => {\n return {\n provider: encodeURIComponent(provider.name),\n context: JSON.stringify(this.context),\n templateClaimId: provider.id,\n payload: {\n metadata: {\n name: encodeURIComponent(provider.name),\n logoUrl: provider.logoUrl\n },\n url: provider.url,\n urlType: provider.urlType as \"CONSTANT\" | \"REGEX\",\n method: provider.method as \"GET\" | \"POST\",\n login: {\n url: provider.loginUrl\n },\n parameters: {},\n responseSelections: provider.responseSelections,\n customInjection: provider.customInjection,\n bodySniff: provider.bodySniff,\n userAgent: provider.userAgent,\n useZk: true\n }\n } as RequestedClaim;\n });\n\n this.requestedProofs = {\n id: v4().toString(),\n sessionId: this.sessionId,\n name: 'web-SDK',\n callbackUrl: callbackUrl,\n statusUrl: statusUrl ? statusUrl : this.getStatusUrl(),\n claims: claims\n };\n\n return this.requestedProofs!;\n }\n\n addContext(address: string, message: string) {\n // TODO: sync data on backend\n this.context = {\n contextAddress: address,\n contextMessage: message\n }\n return this.context\n }\n\n static async verifySignedProof(proof: Proof) {\n if (!proof.signatures.length) {\n throw new Error('No signatures')\n }\n const witnesses = await getWitnessesForClaim(\n proof.claimData.epoch,\n proof.identifier,\n proof.claimData.timestampS\n )\n\n try {\n // then hash the claim info with the encoded ctx to get the identifier\n const calculatedIdentifier = getIdentifierFromClaimInfo({\n parameters: JSON.parse(\n canonicalize(proof.claimData.parameters) as string\n ),\n provider: proof.claimData.provider,\n context: proof.claimData.context\n })\n proof.identifier = proof.identifier.replace('\"', '')\n proof.identifier = proof.identifier.replace('\"', '')\n // check if the identifier matches the one in the proof\n if (calculatedIdentifier !== proof.identifier) {\n throw new Error('Identifier Mismatch')\n }\n\n const signedClaim: SignedClaim = {\n claim: {\n ...proof.claimData\n },\n signatures: proof.signatures.map(signature => {\n return ethers.getBytes(signature)\n })\n }\n\n // verify the witness signature\n assertValidSignedClaim(signedClaim, witnesses)\n } catch (e: Error | unknown) {\n console.error(e)\n return false\n }\n\n return true\n }\n}\n\nexport class ReclaimVerficationRequest {\n onSuccessCallback?: (data: Proof | Error | unknown) => void | unknown\n onFailureCallback?: (data: Proof | Error | unknown) => void | unknown\n sessionId: string\n template: string\n statusUrl: string\n intervals: Map<string, NodeJS.Timer> = new Map()\n\n constructor(sessionId: string, statusUrl: string, template: string) {\n this.sessionId = sessionId\n this.statusUrl = statusUrl\n this.template = template\n console.log(`ReclaimVerficationRequest created with statusUrl: ${this.statusUrl}, template: ${this.template}, sessionId: ${this.sessionId}`)\n }\n\n on(\n event: string,\n callback: (data: Proof | Error | unknown) => void | unknown\n ) {\n if (event === 'success') {\n this.onSuccessCallback = callback\n }\n if (event === 'error') {\n this.onFailureCallback = callback\n }\n return this\n }\n\n async start() {\n if (this.statusUrl && this.sessionId) {\n const interval = setInterval(async () => {\n console.log('session id: ', this.sessionId)\n console.log('Checking status...with status url: ', this.statusUrl)\n try {\n const res = await fetch(this.statusUrl)\n const data = await res.json()\n\n if (!data.session) return\n\n data.session.proofs.forEach(async (proof: Proof) => {\n const verified = await ReclaimClient.verifySignedProof(proof)\n if (!verified) {\n throw new Error('Proof not verified')\n }\n })\n if (this.onSuccessCallback) {\n this.onSuccessCallback(data.session.proofs)\n }\n clearInterval(this.intervals.get(this.sessionId!))\n this.intervals.delete(this.sessionId!)\n } catch (e: Error | unknown) {\n if (this.onFailureCallback) {\n this.onFailureCallback(e)\n }\n clearInterval(this.intervals.get(this.sessionId!))\n this.intervals.delete(this.sessionId!)\n }\n }, 3000)\n\n this.intervals.set(this.sessionId, interval)\n\n setTimeout(() => {\n if(this.intervals.has(this.sessionId)){\n clearInterval(this.intervals.get(this.sessionId!))\n }\n }, 1000 * 60 * 5)\n\n return this.template\n }\n }\n}\n","import URL from 'url-parse';\nimport type { ParsedURL, SignedClaim } from './types';\nimport type { WitnessData } from './interfaces';\nimport { ethers } from 'ethers';\nimport { makeBeacon } from './smart-contract';\nimport { fetchWitnessListForClaim, createSignDataForClaim } from './witness';\n\n/*\n URL utils\n*/\nexport function parse(url: string): ParsedURL {\n validateURL(url);\n\n const parsed = URL(url, /* parseQueryString */ true);\n\n for (const param in parsed.query) {\n parsed.query[param] = decodeURIComponent(parsed.query[param]!);\n }\n const queryParams = parsed.query;\n\n let path = parsed.pathname || null;\n let hostname = parsed.hostname || null;\n let scheme = parsed.protocol || null;\n\n if (scheme) {\n // Remove colon at end\n scheme = scheme.substring(0, scheme.length - 1);\n }\n\n return {\n hostname,\n path,\n queryParams,\n scheme,\n };\n}\n\nfunction validateURL(url: string): void {\n if (typeof url !== 'string') {\n throw new Error(`Invalid URL: ${url}. URL must be a string.`);\n }\n if (!url) {\n throw new Error(`Invalid URL: ${url}. URL cannot be empty`);\n }\n}\n\n/*\n Witness Utils\n*/\n\nexport async function getWitnessesForClaim(\n epoch: number,\n identifier: string,\n timestampS: number\n) {\n const beacon = makeBeacon();\n if (!beacon) throw new Error('No beacon');\n const state = await beacon.getState(epoch);\n const witnessList = fetchWitnessListForClaim(state, identifier, timestampS);\n return witnessList.map((w: WitnessData) => w.id.toLowerCase());\n}\n\n/*\n Proof Utils\n*/\n\n/** recovers the addresses of those that signed the claim */\nexport function recoverSignersOfSignedClaim({\n claim,\n signatures,\n}: SignedClaim) {\n const dataStr = createSignDataForClaim({ ...claim });\n return signatures.map((signature) =>\n ethers.verifyMessage(dataStr, ethers.hexlify(signature)).toLowerCase()\n );\n}\n\n/**\n * Asserts that the claim is signed by the expected witnesses\n * @param claim\n * @param expectedWitnessAddresses\n */\nexport function assertValidSignedClaim(\n claim: SignedClaim,\n expectedWitnessAddresses: string[]\n) {\n const witnessAddresses = recoverSignersOfSignedClaim(claim);\n // set of witnesses whose signatures we've not seen\n const witnessesNotSeen = new Set(expectedWitnessAddresses);\n for (const witness of witnessAddresses) {\n if (witnessesNotSeen.has(witness)) {\n witnessesNotSeen.delete(witness);\n }\n }\n\n // check if all witnesses have signed\n if (witnessesNotSeen.size > 0) {\n throw new Error(\n `Missing signatures from ${expectedWitnessAddresses.join(', ')}`\n );\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n\nimport { Contract } from 'ethers';\n\nconst _abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: 'address',\n name: 'previousAdmin',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'address',\n name: 'newAdmin',\n type: 'address',\n },\n ],\n name: 'AdminChanged',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'beacon',\n type: 'address',\n },\n ],\n name: 'BeaconUpgraded',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: 'witnesses',\n type: 'tuple[]',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n indexed: false,\n internalType: 'struct Reclaim.Epoch',\n name: 'epoch',\n type: 'tuple',\n },\n ],\n name: 'EpochAdded',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: 'uint8',\n name: 'version',\n type: 'uint8',\n },\n ],\n name: 'Initialized',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'previousOwner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'newOwner',\n type: 'address',\n },\n ],\n name: 'OwnershipTransferred',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'implementation',\n type: 'address',\n },\n ],\n name: 'Upgraded',\n type: 'event',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'witnessAddress',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n name: 'addAsWitness',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'addNewEpoch',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epochNum',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'string',\n name: 'provider',\n type: 'string',\n },\n {\n internalType: 'string',\n name: 'parameters',\n type: 'string',\n },\n {\n internalType: 'string',\n name: 'context',\n type: 'string',\n },\n ],\n internalType: 'struct Claims.ClaimInfo',\n name: 'claimInfo',\n type: 'tuple',\n },\n {\n components: [\n {\n internalType: 'bytes32',\n name: 'identifier',\n type: 'bytes32',\n },\n {\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n internalType: 'uint32',\n name: 'timestampS',\n type: 'uint32',\n },\n {\n internalType: 'uint256',\n name: 'epoch',\n type: 'uint256',\n },\n ],\n internalType: 'struct Claims.CompleteClaimData',\n name: 'claimData',\n type: 'tuple',\n },\n {\n internalType: 'bytes[]',\n name: 'signatures',\n type: 'bytes[]',\n },\n ],\n name: 'assertValidEpochAndSignedClaim',\n outputs: [],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'currentEpoch',\n outputs: [\n {\n internalType: 'uint32',\n name: '',\n type: 'uint32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'epochDurationS',\n outputs: [\n {\n internalType: 'uint32',\n name: '',\n type: 'uint32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n name: 'epochs',\n outputs: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epoch',\n type: 'uint32',\n },\n ],\n name: 'fetchEpoch',\n outputs: [\n {\n components: [\n {\n internalType: 'uint32',\n name: 'id',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampStart',\n type: 'uint32',\n },\n {\n internalType: 'uint32',\n name: 'timestampEnd',\n type: 'uint32',\n },\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: 'witnesses',\n type: 'tuple[]',\n },\n {\n internalType: 'uint8',\n name: 'minimumWitnessesForClaimCreation',\n type: 'uint8',\n },\n ],\n internalType: 'struct Reclaim.Epoch',\n name: '',\n type: 'tuple',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint32',\n name: 'epoch',\n type: 'uint32',\n },\n {\n internalType: 'bytes32',\n name: 'identifier',\n type: 'bytes32',\n },\n {\n internalType: 'uint32',\n name: 'timestampS',\n type: 'uint32',\n },\n ],\n name: 'fetchWitnessesForClaim',\n outputs: [\n {\n components: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n internalType: 'struct Reclaim.Witness[]',\n name: '',\n type: 'tuple[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'initialize',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'minimumWitnessesForClaimCreation',\n outputs: [\n {\n internalType: 'uint8',\n name: '',\n type: 'uint8',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'owner',\n outputs: [\n {\n internalType: 'address',\n name: '',\n type: 'address',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'proxiableUUID',\n outputs: [\n {\n internalType: 'bytes32',\n name: '',\n type: 'bytes32',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'witnessAddress',\n type: 'address',\n },\n ],\n name: 'removeAsWitness',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'renounceOwnership',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newOwner',\n type: 'address',\n },\n ],\n name: 'transferOwnership',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'bool',\n name: 'isWhitelisted',\n type: 'bool',\n },\n ],\n name: 'updateWitnessWhitelist',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newImplementation',\n type: 'address',\n },\n ],\n name: 'upgradeTo',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'newImplementation',\n type: 'address',\n },\n {\n internalType: 'bytes',\n name: 'data',\n type: 'bytes',\n },\n ],\n name: 'upgradeToAndCall',\n outputs: [],\n stateMutability: 'payable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n name: 'witnesses',\n outputs: [\n {\n internalType: 'address',\n name: 'addr',\n type: 'address',\n },\n {\n internalType: 'string',\n name: 'host',\n type: 'string',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n] as const;\n\nexport class Reclaim__factory {\n static readonly abi = _abi;\n\n static connect(address: string, signerOrProvider: any): Contract {\n return new Contract(address, _abi, signerOrProvider);\n }\n}\n","{\n \"0x1a4\": {\n \"chainName\": \"opt-goerli\",\n \"address\": \"0xF93F605142Fb1Efad7Aa58253dDffF67775b4520\",\n \"rpcUrl\": \"https://opt-goerli.g.alchemy.com/v2/rksDkSUXd2dyk2ANy_zzODknx_AAokui\"\n }\n}\n","import type { Beacon, BeaconState } from './interfaces';\nimport { Reclaim__factory as ReclaimFactory } from './contract-types';\nimport CONTRACTS_CONFIG from './contract-types/config.json';\nimport { Contract, ethers } from 'ethers';\n\nconst DEFAULT_CHAIN_ID = 420;\n\nexport function makeBeacon(chainId?: number): Beacon | undefined {\n chainId = chainId || DEFAULT_CHAIN_ID;\n const contract = getContract(chainId);\n if (contract) {\n return makeBeaconCacheable({\n async getState(epochId: number | undefined): Promise<BeaconState> {\n //@ts-ignore\n const epoch = await contract.fetchEpoch(epochId || 0);\n if (!epoch.id) {\n throw new Error(`Invalid epoch ID: ${epochId}`);\n }\n\n return {\n epoch: epoch.id,\n witnesses: epoch.witnesses.map((w: any) => ({\n id: w.addr.toLowerCase(),\n url: w.host,\n })),\n witnessesRequiredForClaim: epoch.minimumWitnessesForClaimCreation,\n nextEpochTimestampS: epoch.timestampEnd,\n };\n },\n });\n } else {\n return undefined;\n }\n}\n\nexport function makeBeaconCacheable(beacon: Beacon): Beacon {\n const cache: { [epochId: number]: Promise<BeaconState> } = {};\n\n return {\n ...beacon,\n async getState(epochId: number | undefined): Promise<BeaconState> {\n if (!epochId) {\n // TODO: add cache here\n const state = await beacon.getState();\n return state;\n }\n\n const key = epochId;\n\n if (!cache[key]) {\n cache[key] = beacon.getState(epochId);\n }\n\n return cache[key] as unknown as BeaconState;\n },\n };\n}\n\nconst existingContractsMap: { [chain: string]: Contract } = {};\n\nfunction getContract(chainId: number): Contract {\n const chainKey = `0x${chainId.toString(16)}`;\n if (!existingContractsMap[chainKey]) {\n const contractData =\n CONTRACTS_CONFIG[chainKey as keyof typeof CONTRACTS_CONFIG];\n if (!contractData) {\n throw new Error(`Unsupported chain: \"${chainKey}\"`);\n }\n\n const rpcProvider = new ethers.JsonRpcProvider(contractData.rpcUrl);\n existingContractsMap[chainKey] = ReclaimFactory.connect(\n contractData.address,\n rpcProvider\n );\n }\n\n return existingContractsMap[chainKey] as Contract;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAAuB;AAWhB,SAAS,yBACd,EAAE,WAAW,2BAA2B,MAAM,GAC9C,QACA,YACA;AACA,QAAM,aACJ,OAAO,WAAW,WAAW,SAAS,2BAA2B,MAAM;AACzE,QAAM,gBAAgB;AAAA,IACpB;AAAA,IACA,MAAM,SAAS;AAAA,IACf,0BAA0B,SAAS;AAAA,IACnC,WAAW,SAAS;AAAA,EACtB,EAAE,KAAK,IAAI;AACX,QAAM,kBAAkB,qBAAO,UAAU,gBAAgB,aAAa,CAAC;AACvE,QAAM,eAAe,qBAAO,SAAS,eAAe;AACpD,QAAM,mBAAmB,qBAAqB,YAAY;AAC1D,QAAM,gBAAgB,CAAC,GAAG,SAAS;AACnC,QAAM,oBAAmC,CAAC;AAG1C,MAAI,aAAa;AACjB,WAAS,IAAI,GAAG,IAAI,2BAA2B,KAAK;AAClD,UAAM,aAAa,iBAAiB,UAAU,UAAU;AACxD,UAAM,eAAe,aAAa,cAAc;AAChD,UAAM,UAAU,cAAc,YAAY;AAC1C,sBAAkB,KAAK,OAAO;AAG9B,kBAAc,YAAY,IAAI,cAC5B,cAAc,SAAS,CACzB;AACA,kBAAc,IAAI;AAClB,kBAAc,aAAa,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AC9C;AACA,0BAAc,KAAK,UAAU,IAAI,KAAK,SAAU,CAAC;AACjD,iBAAK,UAAU,OAAO,KAAK,SAAU;AAAA,UACzC,SAAS,GAAoB;AACzB,gBAAI,KAAK,mBAAmB;AACxB,mBAAK,kBAAkB,CAAC;AAAA,YAC5B;AACA,0BAAc,KAAK,UAAU,IAAI,KAAK,SAAU,CAAC;AACjD,iBAAK,UAAU,OAAO,KAAK,SAAU;AAAA,UACzC;AAAA,QACJ,IAAG,GAAI;AAEP,aAAK,UAAU,IAAI,KAAK,WAAW,QAAQ;AAE3C,mBAAW,MAAM;AACb,cAAG,KAAK,UAAU,IAAI,KAAK,SAAS,GAAE;AAClC,0BAAc,KAAK,UAAU,IAAI,KAAK,SAAU,CAAC;AAAA,UACrD;AAAA,QACJ,GAAG,MAAO,KAAK,CAAC;AAEhB,eAAO,KAAK;AAAA,MAChB;AAAA,IACJ;AAAA;AACJ;","names":["import_ethers","import_ethers","import_ethers","import_ethers","canonicalize"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/js-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Designed to request proofs from the Reclaim protocol and manage the flow of claims and witness interactions.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": true
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsup",
|
|
19
|
+
"build": "tsup --dts",
|
|
20
20
|
"release": "release-it",
|
|
21
21
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
22
|
},
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!-- Do not edit this file with editors other than draw.io -->
|
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="413px" height="137px" viewBox="-0.5 -0.5 413 137" content="<mxfile host="app.diagrams.net" modified="2023-12-12T10:56:37.870Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" etag="5c-IEuCihH7OA-rWiBcE" version="22.1.7" type="google"><diagram name="Page-1" id="Bim3TOI_uKPudQwilAti">zZbLjtsgFIafxstGBwO+LJvMdCpVlapm0XZJbRqjcUyEya1PXzxAbIaZKholTZXEsX8OmPP93BK8WB8eFNs0n2XN2ySF+pDguyRNUVZm5m9Qjl7JcquslKidNgpL8Zs7EZy6FTXvg0AtZavFJhQr2XW80oHGlJL7MOyXbMO3btiKR8KyYm2sfhO1bqxapPmof+Ri1fg3m5RtyZr5YJdJ37Ba7icSvk/wQkmp7d36sODtQM9zsfU+vFJ66pjinT6nQmor7Fi7dbl95VXLxNqIy7tPrpP66DPfN0Lz5YZVw/Pe2Jvgea+VfDyBMCnM4164ju240vwwkVyvHrhcc62OJsSXUmKr7EfAuePbTNhiF8acpatTS2PW5sYl/jIEHEHYmgF2w9yxS9TPD4CIBULoOjBIBKNineyEGf3DPLwZlLSEM6DAdaDQCArXDVf97XC8QzfE4dud8IhIVFu140M8ekLAlH4/rLxGMKPJxMx5V3vlZyurx0E6CP3dPMOMApQII1JiCpm5usIfrj3DTR1PkRnGhNDSfn3pEAp/Y93Lrap4sAyaXq6452QlXgdbQeyH4i3TYhfuDC/BfapqMmbHScBGik73EftT++fZga5rB5oBIJICoe6TTeyAWZFCaRZnXOA8z7LQHVKWeUlzioxHZZFZIy9hD/nH9riWvwzCOAsxCWdhDs+stA2+2dh4e77wPAMAArQgBFF/zQNzSwQpzjAYk81MpPi5vXlOswKMscMPXcpd+l+4S0Nz3SHujeaax/FYZ8PH0zG+/wM=</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="165" y="1" width="77" height="34" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 75px; height: 1px; padding-top: 18px; margin-left: 166px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Reclaim SDK</div></div></div></foreignObject><text x="204" y="22" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Reclaim SDK</text></switch></g><rect x="148" y="101" width="111" height="34" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 109px; height: 1px; padding-top: 118px; margin-left: 149px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">uuid</div></div></div></foreignObject><text x="203" y="122" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">uuid</text></switch></g><rect x="301" y="101" width="110" height="34" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 118px; margin-left: 302px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">canonicalize</div></div></div></foreignObject><text x="356" y="122" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">canonicalize</text></switch></g><rect x="1" y="101" width="110" height="34" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 118px; margin-left: 2px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">ethers</div></div></div></foreignObject><text x="56" y="122" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">ethers</text></switch></g><path d="M 203.57 35 Q 203.57 35 203.57 92.88" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 203.57 99.88 L 200.07 92.88 L 207.07 92.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 242 28.88 Q 351 71 354.65 92.99" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 355.79 99.9 L 351.2 93.56 L 358.1 92.42 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 165 31.96 Q 61 70 57.11 93" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 55.94 99.9 L 53.66 92.41 L 60.56 93.58 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
|
package/readme/usage-flow-2.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1039" height="762"><desc>participant%20AppClip%2FInstanApp%0Aparticipant%20User%0Aparticipant%20SDK%20Sample%20Web%20App%0Aparticipant%20Reclaim%20SDK%0A%0AUser-%3ESDK%20Sample%20Web%20App%3A%20ask%20to%20provide%20proof%0A%0ASDK%20Sample%20Web%20App-%3EReclaim%20SDK%3A%20requestProof(request%2C%20AppCallbackUrl)%0Aactivate%20Reclaim%20SDK%0AReclaim%20SDK-%3EReclaim%20SDK%3A%20Validate%20request%0AReclaim%20SDK-%3EReclaim%20SDK%3A%20Generate%20Template%20Instance%0AReclaim%20SDK--%3ESDK%20Sample%20Web%20App%3A%20TemplateInstance%0Adeactivate%20Reclaim%20SDK%0ASDK%20Sample%20Web%20App-%3ESDK%20Sample%20Web%20App%3A%20Generate%20QrCode%20from%20template%0A%0AUser--%3ESDK%20Sample%20Web%20App%3A%20Scan%20QrCode%0A%0ASDK%20Sample%20Web%20App--%3EAppClip%2FInstanApp%3A%20Open%20AppClip%2FInstanApp%0A%0AAppClip%2FInstanApp-%3EAppClip%2FInstanApp%3A%20complete%20verification%20task%0A%0AAppClip%2FInstanApp-%3ESDK%20Sample%20Web%20App%3A%20Submit%20Proof%20using%20AppCallbackUrl%0A%0ASDK%20Sample%20Web%20App--%3EUser%3A%20notify%20user%20(proof%20received)%0A</desc><defs/><g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g><rect fill="white" stroke="none" x="0" y="0" width="1039" height="762"/></g><g/><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 59.284222437999986 L 88.59873290331642 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 59.284222437999986 L 285.4386060077435 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 59.284222437999986 L 506.7163531173789 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 814.1986855920534 59.284222437999986 L 814.1986855920534 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/></g><g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 8.795878700000003 11.786477457999997 L 168.40158710663283 11.786477457999997 L 168.40158710663283 59.284222437999986 L 8.795878700000003 59.284222437999986 L 8.795878700000003 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="27.88293547900001" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">AppClip/InstanApp</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 250.87553604514974 11.786477457999997 L 320.00167597033726 11.786477457999997 L 320.00167597033726 59.284222437999986 L 250.87553604514974 59.284222437999986 L 250.87553604514974 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="269.96259282414974" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">User</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 413.6099863408203 11.786477457999997 L 599.8227198939375 11.786477457999997 L 599.8227198939375 59.284222437999986 L 413.6099863408203 59.284222437999986 L 413.6099863408203 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="432.6970431198203" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">SDK Sample Web App</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 751.5289643233073 11.786477457999997 L 876.8684068607995 11.786477457999997 L 876.8684068607995 59.284222437999986 L 751.5289643233073 59.284222437999986 L 751.5289643233073 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="770.6160211023073" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Reclaim SDK</text></g></g><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 166.593942578 L 822.9945642920534 166.593942578 L 822.9945642920534 360.103273978 L 805.4028068920534 360.103273978 L 805.4028068920534 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g><g><rect fill="white" stroke="none" x="329.0615110575416" y="94.46773723799998" width="134.03193701003906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="331.70027466754163" y="110.30031889799997" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">ask to provide proof</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 117.33702185799999 L 492.2324728580456 117.33702185799999" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,117.33702185799999) translate(-506.7163531173789,-117.33702185799999)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 110.00712294133332 L 506.7163531173789 117.33702185799999 L 492.05655528404554 124.66692077466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="143.724657958" width="257.05262792800784" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="159.557239618" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">requestProof(request, AppCallbackUrl)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 166.593942578 L 790.9189266327201 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(805.4028068920534,166.593942578) translate(-805.4028068920534,-166.593942578)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 790.7430090587201 159.26404366133332 L 805.4028068920534 166.593942578 L 790.7430090587201 173.92384149466668 Z"/></g></g><g><g><rect fill="white" stroke="none" x="843.8114772153867" y="192.981578678" width="110.14505041335937" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="846.4502408253867" y="208.81416033800002" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Validate request</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 822.9945642920534 215.850863298 L 893.3615938920534 215.850863298 L 893.3615938920534 238.720147918 L 837.4784445513867 238.720147918" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(822.9945642920534,238.720147918) translate(-822.9945642920534,-238.720147918)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.6543621253867 231.39024900133333 L 822.9945642920534 238.720147918 L 837.6543621253867 246.0500468346667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="843.8114772153867" y="265.107784018" width="189.45071447585937" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="846.4502408253867" y="280.94036567800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate Template Instance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 822.9945642920534 287.97706863800005 L 893.3615938920534 287.97706863800005 L 893.3615938920534 310.846353258 L 837.4784445513867 310.846353258" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(822.9945642920534,310.846353258) translate(-822.9945642920534,-310.846353258)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.6543621253867 303.5164543413334 L 822.9945642920534 310.846353258 L 837.6543621253867 318.1762521746667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="595.9691486090717" y="337.23398935800003" width="120.18086279128906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="598.6079122190716" y="353.06657101800005" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">TemplateInstance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 360.103273978 L 521.2002333767123 360.103273978" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,360.103273978) translate(-506.7163531173789,-360.103273978)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 352.77337506133335 L 506.7163531173789 360.103273978 L 521.3761509507123 367.43317289466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="386.490910078" width="215.49939001296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="402.32349173800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate QrCode from template</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 409.36019469800004 L 577.0833827173789 409.36019469800004 L 577.0833827173789 432.229479318 L 521.2002333767123 432.229479318" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,432.229479318) translate(-506.7163531173789,-432.229479318)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 424.89958040133337 L 506.7163531173789 432.229479318 L 521.3761509507123 439.55937823466667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="349.0292768656471" y="458.617115418" width="94.09640539382812" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="351.6680404756471" y="474.44969707800004" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Scan QrCode</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 481.486400038 L 492.2324728580456 481.486400038" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,481.486400038) translate(-506.7163531173789,-481.486400038)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 474.15650112133335 L 506.7163531173789 481.486400038 L 492.05655528404554 488.81629895466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="214.33519327974216" y="507.874036138" width="166.64469946121093" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="216.97395688974217" y="523.706617798" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Open AppClip/InstanApp</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 530.743320758 L 103.08261316264975 530.743320758" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(88.59873290331642,530.743320758) translate(-88.59873290331642,-530.743320758)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 523.4134218413333 L 88.59873290331642 530.743320758 L 103.25853073664975 538.0732196746667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="109.41564582664975" y="557.130956858" width="169.86584509109375" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="112.05440943664975" y="572.963538518" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">complete verification task</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 580.0002414779999 L 158.9657625033164 580.0002414779999 L 158.9657625033164 602.8695260979999 L 103.08261316264975 602.8695260979999" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(88.59873290331642,602.8695260979999) translate(-88.59873290331642,-602.8695260979999)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 595.5396271813332 L 88.59873290331642 602.8695260979999 L 103.25853073664975 610.1994250146666 Z"/></g></g><g><g><rect fill="white" stroke="none" x="180.53779948091403" y="629.257162198" width="234.23948705886718" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="183.17656309091404" y="645.0897438579999" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Submit Proof using AppCallbackUrl</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 652.126446818 L 492.2324728580456 652.126446818" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,652.126446818) translate(-506.7163531173789,-652.126446818)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 644.7965479013333 L 506.7163531173789 652.126446818 L 492.05655528404554 659.4563457346667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="306.2555189310768" y="678.514082918" width="179.64392126296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="308.8942825410768" y="694.346664578" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">notify user (proof received)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 701.383367538 L 299.9224862670768 701.383367538" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(285.4386060077435,701.383367538) translate(-285.4386060077435,-701.383367538)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 300.09840384107684 694.0534686213333 L 285.4386060077435 701.383367538 L 300.09840384107684 708.7132664546667 Z"/></g></g></g><g/><g/><g/><g/></g></svg>
|
package/readme/usage-flow-3.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1039" height="690"><desc>participant%20AppClip%2FInstanApp%0Aparticipant%20User%0Aparticipant%20SDK%20Sample%20Web%20App%0Aparticipant%20Reclaim%20SDK%0A%0AUser-%3ESDK%20Sample%20Web%20App%3A%20ask%20to%20provide%20proof%0A%0ASDK%20Sample%20Web%20App-%3EReclaim%20SDK%3A%20requestProof(request%2C%20AppCallbackUrl)%0Aactivate%20Reclaim%20SDK%0AReclaim%20SDK-%3EReclaim%20SDK%3A%20Generate%20Template%20Instance%0AReclaim%20SDK--%3ESDK%20Sample%20Web%20App%3A%20TemplateInstance%0Adeactivate%20Reclaim%20SDK%0A%0ASDK%20Sample%20Web%20App-%3ESDK%20Sample%20Web%20App%3A%20Generate%20QrCode%20from%20template%0A%0AUser--%3ESDK%20Sample%20Web%20App%3A%20Scan%20QrCode%0A%0ASDK%20Sample%20Web%20App--%3EAppClip%2FInstanApp%3A%20Open%20AppClip%2FInstanApp%0A%0AAppClip%2FInstanApp-%3EAppClip%2FInstanApp%3A%20complete%20verification%20task%0A%0AAppClip%2FInstanApp-%3ESDK%20Sample%20Web%20App%3A%20Submit%20Proof%20using%20AppCallbackUrl%0A%0ASDK%20Sample%20Web%20App--%3EUser%3A%20notify%20user%20(proof%20received)%0A</desc><defs/><g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g><rect fill="white" stroke="none" x="0" y="0" width="1039" height="690"/></g><g/><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 59.284222437999986 L 88.59873290331642 690.8283130980001" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 59.284222437999986 L 285.4386060077435 690.8283130980001" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 59.284222437999986 L 506.7163531173789 690.8283130980001" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 814.1986855920534 59.284222437999986 L 814.1986855920534 690.8283130980001" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/></g><g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 8.795878700000003 11.786477457999997 L 168.40158710663283 11.786477457999997 L 168.40158710663283 59.284222437999986 L 8.795878700000003 59.284222437999986 L 8.795878700000003 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="27.88293547900001" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">AppClip/InstanApp</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 250.87553604514974 11.786477457999997 L 320.00167597033726 11.786477457999997 L 320.00167597033726 59.284222437999986 L 250.87553604514974 59.284222437999986 L 250.87553604514974 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="269.96259282414974" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">User</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 413.6099863408203 11.786477457999997 L 599.8227198939375 11.786477457999997 L 599.8227198939375 59.284222437999986 L 413.6099863408203 59.284222437999986 L 413.6099863408203 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="432.6970431198203" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">SDK Sample Web App</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 751.5289643233073 11.786477457999997 L 876.8684068607995 11.786477457999997 L 876.8684068607995 59.284222437999986 L 751.5289643233073 59.284222437999986 L 751.5289643233073 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="770.6160211023073" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Reclaim SDK</text></g></g><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 166.593942578 L 822.9945642920534 166.593942578 L 822.9945642920534 287.977068638 L 805.4028068920534 287.977068638 L 805.4028068920534 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g><g><rect fill="white" stroke="none" x="329.0615110575416" y="94.46773723799998" width="134.03193701003906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="331.70027466754163" y="110.30031889799997" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">ask to provide proof</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 117.33702185799999 L 492.2324728580456 117.33702185799999" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,117.33702185799999) translate(-506.7163531173789,-117.33702185799999)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 110.00712294133332 L 506.7163531173789 117.33702185799999 L 492.05655528404554 124.66692077466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="143.724657958" width="257.05262792800784" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="159.557239618" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">requestProof(request, AppCallbackUrl)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 166.593942578 L 790.9189266327201 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(805.4028068920534,166.593942578) translate(-805.4028068920534,-166.593942578)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 790.7430090587201 159.26404366133332 L 805.4028068920534 166.593942578 L 790.7430090587201 173.92384149466668 Z"/></g></g><g><g><rect fill="white" stroke="none" x="843.8114772153867" y="192.981578678" width="189.45071447585937" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="846.4502408253867" y="208.81416033800002" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate Template Instance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 822.9945642920534 215.850863298 L 893.3615938920534 215.850863298 L 893.3615938920534 238.720147918 L 837.4784445513867 238.720147918" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(822.9945642920534,238.720147918) translate(-822.9945642920534,-238.720147918)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.6543621253867 231.39024900133333 L 822.9945642920534 238.720147918 L 837.6543621253867 246.0500468346667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="595.9691486090717" y="265.107784018" width="120.18086279128906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="598.6079122190716" y="280.94036567800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">TemplateInstance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 287.977068638 L 521.2002333767123 287.977068638" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,287.977068638) translate(-506.7163531173789,-287.977068638)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 280.64716972133334 L 506.7163531173789 287.977068638 L 521.3761509507123 295.30696755466664 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="314.364704738" width="215.49939001296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="330.197286398" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate QrCode from template</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 337.23398935800003 L 577.0833827173789 337.23398935800003 L 577.0833827173789 360.103273978 L 521.2002333767123 360.103273978" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,360.103273978) translate(-506.7163531173789,-360.103273978)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 352.77337506133335 L 506.7163531173789 360.103273978 L 521.3761509507123 367.43317289466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="349.0292768656471" y="386.490910078" width="94.09640539382812" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="351.6680404756471" y="402.32349173800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Scan QrCode</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 409.360194698 L 492.2324728580456 409.360194698" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,409.360194698) translate(-506.7163531173789,-409.360194698)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 402.03029578133334 L 506.7163531173789 409.360194698 L 492.05655528404554 416.69009361466664 Z"/></g></g><g><g><rect fill="white" stroke="none" x="214.33519327974216" y="435.747830798" width="166.64469946121093" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="216.97395688974217" y="451.580412458" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Open AppClip/InstanApp</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 458.61711541799997 L 103.08261316264975 458.61711541799997" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(88.59873290331642,458.61711541799997) translate(-88.59873290331642,-458.61711541799997)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 451.2872165013333 L 88.59873290331642 458.61711541799997 L 103.25853073664975 465.9470143346666 Z"/></g></g><g><g><rect fill="white" stroke="none" x="109.41564582664975" y="485.004751518" width="169.86584509109375" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="112.05440943664975" y="500.837333178" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">complete verification task</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 507.874036138 L 158.9657625033164 507.874036138 L 158.9657625033164 530.743320758 L 103.08261316264975 530.743320758" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(88.59873290331642,530.743320758) translate(-88.59873290331642,-530.743320758)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 523.4134218413333 L 88.59873290331642 530.743320758 L 103.25853073664975 538.0732196746667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="180.53779948091403" y="557.130956858" width="234.23948705886718" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="183.17656309091404" y="572.963538518" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Submit Proof using AppCallbackUrl</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 580.000241478 L 492.2324728580456 580.000241478" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,580.000241478) translate(-506.7163531173789,-580.000241478)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 572.6703425613333 L 506.7163531173789 580.000241478 L 492.05655528404554 587.3301403946667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="306.2555189310768" y="606.387877578" width="179.64392126296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="308.8942825410768" y="622.220459238" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">notify user (proof received)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 629.2571621980001 L 299.9224862670768 629.2571621980001" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(285.4386060077435,629.2571621980001) translate(-285.4386060077435,-629.2571621980001)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 300.09840384107684 621.9272632813334 L 285.4386060077435 629.2571621980001 L 300.09840384107684 636.5870611146668 Z"/></g></g></g><g/><g/><g/><g/></g></svg>
|
package/readme/usage-flow.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1039" height="762"><desc>%0A%0Aparticipant%20AppClip%2FInstanApp%0Aparticipant%20User%0Aparticipant%Reclaim%0Aparticipant%20Reclaim%20SDK%0A%0AUser-%3EApp%3A%20ask%20to%20provide%20proof%0A%0AApp-%3EReclaim%20SDK%3A%20requestProof(request%2C%20AppCallbackUrl)%0Aactivate%20Reclaim%20SDK%0AReclaim%20SDK-%3EReclaim%20SDK%3A%20Validate%20request%0AReclaim%20SDK-%3EReclaim%20SDK%3A%20Generate%20Template%20Instance%0AReclaim%20SDK--%3EApp%3A%20TemplateInstance%0Adeactivate%20Reclaim%20SDK%0AApp-%3EApp%3A%20Generate%20QrCode%20from%20template%0A%0A%0AUser--%3EApp%3A%20Scan%20QrCode%0A%0AApp--%3EAppClip%2FInstanApp%3A%20Open%20AppClip%2FInstanApp%0A%0AAppClip%2FInstanApp-%3EAppClip%2FInstanApp%3A%20complete%20verification%20task%0A%0A%0AAppClip%2FInstanApp-%3EApp%3A%20Submit%20Proof%20using%20AppCallbackUrl%0A%0A%0AApp--%3EUser%3A%20notify%20user%20(proof%20received)%0A</desc><defs/><g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g><rect fill="white" stroke="none" x="0" y="0" width="1039" height="762"/></g><g/><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 59.284222437999986 L 88.59873290331642 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 59.284222437999986 L 285.4386060077435 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 59.284222437999986 L 506.7163531173789 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 814.1986855920534 59.284222437999986 L 814.1986855920534 762.954518438" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="13.532121076923076,5.863919133333333"/></g><g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 8.795878700000003 11.786477457999997 L 168.40158710663283 11.786477457999997 L 168.40158710663283 59.284222437999986 L 8.795878700000003 59.284222437999986 L 8.795878700000003 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="27.88293547900001" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">AppClip/InstanApp</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 250.87553604514974 11.786477457999997 L 320.00167597033726 11.786477457999997 L 320.00167597033726 59.284222437999986 L 250.87553604514974 59.284222437999986 L 250.87553604514974 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="269.96259282414974" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">User</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 474.5870676396484 11.786477457999997 L 538.8456385951093 11.786477457999997 L 538.8456385951093 59.284222437999986 L 474.5870676396484 59.284222437999986 L 474.5870676396484 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="493.67412441864843" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">App</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 751.5289643233073 11.786477457999997 L 876.8684068607995 11.786477457999997 L 876.8684068607995 59.284222437999986 L 751.5289643233073 59.284222437999986 L 751.5289643233073 11.786477457999997 Z" stroke-miterlimit="10" stroke-width="2.814681184" stroke-dasharray=""/></g><g><g/><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="770.6160211023073" y="41.692465037999995" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Reclaim SDK</text></g></g><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 166.593942578 L 822.9945642920534 166.593942578 L 822.9945642920534 360.103273978 L 805.4028068920534 360.103273978 L 805.4028068920534 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g><g><rect fill="white" stroke="none" x="329.0615110575416" y="94.46773723799998" width="134.03193701003906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="331.70027466754163" y="110.30031889799997" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">ask to provide proof</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 117.33702185799999 L 492.2324728580456 117.33702185799999" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,117.33702185799999) translate(-506.7163531173789,-117.33702185799999)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 110.00712294133332 L 506.7163531173789 117.33702185799999 L 492.05655528404554 124.66692077466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="143.724657958" width="257.05262792800784" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="159.557239618" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">requestProof(request, AppCallbackUrl)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 166.593942578 L 790.9189266327201 166.593942578" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(805.4028068920534,166.593942578) translate(-805.4028068920534,-166.593942578)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 790.7430090587201 159.26404366133332 L 805.4028068920534 166.593942578 L 790.7430090587201 173.92384149466668 Z"/></g></g><g><g><rect fill="white" stroke="none" x="843.8114772153867" y="192.981578678" width="110.14505041335937" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="846.4502408253867" y="208.81416033800002" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Validate request</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 822.9945642920534 215.850863298 L 893.3615938920534 215.850863298 L 893.3615938920534 238.720147918 L 837.4784445513867 238.720147918" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(822.9945642920534,238.720147918) translate(-822.9945642920534,-238.720147918)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.6543621253867 231.39024900133333 L 822.9945642920534 238.720147918 L 837.6543621253867 246.0500468346667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="843.8114772153867" y="265.107784018" width="189.45071447585937" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="846.4502408253867" y="280.94036567800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate Template Instance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 822.9945642920534 287.97706863800005 L 893.3615938920534 287.97706863800005 L 893.3615938920534 310.846353258 L 837.4784445513867 310.846353258" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(822.9945642920534,310.846353258) translate(-822.9945642920534,-310.846353258)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.6543621253867 303.5164543413334 L 822.9945642920534 310.846353258 L 837.6543621253867 318.1762521746667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="595.9691486090717" y="337.23398935800003" width="120.18086279128906" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="598.6079122190716" y="353.06657101800005" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">TemplateInstance</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 805.4028068920534 360.103273978 L 521.2002333767123 360.103273978" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,360.103273978) translate(-506.7163531173789,-360.103273978)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 352.77337506133335 L 506.7163531173789 360.103273978 L 521.3761509507123 367.43317289466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="527.5332660407123" y="386.490910078" width="215.49939001296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="530.1720296507123" y="402.32349173800003" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Generate QrCode from template</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 409.36019469800004 L 577.0833827173789 409.36019469800004 L 577.0833827173789 432.229479318 L 521.2002333767123 432.229479318" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,432.229479318) translate(-506.7163531173789,-432.229479318)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 521.3761509507123 424.89958040133337 L 506.7163531173789 432.229479318 L 521.3761509507123 439.55937823466667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="349.0292768656471" y="458.617115418" width="94.09640539382812" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="351.6680404756471" y="474.44969707800004" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Scan QrCode</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 285.4386060077435 481.486400038 L 492.2324728580456 481.486400038" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(506.7163531173789,481.486400038) translate(-506.7163531173789,-481.486400038)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 474.15650112133335 L 506.7163531173789 481.486400038 L 492.05655528404554 488.81629895466665 Z"/></g></g><g><g><rect fill="white" stroke="none" x="214.33519327974216" y="507.874036138" width="166.64469946121093" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="216.97395688974217" y="523.706617798" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Open AppClip/InstanApp</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 530.743320758 L 103.08261316264975 530.743320758" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(88.59873290331642,530.743320758) translate(-88.59873290331642,-530.743320758)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 523.4134218413333 L 88.59873290331642 530.743320758 L 103.25853073664975 538.0732196746667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="109.41564582664975" y="557.130956858" width="169.86584509109375" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="112.05440943664975" y="572.963538518" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">complete verification task</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 580.0002414779999 L 158.9657625033164 580.0002414779999 L 158.9657625033164 602.8695260979999 L 103.08261316264975 602.8695260979999" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(88.59873290331642,602.8695260979999) translate(-88.59873290331642,-602.8695260979999)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 103.25853073664975 595.5396271813332 L 88.59873290331642 602.8695260979999 L 103.25853073664975 610.1994250146666 Z"/></g></g><g><g><rect fill="white" stroke="none" x="180.53779948091403" y="629.257162198" width="234.23948705886718" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="183.17656309091404" y="645.0897438579999" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">Submit Proof using AppCallbackUrl</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 88.59873290331642 652.126446818 L 492.2324728580456 652.126446818" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray=""/><g transform="translate(506.7163531173789,652.126446818) translate(-506.7163531173789,-652.126446818)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 492.05655528404554 644.7965479013333 L 506.7163531173789 652.126446818 L 492.05655528404554 659.4563457346667 Z"/></g></g><g><g><rect fill="white" stroke="none" x="306.2555189310768" y="678.514082918" width="179.64392126296875" height="22.86928462"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="308.8942825410768" y="694.346664578" text-anchor="start" dominant-baseline="alphabetic" xml:space="preserve">notify user (proof received)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 506.7163531173789 701.383367538 L 299.9224862670768 701.383367538" stroke-miterlimit="10" stroke-width="1.4659797833333332" stroke-dasharray="7.0367029599999995"/><g transform="translate(285.4386060077435,701.383367538) translate(-285.4386060077435,-701.383367538)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 300.09840384107684 694.0534686213333 L 285.4386060077435 701.383367538 L 300.09840384107684 708.7132664546667 Z"/></g></g></g><g/><g/><g/><g/></g></svg>
|