@awebai/pi 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5345,14 +5345,14 @@ function verifyDidKeyResolution(resolution, cached, nowMs) {
|
|
|
5345
5345
|
return { outcome: "HARD_ERROR", error: "log_head seq must be >= 1" };
|
|
5346
5346
|
}
|
|
5347
5347
|
if (head.seq === 1) {
|
|
5348
|
-
if (head.operation !== "create") {
|
|
5349
|
-
return { outcome: "HARD_ERROR", error: "seq=1 requires create operation" };
|
|
5348
|
+
if (head.operation !== "create" && head.operation !== "register_did") {
|
|
5349
|
+
return { outcome: "HARD_ERROR", error: "seq=1 requires create/register_did operation" };
|
|
5350
5350
|
}
|
|
5351
5351
|
if (head.prev_entry_hash != null) {
|
|
5352
5352
|
return { outcome: "HARD_ERROR", error: "seq=1 requires null prev_entry_hash" };
|
|
5353
5353
|
}
|
|
5354
5354
|
if (head.previous_did_key != null) {
|
|
5355
|
-
return { outcome: "HARD_ERROR", error: "
|
|
5355
|
+
return { outcome: "HARD_ERROR", error: "seq=1 requires null previous_did_key" };
|
|
5356
5356
|
}
|
|
5357
5357
|
} else {
|
|
5358
5358
|
if (!head.prev_entry_hash || !isLowerHex(head.prev_entry_hash)) {
|
|
@@ -5618,7 +5618,10 @@ var SenderTrustManager = class {
|
|
|
5618
5618
|
if (recipientDID.startsWith("did:aw:")) {
|
|
5619
5619
|
if (recipientStableID)
|
|
5620
5620
|
return status;
|
|
5621
|
-
|
|
5621
|
+
if (selfStableID) {
|
|
5622
|
+
return recipientDID.toLowerCase() === selfStableID.toLowerCase() ? status : "identity_mismatch";
|
|
5623
|
+
}
|
|
5624
|
+
return status;
|
|
5622
5625
|
}
|
|
5623
5626
|
return recipientDID === selfDID ? status : "identity_mismatch";
|
|
5624
5627
|
}
|