signify-ts 0.2.0 → 0.2.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.
@@ -6428,13 +6428,14 @@ var Credentials = class {
6428
6428
  * @async
6429
6429
  * @param {string} name Name or alias of the identifier
6430
6430
  * @param {string} said SAID of the credential
6431
+ * @param {string} datetime date time of revocation
6431
6432
  * @returns {Promise<any>} A promise to the long-running operation
6432
6433
  */
6433
- async revoke(name, said) {
6434
+ async revoke(name, said, datetime) {
6434
6435
  const hab = await this.client.identifiers().get(name);
6435
6436
  const pre = hab.prefix;
6436
6437
  const vs = versify("KERI" /* KERI */, void 0, "JSON" /* JSON */, 0);
6437
- const dt = (/* @__PURE__ */ new Date()).toISOString().replace("Z", "000+00:00");
6438
+ const dt = datetime ?? (/* @__PURE__ */ new Date()).toISOString().replace("Z", "000+00:00");
6438
6439
  const cred = await this.get(said);
6439
6440
  const _rev = {
6440
6441
  v: vs,
@@ -6464,6 +6465,7 @@ var Credentials = class {
6464
6465
  d: rev.d
6465
6466
  }
6466
6467
  ];
6468
+ const keeper = this.client.manager.get(hab);
6467
6469
  if (estOnly) {
6468
6470
  throw new Error("Establishment only not implemented");
6469
6471
  } else {
@@ -6475,14 +6477,14 @@ var Credentials = class {
6475
6477
  version: void 0,
6476
6478
  kind: void 0
6477
6479
  });
6478
- const keeper = this.client.manager.get(hab);
6479
6480
  sigs = await keeper.sign(b(serder.raw));
6480
6481
  ixn = serder.ked;
6481
6482
  }
6482
6483
  const body = {
6483
6484
  rev,
6484
6485
  ixn,
6485
- sigs
6486
+ sigs,
6487
+ [keeper.algo]: keeper.params()
6486
6488
  };
6487
6489
  const path = `/identifiers/${name}/credentials/${said}`;
6488
6490
  const method = "DELETE";
@@ -6490,7 +6492,12 @@ var Credentials = class {
6490
6492
  Accept: "application/json+cesr"
6491
6493
  });
6492
6494
  const res = await this.client.fetch(path, method, body, headers);
6493
- return await res.json();
6495
+ const op = await res.json();
6496
+ return {
6497
+ rev: new Serder(rev),
6498
+ anc: new Serder(ixn),
6499
+ op
6500
+ };
6494
6501
  }
6495
6502
  /**
6496
6503
  * Present a credential