@oma3/omatrust 0.1.0-alpha.1 → 0.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -7
- package/dist/identity/index.cjs +1 -1
- package/dist/identity/index.cjs.map +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index-B9KW02US.d.cts +119 -0
- package/dist/index-DXrwBex9.d.ts +119 -0
- package/dist/index.cjs +656 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +657 -92
- package/dist/index.js.map +1 -1
- package/dist/reputation/index.browser.cjs +2133 -0
- package/dist/reputation/index.browser.cjs.map +1 -0
- package/dist/reputation/index.browser.d.cts +14 -0
- package/dist/reputation/index.browser.d.ts +14 -0
- package/dist/reputation/index.browser.js +2071 -0
- package/dist/reputation/index.browser.js.map +1 -0
- package/dist/reputation/index.cjs +675 -90
- package/dist/reputation/index.cjs.map +1 -1
- package/dist/reputation/index.d.cts +2 -1
- package/dist/reputation/index.d.ts +2 -1
- package/dist/reputation/index.js +669 -92
- package/dist/reputation/index.js.map +1 -1
- package/dist/subject-ownership-CXvzEjpH.d.cts +434 -0
- package/dist/subject-ownership-CXvzEjpH.d.ts +434 -0
- package/dist/widgets/index.cjs +195 -0
- package/dist/widgets/index.cjs.map +1 -0
- package/dist/widgets/index.d.cts +134 -0
- package/dist/widgets/index.d.ts +134 -0
- package/dist/widgets/index.js +185 -0
- package/dist/widgets/index.js.map +1 -0
- package/package.json +33 -6
- package/dist/index-ChbJxwOA.d.cts +0 -415
- package/dist/index-ChbJxwOA.d.ts +0 -415
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
type Hex = `0x${string}`;
|
|
2
|
+
type Did = string;
|
|
3
|
+
type ProofType = "pop-jws" | "pop-eip712" | "x402-receipt" | "evidence-pointer" | "tx-encoded-value" | "tx-interaction" | "x402-offer";
|
|
4
|
+
type ProofPurpose = "shared-control" | "commercial-tx";
|
|
5
|
+
type SchemaField = {
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
value?: unknown;
|
|
9
|
+
};
|
|
10
|
+
type AttestationValidationError = {
|
|
11
|
+
schemaFieldName: string;
|
|
12
|
+
expectedType: string;
|
|
13
|
+
providedType: string;
|
|
14
|
+
providedValue: unknown;
|
|
15
|
+
};
|
|
16
|
+
type AttestationQueryResult = {
|
|
17
|
+
uid: Hex;
|
|
18
|
+
schema: Hex;
|
|
19
|
+
attester: Hex;
|
|
20
|
+
recipient: Hex;
|
|
21
|
+
txHash?: Hex;
|
|
22
|
+
revocable: boolean;
|
|
23
|
+
revocationTime: bigint;
|
|
24
|
+
expirationTime: bigint;
|
|
25
|
+
time: bigint;
|
|
26
|
+
refUID: Hex;
|
|
27
|
+
data: Record<string, unknown>;
|
|
28
|
+
raw?: Hex;
|
|
29
|
+
};
|
|
30
|
+
type ProofWrapper = {
|
|
31
|
+
proofType: ProofType;
|
|
32
|
+
proofObject: unknown;
|
|
33
|
+
proofPurpose?: ProofPurpose;
|
|
34
|
+
version?: number;
|
|
35
|
+
issuedAt?: number;
|
|
36
|
+
expiresAt?: number;
|
|
37
|
+
};
|
|
38
|
+
type TxEncodedValueProof = ProofWrapper & {
|
|
39
|
+
proofType: "tx-encoded-value";
|
|
40
|
+
proofPurpose: ProofPurpose;
|
|
41
|
+
proofObject: {
|
|
42
|
+
chainId: string;
|
|
43
|
+
txHash: Hex;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type TxInteractionProof = ProofWrapper & {
|
|
47
|
+
proofType: "tx-interaction";
|
|
48
|
+
proofPurpose: "commercial-tx";
|
|
49
|
+
proofObject: {
|
|
50
|
+
chainId: string;
|
|
51
|
+
txHash: Hex;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
type PopEip712Proof = ProofWrapper & {
|
|
55
|
+
proofType: "pop-eip712";
|
|
56
|
+
proofObject: {
|
|
57
|
+
domain: {
|
|
58
|
+
name: string;
|
|
59
|
+
version: string;
|
|
60
|
+
chainId: number;
|
|
61
|
+
verifyingContract?: Hex;
|
|
62
|
+
};
|
|
63
|
+
message: {
|
|
64
|
+
signer: string;
|
|
65
|
+
authorizedEntity: string;
|
|
66
|
+
signingPurpose: string;
|
|
67
|
+
creationTimestamp: number;
|
|
68
|
+
expirationTimestamp: number;
|
|
69
|
+
randomValue: Hex;
|
|
70
|
+
statement: string;
|
|
71
|
+
};
|
|
72
|
+
signature: Hex;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
type PopJwsProof = ProofWrapper & {
|
|
76
|
+
proofType: "pop-jws";
|
|
77
|
+
proofObject: string;
|
|
78
|
+
};
|
|
79
|
+
type X402ReceiptProof = ProofWrapper & {
|
|
80
|
+
proofType: "x402-receipt";
|
|
81
|
+
proofPurpose: "commercial-tx";
|
|
82
|
+
proofObject: Record<string, unknown>;
|
|
83
|
+
};
|
|
84
|
+
type X402OfferProof = ProofWrapper & {
|
|
85
|
+
proofType: "x402-offer";
|
|
86
|
+
proofPurpose: "commercial-tx";
|
|
87
|
+
proofObject: Record<string, unknown>;
|
|
88
|
+
};
|
|
89
|
+
type EvidencePointerProof = ProofWrapper & {
|
|
90
|
+
proofType: "evidence-pointer";
|
|
91
|
+
proofPurpose: "shared-control";
|
|
92
|
+
proofObject: {
|
|
93
|
+
url: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type ChainConstants = {
|
|
97
|
+
base: bigint;
|
|
98
|
+
range: bigint;
|
|
99
|
+
decimals: number;
|
|
100
|
+
nativeSymbol: string;
|
|
101
|
+
};
|
|
102
|
+
type SubmitAttestationParams = {
|
|
103
|
+
signer: unknown;
|
|
104
|
+
chainId: number;
|
|
105
|
+
easContractAddress: Hex;
|
|
106
|
+
schemaUid: Hex;
|
|
107
|
+
schema: SchemaField[] | string;
|
|
108
|
+
data: Record<string, unknown>;
|
|
109
|
+
revocable?: boolean;
|
|
110
|
+
expirationTime?: bigint | number;
|
|
111
|
+
refUid?: Hex;
|
|
112
|
+
value?: bigint | number;
|
|
113
|
+
};
|
|
114
|
+
type SubmitAttestationResult = {
|
|
115
|
+
uid: Hex;
|
|
116
|
+
txHash: Hex;
|
|
117
|
+
receipt?: unknown;
|
|
118
|
+
};
|
|
119
|
+
type RevokeAttestationParams = {
|
|
120
|
+
signer: unknown;
|
|
121
|
+
easContractAddress: Hex;
|
|
122
|
+
schemaUid: Hex;
|
|
123
|
+
uid: Hex;
|
|
124
|
+
value?: bigint | number;
|
|
125
|
+
};
|
|
126
|
+
type RevokeAttestationResult = {
|
|
127
|
+
txHash: Hex;
|
|
128
|
+
receipt?: unknown;
|
|
129
|
+
};
|
|
130
|
+
type PrepareDelegatedAttestationParams = {
|
|
131
|
+
chainId: number;
|
|
132
|
+
easContractAddress: Hex;
|
|
133
|
+
schemaUid: Hex;
|
|
134
|
+
schema: SchemaField[] | string;
|
|
135
|
+
data: Record<string, unknown>;
|
|
136
|
+
attester: Hex;
|
|
137
|
+
nonce: bigint | number;
|
|
138
|
+
revocable?: boolean;
|
|
139
|
+
expirationTime?: bigint | number;
|
|
140
|
+
refUid?: Hex;
|
|
141
|
+
value?: bigint | number;
|
|
142
|
+
deadline?: bigint | number;
|
|
143
|
+
};
|
|
144
|
+
type PrepareDelegatedAttestationResult = {
|
|
145
|
+
delegatedRequest: Record<string, unknown>;
|
|
146
|
+
typedData: {
|
|
147
|
+
domain: Record<string, unknown>;
|
|
148
|
+
types: Record<string, unknown>;
|
|
149
|
+
message: Record<string, unknown>;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
type BuildDelegatedTypedDataFromEncodedParams = {
|
|
153
|
+
chainId: number;
|
|
154
|
+
easContractAddress: Hex;
|
|
155
|
+
schemaUid: Hex;
|
|
156
|
+
encodedData: Hex;
|
|
157
|
+
recipient: Hex;
|
|
158
|
+
attester: Hex;
|
|
159
|
+
nonce: bigint | number;
|
|
160
|
+
revocable?: boolean;
|
|
161
|
+
expirationTime?: bigint | number;
|
|
162
|
+
refUid?: Hex;
|
|
163
|
+
value?: bigint | number;
|
|
164
|
+
deadline?: bigint | number;
|
|
165
|
+
};
|
|
166
|
+
type SubmitDelegatedAttestationParams = {
|
|
167
|
+
relayUrl: string;
|
|
168
|
+
prepared: PrepareDelegatedAttestationResult;
|
|
169
|
+
signature: Hex | string;
|
|
170
|
+
attester?: Hex;
|
|
171
|
+
};
|
|
172
|
+
type SubmitDelegatedAttestationResult = {
|
|
173
|
+
uid: Hex;
|
|
174
|
+
txHash?: Hex;
|
|
175
|
+
status: "submitted" | "confirmed";
|
|
176
|
+
};
|
|
177
|
+
type GetAttestationParams = {
|
|
178
|
+
uid: Hex;
|
|
179
|
+
provider: unknown;
|
|
180
|
+
easContractAddress: Hex;
|
|
181
|
+
schema?: SchemaField[] | string;
|
|
182
|
+
};
|
|
183
|
+
type ListAttestationsParams = {
|
|
184
|
+
did: Did;
|
|
185
|
+
provider: unknown;
|
|
186
|
+
easContractAddress: Hex;
|
|
187
|
+
schemas?: Hex[];
|
|
188
|
+
limit?: number;
|
|
189
|
+
fromBlock?: number;
|
|
190
|
+
toBlock?: number;
|
|
191
|
+
};
|
|
192
|
+
type GetAttestationsByAttesterParams = {
|
|
193
|
+
attester: Hex;
|
|
194
|
+
provider: unknown;
|
|
195
|
+
easContractAddress: Hex;
|
|
196
|
+
schemas?: Hex[];
|
|
197
|
+
limit?: number;
|
|
198
|
+
fromBlock?: number;
|
|
199
|
+
toBlock?: number;
|
|
200
|
+
};
|
|
201
|
+
type VerifyAttestationParams = {
|
|
202
|
+
attestation: AttestationQueryResult;
|
|
203
|
+
provider?: unknown;
|
|
204
|
+
checks?: ProofType[];
|
|
205
|
+
context?: Record<string, unknown>;
|
|
206
|
+
};
|
|
207
|
+
type VerifyAttestationResult = {
|
|
208
|
+
valid: boolean;
|
|
209
|
+
checks: Record<string, boolean>;
|
|
210
|
+
reasons: string[];
|
|
211
|
+
};
|
|
212
|
+
type CallControllerWitnessParams = {
|
|
213
|
+
gatewayUrl: string;
|
|
214
|
+
attestationUid: Hex;
|
|
215
|
+
chainId: number;
|
|
216
|
+
easContract: Hex;
|
|
217
|
+
schemaUid: Hex;
|
|
218
|
+
subject: Did;
|
|
219
|
+
controller: Did;
|
|
220
|
+
timeoutMs?: number;
|
|
221
|
+
};
|
|
222
|
+
type CallControllerWitnessResult = {
|
|
223
|
+
ok: boolean;
|
|
224
|
+
method: "dns-txt" | "did-json";
|
|
225
|
+
details?: unknown;
|
|
226
|
+
};
|
|
227
|
+
type VerifyProofParams = {
|
|
228
|
+
proof: ProofWrapper;
|
|
229
|
+
provider?: unknown;
|
|
230
|
+
expectedSubject?: Did;
|
|
231
|
+
expectedController?: Did;
|
|
232
|
+
};
|
|
233
|
+
type VerifyProofResult = {
|
|
234
|
+
valid: boolean;
|
|
235
|
+
proofType: ProofType;
|
|
236
|
+
reason?: string;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
declare function submitAttestation(params: SubmitAttestationParams): Promise<SubmitAttestationResult>;
|
|
240
|
+
|
|
241
|
+
declare function revokeAttestation(params: RevokeAttestationParams): Promise<RevokeAttestationResult>;
|
|
242
|
+
|
|
243
|
+
declare function buildDelegatedAttestationTypedData(params: PrepareDelegatedAttestationParams): {
|
|
244
|
+
domain: Record<string, unknown>;
|
|
245
|
+
types: Record<string, unknown>;
|
|
246
|
+
message: Record<string, unknown>;
|
|
247
|
+
};
|
|
248
|
+
declare function buildDelegatedTypedDataFromEncoded(params: BuildDelegatedTypedDataFromEncodedParams): {
|
|
249
|
+
domain: Record<string, unknown>;
|
|
250
|
+
types: Record<string, unknown>;
|
|
251
|
+
message: Record<string, unknown>;
|
|
252
|
+
};
|
|
253
|
+
declare function splitSignature(signature: Hex | string): {
|
|
254
|
+
v: number;
|
|
255
|
+
r: Hex;
|
|
256
|
+
s: Hex;
|
|
257
|
+
};
|
|
258
|
+
declare function prepareDelegatedAttestation(params: PrepareDelegatedAttestationParams): Promise<PrepareDelegatedAttestationResult>;
|
|
259
|
+
declare function submitDelegatedAttestation(params: SubmitDelegatedAttestationParams): Promise<SubmitDelegatedAttestationResult>;
|
|
260
|
+
|
|
261
|
+
declare function getAttestation(params: GetAttestationParams): Promise<AttestationQueryResult>;
|
|
262
|
+
declare function getAttestationsForDid(params: ListAttestationsParams): Promise<AttestationQueryResult[]>;
|
|
263
|
+
declare function getAttestationsByAttester(params: GetAttestationsByAttesterParams): Promise<AttestationQueryResult[]>;
|
|
264
|
+
declare function listAttestations(params: ListAttestationsParams): Promise<AttestationQueryResult[]>;
|
|
265
|
+
type GetLatestAttestationsParams = {
|
|
266
|
+
provider: unknown;
|
|
267
|
+
easContractAddress: Hex;
|
|
268
|
+
schemas?: Hex[];
|
|
269
|
+
limit?: number;
|
|
270
|
+
fromBlock?: number;
|
|
271
|
+
};
|
|
272
|
+
declare function getLatestAttestations(params: GetLatestAttestationsParams): Promise<AttestationQueryResult[]>;
|
|
273
|
+
declare function deduplicateReviews(attestations: AttestationQueryResult[]): AttestationQueryResult[];
|
|
274
|
+
declare function calculateAverageUserReviewRating(attestations: AttestationQueryResult[]): number;
|
|
275
|
+
declare function getMajorVersion(version: string): number;
|
|
276
|
+
|
|
277
|
+
declare function verifyProof(params: VerifyProofParams): Promise<VerifyProofResult>;
|
|
278
|
+
declare function verifyAttestation(params: VerifyAttestationParams): Promise<VerifyAttestationResult>;
|
|
279
|
+
|
|
280
|
+
declare function normalizeSchema(schema: SchemaField[] | string): SchemaField[];
|
|
281
|
+
declare function schemaToString(schema: SchemaField[] | string): string;
|
|
282
|
+
declare function encodeAttestationData(schema: SchemaField[] | string, data: Record<string, unknown>): Hex;
|
|
283
|
+
declare function validateAttestationData(schema: SchemaField[] | string, data: Record<string, unknown>): AttestationValidationError[];
|
|
284
|
+
declare function decodeAttestationData(schema: SchemaField[] | string, encodedData: Hex): Record<string, unknown>;
|
|
285
|
+
declare function extractExpirationTime(data: Record<string, unknown>): bigint | number | undefined;
|
|
286
|
+
|
|
287
|
+
declare function verifySchemaExists(schemaRegistry: unknown, schemaUid: Hex): Promise<boolean>;
|
|
288
|
+
declare function getSchemaDetails(schemaRegistry: unknown, schemaUid: Hex): Promise<{
|
|
289
|
+
uid: Hex;
|
|
290
|
+
schema: string;
|
|
291
|
+
resolver: Hex;
|
|
292
|
+
revocable: boolean;
|
|
293
|
+
}>;
|
|
294
|
+
declare function formatSchemaUid(schemaUid: string): Hex;
|
|
295
|
+
|
|
296
|
+
declare function callControllerWitness(params: CallControllerWitnessParams): Promise<CallControllerWitnessResult>;
|
|
297
|
+
|
|
298
|
+
declare function getSupportedChainIds(): number[];
|
|
299
|
+
declare function isChainSupported(chainId: number): boolean;
|
|
300
|
+
declare function getChainConstants(chainId: number, purpose: ProofPurpose): ChainConstants;
|
|
301
|
+
declare function constructSeed(subjectDidHash: Hex, counterpartyDidHash: Hex, purpose: ProofPurpose): Uint8Array;
|
|
302
|
+
declare function hashSeed(seedBytes: Uint8Array, chainId: number): Hex;
|
|
303
|
+
declare function calculateTransferAmount(subject: string, counterparty: string, chainId: number, purpose: ProofPurpose): bigint;
|
|
304
|
+
declare function calculateTransferAmountFromAddresses(subjectAddress: string, counterpartyAddress: string, chainId: number, purpose: ProofPurpose): bigint;
|
|
305
|
+
declare function createTxEncodedValueProof(chainId: number, txHash: Hex, purpose: ProofPurpose): TxEncodedValueProof;
|
|
306
|
+
declare function formatTransferAmount(amount: bigint | number, chainId: number): string;
|
|
307
|
+
declare function getExplorerTxUrl(chainId: number, txHash: Hex): string;
|
|
308
|
+
declare function getExplorerAddressUrl(chainId: number, address: string): string;
|
|
309
|
+
|
|
310
|
+
declare function createTxInteractionProof(chainId: number, txHash: Hex): TxInteractionProof;
|
|
311
|
+
|
|
312
|
+
type CreatePopEip712ProofParams = {
|
|
313
|
+
signer: string;
|
|
314
|
+
authorizedEntity: string;
|
|
315
|
+
signingPurpose: ProofPurpose;
|
|
316
|
+
chainId: number;
|
|
317
|
+
creationTimestamp?: number;
|
|
318
|
+
expirationTimestamp?: number;
|
|
319
|
+
randomValue?: Hex;
|
|
320
|
+
statement?: string;
|
|
321
|
+
};
|
|
322
|
+
declare function createPopEip712Proof(params: CreatePopEip712ProofParams, signFn: (typedData: Record<string, unknown>) => Promise<Hex>): Promise<PopEip712Proof>;
|
|
323
|
+
|
|
324
|
+
type CreatePopJwsProofParams = {
|
|
325
|
+
issuer: Did;
|
|
326
|
+
audience: Did;
|
|
327
|
+
purpose: ProofPurpose;
|
|
328
|
+
issuedAt?: number;
|
|
329
|
+
expiresAt?: number;
|
|
330
|
+
nonce?: string;
|
|
331
|
+
};
|
|
332
|
+
declare function createPopJwsProof(params: CreatePopJwsProofParams, signFn: (payload: Record<string, unknown>, header: Record<string, unknown>) => Promise<string>): Promise<PopJwsProof>;
|
|
333
|
+
|
|
334
|
+
declare function createX402ReceiptProof(receipt: Record<string, unknown>): X402ReceiptProof;
|
|
335
|
+
declare function createX402OfferProof(offer: Record<string, unknown>): X402OfferProof;
|
|
336
|
+
|
|
337
|
+
declare function createEvidencePointerProof(url: string): EvidencePointerProof;
|
|
338
|
+
|
|
339
|
+
declare function parseDnsTxtRecord(record: string): {
|
|
340
|
+
version?: string;
|
|
341
|
+
controller?: Did;
|
|
342
|
+
[key: string]: string | undefined;
|
|
343
|
+
};
|
|
344
|
+
declare function buildDnsTxtRecord(controllerDid: Did): string;
|
|
345
|
+
|
|
346
|
+
declare function fetchDidDocument(domain: string): Promise<Record<string, unknown>>;
|
|
347
|
+
interface VerifyDidJsonControllerDidOptions {
|
|
348
|
+
fetchDidDocument?: (domain: string) => Promise<Record<string, unknown>>;
|
|
349
|
+
}
|
|
350
|
+
declare function extractAddressesFromDidDocument(didDocument: Record<string, unknown>): string[];
|
|
351
|
+
declare function verifyDidDocumentControllerDid(didDocument: Record<string, unknown>, expectedControllerDid: Did): {
|
|
352
|
+
valid: boolean;
|
|
353
|
+
reason?: string;
|
|
354
|
+
};
|
|
355
|
+
declare function verifyDidJsonControllerDid(domain: string, expectedControllerDid: Did, options?: VerifyDidJsonControllerDidOptions): Promise<{
|
|
356
|
+
valid: boolean;
|
|
357
|
+
reason?: string;
|
|
358
|
+
}>;
|
|
359
|
+
|
|
360
|
+
declare function buildEip712Domain(name: string, version: string, chainId: number, verifyingContract: Hex): {
|
|
361
|
+
name: string;
|
|
362
|
+
version: string;
|
|
363
|
+
chainId: number;
|
|
364
|
+
verifyingContract: Hex;
|
|
365
|
+
};
|
|
366
|
+
declare function getOmaTrustProofEip712Types(): {
|
|
367
|
+
primaryType: string;
|
|
368
|
+
types: Record<string, Array<{
|
|
369
|
+
name: string;
|
|
370
|
+
type: string;
|
|
371
|
+
}>>;
|
|
372
|
+
};
|
|
373
|
+
declare function verifyEip712Signature(typedData: {
|
|
374
|
+
domain: Record<string, unknown>;
|
|
375
|
+
types: Record<string, unknown>;
|
|
376
|
+
message: Record<string, unknown>;
|
|
377
|
+
}, signature: Hex | string): {
|
|
378
|
+
valid: boolean;
|
|
379
|
+
signer?: string;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
interface VerifyDnsTxtControllerDidOptions {
|
|
383
|
+
resolveTxt?: (host: string) => Promise<string[][]>;
|
|
384
|
+
recordPrefix?: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
type SubjectOwnershipVerificationMethod = "dns" | "did-document" | "wallet" | "contract" | "minting-wallet" | "transfer";
|
|
388
|
+
interface SubjectOwnershipVerificationResult {
|
|
389
|
+
valid: boolean;
|
|
390
|
+
method?: SubjectOwnershipVerificationMethod;
|
|
391
|
+
reason?: string;
|
|
392
|
+
details?: string;
|
|
393
|
+
subjectDid: Did;
|
|
394
|
+
connectedWalletDid: Did;
|
|
395
|
+
controllingWalletDid?: Did;
|
|
396
|
+
}
|
|
397
|
+
interface EvmOwnershipProvider {
|
|
398
|
+
call(transaction: {
|
|
399
|
+
to: string;
|
|
400
|
+
data: string;
|
|
401
|
+
}): Promise<string>;
|
|
402
|
+
getCode(address: string): Promise<string>;
|
|
403
|
+
getStorage(address: string, slot: string): Promise<string>;
|
|
404
|
+
getTransaction(hash: string): Promise<{
|
|
405
|
+
from?: string | null;
|
|
406
|
+
to?: string | null;
|
|
407
|
+
value?: bigint | string | number | null;
|
|
408
|
+
blockNumber?: number | null;
|
|
409
|
+
} | null>;
|
|
410
|
+
getTransactionReceipt(hash: string): Promise<{
|
|
411
|
+
blockNumber: number;
|
|
412
|
+
} | null>;
|
|
413
|
+
getBlockNumber(): Promise<number>;
|
|
414
|
+
getBlock(blockNumber: number): Promise<{
|
|
415
|
+
timestamp: number;
|
|
416
|
+
} | null>;
|
|
417
|
+
}
|
|
418
|
+
interface VerifyDidWebOwnershipParams extends VerifyDnsTxtControllerDidOptions {
|
|
419
|
+
subjectDid: Did;
|
|
420
|
+
connectedWalletDid: Did;
|
|
421
|
+
fetchDidDocument?: (domain: string) => Promise<Record<string, unknown>>;
|
|
422
|
+
}
|
|
423
|
+
interface VerifyDidPkhOwnershipParams {
|
|
424
|
+
subjectDid: Did;
|
|
425
|
+
connectedWalletDid: Did;
|
|
426
|
+
provider: EvmOwnershipProvider;
|
|
427
|
+
txHash?: Hex | string;
|
|
428
|
+
}
|
|
429
|
+
type VerifySubjectOwnershipParams = VerifyDidWebOwnershipParams | (VerifyDidPkhOwnershipParams & VerifyDnsTxtControllerDidOptions);
|
|
430
|
+
declare function verifyDidWebOwnership(params: VerifyDidWebOwnershipParams): Promise<SubjectOwnershipVerificationResult>;
|
|
431
|
+
declare function verifyDidPkhOwnership(params: VerifyDidPkhOwnershipParams): Promise<SubjectOwnershipVerificationResult>;
|
|
432
|
+
declare function verifySubjectOwnership(params: VerifySubjectOwnershipParams): Promise<SubjectOwnershipVerificationResult>;
|
|
433
|
+
|
|
434
|
+
export { createEvidencePointerProof as $, type AttestationQueryResult as A, type BuildDelegatedTypedDataFromEncodedParams as B, type CallControllerWitnessParams as C, type Did as D, type EvidencePointerProof as E, type VerifyProofParams as F, type GetAttestationParams as G, type Hex as H, type VerifyProofResult as I, type VerifySubjectOwnershipParams as J, type X402ReceiptProof as K, type ListAttestationsParams as L, buildDelegatedAttestationTypedData as M, buildDelegatedTypedDataFromEncoded as N, buildDnsTxtRecord as O, type PopEip712Proof as P, buildEip712Domain as Q, type RevokeAttestationParams as R, type SchemaField as S, type TxEncodedValueProof as T, calculateAverageUserReviewRating as U, type VerifyAttestationParams as V, calculateTransferAmount as W, type X402OfferProof as X, calculateTransferAmountFromAddresses as Y, callControllerWitness as Z, constructSeed as _, type AttestationValidationError as a, createPopEip712Proof as a0, createPopJwsProof as a1, createTxEncodedValueProof as a2, createTxInteractionProof as a3, createX402OfferProof as a4, createX402ReceiptProof as a5, decodeAttestationData as a6, deduplicateReviews as a7, encodeAttestationData as a8, extractAddressesFromDidDocument as a9, validateAttestationData as aA, verifyAttestation as aB, verifyDidDocumentControllerDid as aC, verifyDidJsonControllerDid as aD, verifyDidPkhOwnership as aE, verifyDidWebOwnership as aF, verifyEip712Signature as aG, verifyProof as aH, verifySchemaExists as aI, verifySubjectOwnership as aJ, extractExpirationTime as aa, fetchDidDocument as ab, formatSchemaUid as ac, formatTransferAmount as ad, getAttestation as ae, getAttestationsByAttester as af, getAttestationsForDid as ag, getChainConstants as ah, getExplorerAddressUrl as ai, getExplorerTxUrl as aj, getLatestAttestations as ak, getMajorVersion as al, getOmaTrustProofEip712Types as am, getSchemaDetails as an, getSupportedChainIds as ao, hashSeed as ap, isChainSupported as aq, listAttestations as ar, normalizeSchema as as, parseDnsTxtRecord as at, prepareDelegatedAttestation as au, revokeAttestation as av, schemaToString as aw, splitSignature as ax, submitAttestation as ay, submitDelegatedAttestation as az, type CallControllerWitnessResult as b, type ChainConstants as c, type CreatePopEip712ProofParams as d, type CreatePopJwsProofParams as e, type EvmOwnershipProvider as f, type GetAttestationsByAttesterParams as g, type GetLatestAttestationsParams as h, type PopJwsProof as i, type PrepareDelegatedAttestationParams as j, type PrepareDelegatedAttestationResult as k, type ProofPurpose as l, type ProofType as m, type ProofWrapper as n, type RevokeAttestationResult as o, type SubjectOwnershipVerificationMethod as p, type SubjectOwnershipVerificationResult as q, type SubmitAttestationParams as r, type SubmitAttestationResult as s, type SubmitDelegatedAttestationParams as t, type SubmitDelegatedAttestationResult as u, type TxInteractionProof as v, type VerifyAttestationResult as w, type VerifyDidJsonControllerDidOptions as x, type VerifyDidPkhOwnershipParams as y, type VerifyDidWebOwnershipParams as z };
|