@tinycloud/node-sdk 3.3.0-beta.21 → 3.3.0-beta.23
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-BPDOmuf6.d.cts → TinyCloudNode-Dxdmw48u.d.cts} +9 -41
- package/dist/{TinyCloudNode-BPDOmuf6.d.ts → TinyCloudNode-Dxdmw48u.d.ts} +9 -41
- package/dist/{authority-C-pzOYXq.d.ts → authority-CT9_mApq.d.ts} +1 -1
- package/dist/{authority-21H2cKmO.d.cts → authority-DVbN0Tqt.d.cts} +1 -1
- package/dist/core.cjs +16 -63
- 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 +16 -63
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +16 -63
- 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 +16 -63
- 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, 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 } from './WasmKeyProvider-5Ee7fcAw.cjs';
|
|
4
|
-
export { A as ACCEPTED_MARKER_VERSIONS, a as AuthDelegationArtifact, b as AuthRequestArtifact, B as BOOTSTRAP_COMPLETION_MARKER_KEY, c as BOOTSTRAP_COMPLETION_MARKER_VERSION, d as BootstrapCompletionMarker, e as BootstrapWarning, C as CompactRuntimeDelegationInput, f as CreateOwnerDelegationParams, D as DelegateToOptions, g as DelegateToResult, h as DelegatedAccess, i as DelegationAuthority, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, j as NodeUserAuthorization, k as NodeUserAuthorizationAuthorizeFn, l as NodeUserAuthorizationConfig, O as OpenKeyAuthorizationResultV1, m as OpenKeyAuthorizeInput, n as OpenKeyAuthorizeTinyCloud, o as OpenKeyBridgeInput, p as OwnerDelegationReceipt, P as PortableDelegation, R as RUNTIME_DELEGATION_REJECTIONS, q as RestorableSession, r as RuntimeDelegationActivator, s as RuntimeDelegationRejectedError, t as RuntimeDelegationRejection, u as RuntimePermissionGrantOptions, S as SecretPermissionHint, v as SecretReadInput, w as SecretReadResult, x as SessionGrantProof, y as SignStrategy, T as TinyCloudNode, z as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, F as UnifiedOwnerRootReceipt, G as UnsupportedSessionRestoreError, V as ValidatedRuntimeDelegation, H as VerifiedSessionGrant, J as activateCompactRuntimeDelegation, K as activateValidatedRuntimeDelegation, L as defaultSignStrategy, M as deserializeDelegation, Q as grantAuthRequest, W as serializeDelegation, X as signedCompactUcanExpiry, Y as siweRuntimeDelegation, Z as wireOpenKeyAuthorize } from './TinyCloudNode-
|
|
4
|
+
export { A as ACCEPTED_MARKER_VERSIONS, a as AuthDelegationArtifact, b as AuthRequestArtifact, B as BOOTSTRAP_COMPLETION_MARKER_KEY, c as BOOTSTRAP_COMPLETION_MARKER_VERSION, d as BootstrapCompletionMarker, e as BootstrapWarning, C as CompactRuntimeDelegationInput, f as CreateOwnerDelegationParams, D as DelegateToOptions, g as DelegateToResult, h as DelegatedAccess, i as DelegationAuthority, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, j as NodeUserAuthorization, k as NodeUserAuthorizationAuthorizeFn, l as NodeUserAuthorizationConfig, O as OpenKeyAuthorizationResultV1, m as OpenKeyAuthorizeInput, n as OpenKeyAuthorizeTinyCloud, o as OpenKeyBridgeInput, p as OwnerDelegationReceipt, P as PortableDelegation, R as RUNTIME_DELEGATION_REJECTIONS, q as RestorableSession, r as RuntimeDelegationActivator, s as RuntimeDelegationRejectedError, t as RuntimeDelegationRejection, u as RuntimePermissionGrantOptions, S as SecretPermissionHint, v as SecretReadInput, w as SecretReadResult, x as SessionGrantProof, y as SignStrategy, T as TinyCloudNode, z as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, F as UnifiedOwnerRootReceipt, G as UnsupportedSessionRestoreError, V as ValidatedRuntimeDelegation, H as VerifiedSessionGrant, J as activateCompactRuntimeDelegation, K as activateValidatedRuntimeDelegation, L as defaultSignStrategy, M as deserializeDelegation, Q as grantAuthRequest, W as serializeDelegation, X as signedCompactUcanExpiry, Y as siweRuntimeDelegation, Z as wireOpenKeyAuthorize } from './TinyCloudNode-Dxdmw48u.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
|
import { KVReplicaStorage } from '@tinycloud/sdk-services';
|
|
7
7
|
import { ProfileReplicaPurge } from '@tinycloud/sdk-services/kv/replication';
|
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, 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 } from './WasmKeyProvider-5Ee7fcAw.js';
|
|
4
|
-
export { A as ACCEPTED_MARKER_VERSIONS, a as AuthDelegationArtifact, b as AuthRequestArtifact, B as BOOTSTRAP_COMPLETION_MARKER_KEY, c as BOOTSTRAP_COMPLETION_MARKER_VERSION, d as BootstrapCompletionMarker, e as BootstrapWarning, C as CompactRuntimeDelegationInput, f as CreateOwnerDelegationParams, D as DelegateToOptions, g as DelegateToResult, h as DelegatedAccess, i as DelegationAuthority, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, j as NodeUserAuthorization, k as NodeUserAuthorizationAuthorizeFn, l as NodeUserAuthorizationConfig, O as OpenKeyAuthorizationResultV1, m as OpenKeyAuthorizeInput, n as OpenKeyAuthorizeTinyCloud, o as OpenKeyBridgeInput, p as OwnerDelegationReceipt, P as PortableDelegation, R as RUNTIME_DELEGATION_REJECTIONS, q as RestorableSession, r as RuntimeDelegationActivator, s as RuntimeDelegationRejectedError, t as RuntimeDelegationRejection, u as RuntimePermissionGrantOptions, S as SecretPermissionHint, v as SecretReadInput, w as SecretReadResult, x as SessionGrantProof, y as SignStrategy, T as TinyCloudNode, z as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, F as UnifiedOwnerRootReceipt, G as UnsupportedSessionRestoreError, V as ValidatedRuntimeDelegation, H as VerifiedSessionGrant, J as activateCompactRuntimeDelegation, K as activateValidatedRuntimeDelegation, L as defaultSignStrategy, M as deserializeDelegation, Q as grantAuthRequest, W as serializeDelegation, X as signedCompactUcanExpiry, Y as siweRuntimeDelegation, Z as wireOpenKeyAuthorize } from './TinyCloudNode-
|
|
4
|
+
export { A as ACCEPTED_MARKER_VERSIONS, a as AuthDelegationArtifact, b as AuthRequestArtifact, B as BOOTSTRAP_COMPLETION_MARKER_KEY, c as BOOTSTRAP_COMPLETION_MARKER_VERSION, d as BootstrapCompletionMarker, e as BootstrapWarning, C as CompactRuntimeDelegationInput, f as CreateOwnerDelegationParams, D as DelegateToOptions, g as DelegateToResult, h as DelegatedAccess, i as DelegationAuthority, E as EnsureEncryptionNetworkOptions, I as InvalidRestoredSessionError, N as NodeEventEmitterStrategy, j as NodeUserAuthorization, k as NodeUserAuthorizationAuthorizeFn, l as NodeUserAuthorizationConfig, O as OpenKeyAuthorizationResultV1, m as OpenKeyAuthorizeInput, n as OpenKeyAuthorizeTinyCloud, o as OpenKeyBridgeInput, p as OwnerDelegationReceipt, P as PortableDelegation, R as RUNTIME_DELEGATION_REJECTIONS, q as RestorableSession, r as RuntimeDelegationActivator, s as RuntimeDelegationRejectedError, t as RuntimeDelegationRejection, u as RuntimePermissionGrantOptions, S as SecretPermissionHint, v as SecretReadInput, w as SecretReadResult, x as SessionGrantProof, y as SignStrategy, T as TinyCloudNode, z as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, F as UnifiedOwnerRootReceipt, G as UnsupportedSessionRestoreError, V as ValidatedRuntimeDelegation, H as VerifiedSessionGrant, J as activateCompactRuntimeDelegation, K as activateValidatedRuntimeDelegation, L as defaultSignStrategy, M as deserializeDelegation, Q as grantAuthRequest, W as serializeDelegation, X as signedCompactUcanExpiry, Y as siweRuntimeDelegation, Z as wireOpenKeyAuthorize } from './TinyCloudNode-Dxdmw48u.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
|
import { KVReplicaStorage } from '@tinycloud/sdk-services';
|
|
7
7
|
import { ProfileReplicaPurge } from '@tinycloud/sdk-services/kv/replication';
|
package/dist/index.js
CHANGED
|
@@ -21154,6 +21154,12 @@ function describeHostFailure2(result) {
|
|
|
21154
21154
|
const text = result.error?.trim();
|
|
21155
21155
|
return text ? `${result.status} - ${text}` : `${result.status}`;
|
|
21156
21156
|
}
|
|
21157
|
+
function assertDelegationActivated(result, delegation, requireActivation) {
|
|
21158
|
+
const skipped = requireActivation ? (delegation.resources?.map((r2) => r2.space) ?? [delegation.spaceId]).filter((space) => result.skipped?.includes(space)) : [];
|
|
21159
|
+
if (result.success && skipped.length === 0) return;
|
|
21160
|
+
const detail = result.success ? `the node skipped ${[...new Set(skipped)].join(", ")} (space not hosted on the node)` : describeHostFailure2(result);
|
|
21161
|
+
throw Object.assign(new Error(`Failed to activate delegation with host: ${detail}`), { cause: result });
|
|
21162
|
+
}
|
|
21157
21163
|
function ownerDelegationPermissions(params) {
|
|
21158
21164
|
const hasPermissions = Object.prototype.hasOwnProperty.call(params, "permissions");
|
|
21159
21165
|
const hasLegacy = Object.prototype.hasOwnProperty.call(params, "path") || Object.prototype.hasOwnProperty.call(params, "actions");
|
|
@@ -21787,7 +21793,6 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
21787
21793
|
if (!this.wasmBindings.computeCid) throw new Error("computeCid is unavailable");
|
|
21788
21794
|
return this.wasmBindings.computeCid(data, codec);
|
|
21789
21795
|
},
|
|
21790
|
-
// delegationManager: undefined - not needed for receive()
|
|
21791
21796
|
createKVService: (config) => {
|
|
21792
21797
|
const prefix = config.pathPrefix?.replace(/\/$/, "");
|
|
21793
21798
|
const kvService = new KVService2({ prefix });
|
|
@@ -23871,7 +23876,6 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
23871
23876
|
});
|
|
23872
23877
|
sharingService.updateConfig({
|
|
23873
23878
|
session: input.serviceSession,
|
|
23874
|
-
delegationManager,
|
|
23875
23879
|
sessionExpiry: input.sessionExpiry,
|
|
23876
23880
|
createDelegationWasm: (params) => {
|
|
23877
23881
|
graph.assertActive();
|
|
@@ -24811,7 +24815,6 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
24811
24815
|
assertActive: () => graph.assertActive(),
|
|
24812
24816
|
keyProvider: this._keyProvider,
|
|
24813
24817
|
registry: this._capabilityRegistry,
|
|
24814
|
-
delegationManager: this._delegationManager,
|
|
24815
24818
|
sessionExpiry: this.getSessionExpiry(),
|
|
24816
24819
|
createDelegationWasm: (params) => {
|
|
24817
24820
|
graph.assertActive();
|
|
@@ -25794,16 +25797,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
25794
25797
|
* ```typescript
|
|
25795
25798
|
* const delegations = alice.delegationManager;
|
|
25796
25799
|
*
|
|
25797
|
-
* //
|
|
25798
|
-
* const
|
|
25799
|
-
* delegateDID: bob.did,
|
|
25800
|
-
* path: "shared/",
|
|
25801
|
-
* actions: ["tinycloud.kv/get", "tinycloud.kv/put"],
|
|
25802
|
-
* expiry: new Date(Date.now() + 24 * 60 * 60 * 1000), // 24 hours
|
|
25803
|
-
* });
|
|
25804
|
-
*
|
|
25805
|
-
* // List delegations
|
|
25806
|
-
* const listResult = await delegations.list();
|
|
25800
|
+
* // Query account delegations
|
|
25801
|
+
* const page = await delegations.query();
|
|
25807
25802
|
*
|
|
25808
25803
|
* // Revoke a delegation
|
|
25809
25804
|
* await delegations.revoke(delegationCid);
|
|
@@ -26004,32 +25999,6 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26004
25999
|
// ===========================================================================
|
|
26005
26000
|
// v2 Delegation Convenience Methods
|
|
26006
26001
|
// ===========================================================================
|
|
26007
|
-
/**
|
|
26008
|
-
* Create a delegation using the v2 DelegationManager.
|
|
26009
|
-
*
|
|
26010
|
-
* This is a convenience method that wraps DelegationManager.create().
|
|
26011
|
-
* For more control, use `this.delegationManager` directly.
|
|
26012
|
-
*
|
|
26013
|
-
* @param params - Delegation parameters
|
|
26014
|
-
* @returns Result containing the created Delegation
|
|
26015
|
-
*
|
|
26016
|
-
* @example
|
|
26017
|
-
* ```typescript
|
|
26018
|
-
* const result = await alice.delegate({
|
|
26019
|
-
* delegateDID: bob.did,
|
|
26020
|
-
* path: "shared/",
|
|
26021
|
-
* actions: ["tinycloud.kv/get", "tinycloud.kv/put"],
|
|
26022
|
-
* expiry: new Date(Date.now() + 24 * 60 * 60 * 1000),
|
|
26023
|
-
* });
|
|
26024
|
-
*
|
|
26025
|
-
* if (result.ok) {
|
|
26026
|
-
* console.log("Delegation created:", result.data.cid);
|
|
26027
|
-
* }
|
|
26028
|
-
* ```
|
|
26029
|
-
*/
|
|
26030
|
-
async delegate(params) {
|
|
26031
|
-
return this.delegationManager.create(params);
|
|
26032
|
-
}
|
|
26033
26002
|
/**
|
|
26034
26003
|
* Revoke a delegation with the owner wallet when available. Session-only
|
|
26035
26004
|
* clients continue to use their delegated revocation authority.
|
|
@@ -26055,14 +26024,6 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26055
26024
|
0x55n
|
|
26056
26025
|
);
|
|
26057
26026
|
}
|
|
26058
|
-
/**
|
|
26059
|
-
* List all delegations for the current session's space.
|
|
26060
|
-
*
|
|
26061
|
-
* @returns Result containing an array of Delegations
|
|
26062
|
-
*/
|
|
26063
|
-
async listDelegations() {
|
|
26064
|
-
return this.delegationManager.list();
|
|
26065
|
-
}
|
|
26066
26027
|
/**
|
|
26067
26028
|
* Check if the current session has permission for a path and action.
|
|
26068
26029
|
*
|
|
@@ -26190,7 +26151,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26190
26151
|
plan.grant,
|
|
26191
26152
|
plan.operations,
|
|
26192
26153
|
onPrepared,
|
|
26193
|
-
options?.disableSubDelegation === true
|
|
26154
|
+
options?.disableSubDelegation === true,
|
|
26155
|
+
options?.requireActivation === true
|
|
26194
26156
|
);
|
|
26195
26157
|
return { delegation: delegation2, prompted: false };
|
|
26196
26158
|
}
|
|
@@ -26200,7 +26162,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26200
26162
|
effectiveExpiration,
|
|
26201
26163
|
session,
|
|
26202
26164
|
onPrepared,
|
|
26203
|
-
options?.disableSubDelegation === true
|
|
26165
|
+
options?.disableSubDelegation === true,
|
|
26166
|
+
options?.requireActivation === true
|
|
26204
26167
|
);
|
|
26205
26168
|
return { delegation, prompted: false };
|
|
26206
26169
|
}
|
|
@@ -26431,7 +26394,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26431
26394
|
*
|
|
26432
26395
|
* @internal
|
|
26433
26396
|
*/
|
|
26434
|
-
async createDelegationViaWasmPath(did, entries, expirationTime, session, onPrepared, disableSubDelegation = false) {
|
|
26397
|
+
async createDelegationViaWasmPath(did, entries, expirationTime, session, onPrepared, disableSubDelegation = false, requireActivation = false) {
|
|
26435
26398
|
if (entries.length === 0) {
|
|
26436
26399
|
throw new Error(
|
|
26437
26400
|
"createDelegationViaWasmPath requires a non-empty entries array"
|
|
@@ -26515,15 +26478,10 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26515
26478
|
this.config.host,
|
|
26516
26479
|
delegationHeader
|
|
26517
26480
|
);
|
|
26518
|
-
|
|
26519
|
-
throw Object.assign(
|
|
26520
|
-
new Error(`Failed to activate delegation with host: ${describeHostFailure2(activateResult)}`),
|
|
26521
|
-
{ cause: activateResult }
|
|
26522
|
-
);
|
|
26523
|
-
}
|
|
26481
|
+
assertDelegationActivated(activateResult, delegation, requireActivation);
|
|
26524
26482
|
return delegation;
|
|
26525
26483
|
}
|
|
26526
|
-
async createDelegationViaRuntimeGrant(did, entries, expirationTime, grant, requestedOperations, onPrepared, disableSubDelegation = false) {
|
|
26484
|
+
async createDelegationViaRuntimeGrant(did, entries, expirationTime, grant, requestedOperations, onPrepared, disableSubDelegation = false, requireActivation = false) {
|
|
26527
26485
|
this.assertRuntimeGrantCaveatsPreservable(entries, requestedOperations, grant);
|
|
26528
26486
|
this.assertDelegationCaveatsPreservable(entries);
|
|
26529
26487
|
const result = this.createDelegationWrapper({
|
|
@@ -26557,12 +26515,7 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
26557
26515
|
targetHost,
|
|
26558
26516
|
delegationHeader
|
|
26559
26517
|
);
|
|
26560
|
-
|
|
26561
|
-
throw Object.assign(
|
|
26562
|
-
new Error(`Failed to activate delegation with host: ${describeHostFailure2(activateResult)}`),
|
|
26563
|
-
{ cause: activateResult }
|
|
26564
|
-
);
|
|
26565
|
-
}
|
|
26518
|
+
assertDelegationActivated(activateResult, delegation, requireActivation);
|
|
26566
26519
|
return delegation;
|
|
26567
26520
|
}
|
|
26568
26521
|
resolvePermissionSpace(space, session) {
|