@tinycloud/node-sdk 3.8.0-beta.11 → 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/{WasmKeyProvider-5Ee7fcAw.d.cts → WasmKeyProvider-BKCPRC-c.d.cts} +21 -1
- package/dist/{WasmKeyProvider-5Ee7fcAw.d.ts → WasmKeyProvider-BKCPRC-c.d.ts} +21 -1
- 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 +41 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +3 -3
- package/dist/core.d.ts +3 -3
- package/dist/core.js +41 -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 +41 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +41 -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
package/dist/core.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReplicationOptions, Manifest, PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, AccountApplication, AccountApplicationListOptions, AccountApplicationRegisterOptions, AccountDelegation, AccountDelegationListOptions, AccountDelegationRevokeOptions, AccountIndexEnsureResult, AccountIndexRebuildResult, AccountIndexStatus, AccountIndexedReadOptions, AccountService, AccountServiceConfig, AccountSpace, AccountSpaceListOptions, AccountStatus, AuthorityRefusal, AutoApproveSpaceCreationHandler, AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CanonicalAddress, CanonicalParsedNetworkId, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, CaveatedDelegationUnsupportedError, ClientSession, ColumnInfo, ComposeManifestOptions, ComposedManifestRequest, CreateDelegationParams, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DataVaultConfig, DataVaultService, DatabaseHandle, DelegateReceivedShareParams, DelegatedShareAccess, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, DidCacheKeyOptions, DidEqualsOptions, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IENSResolver, IKVService, INotificationHandler, IPrefixedKVService, ISQLService, ISecretsService, ISessionManager, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceCreationHandler, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IWasmBindings, IdentityParseError, IngestOptions, InvokeFunction, JWK, KVBatchReadResponse, KVCreateSignedReadUrlOptions, KVListPage, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVService, KVServiceConfig, KVSignedReadUrlResponse, KeyInfo, KeyProvider, KeyType, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, Manifest, ManifestDefaults, ManifestRegistryRecord, ManifestSecretActions, ManifestValidationError, OpenKeyCallbackStrategy, OpenKeySigningRequestBody, OpenKeySigningResponseBody, OpenKeySigningStrategyOptions, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PermissionEntry, PermissionNotInManifestError, PersistedSessionData, PinnedKey, PkhDidParts, PrefixedKVService, ProtocolMismatchError, PurgeTarget, QueryOptions, QueryResponse, ReceiveOptions, RegisterBatchSuccess, RegisterPolicyV3Input, RegisterPolicyV3Receipt, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedCapabilities, ResolvedDelegate, ResolvedReplicationOptions, ResolvedSecretPath, ResourceCapability, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceSession, SessionExpiredError, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignInOptions, SignRequest, SignResponse, SilentNotificationHandler, Space, SpaceAbilitiesMap, SpaceConfig, SpaceCreationContext, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloud, TinyCloudConfig, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, TinyCloudSession, UnsupportedFeatureError, VAULT_PERMISSION_SERVICE, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VersionCheckError, ViewInfo, WasmVaultFunctions, addressStorageKey, buildSpaceUri, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeSecretScope, checkNodeInfo, clearTinyCloudDebugLogs, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, createVaultCrypto, defaultSpaceCreationHandler, didCacheKey, didEquals, disableTinyCloudDebug, enableTinyCloudDebug, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isCapabilitySubset, isEvmAddress, loadManifest, makePkhSpaceId, makePublicSpaceId, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseSecretCatalogKey, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveManifest, resolveSecretListPrefix, resolveSecretPath, resourceCapabilitiesToSpaceAbilitiesMap, tinyCloudDebugLogger, validateManifest } from '@tinycloud/sdk-core';
|
|
3
3
|
import { _ as __gated_network } from './gated-network-BEF2XSTC.cjs';
|
|
4
|
-
import { _ as __authority } from './authority-
|
|
4
|
+
import { _ as __authority } from './authority-Bgbd8NGB.cjs';
|
|
5
5
|
import { _ as __runtime } from './runtime-mRhSu-vJ.cjs';
|
|
6
6
|
import { ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
7
|
-
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider } from './WasmKeyProvider-
|
|
8
|
-
export { B as BootstrapWarning, C as CreateOwnerDelegationParams, D as DelegateToOptions, a as DelegateToResult, b as DelegatedAccess, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, c as NodeUserAuthorization, d as NodeUserAuthorizationConfig, O as OpenKeyAuthorizeTinyCloud, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, f as SecretReadInput, g as SecretReadResult, h as SignStrategy, T as TinyCloudNode, i as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, j as UnifiedOwnerRootReceipt, k as UnsupportedSessionRestoreError, l as defaultSignStrategy, w as wireOpenKeyAuthorize } from './TinyCloudNode-
|
|
7
|
+
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider, i as isAppKeyHostBound } from './WasmKeyProvider-BKCPRC-c.cjs';
|
|
8
|
+
export { B as BootstrapWarning, C as CreateOwnerDelegationParams, D as DelegateToOptions, a as DelegateToResult, b as DelegatedAccess, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, c as NodeUserAuthorization, d as NodeUserAuthorizationConfig, O as OpenKeyAuthorizeTinyCloud, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, f as SecretReadInput, g as SecretReadResult, h as SignStrategy, T as TinyCloudNode, i as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, j as UnifiedOwnerRootReceipt, k as UnsupportedSessionRestoreError, l as defaultSignStrategy, w as wireOpenKeyAuthorize } from './TinyCloudNode-DLuN31i0.cjs';
|
|
9
9
|
export { C as CompactRuntimeDelegationInput, P as PortableDelegation, R as RuntimeDelegationRejectedError, a as RuntimeDelegationRejection, V as ValidatedRuntimeDelegation, b as activateCompactRuntimeDelegation, c as activateValidatedRuntimeDelegation, d as deserializeDelegation, s as serializeDelegation } from './delegation-Ckc3UETl.cjs';
|
|
10
10
|
import '@tinycloud/sdk-services';
|
|
11
11
|
import '@tinycloud/sdk-services/encryption/named-keys';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReplicationOptions, Manifest, PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, AccountApplication, AccountApplicationListOptions, AccountApplicationRegisterOptions, AccountDelegation, AccountDelegationListOptions, AccountDelegationRevokeOptions, AccountIndexEnsureResult, AccountIndexRebuildResult, AccountIndexStatus, AccountIndexedReadOptions, AccountService, AccountServiceConfig, AccountSpace, AccountSpaceListOptions, AccountStatus, AuthorityRefusal, AutoApproveSpaceCreationHandler, AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CanonicalAddress, CanonicalParsedNetworkId, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, CaveatedDelegationUnsupportedError, ClientSession, ColumnInfo, ComposeManifestOptions, ComposedManifestRequest, CreateDelegationParams, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DataVaultConfig, DataVaultService, DatabaseHandle, DelegateReceivedShareParams, DelegatedShareAccess, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, DidCacheKeyOptions, DidEqualsOptions, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IENSResolver, IKVService, INotificationHandler, IPrefixedKVService, ISQLService, ISecretsService, ISessionManager, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceCreationHandler, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IWasmBindings, IdentityParseError, IngestOptions, InvokeFunction, JWK, KVBatchReadResponse, KVCreateSignedReadUrlOptions, KVListPage, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVService, KVServiceConfig, KVSignedReadUrlResponse, KeyInfo, KeyProvider, KeyType, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, Manifest, ManifestDefaults, ManifestRegistryRecord, ManifestSecretActions, ManifestValidationError, OpenKeyCallbackStrategy, OpenKeySigningRequestBody, OpenKeySigningResponseBody, OpenKeySigningStrategyOptions, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PermissionEntry, PermissionNotInManifestError, PersistedSessionData, PinnedKey, PkhDidParts, PrefixedKVService, ProtocolMismatchError, PurgeTarget, QueryOptions, QueryResponse, ReceiveOptions, RegisterBatchSuccess, RegisterPolicyV3Input, RegisterPolicyV3Receipt, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedCapabilities, ResolvedDelegate, ResolvedReplicationOptions, ResolvedSecretPath, ResourceCapability, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceSession, SessionExpiredError, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignInOptions, SignRequest, SignResponse, SilentNotificationHandler, Space, SpaceAbilitiesMap, SpaceConfig, SpaceCreationContext, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloud, TinyCloudConfig, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, TinyCloudSession, UnsupportedFeatureError, VAULT_PERMISSION_SERVICE, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VersionCheckError, ViewInfo, WasmVaultFunctions, addressStorageKey, buildSpaceUri, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeSecretScope, checkNodeInfo, clearTinyCloudDebugLogs, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, createVaultCrypto, defaultSpaceCreationHandler, didCacheKey, didEquals, disableTinyCloudDebug, enableTinyCloudDebug, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isCapabilitySubset, isEvmAddress, loadManifest, makePkhSpaceId, makePublicSpaceId, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseSecretCatalogKey, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveManifest, resolveSecretListPrefix, resolveSecretPath, resourceCapabilitiesToSpaceAbilitiesMap, tinyCloudDebugLogger, validateManifest } from '@tinycloud/sdk-core';
|
|
3
3
|
import { _ as __gated_network } from './gated-network-BEF2XSTC.js';
|
|
4
|
-
import { _ as __authority } from './authority-
|
|
4
|
+
import { _ as __authority } from './authority-BHLahKNJ.js';
|
|
5
5
|
import { _ as __runtime } from './runtime-CO4VXnPq.js';
|
|
6
6
|
import { ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
7
|
-
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider } from './WasmKeyProvider-
|
|
8
|
-
export { B as BootstrapWarning, C as CreateOwnerDelegationParams, D as DelegateToOptions, a as DelegateToResult, b as DelegatedAccess, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, c as NodeUserAuthorization, d as NodeUserAuthorizationConfig, O as OpenKeyAuthorizeTinyCloud, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, f as SecretReadInput, g as SecretReadResult, h as SignStrategy, T as TinyCloudNode, i as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, j as UnifiedOwnerRootReceipt, k as UnsupportedSessionRestoreError, l as defaultSignStrategy, w as wireOpenKeyAuthorize } from './TinyCloudNode-
|
|
7
|
+
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider, i as isAppKeyHostBound } from './WasmKeyProvider-BKCPRC-c.js';
|
|
8
|
+
export { B as BootstrapWarning, C as CreateOwnerDelegationParams, D as DelegateToOptions, a as DelegateToResult, b as DelegatedAccess, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, c as NodeUserAuthorization, d as NodeUserAuthorizationConfig, O as OpenKeyAuthorizeTinyCloud, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, f as SecretReadInput, g as SecretReadResult, h as SignStrategy, T as TinyCloudNode, i as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, j as UnifiedOwnerRootReceipt, k as UnsupportedSessionRestoreError, l as defaultSignStrategy, w as wireOpenKeyAuthorize } from './TinyCloudNode-DfuhkGz7.js';
|
|
9
9
|
export { C as CompactRuntimeDelegationInput, P as PortableDelegation, R as RuntimeDelegationRejectedError, a as RuntimeDelegationRejection, V as ValidatedRuntimeDelegation, b as activateCompactRuntimeDelegation, c as activateValidatedRuntimeDelegation, d as deserializeDelegation, s as serializeDelegation } from './delegation-Ckc3UETl.js';
|
|
10
10
|
import '@tinycloud/sdk-services';
|
|
11
11
|
import '@tinycloud/sdk-services/encryption/named-keys';
|
package/dist/core.js
CHANGED
|
@@ -299,6 +299,18 @@ function appKeyHostBinding(domain, appId) {
|
|
|
299
299
|
const reversed = labels.reverse().join(".");
|
|
300
300
|
return appId === reversed || appId.startsWith(`${reversed}.`);
|
|
301
301
|
}
|
|
302
|
+
function isAppKeyHostBound(keysAppId, origin) {
|
|
303
|
+
if (typeof origin === "string" && !origin.includes("://")) {
|
|
304
|
+
return appKeyHostBinding(origin, keysAppId);
|
|
305
|
+
}
|
|
306
|
+
let url;
|
|
307
|
+
try {
|
|
308
|
+
url = typeof origin === "string" ? new URL(origin) : origin;
|
|
309
|
+
} catch {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
return appKeyHostBinding(url.host, keysAppId);
|
|
313
|
+
}
|
|
302
314
|
|
|
303
315
|
// src/replication/authority-sign-in.ts
|
|
304
316
|
import {
|
|
@@ -2936,6 +2948,7 @@ import {
|
|
|
2936
2948
|
withoutShareLink,
|
|
2937
2949
|
verifyEip191MessageSignature,
|
|
2938
2950
|
signCompactUcanRootAuthorization,
|
|
2951
|
+
signCompactUcanAuthorization,
|
|
2939
2952
|
markDelegationTerminal,
|
|
2940
2953
|
isStorageFullError,
|
|
2941
2954
|
STORAGE_FULL_MESSAGE,
|
|
@@ -6554,6 +6567,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6554
6567
|
invoke: graph.invoke,
|
|
6555
6568
|
invokeAny: graph.invokeAny,
|
|
6556
6569
|
signOwnerRevocation: this.signer ? (cid) => this.signOwnerRevocation(cid) : void 0,
|
|
6570
|
+
sessionInvocationSigner: this.sessionInvocationSignerFor(input.serviceSession),
|
|
6557
6571
|
fetch: graph.fetch
|
|
6558
6572
|
});
|
|
6559
6573
|
const keyProvider = new WasmKeyProvider({ sessionManager: input.manager });
|
|
@@ -6769,6 +6783,31 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6769
6783
|
if (session === void 0) throw new Error("Not signed in. Call signIn() first.");
|
|
6770
6784
|
return signBytesWithJwk(bytes, session.jwk);
|
|
6771
6785
|
}
|
|
6786
|
+
/**
|
|
6787
|
+
* Signs proofless invocations with `session`'s own did:key, for the node's
|
|
6788
|
+
* issued-delegation list and revocation by the delegator. The audience is
|
|
6789
|
+
* this Node's DID; each invocation lives 60 seconds.
|
|
6790
|
+
*/
|
|
6791
|
+
sessionInvocationSignerFor(session) {
|
|
6792
|
+
return {
|
|
6793
|
+
did: () => session.verificationMethod.split("#", 1)[0],
|
|
6794
|
+
sign: async (attenuation) => {
|
|
6795
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
6796
|
+
const invocation = await signCompactUcanAuthorization({
|
|
6797
|
+
issuerDid: session.verificationMethod.split("#", 1)[0],
|
|
6798
|
+
audienceDid: await this.fetchNodeId(),
|
|
6799
|
+
attenuation,
|
|
6800
|
+
facts: [{}],
|
|
6801
|
+
proofs: [],
|
|
6802
|
+
notBefore: now,
|
|
6803
|
+
expiresAt: now + 60,
|
|
6804
|
+
nonce: `urn:uuid:${crypto.randomUUID()}`,
|
|
6805
|
+
sign: (bytes) => signBytesWithJwk(bytes, session.jwk)
|
|
6806
|
+
});
|
|
6807
|
+
return invocation.authorization;
|
|
6808
|
+
}
|
|
6809
|
+
};
|
|
6810
|
+
}
|
|
6772
6811
|
/** Author a proofless Policy/v3 owner root with the authenticated holder key. */
|
|
6773
6812
|
async createUnifiedOwnerRoot(input) {
|
|
6774
6813
|
const ownerDid = this.credentialHolderDid;
|
|
@@ -7476,6 +7515,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
7476
7515
|
invoke: graph.invoke,
|
|
7477
7516
|
invokeAny: graph.invokeAny,
|
|
7478
7517
|
signOwnerRevocation: this.signer ? (cid) => this.signOwnerRevocation(cid) : void 0,
|
|
7518
|
+
sessionInvocationSigner: this.sessionInvocationSignerFor(serviceSession),
|
|
7479
7519
|
fetch: graph.fetch
|
|
7480
7520
|
});
|
|
7481
7521
|
this._spaceService = new SpaceService({
|
|
@@ -10421,6 +10461,7 @@ export {
|
|
|
10421
10461
|
getNodeReplicationLoaders,
|
|
10422
10462
|
getTinyCloudDebugLogs,
|
|
10423
10463
|
installTinyCloudDebugGlobals,
|
|
10464
|
+
isAppKeyHostBound,
|
|
10424
10465
|
isCapabilitySubset3 as isCapabilitySubset,
|
|
10425
10466
|
isEvmAddress,
|
|
10426
10467
|
loadManifest,
|