@tinycloud/node-sdk 3.8.0-beta.13 → 3.8.0-beta.14
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/{TinyCloudNode-BVDUdEcf.d.cts → TinyCloudNode-DLuN31i0.d.cts} +6 -0
- package/dist/{TinyCloudNode-jMK_2Uj8.d.ts → TinyCloudNode-DfuhkGz7.d.ts} +6 -0
- package/dist/{authority-i22vHbbp.d.ts → authority-BHLahKNJ.d.ts} +1 -1
- package/dist/{authority-DJ-PE4Xo.d.cts → authority-Bgbd8NGB.d.cts} +1 -1
- package/dist/core.cjs +27 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +28 -0
- package/dist/core.js.map +1 -1
- package/dist/encryption-keys.d.cts +1 -1
- package/dist/encryption-keys.d.ts +1 -1
- package/dist/index.cjs +27 -0
- 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 +28 -0
- package/dist/index.js.map +1 -1
- package/dist/replication/authority.d.cts +2 -2
- package/dist/replication/authority.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NamedKeyClient } from '@tinycloud/sdk-services/encryption/named-keys';
|
|
2
2
|
export { DecryptManyResult, KeyCallOptions, KeyDescriptor, KeyEncryptOptions, NamedKeyClient, NamedKeyEnvelope, NamedKeyError, NamedKeyErrorCode, PublicKeyDescriptor, buildKeyAdminFacts, buildKeyDescribeFacts } from '@tinycloud/sdk-services/encryption/named-keys';
|
|
3
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
3
|
+
import { T as TinyCloudNode } from './TinyCloudNode-DLuN31i0.cjs';
|
|
4
4
|
import '@tinycloud/sdk-core';
|
|
5
5
|
import '@tinycloud/sdk-services/kv/replication';
|
|
6
6
|
import '@tinycloud/sdk-services';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NamedKeyClient } from '@tinycloud/sdk-services/encryption/named-keys';
|
|
2
2
|
export { DecryptManyResult, KeyCallOptions, KeyDescriptor, KeyEncryptOptions, NamedKeyClient, NamedKeyEnvelope, NamedKeyError, NamedKeyErrorCode, PublicKeyDescriptor, buildKeyAdminFacts, buildKeyDescribeFacts } from '@tinycloud/sdk-services/encryption/named-keys';
|
|
3
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
3
|
+
import { T as TinyCloudNode } from './TinyCloudNode-DfuhkGz7.js';
|
|
4
4
|
import '@tinycloud/sdk-core';
|
|
5
5
|
import '@tinycloud/sdk-services/kv/replication';
|
|
6
6
|
import '@tinycloud/sdk-services';
|
package/dist/index.cjs
CHANGED
|
@@ -24355,6 +24355,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
24355
24355
|
invoke: graph.invoke,
|
|
24356
24356
|
invokeAny: graph.invokeAny,
|
|
24357
24357
|
signOwnerRevocation: this.signer ? (cid) => this.signOwnerRevocation(cid) : void 0,
|
|
24358
|
+
sessionInvocationSigner: this.sessionInvocationSignerFor(input.serviceSession),
|
|
24358
24359
|
fetch: graph.fetch
|
|
24359
24360
|
});
|
|
24360
24361
|
const keyProvider = new WasmKeyProvider({ sessionManager: input.manager });
|
|
@@ -24570,6 +24571,31 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
24570
24571
|
if (session === void 0) throw new Error("Not signed in. Call signIn() first.");
|
|
24571
24572
|
return signBytesWithJwk(bytes, session.jwk);
|
|
24572
24573
|
}
|
|
24574
|
+
/**
|
|
24575
|
+
* Signs proofless invocations with `session`'s own did:key, for the node's
|
|
24576
|
+
* issued-delegation list and revocation by the delegator. The audience is
|
|
24577
|
+
* this Node's DID; each invocation lives 60 seconds.
|
|
24578
|
+
*/
|
|
24579
|
+
sessionInvocationSignerFor(session) {
|
|
24580
|
+
return {
|
|
24581
|
+
did: () => session.verificationMethod.split("#", 1)[0],
|
|
24582
|
+
sign: async (attenuation) => {
|
|
24583
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
24584
|
+
const invocation = await (0, import_sdk_core10.signCompactUcanAuthorization)({
|
|
24585
|
+
issuerDid: session.verificationMethod.split("#", 1)[0],
|
|
24586
|
+
audienceDid: await this.fetchNodeId(),
|
|
24587
|
+
attenuation,
|
|
24588
|
+
facts: [{}],
|
|
24589
|
+
proofs: [],
|
|
24590
|
+
notBefore: now,
|
|
24591
|
+
expiresAt: now + 60,
|
|
24592
|
+
nonce: `urn:uuid:${crypto.randomUUID()}`,
|
|
24593
|
+
sign: (bytes) => signBytesWithJwk(bytes, session.jwk)
|
|
24594
|
+
});
|
|
24595
|
+
return invocation.authorization;
|
|
24596
|
+
}
|
|
24597
|
+
};
|
|
24598
|
+
}
|
|
24573
24599
|
/** Author a proofless Policy/v3 owner root with the authenticated holder key. */
|
|
24574
24600
|
async createUnifiedOwnerRoot(input) {
|
|
24575
24601
|
const ownerDid = this.credentialHolderDid;
|
|
@@ -25277,6 +25303,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25277
25303
|
invoke: graph.invoke,
|
|
25278
25304
|
invokeAny: graph.invokeAny,
|
|
25279
25305
|
signOwnerRevocation: this.signer ? (cid) => this.signOwnerRevocation(cid) : void 0,
|
|
25306
|
+
sessionInvocationSigner: this.sessionInvocationSignerFor(serviceSession),
|
|
25280
25307
|
fetch: graph.fetch
|
|
25281
25308
|
});
|
|
25282
25309
|
this._spaceService = new import_sdk_core10.SpaceService({
|