@tinycloud/node-sdk 2.2.1-beta.0 → 2.2.1-beta.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.
- package/dist/{core-CNyXnUx9.d.cts → core-CWdCZ8q6.d.cts} +1 -0
- package/dist/{core-CNyXnUx9.d.ts → core-CWdCZ8q6.d.ts} +1 -0
- package/dist/core.cjs +10 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +10 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1406,6 +1406,7 @@ declare class TinyCloudNode {
|
|
|
1406
1406
|
private findRuntimeGrantsForPermissionEntries;
|
|
1407
1407
|
private runtimeDelegationFromSession;
|
|
1408
1408
|
private runtimeGrantFromDelegation;
|
|
1409
|
+
private didWithoutFragment;
|
|
1409
1410
|
private installRuntimeGrantFromServiceSession;
|
|
1410
1411
|
private delegatedResourcesForEntries;
|
|
1411
1412
|
private operationsFromDelegation;
|
|
@@ -1406,6 +1406,7 @@ declare class TinyCloudNode {
|
|
|
1406
1406
|
private findRuntimeGrantsForPermissionEntries;
|
|
1407
1407
|
private runtimeDelegationFromSession;
|
|
1408
1408
|
private runtimeGrantFromDelegation;
|
|
1409
|
+
private didWithoutFragment;
|
|
1409
1410
|
private installRuntimeGrantFromServiceSession;
|
|
1410
1411
|
private delegatedResourcesForEntries;
|
|
1411
1412
|
private operationsFromDelegation;
|
package/dist/core.cjs
CHANGED
|
@@ -2999,7 +2999,12 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
2999
2999
|
if (delegation.expiry.getTime() <= Date.now()) {
|
|
3000
3000
|
throw new import_sdk_core6.SessionExpiredError(delegation.expiry);
|
|
3001
3001
|
}
|
|
3002
|
-
const expectedDids = /* @__PURE__ */ new Set([
|
|
3002
|
+
const expectedDids = /* @__PURE__ */ new Set([
|
|
3003
|
+
session.verificationMethod,
|
|
3004
|
+
this.didWithoutFragment(session.verificationMethod),
|
|
3005
|
+
this.sessionDid,
|
|
3006
|
+
this.didWithoutFragment(this.sessionDid)
|
|
3007
|
+
]);
|
|
3003
3008
|
if (!expectedDids.has(delegation.delegateDID)) {
|
|
3004
3009
|
throw new Error(
|
|
3005
3010
|
`Runtime delegation targets ${delegation.delegateDID} but this session key is ${session.verificationMethod}.`
|
|
@@ -3835,6 +3840,10 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
3835
3840
|
expiresAt: delegation.expiry
|
|
3836
3841
|
};
|
|
3837
3842
|
}
|
|
3843
|
+
didWithoutFragment(did) {
|
|
3844
|
+
const fragment = did.indexOf("#");
|
|
3845
|
+
return fragment === -1 ? did : did.slice(0, fragment);
|
|
3846
|
+
}
|
|
3838
3847
|
installRuntimeGrantFromServiceSession(delegation, session, expiresAt) {
|
|
3839
3848
|
const operations = this.operationsFromDelegation(delegation);
|
|
3840
3849
|
if (operations.length === 0) {
|