@tinycloud/node-sdk 3.11.0-beta.0 → 3.11.0-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/{TinyCloudNode-BpolXzu5.d.ts → TinyCloudNode-BlNcvo1c.d.ts} +7 -0
- package/dist/{TinyCloudNode-wAQN1Ndh.d.cts → TinyCloudNode-CnVaWnAX.d.cts} +7 -0
- package/dist/{authority-C0JKqTwY.d.cts → authority-B2SLx27M.d.cts} +1 -1
- package/dist/{authority-Cj8MLCkr.d.ts → authority-DHIk5QvV.d.ts} +1 -1
- package/dist/core.cjs +25 -6
- 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 +27 -6
- 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 +25 -6
- 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 +27 -6
- 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/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ISigner, Bytes, IWasmBindings, PersistedSessionProof, ISessionManager } from '@tinycloud/sdk-core';
|
|
2
2
|
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, AccountApplication, AccountApplicationListOptions, AccountApplicationRegisterOptions, AccountDelegation, AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, AccountDelegationRecord, AccountDelegationResource, AccountDelegationRevokeOptions, AccountIndexEnsureResult, AccountIndexRebuildResult, AccountIndexStatus, AccountIndexedReadOptions, AccountService, AccountServiceConfig, AccountSpace, AccountSpaceListOptions, AccountStatus, AuthorityRefusal, AutoApproveSpaceCreationHandler, AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CallbackStrategy, CanonicalAddress, CanonicalDecryptRequest, CanonicalJson, CanonicalParsedNetworkId, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, CaveatedDelegationUnsupportedError, ClientSession, ColumnInfo, ComposeManifestOptions, ComposedManifestRequest, CreateDelegationParams, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DecryptTransportResponseError, DelegateReceivedShareParams, DelegatedShareAccess, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, DelegationRevocationReceipt, DidCacheKeyOptions, DidEqualsOptions, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncodedShareData, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IENSResolver, IEncryptionService, IHooksService, IKVService, INotificationHandler, IPrefixedKVService, ISQLService, ISecretsService, ISessionManager, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceCreationHandler, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IStorageService, IUserAuthorization, IWasmBindings, IdentityParseError, IngestOptions, InlineEncryptedEnvelope, InvokeFunction, JWK, KVBatchReadResponse, KVCreateSignedReadUrlOptions, KVListPage, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVService, KVServiceConfig, KVSignedReadUrlResponse, KeyInfo, KeyProvider, KeyType, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, MAX_SECRET_SCOPE_LENGTH, Manifest, ManifestDefaults, ManifestRegistryRecord, ManifestSecretActions, ManifestValidationError, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, OpenKeyCallbackStrategy, OpenKeySigningRequestBody, OpenKeySigningResponseBody, OpenKeySigningStrategyOptions, OwnerDelegationPermission, ParsedNetworkId, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PermissionEntry, PermissionNotInManifestError, PersistedSessionData, PinnedKey, PkhDidParts, PrefixedKVService, ProtocolMismatchError, PurgeTarget, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiveOptions, ReceiverKeyPair, ReceiverKeySigner, RegisterBatchSuccess, RegisterPolicyV3Input, RegisterPolicyV3Receipt, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaLocalEraseOutcome, ReplicaPurgeError, ReplicaPurgeFailedEvent, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedCapabilities, ResolvedDelegate, ResolvedReplicationOptions, ResolvedSecretPath, ResourceCapability, SECRET_NAME_RE, SECRET_SCOPE_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_WRITE_TOO_LARGE_MESSAGE, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretPutOptions, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceSession, SessionExpiredError, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignInOptions, SignRequest, SignResponse, SignedReceiverKeyInput, SilentNotificationHandler, Space, SpaceAbilitiesMap, SpaceConfig, SpaceCreationContext, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StorageAccountUsage, StorageFullEvent, StorageStatus, StorageStatusOptions, StorageUsage, StorageUsageState, StoredDelegationChain, SubscribeOptions, TC832_RESERVED_SCOPES, 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, VerifyDecryptResponseInput, VersionCheckError, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, addressStorageKey, appSecretScope, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, buildSpaceUri, canonicalHashHex, canonicalSignedResponse, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeEncryptionJson, canonicalizeNetworkId, canonicalizeSecretScope, checkDecryptInvocationInput, checkNodeInfo, clearTinyCloudDebugLogs, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, createVaultCrypto, decryptEnvelopeWithKey, defaultSpaceCreationHandler, deriveSignedReceiverKey, didCacheKey, didEquals, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, encryptionBase64Decode, encryptionBase64Encode, encryptionError, encryptionUtf8Decode, encryptionUtf8Encode, ensureNetworkUsableForDecrypt, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isCapabilitySubset, isEvmAddress, isNetworkId, isStorageFullError, loadManifest, makePkhSpaceId, makePublicSpaceId, networkDiscoveryKey, openWrappedKey, parseCanonicalNetworkId, parseExpiry, parseNetworkId, parsePkhDid, parseSecretCatalogKey, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveManifest, resolveSecretListPrefix, resolveSecretPath, resourceCapabilitiesToSpaceAbilitiesMap, storageUsageState, tinyCloudDebugLogger, validateEnvelope, validateManifest, verifyDecryptResponse } from '@tinycloud/sdk-core';
|
|
3
3
|
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider, i as isAppKeyHostBound } from './WasmKeyProvider-BKCPRC-c.cjs';
|
|
4
|
-
export { A as ACCEPTED_MARKER_VERSIONS, m as BOOTSTRAP_COMPLETION_MARKER_KEY, n as BOOTSTRAP_COMPLETION_MARKER_VERSION, o as BootstrapCompletionMarker, 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, p as NodeUserAuthorizationAuthorizeFn, d as NodeUserAuthorizationConfig, q as OpenKeyAuthorizationResultV1, r as OpenKeyAuthorizeInput, O as OpenKeyAuthorizeTinyCloud, s as OpenKeyBridgeInput, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, t as RestorableSession, 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-
|
|
4
|
+
export { A as ACCEPTED_MARKER_VERSIONS, m as BOOTSTRAP_COMPLETION_MARKER_KEY, n as BOOTSTRAP_COMPLETION_MARKER_VERSION, o as BootstrapCompletionMarker, 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, p as NodeUserAuthorizationAuthorizeFn, d as NodeUserAuthorizationConfig, q as OpenKeyAuthorizationResultV1, r as OpenKeyAuthorizeInput, O as OpenKeyAuthorizeTinyCloud, s as OpenKeyBridgeInput, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, t as RestorableSession, 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-CnVaWnAX.cjs';
|
|
5
5
|
import { invoke, invokeAny, computeCid, prepareSession, completeSessionSetup, ensureEip55, makeSpaceId, createDelegation, parseRecapFromSiwe, parseVerifiedRecapFromSiwe, generateHostSIWEMessage, siweToDelegationHeaders, protocolVersion, vault_encrypt, vault_decrypt, vault_derive_key, vault_x25519_from_seed, vault_x25519_dh, vault_random_bytes, vault_sha256 } from '@tinycloud/node-sdk-wasm';
|
|
6
6
|
export { A as AuthDelegationArtifact, e as AuthRequestArtifact, C as CompactRuntimeDelegationInput, D as DelegationAuthority, P as PortableDelegation, f as RUNTIME_DELEGATION_REJECTIONS, g as RuntimeDelegationActivator, R as RuntimeDelegationRejectedError, a as RuntimeDelegationRejection, S as SessionGrantProof, V as ValidatedRuntimeDelegation, h as VerifiedSessionGrant, b as activateCompactRuntimeDelegation, c as activateValidatedRuntimeDelegation, d as deserializeDelegation, i as grantAuthRequest, s as serializeDelegation, j as signedCompactUcanExpiry, k as siweRuntimeDelegation } from './delegation-Ckc3UETl.cjs';
|
|
7
7
|
import { KVReplicaStorage } from '@tinycloud/sdk-services';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ISigner, Bytes, IWasmBindings, PersistedSessionProof, ISessionManager } from '@tinycloud/sdk-core';
|
|
2
2
|
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, AccountApplication, AccountApplicationListOptions, AccountApplicationRegisterOptions, AccountDelegation, AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, AccountDelegationRecord, AccountDelegationResource, AccountDelegationRevokeOptions, AccountIndexEnsureResult, AccountIndexRebuildResult, AccountIndexStatus, AccountIndexedReadOptions, AccountService, AccountServiceConfig, AccountSpace, AccountSpaceListOptions, AccountStatus, AuthorityRefusal, AutoApproveSpaceCreationHandler, AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CallbackStrategy, CanonicalAddress, CanonicalDecryptRequest, CanonicalJson, CanonicalParsedNetworkId, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, CaveatedDelegationUnsupportedError, ClientSession, ColumnInfo, ComposeManifestOptions, ComposedManifestRequest, CreateDelegationParams, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DecryptTransportResponseError, DelegateReceivedShareParams, DelegatedShareAccess, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, DelegationRevocationReceipt, DidCacheKeyOptions, DidEqualsOptions, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncodedShareData, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IENSResolver, IEncryptionService, IHooksService, IKVService, INotificationHandler, IPrefixedKVService, ISQLService, ISecretsService, ISessionManager, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceCreationHandler, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IStorageService, IUserAuthorization, IWasmBindings, IdentityParseError, IngestOptions, InlineEncryptedEnvelope, InvokeFunction, JWK, KVBatchReadResponse, KVCreateSignedReadUrlOptions, KVListPage, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVService, KVServiceConfig, KVSignedReadUrlResponse, KeyInfo, KeyProvider, KeyType, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, MAX_SECRET_SCOPE_LENGTH, Manifest, ManifestDefaults, ManifestRegistryRecord, ManifestSecretActions, ManifestValidationError, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, OpenKeyCallbackStrategy, OpenKeySigningRequestBody, OpenKeySigningResponseBody, OpenKeySigningStrategyOptions, OwnerDelegationPermission, ParsedNetworkId, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PermissionEntry, PermissionNotInManifestError, PersistedSessionData, PinnedKey, PkhDidParts, PrefixedKVService, ProtocolMismatchError, PurgeTarget, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiveOptions, ReceiverKeyPair, ReceiverKeySigner, RegisterBatchSuccess, RegisterPolicyV3Input, RegisterPolicyV3Receipt, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaLocalEraseOutcome, ReplicaPurgeError, ReplicaPurgeFailedEvent, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedCapabilities, ResolvedDelegate, ResolvedReplicationOptions, ResolvedSecretPath, ResourceCapability, SECRET_NAME_RE, SECRET_SCOPE_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_WRITE_TOO_LARGE_MESSAGE, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretPutOptions, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceSession, SessionExpiredError, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignInOptions, SignRequest, SignResponse, SignedReceiverKeyInput, SilentNotificationHandler, Space, SpaceAbilitiesMap, SpaceConfig, SpaceCreationContext, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StorageAccountUsage, StorageFullEvent, StorageStatus, StorageStatusOptions, StorageUsage, StorageUsageState, StoredDelegationChain, SubscribeOptions, TC832_RESERVED_SCOPES, 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, VerifyDecryptResponseInput, VersionCheckError, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, addressStorageKey, appSecretScope, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, buildSpaceUri, canonicalHashHex, canonicalSignedResponse, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeEncryptionJson, canonicalizeNetworkId, canonicalizeSecretScope, checkDecryptInvocationInput, checkNodeInfo, clearTinyCloudDebugLogs, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, createVaultCrypto, decryptEnvelopeWithKey, defaultSpaceCreationHandler, deriveSignedReceiverKey, didCacheKey, didEquals, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, encryptionBase64Decode, encryptionBase64Encode, encryptionError, encryptionUtf8Decode, encryptionUtf8Encode, ensureNetworkUsableForDecrypt, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isCapabilitySubset, isEvmAddress, isNetworkId, isStorageFullError, loadManifest, makePkhSpaceId, makePublicSpaceId, networkDiscoveryKey, openWrappedKey, parseCanonicalNetworkId, parseExpiry, parseNetworkId, parsePkhDid, parseSecretCatalogKey, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveManifest, resolveSecretListPrefix, resolveSecretPath, resourceCapabilitiesToSpaceAbilitiesMap, storageUsageState, tinyCloudDebugLogger, validateEnvelope, validateManifest, verifyDecryptResponse } from '@tinycloud/sdk-core';
|
|
3
3
|
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider, i as isAppKeyHostBound } from './WasmKeyProvider-BKCPRC-c.js';
|
|
4
|
-
export { A as ACCEPTED_MARKER_VERSIONS, m as BOOTSTRAP_COMPLETION_MARKER_KEY, n as BOOTSTRAP_COMPLETION_MARKER_VERSION, o as BootstrapCompletionMarker, 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, p as NodeUserAuthorizationAuthorizeFn, d as NodeUserAuthorizationConfig, q as OpenKeyAuthorizationResultV1, r as OpenKeyAuthorizeInput, O as OpenKeyAuthorizeTinyCloud, s as OpenKeyBridgeInput, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, t as RestorableSession, 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-
|
|
4
|
+
export { A as ACCEPTED_MARKER_VERSIONS, m as BOOTSTRAP_COMPLETION_MARKER_KEY, n as BOOTSTRAP_COMPLETION_MARKER_VERSION, o as BootstrapCompletionMarker, 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, p as NodeUserAuthorizationAuthorizeFn, d as NodeUserAuthorizationConfig, q as OpenKeyAuthorizationResultV1, r as OpenKeyAuthorizeInput, O as OpenKeyAuthorizeTinyCloud, s as OpenKeyBridgeInput, e as OwnerDelegationReceipt, P as PreparedOpenKeyAuthorization, t as RestorableSession, 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-BlNcvo1c.js';
|
|
5
5
|
import { invoke, invokeAny, computeCid, prepareSession, completeSessionSetup, ensureEip55, makeSpaceId, createDelegation, parseRecapFromSiwe, parseVerifiedRecapFromSiwe, generateHostSIWEMessage, siweToDelegationHeaders, protocolVersion, vault_encrypt, vault_decrypt, vault_derive_key, vault_x25519_from_seed, vault_x25519_dh, vault_random_bytes, vault_sha256 } from '@tinycloud/node-sdk-wasm';
|
|
6
6
|
export { A as AuthDelegationArtifact, e as AuthRequestArtifact, C as CompactRuntimeDelegationInput, D as DelegationAuthority, P as PortableDelegation, f as RUNTIME_DELEGATION_REJECTIONS, g as RuntimeDelegationActivator, R as RuntimeDelegationRejectedError, a as RuntimeDelegationRejection, S as SessionGrantProof, V as ValidatedRuntimeDelegation, h as VerifiedSessionGrant, b as activateCompactRuntimeDelegation, c as activateValidatedRuntimeDelegation, d as deserializeDelegation, i as grantAuthRequest, s as serializeDelegation, j as signedCompactUcanExpiry, k as siweRuntimeDelegation } from './delegation-Ckc3UETl.js';
|
|
7
7
|
import { KVReplicaStorage } from '@tinycloud/sdk-services';
|
package/dist/index.js
CHANGED
|
@@ -18756,6 +18756,7 @@ import {
|
|
|
18756
18756
|
DUCKDB as DUCKDB2,
|
|
18757
18757
|
ENCRYPTION as ENCRYPTION2,
|
|
18758
18758
|
EXPIRY as EXPIRY3,
|
|
18759
|
+
assertExpiryWithinTechnicalLimit as assertExpiryWithinTechnicalLimit2,
|
|
18759
18760
|
canonicalHashHex,
|
|
18760
18761
|
canonicalizeEncryptionJson,
|
|
18761
18762
|
verifyDidKeyEd25519Signature,
|
|
@@ -18817,6 +18818,7 @@ import {
|
|
|
18817
18818
|
createInMemoryRegistrySequenceStore,
|
|
18818
18819
|
registryOwnerSubjectV1,
|
|
18819
18820
|
EXPIRY,
|
|
18821
|
+
assertExpiryWithinTechnicalLimit,
|
|
18820
18822
|
canonicalizeAddress,
|
|
18821
18823
|
makePkhSpaceId,
|
|
18822
18824
|
pkhDid,
|
|
@@ -19952,7 +19954,7 @@ var NodeUserAuthorization = class {
|
|
|
19952
19954
|
}
|
|
19953
19955
|
const jwk = JSON.parse(jwkString);
|
|
19954
19956
|
const now = /* @__PURE__ */ new Date();
|
|
19955
|
-
const expirationTime =
|
|
19957
|
+
const expirationTime = this.sessionExpiryFrom(now);
|
|
19956
19958
|
const primaryIdentity = pkhSpaceIdentity(options.spaceId);
|
|
19957
19959
|
const resourcesBySpace = /* @__PURE__ */ new Map();
|
|
19958
19960
|
for (const resource of options.capabilityRequest.resources) {
|
|
@@ -20007,6 +20009,17 @@ var NodeUserAuthorization = class {
|
|
|
20007
20009
|
signature: signature2
|
|
20008
20010
|
};
|
|
20009
20011
|
}
|
|
20012
|
+
/**
|
|
20013
|
+
* When a session that starts at `now` ends. Refused with a dated message when
|
|
20014
|
+
* the configured lifetime reaches past what a sign-in message can carry,
|
|
20015
|
+
* instead of the bare `RangeError` or WASM parse error `toISOString()` and
|
|
20016
|
+
* `prepareSession` would otherwise give.
|
|
20017
|
+
*/
|
|
20018
|
+
sessionExpiryFrom(now) {
|
|
20019
|
+
const expirationTime = new Date(now.getTime() + this.sessionExpirationMs);
|
|
20020
|
+
assertExpiryWithinTechnicalLimit(expirationTime, "siwe");
|
|
20021
|
+
return expirationTime;
|
|
20022
|
+
}
|
|
20010
20023
|
persistedData(session, expiresAt, createdAt, replicaStamp) {
|
|
20011
20024
|
return {
|
|
20012
20025
|
address: session.address,
|
|
@@ -20062,7 +20075,7 @@ var NodeUserAuthorization = class {
|
|
|
20062
20075
|
const capabilityPlan = this.resolveSignInCapabilities(address, chainId);
|
|
20063
20076
|
const spaceId = capabilityPlan.spaceId;
|
|
20064
20077
|
const now = /* @__PURE__ */ new Date();
|
|
20065
|
-
const expirationTime =
|
|
20078
|
+
const expirationTime = this.sessionExpiryFrom(now);
|
|
20066
20079
|
const prepared = this.prepareSessionWithResources({
|
|
20067
20080
|
abilities: capabilityPlan.abilities,
|
|
20068
20081
|
...capabilityPlan.spaceAbilities !== void 0 ? { spaceAbilities: capabilityPlan.spaceAbilities } : {},
|
|
@@ -20208,7 +20221,7 @@ var NodeUserAuthorization = class {
|
|
|
20208
20221
|
const capabilityPlan = this.resolveSignInCapabilities(address, chainId);
|
|
20209
20222
|
const spaceId = capabilityPlan.spaceId;
|
|
20210
20223
|
const now = /* @__PURE__ */ new Date();
|
|
20211
|
-
const expirationTime =
|
|
20224
|
+
const expirationTime = this.sessionExpiryFrom(now);
|
|
20212
20225
|
const prepared = this.prepareSessionWithResources({
|
|
20213
20226
|
abilities: capabilityPlan.abilities,
|
|
20214
20227
|
...capabilityPlan.spaceAbilities !== void 0 ? { spaceAbilities: capabilityPlan.spaceAbilities } : {},
|
|
@@ -20271,7 +20284,7 @@ var NodeUserAuthorization = class {
|
|
|
20271
20284
|
siwe: prepared.siwe,
|
|
20272
20285
|
signature: signature2
|
|
20273
20286
|
};
|
|
20274
|
-
const expiresAt = lastAnchoredLine(prepared.siwe ?? "", /^Expiration Time: (.+)$/gm) ?? new Date(
|
|
20287
|
+
const expiresAt = lastAnchoredLine(prepared.siwe ?? "", /^Expiration Time: (.+)$/gm) ?? this.sessionExpiryFrom(/* @__PURE__ */ new Date()).toISOString();
|
|
20275
20288
|
const createdAt = lastAnchoredLine(prepared.siwe ?? "", /^Issued At: (.+)$/gm) ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
20276
20289
|
const replicaStamp = await this.establishReplicaStamp?.(tinyCloudSession);
|
|
20277
20290
|
const persistedData = this.persistedData(tinyCloudSession, expiresAt, createdAt, replicaStamp);
|
|
@@ -25567,6 +25580,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25567
25580
|
// DID here and rejects the fragment as an invalid audience DID.
|
|
25568
25581
|
verificationMethod: params.session.verificationMethod.split("#", 1)[0]
|
|
25569
25582
|
};
|
|
25583
|
+
assertExpiryWithinTechnicalLimit2(params.expirationSecs * 1e3, "ucan");
|
|
25570
25584
|
const result = this.wasmBindings.createDelegation(
|
|
25571
25585
|
wasmSession,
|
|
25572
25586
|
params.delegateDID,
|
|
@@ -25599,9 +25613,10 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25599
25613
|
}
|
|
25600
25614
|
const permissions = ownerDelegationPermissions(params);
|
|
25601
25615
|
const now = /* @__PURE__ */ new Date();
|
|
25602
|
-
if (!(params.expiresAt instanceof Date) || params.expiresAt.getTime() <= now.getTime()
|
|
25603
|
-
throw new Error("Owner delegation expiry must be explicit, future, and
|
|
25616
|
+
if (!(params.expiresAt instanceof Date) || params.expiresAt.getTime() <= now.getTime()) {
|
|
25617
|
+
throw new Error("Owner delegation expiry must be explicit, future, and a valid date");
|
|
25604
25618
|
}
|
|
25619
|
+
assertExpiryWithinTechnicalLimit2(params.expiresAt, "siwe");
|
|
25605
25620
|
if (!this.signer) throw new Error("Owner wallet signer is required");
|
|
25606
25621
|
const session = this.currentTinyCloudSession();
|
|
25607
25622
|
if (!session) throw new Error("Owner session is required");
|
|
@@ -25702,6 +25717,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25702
25717
|
* not sent.
|
|
25703
25718
|
*/
|
|
25704
25719
|
async authorizeShareDeliveryV3(input) {
|
|
25720
|
+
assertExpiryWithinTechnicalLimit2(new Date(input.expiresAt), "siwe");
|
|
25705
25721
|
const envelopeRef = await shortDeliveryLinkBodyCid(input.shareUrl, input.trustedOrigins);
|
|
25706
25722
|
const session = this.currentTinyCloudSession();
|
|
25707
25723
|
const serviceSession = this._serviceContext?.session;
|
|
@@ -25754,6 +25770,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25754
25770
|
};
|
|
25755
25771
|
}
|
|
25756
25772
|
async createRootDelegationForSharing(params, assertActive) {
|
|
25773
|
+
assertExpiryWithinTechnicalLimit2(params.requestedExpiry, "siwe");
|
|
25757
25774
|
try {
|
|
25758
25775
|
return (await this.createOwnerDelegation({
|
|
25759
25776
|
delegateDid: params.shareKeyDID,
|
|
@@ -26450,6 +26467,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26450
26467
|
if (sessionExpiry !== void 0 && sessionExpiry < expiresAt) {
|
|
26451
26468
|
expiresAt = sessionExpiry;
|
|
26452
26469
|
}
|
|
26470
|
+
assertExpiryWithinTechnicalLimit2(expiresAt, "siwe");
|
|
26453
26471
|
const delegations = [];
|
|
26454
26472
|
let rawEntriesAttached = false;
|
|
26455
26473
|
for (const [spaceId, entries] of bySpace) {
|
|
@@ -27922,6 +27940,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
27922
27940
|
const now = /* @__PURE__ */ new Date();
|
|
27923
27941
|
const expiryMs = params.expiryMs ?? 60 * 60 * 1e3;
|
|
27924
27942
|
const expirationTime = new Date(now.getTime() + expiryMs);
|
|
27943
|
+
assertExpiryWithinTechnicalLimit2(expirationTime, "siwe");
|
|
27925
27944
|
const prepared = this.wasmBindings.prepareSession({
|
|
27926
27945
|
abilities,
|
|
27927
27946
|
address: this.wasmBindings.ensureEip55(session.address),
|
|
@@ -28076,6 +28095,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
28076
28095
|
const { abilities, rawAbilities } = this.buildActivationAbilities(delegation);
|
|
28077
28096
|
const now = /* @__PURE__ */ new Date();
|
|
28078
28097
|
const expirationTime = delegation.expiry;
|
|
28098
|
+
assertExpiryWithinTechnicalLimit2(expirationTime, "siwe");
|
|
28079
28099
|
const prepared = this.wasmBindings.prepareSession({
|
|
28080
28100
|
abilities,
|
|
28081
28101
|
address: this.wasmBindings.ensureEip55(mySession.address),
|
|
@@ -28195,6 +28215,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
28195
28215
|
const now = /* @__PURE__ */ new Date();
|
|
28196
28216
|
const requestedExpiry = params.expiryMs === void 0 ? parentDelegation.expiry : new Date(now.getTime() + params.expiryMs);
|
|
28197
28217
|
const actualExpiry = requestedExpiry > parentDelegation.expiry ? parentDelegation.expiry : requestedExpiry;
|
|
28218
|
+
assertExpiryWithinTechnicalLimit2(actualExpiry, "siwe");
|
|
28198
28219
|
const abilities = {};
|
|
28199
28220
|
const rawAbilities = {};
|
|
28200
28221
|
for (const resource of requestedResources) {
|