@cheqd/did-provider-cheqd 4.4.1 → 4.5.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.
Files changed (75) hide show
  1. package/build/esm/did-manager/cheqd-did-provider.d.ts.map +1 -1
  2. package/build/esm/did-manager/cheqd-did-provider.js +2 -1
  3. package/build/esm/did-manager/cheqd-did-provider.js.map +1 -1
  4. package/build/esm/utils/helpers.d.ts +1 -1
  5. package/build/esm/utils/helpers.d.ts.map +1 -1
  6. package/build/tsconfig.esm.tsbuildinfo +1 -1
  7. package/build/tsconfig.types.tsbuildinfo +1 -1
  8. package/build/types/did-manager/cheqd-did-provider.d.ts.map +1 -1
  9. package/build/types/utils/helpers.d.ts +1 -1
  10. package/build/types/utils/helpers.d.ts.map +1 -1
  11. package/package.json +3 -9
  12. package/src/did-manager/cheqd-did-provider.ts +2 -0
  13. package/src/utils/helpers.ts +1 -1
  14. package/tsconfig.json +1 -1
  15. package/build/cjs/agent/ICheqd.d.ts +0 -769
  16. package/build/cjs/agent/ICheqd.d.ts.map +0 -1
  17. package/build/cjs/agent/ICheqd.js +0 -4399
  18. package/build/cjs/agent/ICheqd.js.map +0 -1
  19. package/build/cjs/agent/index.d.ts +0 -2
  20. package/build/cjs/agent/index.d.ts.map +0 -1
  21. package/build/cjs/agent/index.js +0 -18
  22. package/build/cjs/agent/index.js.map +0 -1
  23. package/build/cjs/did-manager/cheqd-did-provider.d.ts +0 -233
  24. package/build/cjs/did-manager/cheqd-did-provider.d.ts.map +0 -1
  25. package/build/cjs/did-manager/cheqd-did-provider.js +0 -750
  26. package/build/cjs/did-manager/cheqd-did-provider.js.map +0 -1
  27. package/build/cjs/did-manager/cheqd-did-resolver.d.ts +0 -26
  28. package/build/cjs/did-manager/cheqd-did-resolver.d.ts.map +0 -1
  29. package/build/cjs/did-manager/cheqd-did-resolver.js +0 -52
  30. package/build/cjs/did-manager/cheqd-did-resolver.js.map +0 -1
  31. package/build/cjs/did-manager/index.d.ts +0 -4
  32. package/build/cjs/did-manager/index.d.ts.map +0 -1
  33. package/build/cjs/did-manager/index.js +0 -20
  34. package/build/cjs/did-manager/index.js.map +0 -1
  35. package/build/cjs/did-manager/resolver.d.ts +0 -47
  36. package/build/cjs/did-manager/resolver.d.ts.map +0 -1
  37. package/build/cjs/did-manager/resolver.js +0 -75
  38. package/build/cjs/did-manager/resolver.js.map +0 -1
  39. package/build/cjs/dkg-threshold/index.d.ts +0 -2
  40. package/build/cjs/dkg-threshold/index.d.ts.map +0 -1
  41. package/build/cjs/dkg-threshold/index.js +0 -18
  42. package/build/cjs/dkg-threshold/index.js.map +0 -1
  43. package/build/cjs/dkg-threshold/lit-protocol/v2.d.ts +0 -95
  44. package/build/cjs/dkg-threshold/lit-protocol/v2.d.ts.map +0 -1
  45. package/build/cjs/dkg-threshold/lit-protocol/v2.js +0 -193
  46. package/build/cjs/dkg-threshold/lit-protocol/v2.js.map +0 -1
  47. package/build/cjs/dkg-threshold/lit-protocol/v3.d.ts +0 -95
  48. package/build/cjs/dkg-threshold/lit-protocol/v3.d.ts.map +0 -1
  49. package/build/cjs/dkg-threshold/lit-protocol/v3.js +0 -232
  50. package/build/cjs/dkg-threshold/lit-protocol/v3.js.map +0 -1
  51. package/build/cjs/dkg-threshold/lit-protocol/v6.d.ts +0 -131
  52. package/build/cjs/dkg-threshold/lit-protocol/v6.d.ts.map +0 -1
  53. package/build/cjs/dkg-threshold/lit-protocol/v6.js +0 -345
  54. package/build/cjs/dkg-threshold/lit-protocol/v6.js.map +0 -1
  55. package/build/cjs/index.d.ts +0 -9
  56. package/build/cjs/index.d.ts.map +0 -1
  57. package/build/cjs/index.js +0 -25
  58. package/build/cjs/index.js.map +0 -1
  59. package/build/cjs/utils/constants.d.ts +0 -2
  60. package/build/cjs/utils/constants.d.ts.map +0 -1
  61. package/build/cjs/utils/constants.js +0 -5
  62. package/build/cjs/utils/constants.js.map +0 -1
  63. package/build/cjs/utils/env.d.ts +0 -7
  64. package/build/cjs/utils/env.d.ts.map +0 -1
  65. package/build/cjs/utils/env.js +0 -19
  66. package/build/cjs/utils/env.js.map +0 -1
  67. package/build/cjs/utils/helpers.d.ts +0 -18
  68. package/build/cjs/utils/helpers.d.ts.map +0 -1
  69. package/build/cjs/utils/helpers.js +0 -112
  70. package/build/cjs/utils/helpers.js.map +0 -1
  71. package/build/cjs/utils/index.d.ts +0 -3
  72. package/build/cjs/utils/index.d.ts.map +0 -1
  73. package/build/cjs/utils/index.js +0 -19
  74. package/build/cjs/utils/index.js.map +0 -1
  75. package/build/tsconfig.cjs.tsbuildinfo +0 -1
@@ -1,769 +0,0 @@
1
- import { CheqdNetwork, DIDDocument, DidStdFee, ISignInputs, MethodSpecificIdAlgo, VerificationMethods } from '@cheqd/sdk';
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, DefaultStatusList2021Encoding, DefaultStatusList2021StatusPurposeType, TPublicKeyEd25519 } from '../did-manager/cheqd-did-provider.js';
5
- import { CosmosAccessControlCondition, CreateCapacityDelegationAuthSignatureResult, LitCompatibleCosmosChain, LitNetwork, MintCapacityCreditsResult } from '../dkg-threshold/lit-protocol/v6.js';
6
- import { AlternativeUri } from '@cheqd/ts-proto/cheqd/resource/v2/resource.js';
7
- export type IContext = IAgentContext<IDIDManager & IKeyManager & IDataStore & IResolver & ICredentialIssuer & ICredentialVerifier & ICheqd>;
8
- export type TExportedDIDDocWithKeys = {
9
- didDoc: DIDDocument;
10
- keys: TImportableEd25519Key[];
11
- versionId?: string;
12
- };
13
- export type TExportedDIDDocWithLinkedResourceWithKeys = TExportedDIDDocWithKeys & {
14
- linkedResource: LinkedResource;
15
- };
16
- export type LinkedResourceMetadataResolutionResult = {
17
- resourceURI: string;
18
- resourceCollectionId: string;
19
- resourceId: string;
20
- resourceName: string;
21
- resourceType: string;
22
- mediaType: string;
23
- resourceVersion?: string;
24
- created: string;
25
- checksum: string;
26
- previousVersionId: string | null;
27
- nextVersionId: string | null;
28
- };
29
- export type DIDMetadataDereferencingResult = {
30
- '@context': 'https://w3id.org/did-resolution/v1';
31
- dereferencingMetadata: {
32
- contentType: string;
33
- error?: string;
34
- retrieved: string;
35
- did: {
36
- didString: string;
37
- methodSpecificId: string;
38
- method: string;
39
- };
40
- };
41
- contentStream: {
42
- created: string;
43
- versionId: string;
44
- linkedResourceMetadata: LinkedResourceMetadataResolutionResult[];
45
- };
46
- contentMetadata: Record<string, any>;
47
- };
48
- export type ShallowTypedTx = {
49
- body: {
50
- messages: any[];
51
- memo: string;
52
- timeout_height: string;
53
- extension_options: any[];
54
- non_critical_extension_options: any[];
55
- };
56
- auth_info: {
57
- signer_infos: {
58
- public_key: {
59
- '@type': string;
60
- key: string;
61
- };
62
- mode_info: {
63
- single: {
64
- mode: string;
65
- };
66
- };
67
- sequence: string;
68
- }[];
69
- fee: {
70
- amount: Coin[];
71
- gas_limit: string;
72
- payer: string;
73
- granter: string;
74
- };
75
- tip: any | null;
76
- };
77
- signatures: string[];
78
- };
79
- export type ShallowTypedTxTxResponses = {
80
- height: string;
81
- txhash: string;
82
- codespace: string;
83
- code: number;
84
- data: string;
85
- raw_log: string;
86
- logs: any[];
87
- info: string;
88
- gas_wanted: string;
89
- gas_used: string;
90
- tx: ShallowTypedTx;
91
- timestamp: string;
92
- events: any[];
93
- };
94
- export type ShallowTypedTxsResponse = {
95
- txs: ShallowTypedTx[];
96
- tx_responses: ShallowTypedTxTxResponses[];
97
- pagination: string | null;
98
- total: string;
99
- } | undefined;
100
- export type BlockResponse = {
101
- block_id: BlockID;
102
- block: Block;
103
- sdk_block: Block;
104
- };
105
- export type Block = {
106
- header: Header;
107
- data: Data;
108
- evidence: Evidence;
109
- last_commit: LastCommit;
110
- };
111
- export type Data = {
112
- txs: any[];
113
- };
114
- export type Evidence = {
115
- evidence: any[];
116
- };
117
- export type Header = {
118
- version: Version;
119
- chain_id: string;
120
- height: string;
121
- time: string;
122
- last_block_id: BlockID;
123
- last_commit_hash: string;
124
- data_hash: string;
125
- validators_hash: string;
126
- next_validators_hash: string;
127
- consensus_hash: string;
128
- app_hash: string;
129
- last_results_hash: string;
130
- evidence_hash: string;
131
- proposer_address: string;
132
- };
133
- export type BlockID = {
134
- hash: string;
135
- part_set_header: PartSetHeader;
136
- };
137
- export type PartSetHeader = {
138
- total: number;
139
- hash: string;
140
- };
141
- export type Version = {
142
- block: string;
143
- app: string;
144
- };
145
- export type LastCommit = {
146
- height: string;
147
- round: number;
148
- block_id: BlockID;
149
- signatures: Signature[];
150
- };
151
- export type Signature = {
152
- block_id_flag: string;
153
- validator_address?: string;
154
- timestamp: Date;
155
- signature?: string;
156
- };
157
- export type VerificationResult = {
158
- verified: boolean;
159
- revoked?: boolean;
160
- suspended?: boolean;
161
- error?: IVerifyResult['error'];
162
- };
163
- export type EncryptionResult = {
164
- symmetricEncryptionCiphertext: string;
165
- thresholdEncryptionCiphertext: string;
166
- stringHash: string;
167
- symmetricKey: string;
168
- };
169
- export type StatusCheckResult = {
170
- revoked?: boolean;
171
- suspended?: boolean;
172
- error?: IError;
173
- };
174
- export type RevocationResult = {
175
- revoked: boolean;
176
- error?: IError;
177
- statusList?: StatusList2021Revocation;
178
- symmetricKey?: string;
179
- published?: boolean;
180
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
181
- };
182
- export type BulkRevocationResult = {
183
- revoked: boolean[];
184
- error?: IError;
185
- statusList?: StatusList2021Revocation;
186
- symmetricKey?: string;
187
- published?: boolean;
188
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
189
- };
190
- export type SuspensionResult = {
191
- suspended: boolean;
192
- error?: IError;
193
- statusList?: StatusList2021Suspension;
194
- symmetricKey?: string;
195
- published?: boolean;
196
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
197
- };
198
- export type BulkSuspensionResult = {
199
- suspended: boolean[];
200
- error?: IError;
201
- statusList?: StatusList2021Suspension;
202
- symmetricKey?: string;
203
- published?: boolean;
204
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
205
- };
206
- export type UnsuspensionResult = {
207
- unsuspended: boolean;
208
- error?: IError;
209
- statusList?: StatusList2021Suspension;
210
- symmetricKey?: string;
211
- published?: boolean;
212
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
213
- };
214
- export type BulkUnsuspensionResult = {
215
- unsuspended: boolean[];
216
- error?: IError;
217
- statusList?: StatusList2021Suspension;
218
- symmetricKey?: string;
219
- published?: boolean;
220
- resourceMetadata?: LinkedResourceMetadataResolutionResult;
221
- };
222
- export type Bitstring = string;
223
- export type SymmetricEncryptionCipherText = string;
224
- export type ThresholdEncryptionCipherText = string;
225
- export type EncodedList = `${SymmetricEncryptionCipherText}-${ThresholdEncryptionCipherText}` | string;
226
- export type EncodedListAsArray = [SymmetricEncryptionCipherText, ThresholdEncryptionCipherText];
227
- export type StatusList2021Revocation = {
228
- StatusList2021: {
229
- statusPurpose: typeof DefaultStatusList2021StatusPurposeTypes.revocation;
230
- encodedList: EncodedList;
231
- validFrom: string;
232
- validUntil?: string;
233
- };
234
- metadata: {
235
- type: typeof DefaultStatusList2021ResourceTypes.revocation;
236
- encrypted: boolean;
237
- encoding: DefaultStatusList2021Encoding;
238
- statusListHash?: string;
239
- paymentConditions?: PaymentCondition[];
240
- };
241
- };
242
- export type StatusList2021Suspension = {
243
- StatusList2021: {
244
- statusPurpose: typeof DefaultStatusList2021StatusPurposeTypes.suspension;
245
- encodedList: EncodedList;
246
- validFrom: string;
247
- validUntil?: string;
248
- };
249
- metadata: {
250
- type: typeof DefaultStatusList2021ResourceTypes.suspension;
251
- encrypted: boolean;
252
- encoding: DefaultStatusList2021Encoding;
253
- statusListHash?: string;
254
- paymentConditions?: PaymentCondition[];
255
- };
256
- };
257
- export type StatusList2021RevocationNonMigrated = {
258
- StatusList2021: {
259
- statusPurpose: typeof DefaultStatusList2021StatusPurposeTypes.revocation;
260
- encodedList: string;
261
- validFrom: string;
262
- validUntil?: string;
263
- };
264
- metadata: {
265
- type: typeof DefaultStatusList2021ResourceTypes.revocation;
266
- encrypted: boolean;
267
- encoding: DefaultStatusList2021Encoding;
268
- encryptedSymmetricKey?: string;
269
- paymentConditions?: PaymentCondition[];
270
- };
271
- };
272
- export type StatusList2021SuspensionNonMigrated = {
273
- StatusList2021: {
274
- statusPurpose: typeof DefaultStatusList2021StatusPurposeTypes.suspension;
275
- encodedList: string;
276
- validFrom: string;
277
- validUntil?: string;
278
- };
279
- metadata: {
280
- type: typeof DefaultStatusList2021ResourceTypes.suspension;
281
- encrypted: boolean;
282
- encoding: DefaultStatusList2021Encoding;
283
- encryptedSymmetricKey?: string;
284
- paymentConditions?: PaymentCondition[];
285
- };
286
- };
287
- export type AccessControlConditionType = (typeof AccessControlConditionTypes)[keyof typeof AccessControlConditionTypes];
288
- export type AccessControlConditionReturnValueComparator = (typeof AccessControlConditionReturnValueComparators)[keyof typeof AccessControlConditionReturnValueComparators];
289
- export type PaymentCondition = {
290
- feePaymentAddress: string;
291
- feePaymentAmount: string;
292
- intervalInSeconds: number;
293
- blockHeight?: string;
294
- type: Extract<AccessControlConditionType, 'timelockPayment'>;
295
- };
296
- export type DkgOptions = {
297
- chain?: Extract<LitCompatibleCosmosChain, 'cheqdTestnet' | 'cheqdMainnet'>;
298
- network?: LitNetwork;
299
- };
300
- export type CreateStatusList2021Result = {
301
- created: boolean;
302
- error?: Error;
303
- resource: StatusList2021Revocation | StatusList2021Suspension;
304
- resourceMetadata: LinkedResourceMetadataResolutionResult;
305
- encrypted?: boolean;
306
- symmetricKey?: string;
307
- };
308
- export type TransactionResult = {
309
- successful: boolean;
310
- transactionHash?: string;
311
- events?: DeliverTxResponse['events'];
312
- rawLog?: string;
313
- txResponse?: DeliverTxResponse;
314
- error?: IError;
315
- };
316
- export type ObservationResult = {
317
- subscribed: boolean;
318
- meetsCondition: boolean;
319
- transactionHash?: string;
320
- events?: DeliverTxResponse['events'];
321
- rawLog?: string;
322
- txResponse?: ShallowTypedTxTxResponses;
323
- error?: IError;
324
- };
325
- export type MintCapacityCreditResult = {
326
- minted: boolean;
327
- error?: IError;
328
- } & Partial<MintCapacityCreditsResult>;
329
- export type DelegateCapacityCreditResult = {
330
- delegated: boolean;
331
- error?: IError;
332
- } & Partial<CreateCapacityDelegationAuthSignatureResult>;
333
- export declare const AccessControlConditionTypes: {
334
- readonly timelockPayment: "timelockPayment";
335
- readonly memoNonce: "memoNonce";
336
- readonly balance: "balance";
337
- };
338
- export declare const AccessControlConditionReturnValueComparators: {
339
- readonly lessThan: "<";
340
- readonly greaterThan: ">";
341
- readonly equalTo: "=";
342
- readonly lessThanOrEqualTo: "<=";
343
- readonly greaterThanOrEqualTo: ">=";
344
- };
345
- export declare const RemoteListPattern: RegExp;
346
- export declare const CreateIdentifierMethodName = "cheqdCreateIdentifier";
347
- export declare const UpdateIdentifierMethodName = "cheqdUpdateIdentifier";
348
- export declare const DeactivateIdentifierMethodName = "cheqdDeactivateIdentifier";
349
- export declare const CreateResourceMethodName = "cheqdCreateLinkedResource";
350
- export declare const CreateStatusList2021MethodName = "cheqdCreateStatusList2021";
351
- export declare const BroadcastStatusList2021MethodName = "cheqdBroadcastStatusList2021";
352
- export declare const GenerateDidDocMethodName = "cheqdGenerateDidDoc";
353
- export declare const GenerateDidDocWithLinkedResourceMethodName = "cheqdGenerateDidDocWithLinkedResource";
354
- export declare const GenerateKeyPairMethodName = "cheqdGenerateIdentityKeys";
355
- export declare const GenerateVersionIdMethodName = "cheqdGenerateVersionId";
356
- export declare const GenerateStatusList2021MethodName = "cheqdGenerateStatusList2021";
357
- export declare const IssueRevocableCredentialWithStatusList2021MethodName = "cheqdIssueRevocableCredentialWithStatusList2021";
358
- export declare const IssueSuspendableCredentialWithStatusList2021MethodName = "cheqdIssueSuspendableCredentialWithStatusList2021";
359
- export declare const VerifyCredentialMethodName = "cheqdVerifyCredential";
360
- export declare const VerifyPresentationMethodName = "cheqdVerifyPresentation";
361
- export declare const CheckCredentialStatusMethodName = "cheqdCheckCredentialStatus";
362
- export declare const RevokeCredentialMethodName = "cheqdRevokeCredential";
363
- export declare const RevokeCredentialsMethodName = "cheqdRevokeCredentials";
364
- export declare const SuspendCredentialMethodName = "cheqdSuspendCredential";
365
- export declare const SuspendCredentialsMethodName = "cheqdSuspendCredentials";
366
- export declare const UnsuspendCredentialMethodName = "cheqdUnsuspendCredential";
367
- export declare const UnsuspendCredentialsMethodName = "cheqdUnsuspendCredentials";
368
- export declare const TransactSendTokensMethodName = "cheqdTransactSendTokens";
369
- export declare const ObservePaymentConditionMethodName = "cheqdObservePaymentCondition";
370
- export declare const MintCapacityCreditMethodName = "cheqdMintCapacityCredit";
371
- export declare const DelegateCapacityCreditMethodName = "cheqdDelegateCapacityCredit";
372
- export declare const DidPrefix = "did";
373
- export declare const CheqdDidMethod = "cheqd";
374
- export interface ICheqdCreateIdentifierArgs {
375
- kms: string;
376
- alias: string;
377
- document: DIDDocument;
378
- keys?: TImportableEd25519Key[];
379
- versionId?: string;
380
- fee?: DidStdFee;
381
- }
382
- export interface ICheqdUpdateIdentifierArgs {
383
- kms: string;
384
- document: DIDDocument;
385
- keys?: TImportableEd25519Key[] | TPublicKeyEd25519[];
386
- versionId?: string;
387
- fee?: DidStdFee;
388
- }
389
- export interface ICheqdDeactivateIdentifierArgs {
390
- kms: string;
391
- document: DIDDocument;
392
- keys?: TImportableEd25519Key[] | TPublicKeyEd25519[];
393
- fee?: DidStdFee;
394
- }
395
- export interface ICheqdCreateLinkedResourceArgs {
396
- kms: string;
397
- payload: ResourcePayload;
398
- network: CheqdNetwork;
399
- file?: string;
400
- signInputs?: ISignInputs[] | TPublicKeyEd25519[];
401
- fee?: DidStdFee;
402
- }
403
- export interface ICheqdCreateStatusList2021Args {
404
- kms: string;
405
- issuerDid: string;
406
- statusListName: string;
407
- statusPurpose: DefaultStatusList2021StatusPurposeType;
408
- encrypted: boolean;
409
- paymentConditions?: PaymentCondition[];
410
- dkgOptions?: DkgOptions;
411
- resourceVersion?: ResourcePayload['version'];
412
- alsoKnownAs?: ResourcePayload['alsoKnownAs'];
413
- statusListLength?: number;
414
- statusListEncoding?: DefaultStatusList2021Encoding;
415
- validUntil?: string;
416
- returnSymmetricKey?: boolean;
417
- }
418
- export interface ICheqdCreateUnencryptedStatusList2021Args {
419
- kms: string;
420
- payload: StatusList2021ResourcePayload;
421
- network: CheqdNetwork;
422
- file?: string;
423
- signInputs?: ISignInputs[];
424
- fee?: DidStdFee;
425
- }
426
- export interface ICheqdBroadcastStatusList2021Args {
427
- kms: string;
428
- payload: StatusList2021ResourcePayload;
429
- network: CheqdNetwork;
430
- file?: string;
431
- signInputs?: ISignInputs[];
432
- fee?: DidStdFee;
433
- }
434
- export interface ICheqdGenerateDidDocArgs {
435
- verificationMethod: VerificationMethods;
436
- methodSpecificIdAlgo: MethodSpecificIdAlgo;
437
- network: CheqdNetwork;
438
- }
439
- export interface ICheqdGenerateDidDocWithLinkedResourceArgs extends ICheqdGenerateDidDocArgs {
440
- [key: string]: any;
441
- }
442
- export interface ICheqdGenerateKeyPairArgs {
443
- [key: string]: any;
444
- }
445
- export interface ICheqdGenerateVersionIdArgs {
446
- [key: string]: any;
447
- }
448
- export interface ICheqdGenerateStatusList2021Args {
449
- length?: number;
450
- buffer?: Uint8Array;
451
- bitstringEncoding?: DefaultStatusList2021Encoding;
452
- }
453
- export interface ICheqdIssueRevocableCredentialWithStatusList2021Args {
454
- issuanceOptions: ICreateVerifiableCredentialArgs;
455
- statusOptions: {
456
- statusPurpose: 'revocation';
457
- statusListName: string;
458
- statusListIndex?: number;
459
- statusListVersion?: string;
460
- statusListRangeStart?: number;
461
- statusListRangeEnd?: number;
462
- indexNotIn?: number[];
463
- };
464
- }
465
- export interface ICheqdIssueSuspendableCredentialWithStatusList2021Args {
466
- issuanceOptions: ICreateVerifiableCredentialArgs;
467
- statusOptions: {
468
- statusPurpose: 'suspension';
469
- statusListName: string;
470
- statusListIndex?: number;
471
- statusListVersion?: string;
472
- statusListRangeStart?: number;
473
- statusListRangeEnd?: number;
474
- indexNotIn?: number[];
475
- };
476
- }
477
- export interface ICheqdVerifyCredentialWithStatusList2021Args {
478
- credential: W3CVerifiableCredential;
479
- verificationArgs?: IVerifyCredentialArgs;
480
- fetchList?: boolean;
481
- dkgOptions?: DkgOptions;
482
- options?: ICheqdStatusList2021Options;
483
- }
484
- export interface ICheqdVerifyPresentationWithStatusList2021Args {
485
- presentation: VerifiablePresentation;
486
- verificationArgs?: IVerifyPresentationArgs;
487
- fetchList?: boolean;
488
- dkgOptions?: DkgOptions;
489
- options?: ICheqdStatusList2021Options;
490
- }
491
- export interface ICheqdCheckCredentialStatusWithStatusList2021Args {
492
- credential?: W3CVerifiableCredential;
493
- statusOptions?: ICheqdCheckCredentialWithStatusList2021StatusOptions;
494
- verificationOptions?: IVerifyCredentialArgs;
495
- fetchList?: boolean;
496
- dkgOptions?: DkgOptions;
497
- options?: ICheqdStatusList2021Options;
498
- }
499
- export interface ICheqdRevokeCredentialWithStatusList2021Args {
500
- credential?: W3CVerifiableCredential;
501
- revocationOptions?: ICheqdRevokeCredentialWithStatusList2021Options;
502
- verificationOptions?: IVerifyCredentialArgs;
503
- fetchList?: boolean;
504
- publish?: boolean;
505
- publishEncrypted?: boolean;
506
- symmetricKey?: string;
507
- paymentConditions?: PaymentCondition[];
508
- writeToFile?: boolean;
509
- returnUpdatedStatusList?: boolean;
510
- returnSymmetricKey?: boolean;
511
- returnStatusListMetadata?: boolean;
512
- dkgOptions?: DkgOptions;
513
- options?: ICheqdStatusList2021Options;
514
- }
515
- export interface ICheqdRevokeBulkCredentialsWithStatusList2021Args {
516
- credentials?: W3CVerifiableCredential[];
517
- revocationOptions?: ICheqdRevokeBulkCredentialsWithStatusList2021Options;
518
- verificationOptions?: IVerifyCredentialArgs;
519
- fetchList?: boolean;
520
- publish?: boolean;
521
- publishEncrypted?: boolean;
522
- symmetricKey?: string;
523
- paymentConditions?: PaymentCondition[];
524
- writeToFile?: boolean;
525
- returnUpdatedStatusList?: boolean;
526
- returnSymmetricKey?: boolean;
527
- returnStatusListMetadata?: boolean;
528
- dkgOptions?: DkgOptions;
529
- options?: ICheqdStatusList2021Options;
530
- }
531
- export interface ICheqdSuspendCredentialWithStatusList2021Args {
532
- credential?: W3CVerifiableCredential;
533
- suspensionOptions?: ICheqdSuspendCredentialWithStatusList2021Options;
534
- verificationOptions?: IVerifyCredentialArgs;
535
- fetchList?: boolean;
536
- publish?: boolean;
537
- publishEncrypted?: boolean;
538
- symmetricKey?: string;
539
- paymentConditions?: PaymentCondition[];
540
- writeToFile?: boolean;
541
- returnUpdatedStatusList?: boolean;
542
- returnSymmetricKey?: boolean;
543
- returnStatusListMetadata?: boolean;
544
- dkgOptions?: DkgOptions;
545
- options?: ICheqdStatusList2021Options;
546
- }
547
- export interface ICheqdSuspendBulkCredentialsWithStatusList2021Args {
548
- credentials?: W3CVerifiableCredential[];
549
- suspensionOptions?: ICheqdSuspendBulkCredentialsWithStatusList2021Options;
550
- verificationOptions?: IVerifyCredentialArgs;
551
- fetchList?: boolean;
552
- publish?: boolean;
553
- publishEncrypted?: boolean;
554
- symmetricKey?: string;
555
- paymentConditions?: PaymentCondition[];
556
- writeToFile?: boolean;
557
- returnUpdatedStatusList?: boolean;
558
- returnSymmetricKey?: boolean;
559
- returnStatusListMetadata?: boolean;
560
- dkgOptions?: DkgOptions;
561
- options?: ICheqdStatusList2021Options;
562
- }
563
- export interface ICheqdUnsuspendCredentialWithStatusList2021Args {
564
- credential?: W3CVerifiableCredential;
565
- unsuspensionOptions?: ICheqdUnsuspendCredentialWithStatusList2021Options;
566
- verificationOptions?: IVerifyCredentialArgs;
567
- fetchList?: boolean;
568
- publish?: boolean;
569
- publishEncrypted?: boolean;
570
- symmetricKey?: string;
571
- paymentConditions?: PaymentCondition[];
572
- writeToFile?: boolean;
573
- returnUpdatedStatusList?: boolean;
574
- returnSymmetricKey?: boolean;
575
- returnStatusListMetadata?: boolean;
576
- dkgOptions?: DkgOptions;
577
- options?: ICheqdStatusList2021Options;
578
- }
579
- export interface ICheqdUnsuspendBulkCredentialsWithStatusList2021Args {
580
- credentials?: W3CVerifiableCredential[];
581
- unsuspensionOptions?: ICheqdUnsuspendBulkCredentialsWithStatusList2021Options;
582
- verificationOptions?: IVerifyCredentialArgs;
583
- fetchList?: boolean;
584
- publish?: boolean;
585
- publishEncrypted?: boolean;
586
- symmetricKey?: string;
587
- paymentConditions?: PaymentCondition[];
588
- writeToFile?: boolean;
589
- returnUpdatedStatusList?: boolean;
590
- returnSymmetricKey?: boolean;
591
- returnStatusListMetadata?: boolean;
592
- dkgOptions?: DkgOptions;
593
- options?: ICheqdStatusList2021Options;
594
- }
595
- export interface ICheqdTransactSendTokensArgs {
596
- recipientAddress: string;
597
- amount: Coin;
598
- network: CheqdNetwork;
599
- memo?: string;
600
- txBytes?: Uint8Array;
601
- returnTxResponse?: boolean;
602
- }
603
- export interface ICheqdObservePaymentConditionArgs {
604
- recipientAddress?: string;
605
- amount?: Coin;
606
- intervalInSeconds?: number;
607
- blockHeight?: string;
608
- comparator?: Extract<AccessControlConditionReturnValueComparator, '<' | '<='>;
609
- network?: CheqdNetwork;
610
- unifiedAccessControlCondition?: Required<CosmosAccessControlCondition>;
611
- returnTxResponse?: boolean;
612
- }
613
- export interface ICheqdMintCapacityCreditArgs {
614
- network: CheqdNetwork;
615
- effectiveDays: number;
616
- requestsPerDay?: number;
617
- requestsPerSecond?: number;
618
- requestsPerKilosecond?: number;
619
- }
620
- export interface ICheqdDelegateCapacityCreditArgs {
621
- network: CheqdNetwork;
622
- capacityTokenId: string;
623
- delegateeAddresses: string[];
624
- usesPermitted: number;
625
- expiration?: string;
626
- statement?: string;
627
- }
628
- export interface ICheqdStatusList2021Options {
629
- statusListFile?: string;
630
- statusListInlineBitstring?: string;
631
- [key: string]: any;
632
- }
633
- export interface ICheqdRevokeCredentialWithStatusList2021Options {
634
- issuerDid: string;
635
- statusListName: string;
636
- statusListIndex: number;
637
- statusListVersion?: string;
638
- }
639
- export interface ICheqdRevokeBulkCredentialsWithStatusList2021Options {
640
- issuerDid: string;
641
- statusListName: string;
642
- statusListIndices: number[];
643
- statusListVersion?: string;
644
- }
645
- export interface ICheqdSuspendCredentialWithStatusList2021Options {
646
- issuerDid: string;
647
- statusListName: string;
648
- statusListIndex: number;
649
- statusListVersion?: string;
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;
662
- }
663
- export interface ICheqdUnsuspendBulkCredentialsWithStatusList2021Options {
664
- issuerDid: string;
665
- statusListName: string;
666
- statusListIndices: number[];
667
- statusListVersion?: string;
668
- }
669
- export interface ICheqdCheckCredentialWithStatusList2021StatusOptions {
670
- issuerDid: string;
671
- statusListName: string;
672
- statusListIndex: number;
673
- statusPurpose: DefaultStatusList2021StatusPurposeType;
674
- statusListVersion?: string;
675
- }
676
- export interface ICheqd extends IPluginMethodMap {
677
- [CreateIdentifierMethodName]: (args: ICheqdCreateIdentifierArgs, context: IContext) => Promise<Omit<IIdentifier, 'provider'>>;
678
- [UpdateIdentifierMethodName]: (args: ICheqdUpdateIdentifierArgs, context: IContext) => Promise<Omit<IIdentifier, 'provider'>>;
679
- [DeactivateIdentifierMethodName]: (args: ICheqdDeactivateIdentifierArgs, context: IContext) => Promise<boolean>;
680
- [CreateResourceMethodName]: (args: ICheqdCreateLinkedResourceArgs, context: IContext) => Promise<boolean>;
681
- [CreateStatusList2021MethodName]: (args: ICheqdCreateStatusList2021Args, context: IContext) => Promise<CreateStatusList2021Result>;
682
- [BroadcastStatusList2021MethodName]: (args: ICheqdBroadcastStatusList2021Args, context: IContext) => Promise<boolean>;
683
- [GenerateDidDocMethodName]: (args: ICheqdGenerateDidDocArgs, context: IContext) => Promise<TExportedDIDDocWithKeys>;
684
- [GenerateDidDocWithLinkedResourceMethodName]: (args: ICheqdGenerateDidDocWithLinkedResourceArgs, context: IContext) => Promise<TExportedDIDDocWithLinkedResourceWithKeys>;
685
- [GenerateKeyPairMethodName]: (args: ICheqdGenerateKeyPairArgs, context: IContext) => Promise<TImportableEd25519Key>;
686
- [GenerateVersionIdMethodName]: (args: ICheqdGenerateVersionIdArgs, context: IContext) => Promise<string>;
687
- [GenerateStatusList2021MethodName]: (args: ICheqdGenerateStatusList2021Args, context: IContext) => Promise<string>;
688
- [IssueRevocableCredentialWithStatusList2021MethodName]: (args: ICheqdIssueRevocableCredentialWithStatusList2021Args, context: IContext) => Promise<VerifiableCredential>;
689
- [IssueSuspendableCredentialWithStatusList2021MethodName]: (args: ICheqdIssueSuspendableCredentialWithStatusList2021Args, context: IContext) => Promise<VerifiableCredential>;
690
- [VerifyCredentialMethodName]: (args: ICheqdVerifyCredentialWithStatusList2021Args, context: IContext) => Promise<VerificationResult>;
691
- [VerifyPresentationMethodName]: (args: ICheqdVerifyPresentationWithStatusList2021Args, context: IContext) => Promise<VerificationResult>;
692
- [CheckCredentialStatusMethodName]: (args: ICheqdCheckCredentialStatusWithStatusList2021Args, context: IContext) => Promise<StatusCheckResult>;
693
- [RevokeCredentialMethodName]: (args: ICheqdRevokeCredentialWithStatusList2021Args, context: IContext) => Promise<RevocationResult>;
694
- [RevokeCredentialsMethodName]: (args: ICheqdRevokeBulkCredentialsWithStatusList2021Args, context: IContext) => Promise<BulkRevocationResult>;
695
- [SuspendCredentialMethodName]: (args: ICheqdSuspendCredentialWithStatusList2021Args, context: IContext) => Promise<SuspensionResult>;
696
- [SuspendCredentialsMethodName]: (args: ICheqdSuspendBulkCredentialsWithStatusList2021Args, context: IContext) => Promise<BulkSuspensionResult>;
697
- [UnsuspendCredentialMethodName]: (args: ICheqdUnsuspendCredentialWithStatusList2021Args, context: IContext) => Promise<UnsuspensionResult>;
698
- [UnsuspendCredentialsMethodName]: (args: ICheqdUnsuspendBulkCredentialsWithStatusList2021Args, context: IContext) => Promise<BulkUnsuspensionResult>;
699
- [TransactSendTokensMethodName]: (args: ICheqdTransactSendTokensArgs, context: IContext) => Promise<TransactionResult>;
700
- [ObservePaymentConditionMethodName]: (args: ICheqdObservePaymentConditionArgs, context: IContext) => Promise<ObservationResult>;
701
- [MintCapacityCreditMethodName]: (args: ICheqdMintCapacityCreditArgs, context: IContext) => Promise<MintCapacityCreditResult>;
702
- [DelegateCapacityCreditMethodName]: (args: ICheqdDelegateCapacityCreditArgs, context: IContext) => Promise<DelegateCapacityCreditResult>;
703
- }
704
- export declare class Cheqd implements IAgentPlugin {
705
- readonly methods?: ICheqd;
706
- readonly schema?: IAgentPluginSchema;
707
- private readonly supportedDidProviders;
708
- private didProvider;
709
- private providerId;
710
- static readonly defaultStatusList2021Length: number;
711
- static readonly defaultContextV1 = "https://www.w3.org/2018/credentials/v1";
712
- static readonly statusList2021Context = "https://w3id.org/vc-status-list-2021/v1";
713
- constructor(args: {
714
- providers: CheqdDIDProvider[];
715
- });
716
- private CreateIdentifier;
717
- private UpdateIdentifier;
718
- private DeactivateIdentifier;
719
- private CreateResource;
720
- private CreateStatusList2021;
721
- private BroadcastStatusList2021;
722
- private GenerateDidDoc;
723
- private GenerateDidDocWithLinkedResource;
724
- private GenerateIdentityKeys;
725
- private GenerateVersionId;
726
- private GenerateStatusList2021;
727
- private IssueRevocableCredentialWithStatusList2021;
728
- private IssueSuspendableCredentialWithStatusList2021;
729
- private VerifyCredentialWithStatusList2021;
730
- private VerifyPresentationWithStatusList2021;
731
- private CheckCredentialStatusWithStatusList2021;
732
- private RevokeCredentialWithStatusList2021;
733
- private RevokeBulkCredentialsWithStatusList2021;
734
- private SuspendCredentialWithStatusList2021;
735
- private SuspendBulkCredentialsWithStatusList2021;
736
- private UnsuspendCredentialWithStatusList2021;
737
- private UnsuspendBulkCredentialsWithStatusList2021;
738
- private TransactSendTokens;
739
- private ObservePaymentCondition;
740
- private MintCapacityCredit;
741
- private DelegateCapacityCredit;
742
- static revokeCredential(credential: VerifiableCredential, options?: ICheqdStatusList2021Options): Promise<RevocationResult>;
743
- static revokeCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusList2021Options): Promise<BulkRevocationResult>;
744
- static suspendCredential(credential: VerifiableCredential, options?: ICheqdStatusList2021Options): Promise<SuspensionResult>;
745
- static suspendCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusList2021Options): Promise<BulkSuspensionResult>;
746
- static unsuspendCredential(credential: VerifiableCredential, options?: ICheqdStatusList2021Options): Promise<UnsuspensionResult>;
747
- static unsuspendCredentials(credentials: VerifiableCredential[], options?: ICheqdStatusList2021Options): Promise<BulkUnsuspensionResult>;
748
- static checkRevoked(credential: VerifiableCredential, options?: ICheqdStatusList2021Options): Promise<boolean>;
749
- static checkSuspended(credential: VerifiableCredential, options?: ICheqdStatusList2021Options): Promise<boolean>;
750
- private static checkRevokedNonMigrated;
751
- private static checkSuspendedNonMigrated;
752
- static publishStatusList2021(statusList2021Raw: Uint8Array, statusList2021Metadata: LinkedResourceMetadataResolutionResult, options: {
753
- context: IContext;
754
- resourceId?: string;
755
- resourceVersion?: string;
756
- resourceAlsoKnownAs?: AlternativeUri[];
757
- signInputs?: ISignInputs[];
758
- fee?: DidStdFee;
759
- }): Promise<boolean>;
760
- static fetchStatusList2021(credential: VerifiableCredential, returnRaw?: boolean): Promise<StatusList2021Revocation | StatusList2021Suspension | Uint8Array>;
761
- static fetchStatusList2021Metadata(credential: VerifiableCredential): Promise<LinkedResourceMetadataResolutionResult>;
762
- static getProviderFromDidUrl(didUrl: string, providers: CheqdDIDProvider[], message?: string): Promise<CheqdDIDProvider>;
763
- static getProviderFromNetwork(network: CheqdNetwork, providers: CheqdDIDProvider[], message?: string): Promise<CheqdDIDProvider>;
764
- static generateProviderId(namespace: string): string;
765
- static getFile(filename: string): Promise<Uint8Array>;
766
- static writeFile(content: Uint8Array, filename?: string): Promise<void>;
767
- static decodeCredentialJWT(jwt: string): Promise<VerifiableCredential>;
768
- }
769
- //# sourceMappingURL=ICheqd.d.ts.map