@tinycloud/node-sdk 2.7.0-beta.4 → 2.7.0

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.cjs CHANGED
@@ -23762,7 +23762,11 @@ async function activateValidatedRuntimeDelegation(node, delegation, options) {
23762
23762
  delegateDID: signed2.audience,
23763
23763
  host
23764
23764
  };
23765
- await node.useRuntimeDelegation(installedCandidate);
23765
+ if (node.isSessionOnly === true && typeof node.did === "string" && (0, import_sdk_core9.principalDidEquals)(node.did, node.sessionDid) && typeof node.useDelegation === "function") {
23766
+ await node.useDelegation(installedCandidate);
23767
+ } else {
23768
+ await node.useRuntimeDelegation(installedCandidate);
23769
+ }
23766
23770
  const installed = node.getRuntimePermissionDelegations().find((candidate) => candidate.cid === cid);
23767
23771
  if (!installed) {
23768
23772
  throw new Error("Runtime delegation activation did not install the validated authority.");