@cheqd/did-provider-cheqd 4.5.4 → 4.6.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/agent/ICheqd.d.ts +305 -89
- package/build/esm/agent/ICheqd.d.ts.map +1 -1
- package/build/esm/agent/ICheqd.js +1567 -87
- package/build/esm/agent/ICheqd.js.map +1 -1
- package/build/esm/did-manager/cheqd-did-provider.d.ts +16 -5
- package/build/esm/did-manager/cheqd-did-provider.d.ts.map +1 -1
- package/build/esm/did-manager/cheqd-did-provider.js +11 -3
- package/build/esm/did-manager/cheqd-did-provider.js.map +1 -1
- package/build/esm/dkg-threshold/lit-protocol/v6.d.ts.map +1 -1
- package/build/esm/dkg-threshold/lit-protocol/v6.js +63 -33
- package/build/esm/dkg-threshold/lit-protocol/v6.js.map +1 -1
- package/build/esm/utils/helpers.d.ts +28 -7
- package/build/esm/utils/helpers.d.ts.map +1 -1
- package/build/esm/utils/helpers.js +120 -29
- package/build/esm/utils/helpers.js.map +1 -1
- package/build/tsconfig.esm.tsbuildinfo +1 -1
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/agent/ICheqd.d.ts +305 -89
- package/build/types/agent/ICheqd.d.ts.map +1 -1
- package/build/types/did-manager/cheqd-did-provider.d.ts +16 -5
- package/build/types/did-manager/cheqd-did-provider.d.ts.map +1 -1
- package/build/types/dkg-threshold/lit-protocol/v6.d.ts.map +1 -1
- package/build/types/utils/helpers.d.ts +28 -7
- package/build/types/utils/helpers.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/agent/ICheqd.ts +2440 -379
- package/src/did-manager/cheqd-did-provider.ts +25 -10
- package/src/dkg-threshold/lit-protocol/v6.ts +65 -34
- package/src/utils/helpers.ts +172 -34
- package/tsconfig.json +2 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CheqdNetwork, DIDDocument, DidStdFee, ISignInputs, MethodSpecificIdAlgo, VerificationMethods } from '@cheqd/sdk';
|
|
2
2
|
import { Coin, DeliverTxResponse } from '@cosmjs/stargate';
|
|
3
|
-
import { IAgentContext, IKeyManager, IAgentPlugin, IPluginMethodMap, IAgentPluginSchema, IIdentifier, VerifiableCredential, IVerifyCredentialArgs, IVerifyResult, VerifiablePresentation, IVerifyPresentationArgs, IError, ICreateVerifiableCredentialArgs, ICredentialIssuer, IDIDManager, IDataStore, IResolver, W3CVerifiableCredential, ICredentialVerifier } from '@veramo/core';
|
|
4
|
-
import { CheqdDIDProvider, LinkedResource, TImportableEd25519Key, ResourcePayload, StatusList2021ResourcePayload, DefaultStatusList2021ResourceTypes, DefaultStatusList2021StatusPurposeTypes,
|
|
3
|
+
import { IAgentContext, IKeyManager, IAgentPlugin, IPluginMethodMap, IAgentPluginSchema, IIdentifier, VerifiableCredential, IVerifyCredentialArgs, IVerifyResult, VerifiablePresentation, IVerifyPresentationArgs, IError, ICreateVerifiableCredentialArgs, ICredentialIssuer, IDIDManager, IDataStore, IResolver, W3CVerifiableCredential, ICredentialVerifier, CredentialStatusReference } from '@veramo/core';
|
|
4
|
+
import { CheqdDIDProvider, LinkedResource, TImportableEd25519Key, ResourcePayload, StatusList2021ResourcePayload, DefaultStatusListEncodings, DefaultStatusList2021ResourceTypes, DefaultStatusList2021StatusPurposeTypes, DefaultStatusListEncoding, DefaultStatusList2021StatusPurposeType, TPublicKeyEd25519, BitstringStatusListResourceType, BitstringStatusListPurposeType, BitstringStatusListResourcePayload } from '../did-manager/cheqd-did-provider.js';
|
|
5
|
+
import { Bitstring as DBBitstring } from '@digitalbazaar/bitstring';
|
|
5
6
|
import { CosmosAccessControlCondition, CreateCapacityDelegationAuthSignatureResult, LitCompatibleCosmosChain, LitNetwork, MintCapacityCreditsResult } from '../dkg-threshold/lit-protocol/v6.js';
|
|
6
7
|
import { AlternativeUri } from '@cheqd/ts-proto/cheqd/resource/v2/resource.js';
|
|
7
8
|
export type IContext = IAgentContext<IDIDManager & IKeyManager & IDataStore & IResolver & ICredentialIssuer & ICredentialVerifier & ICheqd>;
|
|
@@ -160,6 +161,13 @@ export type VerificationResult = {
|
|
|
160
161
|
suspended?: boolean;
|
|
161
162
|
error?: IVerifyResult['error'];
|
|
162
163
|
};
|
|
164
|
+
export interface BitstringValidationResult {
|
|
165
|
+
status: number;
|
|
166
|
+
purpose: string;
|
|
167
|
+
valid: boolean;
|
|
168
|
+
message?: string;
|
|
169
|
+
}
|
|
170
|
+
export type BitstringVerificationResult = VerificationResult & BitstringValidationResult;
|
|
163
171
|
export type EncryptionResult = {
|
|
164
172
|
symmetricEncryptionCiphertext: string;
|
|
165
173
|
thresholdEncryptionCiphertext: string;
|
|
@@ -171,6 +179,28 @@ export type StatusCheckResult = {
|
|
|
171
179
|
suspended?: boolean;
|
|
172
180
|
error?: IError;
|
|
173
181
|
};
|
|
182
|
+
export type BitstringUpdateResult = {
|
|
183
|
+
updated: boolean;
|
|
184
|
+
statusValue: BitstringStatusValue;
|
|
185
|
+
previousStatusValue?: BitstringStatusValue;
|
|
186
|
+
statusMessage?: string;
|
|
187
|
+
error?: IError;
|
|
188
|
+
statusList?: BitstringStatusList;
|
|
189
|
+
symmetricKey?: string;
|
|
190
|
+
published?: boolean;
|
|
191
|
+
resourceMetadata?: LinkedResourceMetadataResolutionResult;
|
|
192
|
+
};
|
|
193
|
+
export type BulkBitstringUpdateResult = {
|
|
194
|
+
updated: boolean[];
|
|
195
|
+
statusValues: BitstringStatusValue[];
|
|
196
|
+
previousStatusValues?: BitstringStatusValue[];
|
|
197
|
+
statusMessages?: string[];
|
|
198
|
+
error?: IError;
|
|
199
|
+
statusList?: BitstringStatusList;
|
|
200
|
+
symmetricKey?: string;
|
|
201
|
+
published?: boolean;
|
|
202
|
+
resourceMetadata?: LinkedResourceMetadataResolutionResult;
|
|
203
|
+
};
|
|
174
204
|
export type RevocationResult = {
|
|
175
205
|
revoked: boolean;
|
|
176
206
|
error?: IError;
|
|
@@ -234,7 +264,7 @@ export type StatusList2021Revocation = {
|
|
|
234
264
|
metadata: {
|
|
235
265
|
type: typeof DefaultStatusList2021ResourceTypes.revocation;
|
|
236
266
|
encrypted: boolean;
|
|
237
|
-
encoding:
|
|
267
|
+
encoding: DefaultStatusListEncoding;
|
|
238
268
|
statusListHash?: string;
|
|
239
269
|
paymentConditions?: PaymentCondition[];
|
|
240
270
|
};
|
|
@@ -249,7 +279,7 @@ export type StatusList2021Suspension = {
|
|
|
249
279
|
metadata: {
|
|
250
280
|
type: typeof DefaultStatusList2021ResourceTypes.suspension;
|
|
251
281
|
encrypted: boolean;
|
|
252
|
-
encoding:
|
|
282
|
+
encoding: DefaultStatusListEncoding;
|
|
253
283
|
statusListHash?: string;
|
|
254
284
|
paymentConditions?: PaymentCondition[];
|
|
255
285
|
};
|
|
@@ -264,7 +294,7 @@ export type StatusList2021RevocationNonMigrated = {
|
|
|
264
294
|
metadata: {
|
|
265
295
|
type: typeof DefaultStatusList2021ResourceTypes.revocation;
|
|
266
296
|
encrypted: boolean;
|
|
267
|
-
encoding:
|
|
297
|
+
encoding: DefaultStatusListEncoding;
|
|
268
298
|
encryptedSymmetricKey?: string;
|
|
269
299
|
paymentConditions?: PaymentCondition[];
|
|
270
300
|
};
|
|
@@ -279,11 +309,51 @@ export type StatusList2021SuspensionNonMigrated = {
|
|
|
279
309
|
metadata: {
|
|
280
310
|
type: typeof DefaultStatusList2021ResourceTypes.suspension;
|
|
281
311
|
encrypted: boolean;
|
|
282
|
-
encoding:
|
|
312
|
+
encoding: DefaultStatusListEncoding;
|
|
283
313
|
encryptedSymmetricKey?: string;
|
|
284
314
|
paymentConditions?: PaymentCondition[];
|
|
285
315
|
};
|
|
286
316
|
};
|
|
317
|
+
export interface BitstringStatusListEntry extends CredentialStatusReference {
|
|
318
|
+
id: string;
|
|
319
|
+
type: 'BitstringStatusListEntry';
|
|
320
|
+
statusPurpose: BitstringStatusListPurposeType;
|
|
321
|
+
statusListIndex: string;
|
|
322
|
+
statusListCredential: string;
|
|
323
|
+
statusSize?: number | 1;
|
|
324
|
+
statusMessage?: BitstringStatusMessage[];
|
|
325
|
+
statusReference?: string | string[];
|
|
326
|
+
}
|
|
327
|
+
export interface BitstringStatusMessage {
|
|
328
|
+
status: string;
|
|
329
|
+
message: string;
|
|
330
|
+
[key: string]: any;
|
|
331
|
+
}
|
|
332
|
+
export interface EncodedListMetadata {
|
|
333
|
+
encrypted: boolean;
|
|
334
|
+
encoding: DefaultStatusListEncoding;
|
|
335
|
+
length: number;
|
|
336
|
+
statusSize?: number;
|
|
337
|
+
statusMessages?: BitstringStatusMessage[];
|
|
338
|
+
statusListHash?: string;
|
|
339
|
+
symmetricLength?: number;
|
|
340
|
+
paymentConditions?: PaymentCondition[];
|
|
341
|
+
}
|
|
342
|
+
export type BitstringVerifiableCredential = VerifiableCredential & {
|
|
343
|
+
credentialStatus: BitstringStatusListEntry;
|
|
344
|
+
};
|
|
345
|
+
export type BitstringStatusListCredential = VerifiableCredential & {
|
|
346
|
+
credentialSubject: {
|
|
347
|
+
type: string;
|
|
348
|
+
statusPurpose: BitstringStatusListPurposeType;
|
|
349
|
+
encodedList: EncodedList;
|
|
350
|
+
ttl?: number;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
export interface BitstringStatusList {
|
|
354
|
+
bitstringStatusListCredential: BitstringStatusListCredential;
|
|
355
|
+
metadata: EncodedListMetadata;
|
|
356
|
+
}
|
|
287
357
|
export type AccessControlConditionType = (typeof AccessControlConditionTypes)[keyof typeof AccessControlConditionTypes];
|
|
288
358
|
export type AccessControlConditionReturnValueComparator = (typeof AccessControlConditionReturnValueComparators)[keyof typeof AccessControlConditionReturnValueComparators];
|
|
289
359
|
export type PaymentCondition = {
|
|
@@ -305,6 +375,14 @@ export type CreateStatusList2021Result = {
|
|
|
305
375
|
encrypted?: boolean;
|
|
306
376
|
symmetricKey?: string;
|
|
307
377
|
};
|
|
378
|
+
export type CreateStatusListResult = {
|
|
379
|
+
created: boolean;
|
|
380
|
+
error?: Error;
|
|
381
|
+
resource: BitstringStatusList;
|
|
382
|
+
resourceMetadata: LinkedResourceMetadataResolutionResult;
|
|
383
|
+
encrypted?: boolean;
|
|
384
|
+
symmetricKey?: string;
|
|
385
|
+
};
|
|
308
386
|
export type TransactionResult = {
|
|
309
387
|
successful: boolean;
|
|
310
388
|
transactionHash?: string;
|
|
@@ -356,6 +434,15 @@ export declare const GenerateVersionIdMethodName = "cheqdGenerateVersionId";
|
|
|
356
434
|
export declare const GenerateStatusList2021MethodName = "cheqdGenerateStatusList2021";
|
|
357
435
|
export declare const IssueRevocableCredentialWithStatusList2021MethodName = "cheqdIssueRevocableCredentialWithStatusList2021";
|
|
358
436
|
export declare const IssueSuspendableCredentialWithStatusList2021MethodName = "cheqdIssueSuspendableCredentialWithStatusList2021";
|
|
437
|
+
export declare const CreateStatusListMethodName = "cheqdCreateStatusList";
|
|
438
|
+
export declare const BroadcastStatusListMethodName = "cheqdBroadcastStatusList";
|
|
439
|
+
export declare const GenerateStatusListMethodName = "cheqdGenerateStatusList";
|
|
440
|
+
export declare const VerifyStatusListCredentialMethodName = "cheqdVerifyStatusListCredential";
|
|
441
|
+
export declare const IssueCredentialWithStatusListMethodName = "cheqdIssueCredentialWithStatusList";
|
|
442
|
+
export declare const VerifyCredentialWithStatusListMethodName = "cheqdVerifyCredentialWithStatusList";
|
|
443
|
+
export declare const UpdateCredentialWithStatusListMethodName = "cheqdUpdateCredentialWithStatusList";
|
|
444
|
+
export declare const BulkUpdateCredentialsWithStatusListMethodName = "cheqdBulkUpdateCredentialsWithStatusList";
|
|
445
|
+
export declare const VerifyPresentationWithStatusListMethodName = "cheqdVerifyPresentationWithStatusList";
|
|
359
446
|
export declare const VerifyCredentialMethodName = "cheqdVerifyCredential";
|
|
360
447
|
export declare const VerifyPresentationMethodName = "cheqdVerifyPresentation";
|
|
361
448
|
export declare const CheckCredentialStatusMethodName = "cheqdCheckCredentialStatus";
|
|
@@ -377,20 +464,20 @@ export interface ICheqdCreateIdentifierArgs {
|
|
|
377
464
|
document: DIDDocument;
|
|
378
465
|
keys?: TImportableEd25519Key[];
|
|
379
466
|
versionId?: string;
|
|
380
|
-
fee?: DidStdFee;
|
|
467
|
+
fee?: DidStdFee | 'auto' | number;
|
|
381
468
|
}
|
|
382
469
|
export interface ICheqdUpdateIdentifierArgs {
|
|
383
470
|
kms: string;
|
|
384
471
|
document: DIDDocument;
|
|
385
472
|
keys?: TImportableEd25519Key[] | TPublicKeyEd25519[];
|
|
386
473
|
versionId?: string;
|
|
387
|
-
fee?: DidStdFee;
|
|
474
|
+
fee?: DidStdFee | 'auto' | number;
|
|
388
475
|
}
|
|
389
476
|
export interface ICheqdDeactivateIdentifierArgs {
|
|
390
477
|
kms: string;
|
|
391
478
|
document: DIDDocument;
|
|
392
479
|
keys?: TImportableEd25519Key[] | TPublicKeyEd25519[];
|
|
393
|
-
fee?: DidStdFee;
|
|
480
|
+
fee?: DidStdFee | 'auto' | number;
|
|
394
481
|
}
|
|
395
482
|
export interface ICheqdCreateLinkedResourceArgs {
|
|
396
483
|
kms: string;
|
|
@@ -398,7 +485,7 @@ export interface ICheqdCreateLinkedResourceArgs {
|
|
|
398
485
|
network: CheqdNetwork;
|
|
399
486
|
file?: string;
|
|
400
487
|
signInputs?: ISignInputs[] | TPublicKeyEd25519[];
|
|
401
|
-
fee?: DidStdFee;
|
|
488
|
+
fee?: DidStdFee | 'auto' | number;
|
|
402
489
|
}
|
|
403
490
|
export interface ICheqdCreateStatusList2021Args {
|
|
404
491
|
kms: string;
|
|
@@ -411,7 +498,7 @@ export interface ICheqdCreateStatusList2021Args {
|
|
|
411
498
|
resourceVersion?: ResourcePayload['version'];
|
|
412
499
|
alsoKnownAs?: ResourcePayload['alsoKnownAs'];
|
|
413
500
|
statusListLength?: number;
|
|
414
|
-
statusListEncoding?:
|
|
501
|
+
statusListEncoding?: DefaultStatusListEncoding;
|
|
415
502
|
validUntil?: string;
|
|
416
503
|
returnSymmetricKey?: boolean;
|
|
417
504
|
}
|
|
@@ -421,15 +508,33 @@ export interface ICheqdCreateUnencryptedStatusList2021Args {
|
|
|
421
508
|
network: CheqdNetwork;
|
|
422
509
|
file?: string;
|
|
423
510
|
signInputs?: ISignInputs[];
|
|
424
|
-
fee?: DidStdFee;
|
|
511
|
+
fee?: DidStdFee | 'auto' | number;
|
|
425
512
|
}
|
|
426
|
-
export interface
|
|
513
|
+
export interface ICheqdBroadcastStatusListArgs {
|
|
427
514
|
kms: string;
|
|
428
|
-
payload: StatusList2021ResourcePayload;
|
|
515
|
+
payload: StatusList2021ResourcePayload | BitstringStatusListResourcePayload;
|
|
429
516
|
network: CheqdNetwork;
|
|
430
517
|
file?: string;
|
|
431
518
|
signInputs?: ISignInputs[];
|
|
432
|
-
fee?: DidStdFee;
|
|
519
|
+
fee?: DidStdFee | 'auto' | number;
|
|
520
|
+
}
|
|
521
|
+
export interface ICheqdCreateBitstringStatusListArgs {
|
|
522
|
+
kms: string;
|
|
523
|
+
issuerDid: string;
|
|
524
|
+
statusListName: string;
|
|
525
|
+
statusPurpose: BitstringStatusListPurposeType | BitstringStatusListPurposeType[];
|
|
526
|
+
statusSize?: number;
|
|
527
|
+
statusMessages?: BitstringStatusMessage[];
|
|
528
|
+
ttl?: number;
|
|
529
|
+
encrypted: boolean;
|
|
530
|
+
paymentConditions?: PaymentCondition[];
|
|
531
|
+
dkgOptions?: DkgOptions;
|
|
532
|
+
resourceVersion?: ResourcePayload['version'];
|
|
533
|
+
alsoKnownAs?: ResourcePayload['alsoKnownAs'];
|
|
534
|
+
statusListLength?: number;
|
|
535
|
+
statusListEncoding?: DefaultStatusListEncoding;
|
|
536
|
+
validUntil?: string;
|
|
537
|
+
returnSymmetricKey?: boolean;
|
|
433
538
|
}
|
|
434
539
|
export interface ICheqdGenerateDidDocArgs {
|
|
435
540
|
verificationMethod: VerificationMethods;
|
|
@@ -448,7 +553,30 @@ export interface ICheqdGenerateVersionIdArgs {
|
|
|
448
553
|
export interface ICheqdGenerateStatusList2021Args {
|
|
449
554
|
length?: number;
|
|
450
555
|
buffer?: Uint8Array;
|
|
451
|
-
bitstringEncoding?:
|
|
556
|
+
bitstringEncoding?: DefaultStatusListEncoding;
|
|
557
|
+
}
|
|
558
|
+
export interface ICheqdGenerateStatusListArgs {
|
|
559
|
+
length?: number;
|
|
560
|
+
statusSize?: number;
|
|
561
|
+
buffer?: Buffer;
|
|
562
|
+
bitstringEncoding?: DefaultStatusListEncoding;
|
|
563
|
+
}
|
|
564
|
+
export interface ICheqdVerifyStatusListCredentialArgs {
|
|
565
|
+
credential: BitstringStatusListCredential;
|
|
566
|
+
verificationArgs?: IVerifyCredentialArgs;
|
|
567
|
+
}
|
|
568
|
+
export interface StatusOptions {
|
|
569
|
+
statusPurpose: BitstringStatusListPurposeType;
|
|
570
|
+
statusListName: string;
|
|
571
|
+
statusListIndex?: number;
|
|
572
|
+
statusListVersion?: string;
|
|
573
|
+
statusListRangeStart?: number;
|
|
574
|
+
statusListRangeEnd?: number;
|
|
575
|
+
indexNotIn?: number[];
|
|
576
|
+
}
|
|
577
|
+
export interface ICheqdIssueCredentialWithStatusListArgs {
|
|
578
|
+
issuanceOptions: ICreateVerifiableCredentialArgs;
|
|
579
|
+
statusOptions: StatusOptions;
|
|
452
580
|
}
|
|
453
581
|
export interface ICheqdIssueRevocableCredentialWithStatusList2021Args {
|
|
454
582
|
issuanceOptions: ICreateVerifiableCredentialArgs;
|
|
@@ -474,31 +602,39 @@ export interface ICheqdIssueSuspendableCredentialWithStatusList2021Args {
|
|
|
474
602
|
indexNotIn?: number[];
|
|
475
603
|
};
|
|
476
604
|
}
|
|
477
|
-
export interface
|
|
605
|
+
export interface ICheqdVerifyCredentialWithStatusListArgs {
|
|
478
606
|
credential: W3CVerifiableCredential;
|
|
479
607
|
verificationArgs?: IVerifyCredentialArgs;
|
|
480
608
|
fetchList?: boolean;
|
|
481
609
|
dkgOptions?: DkgOptions;
|
|
482
|
-
options?:
|
|
610
|
+
options?: ICheqdStatusListOptions;
|
|
611
|
+
}
|
|
612
|
+
export interface ICheqdVerifyCredentialWithBitstringArgs {
|
|
613
|
+
credential: BitstringVerifiableCredential;
|
|
614
|
+
verificationArgs?: IVerifyCredentialArgs;
|
|
615
|
+
fetchList?: boolean;
|
|
616
|
+
dkgOptions?: DkgOptions;
|
|
617
|
+
options?: ICheqdStatusListOptions;
|
|
483
618
|
}
|
|
484
|
-
export interface
|
|
619
|
+
export interface ICheqdVerifyPresentationWithStatusListArgs {
|
|
485
620
|
presentation: VerifiablePresentation;
|
|
486
621
|
verificationArgs?: IVerifyPresentationArgs;
|
|
487
622
|
fetchList?: boolean;
|
|
488
623
|
dkgOptions?: DkgOptions;
|
|
489
|
-
options?:
|
|
624
|
+
options?: ICheqdStatusListOptions;
|
|
490
625
|
}
|
|
491
|
-
export interface
|
|
626
|
+
export interface ICheqdCheckCredentialStatusWithStatusListArgs {
|
|
492
627
|
credential?: W3CVerifiableCredential;
|
|
493
|
-
statusOptions?:
|
|
628
|
+
statusOptions?: ICheqdCheckCredentialStatusOptions;
|
|
494
629
|
verificationOptions?: IVerifyCredentialArgs;
|
|
495
630
|
fetchList?: boolean;
|
|
496
631
|
dkgOptions?: DkgOptions;
|
|
497
|
-
options?:
|
|
632
|
+
options?: ICheqdStatusListOptions;
|
|
498
633
|
}
|
|
499
|
-
export interface
|
|
634
|
+
export interface ICheqdUpdateCredentialWithStatusListArgs {
|
|
500
635
|
credential?: W3CVerifiableCredential;
|
|
501
|
-
|
|
636
|
+
newStatus: BitstringStatusValue;
|
|
637
|
+
updateOptions?: ICheqdCredentialStatusUpdateOptions;
|
|
502
638
|
verificationOptions?: IVerifyCredentialArgs;
|
|
503
639
|
fetchList?: boolean;
|
|
504
640
|
publish?: boolean;
|
|
@@ -510,11 +646,13 @@ export interface ICheqdRevokeCredentialWithStatusList2021Args {
|
|
|
510
646
|
returnSymmetricKey?: boolean;
|
|
511
647
|
returnStatusListMetadata?: boolean;
|
|
512
648
|
dkgOptions?: DkgOptions;
|
|
513
|
-
options?:
|
|
649
|
+
options?: ICheqdStatusListOptions;
|
|
650
|
+
fee?: DidStdFee | 'auto' | number;
|
|
514
651
|
}
|
|
515
|
-
export interface
|
|
652
|
+
export interface ICheqdBulkUpdateCredentialWithStatusListArgs {
|
|
516
653
|
credentials?: W3CVerifiableCredential[];
|
|
517
|
-
|
|
654
|
+
newStatus: BitstringStatusValue;
|
|
655
|
+
updateOptions?: ICheqdBulkCredentialStatusUpdateOptions;
|
|
518
656
|
verificationOptions?: IVerifyCredentialArgs;
|
|
519
657
|
fetchList?: boolean;
|
|
520
658
|
publish?: boolean;
|
|
@@ -526,11 +664,12 @@ export interface ICheqdRevokeBulkCredentialsWithStatusList2021Args {
|
|
|
526
664
|
returnSymmetricKey?: boolean;
|
|
527
665
|
returnStatusListMetadata?: boolean;
|
|
528
666
|
dkgOptions?: DkgOptions;
|
|
529
|
-
options?:
|
|
667
|
+
options?: ICheqdStatusListOptions;
|
|
668
|
+
fee?: DidStdFee | 'auto' | number;
|
|
530
669
|
}
|
|
531
|
-
export interface
|
|
670
|
+
export interface ICheqdRevokeCredentialWithStatusListArgs {
|
|
532
671
|
credential?: W3CVerifiableCredential;
|
|
533
|
-
|
|
672
|
+
revocationOptions?: ICheqdCredentialStatusUpdateOptions;
|
|
534
673
|
verificationOptions?: IVerifyCredentialArgs;
|
|
535
674
|
fetchList?: boolean;
|
|
536
675
|
publish?: boolean;
|
|
@@ -542,11 +681,11 @@ export interface ICheqdSuspendCredentialWithStatusList2021Args {
|
|
|
542
681
|
returnSymmetricKey?: boolean;
|
|
543
682
|
returnStatusListMetadata?: boolean;
|
|
544
683
|
dkgOptions?: DkgOptions;
|
|
545
|
-
options?:
|
|
684
|
+
options?: ICheqdStatusListOptions;
|
|
546
685
|
}
|
|
547
|
-
export interface
|
|
686
|
+
export interface ICheqdRevokeBulkCredentialsWithStatusListArgs {
|
|
548
687
|
credentials?: W3CVerifiableCredential[];
|
|
549
|
-
|
|
688
|
+
revocationOptions?: ICheqdBulkCredentialStatusUpdateOptions;
|
|
550
689
|
verificationOptions?: IVerifyCredentialArgs;
|
|
551
690
|
fetchList?: boolean;
|
|
552
691
|
publish?: boolean;
|
|
@@ -558,11 +697,12 @@ export interface ICheqdSuspendBulkCredentialsWithStatusList2021Args {
|
|
|
558
697
|
returnSymmetricKey?: boolean;
|
|
559
698
|
returnStatusListMetadata?: boolean;
|
|
560
699
|
dkgOptions?: DkgOptions;
|
|
561
|
-
options?:
|
|
700
|
+
options?: ICheqdStatusListOptions;
|
|
701
|
+
fee?: DidStdFee | 'auto' | number;
|
|
562
702
|
}
|
|
563
|
-
export interface
|
|
703
|
+
export interface ICheqdSuspendCredentialWithStatusListArgs {
|
|
564
704
|
credential?: W3CVerifiableCredential;
|
|
565
|
-
|
|
705
|
+
suspensionOptions?: ICheqdCredentialStatusUpdateOptions;
|
|
566
706
|
verificationOptions?: IVerifyCredentialArgs;
|
|
567
707
|
fetchList?: boolean;
|
|
568
708
|
publish?: boolean;
|
|
@@ -574,11 +714,12 @@ export interface ICheqdUnsuspendCredentialWithStatusList2021Args {
|
|
|
574
714
|
returnSymmetricKey?: boolean;
|
|
575
715
|
returnStatusListMetadata?: boolean;
|
|
576
716
|
dkgOptions?: DkgOptions;
|
|
577
|
-
options?:
|
|
717
|
+
options?: ICheqdStatusListOptions;
|
|
718
|
+
fee?: DidStdFee | 'auto' | number;
|
|
578
719
|
}
|
|
579
|
-
export interface
|
|
720
|
+
export interface ICheqdSuspendBulkCredentialsWithStatusListArgs {
|
|
580
721
|
credentials?: W3CVerifiableCredential[];
|
|
581
|
-
|
|
722
|
+
suspensionOptions?: ICheqdBulkCredentialStatusUpdateOptions;
|
|
582
723
|
verificationOptions?: IVerifyCredentialArgs;
|
|
583
724
|
fetchList?: boolean;
|
|
584
725
|
publish?: boolean;
|
|
@@ -590,7 +731,42 @@ export interface ICheqdUnsuspendBulkCredentialsWithStatusList2021Args {
|
|
|
590
731
|
returnSymmetricKey?: boolean;
|
|
591
732
|
returnStatusListMetadata?: boolean;
|
|
592
733
|
dkgOptions?: DkgOptions;
|
|
593
|
-
options?:
|
|
734
|
+
options?: ICheqdStatusListOptions;
|
|
735
|
+
fee?: DidStdFee | 'auto' | number;
|
|
736
|
+
}
|
|
737
|
+
export interface ICheqdUnsuspendCredentialWithStatusListArgs {
|
|
738
|
+
credential?: W3CVerifiableCredential;
|
|
739
|
+
unsuspensionOptions?: ICheqdCredentialStatusUpdateOptions;
|
|
740
|
+
verificationOptions?: IVerifyCredentialArgs;
|
|
741
|
+
fetchList?: boolean;
|
|
742
|
+
publish?: boolean;
|
|
743
|
+
publishEncrypted?: boolean;
|
|
744
|
+
symmetricKey?: string;
|
|
745
|
+
paymentConditions?: PaymentCondition[];
|
|
746
|
+
writeToFile?: boolean;
|
|
747
|
+
returnUpdatedStatusList?: boolean;
|
|
748
|
+
returnSymmetricKey?: boolean;
|
|
749
|
+
returnStatusListMetadata?: boolean;
|
|
750
|
+
dkgOptions?: DkgOptions;
|
|
751
|
+
options?: ICheqdStatusListOptions;
|
|
752
|
+
fee?: DidStdFee | 'auto' | number;
|
|
753
|
+
}
|
|
754
|
+
export interface ICheqdUnsuspendBulkCredentialsWithStatusListArgs {
|
|
755
|
+
credentials?: W3CVerifiableCredential[];
|
|
756
|
+
unsuspensionOptions?: ICheqdBulkCredentialStatusUpdateOptions;
|
|
757
|
+
verificationOptions?: IVerifyCredentialArgs;
|
|
758
|
+
fetchList?: boolean;
|
|
759
|
+
publish?: boolean;
|
|
760
|
+
publishEncrypted?: boolean;
|
|
761
|
+
symmetricKey?: string;
|
|
762
|
+
paymentConditions?: PaymentCondition[];
|
|
763
|
+
writeToFile?: boolean;
|
|
764
|
+
returnUpdatedStatusList?: boolean;
|
|
765
|
+
returnSymmetricKey?: boolean;
|
|
766
|
+
returnStatusListMetadata?: boolean;
|
|
767
|
+
dkgOptions?: DkgOptions;
|
|
768
|
+
options?: ICheqdStatusListOptions;
|
|
769
|
+
fee?: DidStdFee | 'auto' | number;
|
|
594
770
|
}
|
|
595
771
|
export interface ICheqdTransactSendTokensArgs {
|
|
596
772
|
recipientAddress: string;
|
|
@@ -625,52 +801,36 @@ export interface ICheqdDelegateCapacityCreditArgs {
|
|
|
625
801
|
expiration?: string;
|
|
626
802
|
statement?: string;
|
|
627
803
|
}
|
|
628
|
-
export interface
|
|
804
|
+
export interface ICheqdStatusListOptions {
|
|
629
805
|
statusListFile?: string;
|
|
630
806
|
statusListInlineBitstring?: string;
|
|
807
|
+
fee?: DidStdFee | 'auto' | number;
|
|
808
|
+
signInputs?: ISignInputs[];
|
|
631
809
|
[key: string]: any;
|
|
632
810
|
}
|
|
633
|
-
export interface
|
|
811
|
+
export interface ICheqdCredentialStatusUpdateOptions {
|
|
634
812
|
issuerDid: string;
|
|
635
813
|
statusListName: string;
|
|
636
814
|
statusListIndex: number;
|
|
637
815
|
statusListVersion?: string;
|
|
638
816
|
}
|
|
639
|
-
export interface
|
|
817
|
+
export interface ICheqdBulkCredentialStatusUpdateOptions {
|
|
640
818
|
issuerDid: string;
|
|
641
819
|
statusListName: string;
|
|
642
820
|
statusListIndices: number[];
|
|
643
821
|
statusListVersion?: string;
|
|
644
822
|
}
|
|
645
|
-
export
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
export interface ICheqdSuspendBulkCredentialsWithStatusList2021Options {
|
|
652
|
-
issuerDid: string;
|
|
653
|
-
statusListName: string;
|
|
654
|
-
statusListIndices: number[];
|
|
655
|
-
statusListVersion?: string;
|
|
656
|
-
}
|
|
657
|
-
export interface ICheqdUnsuspendCredentialWithStatusList2021Options {
|
|
658
|
-
issuerDid: string;
|
|
659
|
-
statusListName: string;
|
|
660
|
-
statusListIndex: number;
|
|
661
|
-
statusListVersion?: string;
|
|
823
|
+
export declare enum BitstringStatusValue {
|
|
824
|
+
VALID = 0,// 0x0 - valid
|
|
825
|
+
REVOKED = 1,// 0x1 - revoked
|
|
826
|
+
SUSPENDED = 2,// 0x2 - suspended
|
|
827
|
+
UNKNOWN = 3
|
|
662
828
|
}
|
|
663
|
-
export interface
|
|
664
|
-
issuerDid: string;
|
|
665
|
-
statusListName: string;
|
|
666
|
-
statusListIndices: number[];
|
|
667
|
-
statusListVersion?: string;
|
|
668
|
-
}
|
|
669
|
-
export interface ICheqdCheckCredentialWithStatusList2021StatusOptions {
|
|
829
|
+
export interface ICheqdCheckCredentialStatusOptions {
|
|
670
830
|
issuerDid: string;
|
|
671
831
|
statusListName: string;
|
|
672
832
|
statusListIndex: number;
|
|
673
|
-
statusPurpose: DefaultStatusList2021StatusPurposeType;
|
|
833
|
+
statusPurpose: DefaultStatusList2021StatusPurposeType | BitstringStatusListPurposeType;
|
|
674
834
|
statusListVersion?: string;
|
|
675
835
|
}
|
|
676
836
|
export interface ICheqd extends IPluginMethodMap {
|
|
@@ -679,23 +839,32 @@ export interface ICheqd extends IPluginMethodMap {
|
|
|
679
839
|
[DeactivateIdentifierMethodName]: (args: ICheqdDeactivateIdentifierArgs, context: IContext) => Promise<boolean>;
|
|
680
840
|
[CreateResourceMethodName]: (args: ICheqdCreateLinkedResourceArgs, context: IContext) => Promise<boolean>;
|
|
681
841
|
[CreateStatusList2021MethodName]: (args: ICheqdCreateStatusList2021Args, context: IContext) => Promise<CreateStatusList2021Result>;
|
|
682
|
-
[BroadcastStatusList2021MethodName]: (args:
|
|
842
|
+
[BroadcastStatusList2021MethodName]: (args: ICheqdBroadcastStatusListArgs, context: IContext) => Promise<boolean>;
|
|
683
843
|
[GenerateDidDocMethodName]: (args: ICheqdGenerateDidDocArgs, context: IContext) => Promise<TExportedDIDDocWithKeys>;
|
|
684
844
|
[GenerateDidDocWithLinkedResourceMethodName]: (args: ICheqdGenerateDidDocWithLinkedResourceArgs, context: IContext) => Promise<TExportedDIDDocWithLinkedResourceWithKeys>;
|
|
685
845
|
[GenerateKeyPairMethodName]: (args: ICheqdGenerateKeyPairArgs, context: IContext) => Promise<TImportableEd25519Key>;
|
|
686
846
|
[GenerateVersionIdMethodName]: (args: ICheqdGenerateVersionIdArgs, context: IContext) => Promise<string>;
|
|
847
|
+
[CreateStatusListMethodName]: (args: ICheqdCreateBitstringStatusListArgs, context: IContext) => Promise<CreateStatusListResult>;
|
|
848
|
+
[BroadcastStatusListMethodName]: (args: ICheqdBroadcastStatusListArgs, context: IContext) => Promise<boolean>;
|
|
849
|
+
[GenerateStatusListMethodName]: (args: ICheqdGenerateStatusListArgs, context: IContext) => Promise<string>;
|
|
850
|
+
[VerifyStatusListCredentialMethodName]: (args: ICheqdVerifyStatusListCredentialArgs, context: IContext) => Promise<VerificationResult>;
|
|
851
|
+
[IssueCredentialWithStatusListMethodName]: (args: ICheqdIssueCredentialWithStatusListArgs, context: IContext) => Promise<BitstringVerifiableCredential>;
|
|
687
852
|
[GenerateStatusList2021MethodName]: (args: ICheqdGenerateStatusList2021Args, context: IContext) => Promise<string>;
|
|
688
853
|
[IssueRevocableCredentialWithStatusList2021MethodName]: (args: ICheqdIssueRevocableCredentialWithStatusList2021Args, context: IContext) => Promise<VerifiableCredential>;
|
|
689
854
|
[IssueSuspendableCredentialWithStatusList2021MethodName]: (args: ICheqdIssueSuspendableCredentialWithStatusList2021Args, context: IContext) => Promise<VerifiableCredential>;
|
|
690
|
-
[VerifyCredentialMethodName]: (args:
|
|
691
|
-
[
|
|
692
|
-
[
|
|
693
|
-
[
|
|
694
|
-
[
|
|
695
|
-
[
|
|
696
|
-
[
|
|
697
|
-
[
|
|
698
|
-
[
|
|
855
|
+
[VerifyCredentialMethodName]: (args: ICheqdVerifyCredentialWithStatusListArgs, context: IContext) => Promise<VerificationResult>;
|
|
856
|
+
[VerifyCredentialWithStatusListMethodName]: (args: ICheqdVerifyCredentialWithBitstringArgs, context: IContext) => Promise<VerificationResult>;
|
|
857
|
+
[VerifyPresentationMethodName]: (args: ICheqdVerifyPresentationWithStatusListArgs, context: IContext) => Promise<VerificationResult>;
|
|
858
|
+
[CheckCredentialStatusMethodName]: (args: ICheqdCheckCredentialStatusWithStatusListArgs, context: IContext) => Promise<StatusCheckResult>;
|
|
859
|
+
[VerifyPresentationWithStatusListMethodName]: (args: ICheqdVerifyPresentationWithStatusListArgs, context: IContext) => Promise<BitstringVerificationResult>;
|
|
860
|
+
[UpdateCredentialWithStatusListMethodName]: (args: ICheqdUpdateCredentialWithStatusListArgs, context: IContext) => Promise<BitstringUpdateResult>;
|
|
861
|
+
[BulkUpdateCredentialsWithStatusListMethodName]: (args: ICheqdBulkUpdateCredentialWithStatusListArgs, context: IContext) => Promise<BulkBitstringUpdateResult>;
|
|
862
|
+
[RevokeCredentialMethodName]: (args: ICheqdRevokeCredentialWithStatusListArgs, context: IContext) => Promise<RevocationResult>;
|
|
863
|
+
[RevokeCredentialsMethodName]: (args: ICheqdRevokeBulkCredentialsWithStatusListArgs, context: IContext) => Promise<BulkRevocationResult>;
|
|
864
|
+
[SuspendCredentialMethodName]: (args: ICheqdSuspendCredentialWithStatusListArgs, context: IContext) => Promise<SuspensionResult>;
|
|
865
|
+
[SuspendCredentialsMethodName]: (args: ICheqdSuspendBulkCredentialsWithStatusListArgs, context: IContext) => Promise<BulkSuspensionResult>;
|
|
866
|
+
[UnsuspendCredentialMethodName]: (args: ICheqdUnsuspendCredentialWithStatusListArgs, context: IContext) => Promise<UnsuspensionResult>;
|
|
867
|
+
[UnsuspendCredentialsMethodName]: (args: ICheqdUnsuspendBulkCredentialsWithStatusListArgs, context: IContext) => Promise<BulkUnsuspensionResult>;
|
|
699
868
|
[TransactSendTokensMethodName]: (args: ICheqdTransactSendTokensArgs, context: IContext) => Promise<TransactionResult>;
|
|
700
869
|
[ObservePaymentConditionMethodName]: (args: ICheqdObservePaymentConditionArgs, context: IContext) => Promise<ObservationResult>;
|
|
701
870
|
[MintCapacityCreditMethodName]: (args: ICheqdMintCapacityCreditArgs, context: IContext) => Promise<MintCapacityCreditResult>;
|
|
@@ -710,6 +879,12 @@ export declare class Cheqd implements IAgentPlugin {
|
|
|
710
879
|
static readonly defaultStatusList2021Length: number;
|
|
711
880
|
static readonly defaultContextV1 = "https://www.w3.org/2018/credentials/v1";
|
|
712
881
|
static readonly statusList2021Context = "https://w3id.org/vc-status-list-2021/v1";
|
|
882
|
+
static readonly DefaultBitstringContexts: {
|
|
883
|
+
v2: string;
|
|
884
|
+
statusList: string;
|
|
885
|
+
};
|
|
886
|
+
static readonly DefaultBitstringStatusSize: number;
|
|
887
|
+
static readonly DefaultBitstringLength: number;
|
|
713
888
|
constructor(args: {
|
|
714
889
|
providers: CheqdDIDProvider[];
|
|
715
890
|
});
|
|
@@ -719,17 +894,51 @@ export declare class Cheqd implements IAgentPlugin {
|
|
|
719
894
|
private CreateResource;
|
|
720
895
|
private CreateStatusList2021;
|
|
721
896
|
private BroadcastStatusList2021;
|
|
897
|
+
private CreateBitstringStatusList;
|
|
898
|
+
private BroadcastBitstringStatusList;
|
|
899
|
+
/**
|
|
900
|
+
* Validate Bitstring Status List payload structure and content
|
|
901
|
+
*/
|
|
902
|
+
private validateBitstringStatusListPayload;
|
|
903
|
+
/**
|
|
904
|
+
* Validate status messages for multi-bit status
|
|
905
|
+
*/
|
|
906
|
+
private validateStatusMessagesInPayload;
|
|
722
907
|
private GenerateDidDoc;
|
|
723
908
|
private GenerateDidDocWithLinkedResource;
|
|
724
909
|
private GenerateIdentityKeys;
|
|
725
910
|
private GenerateVersionId;
|
|
726
911
|
private GenerateStatusList2021;
|
|
912
|
+
private GenerateBitstringStatusList;
|
|
913
|
+
private VerifyStatusListCredential;
|
|
914
|
+
private IssueCredentialWithBitstringStatusList;
|
|
727
915
|
private IssueRevocableCredentialWithStatusList2021;
|
|
728
916
|
private IssueSuspendableCredentialWithStatusList2021;
|
|
917
|
+
private addStatusList2021Contexts;
|
|
918
|
+
private addBitstringStatusListContexts;
|
|
729
919
|
private VerifyCredentialWithStatusList2021;
|
|
920
|
+
private VerifyCredentialWithBitstringStatusList;
|
|
921
|
+
static validateBitstringStatus(vcToValidate: BitstringVerifiableCredential, publishedList: BitstringStatusList, options?: ICheqdStatusListOptions): Promise<BitstringValidationResult>;
|
|
922
|
+
private VerifyPresentationWithBitstringStatusList;
|
|
730
923
|
private VerifyPresentationWithStatusList2021;
|
|
731
924
|
private CheckCredentialStatusWithStatusList2021;
|
|
925
|
+
private UpdateCredentialWithStatusList;
|
|
926
|
+
private getStatusPurposeForMultiPurposeList;
|
|
927
|
+
static updateBitstringCredentialStatus(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<BitstringUpdateResult>;
|
|
928
|
+
static fetchAndDecryptBitstring(publishedList: BitstringStatusList, options?: ICheqdStatusListOptions): Promise<string>;
|
|
929
|
+
static publishUpdatedBitstringStatusList(updatedStatusList: BitstringStatusList, credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<{
|
|
930
|
+
symmetricKey?: string;
|
|
931
|
+
}>;
|
|
932
|
+
static publishBitstringStatusList(statusListRaw: Uint8Array, statusListMetadata: LinkedResourceMetadataResolutionResult, options: {
|
|
933
|
+
context: IContext;
|
|
934
|
+
resourceId?: string;
|
|
935
|
+
resourceVersion?: string;
|
|
936
|
+
resourceAlsoKnownAs?: AlternativeUri[];
|
|
937
|
+
signInputs?: ISignInputs[];
|
|
938
|
+
fee?: DidStdFee | 'auto' | number;
|
|
939
|
+
}): Promise<boolean>;
|
|
732
940
|
private RevokeCredentialWithStatusList2021;
|
|
941
|
+
private BulkUpdateCredentialsWithStatusList;
|
|
733
942
|
private RevokeBulkCredentialsWithStatusList2021;
|
|
734
943
|
private SuspendCredentialWithStatusList2021;
|
|
735
944
|
private SuspendBulkCredentialsWithStatusList2021;
|
|
@@ -739,14 +948,14 @@ export declare class Cheqd implements IAgentPlugin {
|
|
|
739
948
|
private ObservePaymentCondition;
|
|
740
949
|
private MintCapacityCredit;
|
|
741
950
|
private DelegateCapacityCredit;
|
|
742
|
-
static revokeCredential(credential: VerifiableCredential, options?:
|
|
743
|
-
static revokeCredentials(credentials: VerifiableCredential[], options?:
|
|
744
|
-
static suspendCredential(credential: VerifiableCredential, options?:
|
|
745
|
-
static suspendCredentials(credentials: VerifiableCredential[], options?:
|
|
746
|
-
static unsuspendCredential(credential: VerifiableCredential, options?:
|
|
747
|
-
static unsuspendCredentials(credentials: VerifiableCredential[], options?:
|
|
748
|
-
static checkRevoked(credential: VerifiableCredential, options?:
|
|
749
|
-
static checkSuspended(credential: VerifiableCredential, options?:
|
|
951
|
+
static revokeCredential(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<RevocationResult>;
|
|
952
|
+
static revokeCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusListOptions): Promise<BulkRevocationResult>;
|
|
953
|
+
static suspendCredential(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<SuspensionResult>;
|
|
954
|
+
static suspendCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusListOptions): Promise<BulkSuspensionResult>;
|
|
955
|
+
static unsuspendCredential(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<UnsuspensionResult>;
|
|
956
|
+
static unsuspendCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusListOptions): Promise<BulkUnsuspensionResult>;
|
|
957
|
+
static checkRevoked(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<boolean>;
|
|
958
|
+
static checkSuspended(credential: VerifiableCredential, options?: ICheqdStatusListOptions): Promise<boolean>;
|
|
750
959
|
private static checkRevokedNonMigrated;
|
|
751
960
|
private static checkSuspendedNonMigrated;
|
|
752
961
|
static publishStatusList2021(statusList2021Raw: Uint8Array, statusList2021Metadata: LinkedResourceMetadataResolutionResult, options: {
|
|
@@ -755,15 +964,22 @@ export declare class Cheqd implements IAgentPlugin {
|
|
|
755
964
|
resourceVersion?: string;
|
|
756
965
|
resourceAlsoKnownAs?: AlternativeUri[];
|
|
757
966
|
signInputs?: ISignInputs[];
|
|
758
|
-
fee?: DidStdFee;
|
|
967
|
+
fee?: DidStdFee | 'auto' | number;
|
|
759
968
|
}): Promise<boolean>;
|
|
760
969
|
static fetchStatusList2021(credential: VerifiableCredential, returnRaw?: boolean): Promise<StatusList2021Revocation | StatusList2021Suspension | Uint8Array>;
|
|
761
|
-
static
|
|
970
|
+
static fetchStatusListMetadata(credential: VerifiableCredential): Promise<LinkedResourceMetadataResolutionResult>;
|
|
971
|
+
/**
|
|
972
|
+
* Fetch the JSON metadata from a bitstring status list credential URL
|
|
973
|
+
*/
|
|
974
|
+
static fetchBitstringStatusList(credential: VerifiableCredential): Promise<BitstringStatusList>;
|
|
762
975
|
static getProviderFromDidUrl(didUrl: string, providers: CheqdDIDProvider[], message?: string): Promise<CheqdDIDProvider>;
|
|
763
976
|
static getProviderFromNetwork(network: CheqdNetwork, providers: CheqdDIDProvider[], message?: string): Promise<CheqdDIDProvider>;
|
|
764
977
|
static generateProviderId(namespace: string): string;
|
|
765
978
|
static getFile(filename: string): Promise<Uint8Array>;
|
|
766
979
|
static writeFile(content: Uint8Array, filename?: string): Promise<void>;
|
|
767
980
|
static decodeCredentialJWT(jwt: string): Promise<VerifiableCredential>;
|
|
981
|
+
static getBitValue(bitstring: DBBitstring, bitIndex: number, statusSize?: number): number;
|
|
982
|
+
static setBitValue(bitstring: DBBitstring, bitIndex: number, value: number, statusSize?: number): void;
|
|
768
983
|
}
|
|
984
|
+
export { BitstringStatusListResourceType, DefaultStatusListEncodings };
|
|
769
985
|
//# sourceMappingURL=ICheqd.d.ts.map
|