@tinycloud/node-sdk 3.3.0-beta.15 → 3.3.0-beta.17

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
@@ -21175,7 +21175,7 @@ function ownerPermissionsToAbilities(permissions) {
21175
21175
  }
21176
21176
  return { abilities, rawAbilities };
21177
21177
  }
21178
- var TERMINAL_DELEGATION_REQUIRES_SESSION_KEY = "disableSubDelegation requires a session-key delegation";
21178
+ var TERMINAL_DELEGATION_REQUIRES_SESSION_KEY = "disableSubDelegation requires a session-key delegation to a did:key (not did:pkh); use the session-key DID or drop the flag";
21179
21179
  function base64UrlEncode(bytes) {
21180
21180
  const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
21181
21181
  let output = "";
@@ -26010,6 +26010,9 @@ var _TinyCloudNode = class _TinyCloudNode {
26010
26010
  "delegateTo: onPrepared cannot be combined with forceWalletSign=true; the wallet-signed path activates the delegation before it could be handed to onPrepared."
26011
26011
  );
26012
26012
  }
26013
+ if (options?.disableSubDelegation && did.startsWith("did:pkh:")) {
26014
+ throw new Error(TERMINAL_DELEGATION_REQUIRES_SESSION_KEY);
26015
+ }
26013
26016
  const session = this.currentTinyCloudSession();
26014
26017
  if (!session) {
26015
26018
  throw new import_sdk_core9.SessionExpiredError(/* @__PURE__ */ new Date(0));