@tinycloud/node-sdk 3.6.0-beta.3 → 3.6.0-beta.5
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/README.md +6 -0
- package/dist/{TinyCloudNode-N4mfZI_k.d.cts → TinyCloudNode-B5WCe_ps.d.ts} +3 -250
- package/dist/{TinyCloudNode-N4mfZI_k.d.ts → TinyCloudNode-CIGurdHw.d.cts} +3 -250
- package/dist/{authority-BgZpUFss.d.cts → authority-Beg1WM2U.d.cts} +1 -1
- package/dist/{authority-C670-9su.d.ts → authority-Vh7ike0I.d.ts} +1 -1
- package/dist/core.d.cts +3 -2
- package/dist/core.d.ts +3 -2
- package/dist/credential-pending-store.cjs +401 -0
- package/dist/credential-pending-store.cjs.map +1 -0
- package/dist/credential-pending-store.d.cts +42 -0
- package/dist/credential-pending-store.d.ts +42 -0
- package/dist/credential-pending-store.js +389 -0
- package/dist/credential-pending-store.js.map +1 -0
- package/dist/credentials-core.cjs +309 -0
- package/dist/credentials-core.cjs.map +1 -0
- package/dist/credentials-core.d.cts +337 -0
- package/dist/credentials-core.d.ts +337 -0
- package/dist/credentials-core.js +294 -0
- package/dist/credentials-core.js.map +1 -0
- package/dist/credentials.cjs +746 -0
- package/dist/credentials.cjs.map +1 -0
- package/dist/credentials.d.cts +4 -0
- package/dist/credentials.d.ts +4 -0
- package/dist/credentials.js +732 -0
- package/dist/credentials.js.map +1 -0
- package/dist/delegation-0LKZkmP2.d.cts +251 -0
- package/dist/delegation-0LKZkmP2.d.ts +251 -0
- package/dist/email-proof-Blhdm4ox.d.cts +155 -0
- package/dist/email-proof-Blhdm4ox.d.ts +155 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/replication/authority.d.cts +3 -2
- package/dist/replication/authority.d.ts +3 -2
- package/package.json +18 -2
package/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# @tinycloud/node-sdk
|
|
2
|
+
|
|
3
|
+
## `@tinycloud/node-sdk/credential-pending-store`
|
|
4
|
+
|
|
5
|
+
File-backed pending store for the email-proof flow. It keeps one file per request under `<home>/credentials/`, named by a hash of the request id. The directory is created with mode 0700 and each file with mode 0600. Permissions and ownership are re-checked on every read. Only a `home` that is itself a symlink is refused; ancestors of `home` may be symlinks, but `realpath(home)` must be owned by the current user. Unsafe files are left in place and reported as an error.
|
|
6
|
+
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _tinycloud_sdk_core from '@tinycloud/sdk-core';
|
|
2
|
-
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions,
|
|
2
|
+
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, Delegation, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, RetryPolicy, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
3
3
|
import { ReplicaSessionStamp } from '@tinycloud/sdk-services/kv/replication';
|
|
4
4
|
import { InvokeFunction, InvokeAnyFunction, FetchFunction, RequestSink, RequestLogReader } from '@tinycloud/sdk-services';
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
|
+
import { P as PortableDelegation, S as SessionGrantProof, g as VerifiedSessionGrant } from './delegation-0LKZkmP2.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Node.js-specific SignStrategy types for TinyCloud authorization.
|
|
@@ -795,254 +796,6 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
795
796
|
private requestSignatureViaEmitter;
|
|
796
797
|
}
|
|
797
798
|
|
|
798
|
-
/**
|
|
799
|
-
* A portable delegation that can be transported between users.
|
|
800
|
-
* Extends the base Delegation type with fields required for transport.
|
|
801
|
-
*
|
|
802
|
-
* @remarks
|
|
803
|
-
* PortableDelegation adds transport fields to Delegation:
|
|
804
|
-
* - `delegationHeader`: Structured authorization header for API calls
|
|
805
|
-
* - `ownerAddress`: Space owner's address for session creation
|
|
806
|
-
* - `chainId`: Chain ID for session creation
|
|
807
|
-
* - `host`: Optional server URL
|
|
808
|
-
* - `resources`: Multi-resource grant breakdown (present when the
|
|
809
|
-
* delegation was issued via the multi-resource WASM path, i.e. one
|
|
810
|
-
* UCAN covering multiple `(service, path, actions)` entries). The
|
|
811
|
-
* flat `path` + `actions` fields mirror the first entry for
|
|
812
|
-
* single-resource callers; consumers that need the full picture
|
|
813
|
-
* read `resources`.
|
|
814
|
-
*/
|
|
815
|
-
interface PortableDelegation extends Omit<Delegation, "isRevoked"> {
|
|
816
|
-
/** The authorization header for this delegation (structured format) */
|
|
817
|
-
delegationHeader: {
|
|
818
|
-
Authorization: string;
|
|
819
|
-
};
|
|
820
|
-
/** The address of the space owner */
|
|
821
|
-
ownerAddress: string;
|
|
822
|
-
/** The chain ID */
|
|
823
|
-
chainId: number;
|
|
824
|
-
/** TinyCloud server URL where this delegation was created */
|
|
825
|
-
host?: string;
|
|
826
|
-
/** Whether the recipient is prevented from creating sub-delegations */
|
|
827
|
-
disableSubDelegation?: boolean;
|
|
828
|
-
/** Companion delegation for the user's public space (auto-created when includePublicSpace is true) */
|
|
829
|
-
publicDelegation?: PortableDelegation;
|
|
830
|
-
/**
|
|
831
|
-
* Full multi-resource grant breakdown. Present when the delegation
|
|
832
|
-
* was issued via the multi-resource WASM path; each entry describes
|
|
833
|
-
* one `(service, space, path, actions)` grant carried by the single
|
|
834
|
-
* underlying UCAN. When absent, only the flat `path` + `actions`
|
|
835
|
-
* fields are authoritative (legacy single-resource shape).
|
|
836
|
-
*/
|
|
837
|
-
resources?: DelegatedResource[];
|
|
838
|
-
/**
|
|
839
|
-
* The wallet-signed SIWE message and EIP-191 signature behind a
|
|
840
|
-
* `delegationHeader` that is a CACAO session grant (OpenKey `/delegate`,
|
|
841
|
-
* {@link TinyCloudNode.grantRuntimePermissions}) rather than a compact UCAN.
|
|
842
|
-
* Not authority: activation rebuilds the CACAO from them and accepts only
|
|
843
|
-
* byte-identical authorization bytes.
|
|
844
|
-
*/
|
|
845
|
-
siweProof?: {
|
|
846
|
-
siwe: string;
|
|
847
|
-
signature: string;
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* The transport shape `tc auth request --emit` produces and that an owner
|
|
852
|
-
* grants to its requester. Only the fields the grant logic needs are declared;
|
|
853
|
-
* the CLI artifact carries more (posture, captured command, ...) and remains a
|
|
854
|
-
* structural superset of this interface.
|
|
855
|
-
*/
|
|
856
|
-
interface AuthRequestArtifact {
|
|
857
|
-
kind: "tinycloud.auth.request";
|
|
858
|
-
version: 1;
|
|
859
|
-
requestId: string;
|
|
860
|
-
/** The requester's session DID — the audience the grant is issued to. */
|
|
861
|
-
sessionDid: string;
|
|
862
|
-
/** The capabilities the requester is asking the owner to delegate. */
|
|
863
|
-
requested: PermissionEntry[];
|
|
864
|
-
/** Optional lifetime override carried from the request. */
|
|
865
|
-
requestedExpiry?: string | number;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* The transport shape returned by {@link grantAuthRequest} (and written by
|
|
869
|
-
* `tc auth grant`). `tc auth import` accepts this artifact directly.
|
|
870
|
-
*/
|
|
871
|
-
interface AuthDelegationArtifact {
|
|
872
|
-
kind: "tinycloud.auth.delegation";
|
|
873
|
-
version: 1;
|
|
874
|
-
requestId: string;
|
|
875
|
-
delegationCid: string;
|
|
876
|
-
delegation: PortableDelegation;
|
|
877
|
-
permissions: PermissionEntry[];
|
|
878
|
-
expiry: string;
|
|
879
|
-
/** Whether issuing the delegation triggered a wallet prompt. */
|
|
880
|
-
prompted: boolean;
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* Minimal owner-side capability {@link grantAuthRequest} needs: the signed
|
|
884
|
-
* `delegateTo` primitive. `TinyCloudNode` satisfies this directly; web/SDK
|
|
885
|
-
* contexts can supply any object that exposes the same method.
|
|
886
|
-
*/
|
|
887
|
-
interface DelegationAuthority {
|
|
888
|
-
delegateTo(did: string, permissions: PermissionEntry[], options?: {
|
|
889
|
-
expiry?: string | number;
|
|
890
|
-
forceWalletSign?: boolean;
|
|
891
|
-
}): Promise<{
|
|
892
|
-
delegation: PortableDelegation;
|
|
893
|
-
prompted: boolean;
|
|
894
|
-
}>;
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* Authority that the validated runtime-delegation activation helper needs.
|
|
898
|
-
* `TinyCloudNode` implements this surface directly; keeping it structural
|
|
899
|
-
* makes the helper usable by a compatible Node wrapper without exposing node
|
|
900
|
-
* internals.
|
|
901
|
-
*/
|
|
902
|
-
interface RuntimeDelegationActivator {
|
|
903
|
-
readonly sessionDid: string;
|
|
904
|
-
readonly did?: string;
|
|
905
|
-
readonly isSessionOnly?: boolean;
|
|
906
|
-
computeDelegationCid(authorization: string): string;
|
|
907
|
-
useRuntimeDelegation(delegation: PortableDelegation): Promise<void>;
|
|
908
|
-
useDelegation?(delegation: PortableDelegation): Promise<unknown>;
|
|
909
|
-
getRuntimePermissionDelegations(): PortableDelegation[];
|
|
910
|
-
/**
|
|
911
|
-
* Verify a wallet-signed session grant issued to this runtime's live session
|
|
912
|
-
* key. Required to activate a CACAO grant; compact UCANs do not use it.
|
|
913
|
-
*/
|
|
914
|
-
verifySessionGrant?(grant: SessionGrantProof): VerifiedSessionGrant;
|
|
915
|
-
}
|
|
916
|
-
/** The installed authority returned by {@link activateValidatedRuntimeDelegation}. */
|
|
917
|
-
interface ValidatedRuntimeDelegation {
|
|
918
|
-
/** CID recomputed from the signed authorization bytes. */
|
|
919
|
-
readonly cid: string;
|
|
920
|
-
/** The authority object installed by the node runtime. */
|
|
921
|
-
readonly delegation: PortableDelegation;
|
|
922
|
-
/** Capabilities read from the signed compact UCAN attenuation or SIWE ReCap. */
|
|
923
|
-
readonly effectivePermissions: readonly PermissionEntry[];
|
|
924
|
-
/** Expiry read from the signed compact UCAN payload or SIWE. */
|
|
925
|
-
readonly expiry: Date;
|
|
926
|
-
/** Audience read from the signed compact UCAN payload or SIWE. */
|
|
927
|
-
readonly audience: string;
|
|
928
|
-
/** Host selected for, and used by, the runtime activation. */
|
|
929
|
-
readonly host: string;
|
|
930
|
-
}
|
|
931
|
-
interface CompactRuntimeDelegationInput {
|
|
932
|
-
readonly authorization: string;
|
|
933
|
-
readonly cid: string;
|
|
934
|
-
readonly host: string;
|
|
935
|
-
readonly ownerAddress: string;
|
|
936
|
-
readonly chainId: number;
|
|
937
|
-
}
|
|
938
|
-
/** A CACAO session grant and the signed SIWE proof it was built from. */
|
|
939
|
-
interface SessionGrantProof {
|
|
940
|
-
readonly delegationHeader: {
|
|
941
|
-
Authorization: string;
|
|
942
|
-
};
|
|
943
|
-
readonly delegationCid: string;
|
|
944
|
-
readonly spaceId: string;
|
|
945
|
-
readonly address: string;
|
|
946
|
-
readonly chainId: number;
|
|
947
|
-
readonly siwe: string;
|
|
948
|
-
readonly signature: string;
|
|
949
|
-
}
|
|
950
|
-
/** Authority read from a verified session grant's signed ReCap. */
|
|
951
|
-
interface VerifiedSessionGrant {
|
|
952
|
-
readonly recap: readonly {
|
|
953
|
-
service: string;
|
|
954
|
-
space: string;
|
|
955
|
-
path: string;
|
|
956
|
-
actions: string[];
|
|
957
|
-
caveats?: Record<string, unknown>[];
|
|
958
|
-
}[];
|
|
959
|
-
readonly expiresAt: Date;
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Stable reasons {@link activateValidatedRuntimeDelegation} refuses a
|
|
963
|
-
* delegation for. The error message is for the caller and may quote
|
|
964
|
-
* transport fields or a node's response; the reason is safe to publish.
|
|
965
|
-
*/
|
|
966
|
-
declare const RUNTIME_DELEGATION_REJECTIONS: readonly ["host_mismatch", "expired", "cid_mismatch", "authority_invalid", "proof_missing", "proof_invalid", "owner_mismatch", "audience_mismatch", "resources_mismatch", "unsupported", "activation_rejected", "activation_unavailable", "activation_unauthenticated"];
|
|
967
|
-
type RuntimeDelegationRejection = typeof RUNTIME_DELEGATION_REJECTIONS[number];
|
|
968
|
-
declare class RuntimeDelegationRejectedError extends Error {
|
|
969
|
-
readonly reason: RuntimeDelegationRejection;
|
|
970
|
-
constructor(reason: RuntimeDelegationRejection, message: string);
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* The expiry a compact UCAN authorization signs: its payload's `exp`. Reads
|
|
974
|
-
* the bytes the issuer's signature covers without verifying that signature,
|
|
975
|
-
* which the node does. `undefined` when `authorization` is not a compact UCAN
|
|
976
|
-
* or its payload has no finite numeric `exp`; then no local expiry decision
|
|
977
|
-
* can be made (activation refuses such a UCAN).
|
|
978
|
-
*/
|
|
979
|
-
declare function signedCompactUcanExpiry(authorization: string): Date | undefined;
|
|
980
|
-
/**
|
|
981
|
-
* CID-bind and activate one runtime delegation.
|
|
982
|
-
*
|
|
983
|
-
* A compact UCAN's audience, expiry and permissions come from its signed
|
|
984
|
-
* payload, and its transport fields must agree with them. A CACAO session
|
|
985
|
-
* grant (OpenKey `/delegate`, `grantRuntimePermissions`) is verified from its
|
|
986
|
-
* `siweProof` against this runtime's live session key; its installed
|
|
987
|
-
* authority is exactly the verified ReCap, and its transport `resources` are
|
|
988
|
-
* display data that is never consulted. Either way the helper then invokes
|
|
989
|
-
* {@link TinyCloudNode.useRuntimeDelegation}; the node activation call remains
|
|
990
|
-
* the authority and delegation-chain validation boundary.
|
|
991
|
-
*
|
|
992
|
-
* `options.authorize`, when given, sees the signed capabilities before
|
|
993
|
-
* anything is activated or installed; returning `false` refuses the
|
|
994
|
-
* delegation.
|
|
995
|
-
*/
|
|
996
|
-
declare function activateValidatedRuntimeDelegation(node: RuntimeDelegationActivator, delegation: PortableDelegation, options: {
|
|
997
|
-
host: string;
|
|
998
|
-
authorize?: (effectivePermissions: readonly PermissionEntry[]) => boolean;
|
|
999
|
-
}): Promise<ValidatedRuntimeDelegation>;
|
|
1000
|
-
/**
|
|
1001
|
-
* Import compact UCAN bytes returned by an authority ceremony through the
|
|
1002
|
-
* ordinary runtime-delegation activation path. All transport projections are
|
|
1003
|
-
* derived from signed bytes before `/delegate` is called.
|
|
1004
|
-
*/
|
|
1005
|
-
declare function activateCompactRuntimeDelegation(node: RuntimeDelegationActivator, input: CompactRuntimeDelegationInput): Promise<ValidatedRuntimeDelegation>;
|
|
1006
|
-
/**
|
|
1007
|
-
* Project an OpenKey signed-login delegation from the same verified CACAO
|
|
1008
|
-
* authority used when the runtime activates and replays it.
|
|
1009
|
-
*/
|
|
1010
|
-
declare function siweRuntimeDelegation(node: RuntimeDelegationActivator, input: {
|
|
1011
|
-
readonly authorization: string;
|
|
1012
|
-
readonly cid: string;
|
|
1013
|
-
readonly spaceId: string;
|
|
1014
|
-
readonly ownerAddress: string;
|
|
1015
|
-
readonly chainId: number;
|
|
1016
|
-
readonly siwe: string;
|
|
1017
|
-
readonly signature: string;
|
|
1018
|
-
readonly host: string;
|
|
1019
|
-
}): PortableDelegation;
|
|
1020
|
-
/**
|
|
1021
|
-
* Turn a delegation REQUEST into a signed GRANT.
|
|
1022
|
-
*
|
|
1023
|
-
* Lifts the body of `tc auth grant` into the SDK so the request→grant
|
|
1024
|
-
* handshake is callable programmatically (future SDK/web owner tooling and the
|
|
1025
|
-
* KV delegation inbox), with the CLI verb reduced to a thin wrapper. The owner
|
|
1026
|
-
* `authority` (a `TinyCloudNode`) signs a delegation scoped to exactly the
|
|
1027
|
-
* requested caps, audienced to the requester's `sessionDid`, honoring the
|
|
1028
|
-
* request's expiry. The returned artifact round-trips through `tc auth import`.
|
|
1029
|
-
*
|
|
1030
|
-
* Authorization is enforced cryptographically by `delegateTo`: caps that are
|
|
1031
|
-
* not derivable from the owner's own session capability chain are rejected
|
|
1032
|
-
* (it throws), so this never widens authority the owner doesn't hold.
|
|
1033
|
-
*/
|
|
1034
|
-
declare function grantAuthRequest(authority: DelegationAuthority, request: AuthRequestArtifact, options?: {
|
|
1035
|
-
expiry?: string | number;
|
|
1036
|
-
}): Promise<AuthDelegationArtifact>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Serialize a PortableDelegation for transport (e.g., over network).
|
|
1039
|
-
*/
|
|
1040
|
-
declare function serializeDelegation(delegation: PortableDelegation): string;
|
|
1041
|
-
/**
|
|
1042
|
-
* Deserialize a PortableDelegation from transport.
|
|
1043
|
-
*/
|
|
1044
|
-
declare function deserializeDelegation(data: string): PortableDelegation;
|
|
1045
|
-
|
|
1046
799
|
/**
|
|
1047
800
|
* The handles needed to rehydrate this delegation activation in a fresh
|
|
1048
801
|
* `TinyCloudNode` via `TinyCloudNode.restoreSession(...)` in another process
|
|
@@ -2895,4 +2648,4 @@ declare class TinyCloudNode {
|
|
|
2895
2648
|
}): Promise<PortableDelegation>;
|
|
2896
2649
|
}
|
|
2897
2650
|
|
|
2898
|
-
export { ACCEPTED_MARKER_VERSIONS as A,
|
|
2651
|
+
export { ACCEPTED_MARKER_VERSIONS as A, type BootstrapWarning as B, type CreateOwnerDelegationParams as C, type DelegateToOptions as D, type EnsureEncryptionNetworkOptions as E, InvalidRestoredSessionError as I, type NodeEventEmitterStrategy as N, type OwnerDelegationReceipt as O, type RuntimePermissionGrantOptions as R, type SecretPermissionHint as S, TinyCloudNode as T, type UnifiedOwnerRootInput as U, type DelegateToResult as a, DelegatedAccess as b, NodeUserAuthorization as c, type NodeUserAuthorizationConfig as d, type SecretReadInput as e, type SecretReadResult as f, type SignStrategy as g, type TinyCloudNodeConfig as h, type UnifiedOwnerRootReceipt as i, UnsupportedSessionRestoreError as j, defaultSignStrategy as k, BOOTSTRAP_COMPLETION_MARKER_KEY as l, BOOTSTRAP_COMPLETION_MARKER_VERSION as m, type BootstrapCompletionMarker as n, type NodeUserAuthorizationAuthorizeFn as o, type OpenKeyAuthorizationResultV1 as p, type OpenKeyAuthorizeInput as q, type OpenKeyAuthorizeTinyCloud as r, type OpenKeyBridgeInput as s, type RestorableSession as t, wireOpenKeyAuthorize as w };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _tinycloud_sdk_core from '@tinycloud/sdk-core';
|
|
2
|
-
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions,
|
|
2
|
+
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, Delegation, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, RetryPolicy, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
3
3
|
import { ReplicaSessionStamp } from '@tinycloud/sdk-services/kv/replication';
|
|
4
4
|
import { InvokeFunction, InvokeAnyFunction, FetchFunction, RequestSink, RequestLogReader } from '@tinycloud/sdk-services';
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
|
+
import { P as PortableDelegation, S as SessionGrantProof, g as VerifiedSessionGrant } from './delegation-0LKZkmP2.cjs';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Node.js-specific SignStrategy types for TinyCloud authorization.
|
|
@@ -795,254 +796,6 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
795
796
|
private requestSignatureViaEmitter;
|
|
796
797
|
}
|
|
797
798
|
|
|
798
|
-
/**
|
|
799
|
-
* A portable delegation that can be transported between users.
|
|
800
|
-
* Extends the base Delegation type with fields required for transport.
|
|
801
|
-
*
|
|
802
|
-
* @remarks
|
|
803
|
-
* PortableDelegation adds transport fields to Delegation:
|
|
804
|
-
* - `delegationHeader`: Structured authorization header for API calls
|
|
805
|
-
* - `ownerAddress`: Space owner's address for session creation
|
|
806
|
-
* - `chainId`: Chain ID for session creation
|
|
807
|
-
* - `host`: Optional server URL
|
|
808
|
-
* - `resources`: Multi-resource grant breakdown (present when the
|
|
809
|
-
* delegation was issued via the multi-resource WASM path, i.e. one
|
|
810
|
-
* UCAN covering multiple `(service, path, actions)` entries). The
|
|
811
|
-
* flat `path` + `actions` fields mirror the first entry for
|
|
812
|
-
* single-resource callers; consumers that need the full picture
|
|
813
|
-
* read `resources`.
|
|
814
|
-
*/
|
|
815
|
-
interface PortableDelegation extends Omit<Delegation, "isRevoked"> {
|
|
816
|
-
/** The authorization header for this delegation (structured format) */
|
|
817
|
-
delegationHeader: {
|
|
818
|
-
Authorization: string;
|
|
819
|
-
};
|
|
820
|
-
/** The address of the space owner */
|
|
821
|
-
ownerAddress: string;
|
|
822
|
-
/** The chain ID */
|
|
823
|
-
chainId: number;
|
|
824
|
-
/** TinyCloud server URL where this delegation was created */
|
|
825
|
-
host?: string;
|
|
826
|
-
/** Whether the recipient is prevented from creating sub-delegations */
|
|
827
|
-
disableSubDelegation?: boolean;
|
|
828
|
-
/** Companion delegation for the user's public space (auto-created when includePublicSpace is true) */
|
|
829
|
-
publicDelegation?: PortableDelegation;
|
|
830
|
-
/**
|
|
831
|
-
* Full multi-resource grant breakdown. Present when the delegation
|
|
832
|
-
* was issued via the multi-resource WASM path; each entry describes
|
|
833
|
-
* one `(service, space, path, actions)` grant carried by the single
|
|
834
|
-
* underlying UCAN. When absent, only the flat `path` + `actions`
|
|
835
|
-
* fields are authoritative (legacy single-resource shape).
|
|
836
|
-
*/
|
|
837
|
-
resources?: DelegatedResource[];
|
|
838
|
-
/**
|
|
839
|
-
* The wallet-signed SIWE message and EIP-191 signature behind a
|
|
840
|
-
* `delegationHeader` that is a CACAO session grant (OpenKey `/delegate`,
|
|
841
|
-
* {@link TinyCloudNode.grantRuntimePermissions}) rather than a compact UCAN.
|
|
842
|
-
* Not authority: activation rebuilds the CACAO from them and accepts only
|
|
843
|
-
* byte-identical authorization bytes.
|
|
844
|
-
*/
|
|
845
|
-
siweProof?: {
|
|
846
|
-
siwe: string;
|
|
847
|
-
signature: string;
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* The transport shape `tc auth request --emit` produces and that an owner
|
|
852
|
-
* grants to its requester. Only the fields the grant logic needs are declared;
|
|
853
|
-
* the CLI artifact carries more (posture, captured command, ...) and remains a
|
|
854
|
-
* structural superset of this interface.
|
|
855
|
-
*/
|
|
856
|
-
interface AuthRequestArtifact {
|
|
857
|
-
kind: "tinycloud.auth.request";
|
|
858
|
-
version: 1;
|
|
859
|
-
requestId: string;
|
|
860
|
-
/** The requester's session DID — the audience the grant is issued to. */
|
|
861
|
-
sessionDid: string;
|
|
862
|
-
/** The capabilities the requester is asking the owner to delegate. */
|
|
863
|
-
requested: PermissionEntry[];
|
|
864
|
-
/** Optional lifetime override carried from the request. */
|
|
865
|
-
requestedExpiry?: string | number;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* The transport shape returned by {@link grantAuthRequest} (and written by
|
|
869
|
-
* `tc auth grant`). `tc auth import` accepts this artifact directly.
|
|
870
|
-
*/
|
|
871
|
-
interface AuthDelegationArtifact {
|
|
872
|
-
kind: "tinycloud.auth.delegation";
|
|
873
|
-
version: 1;
|
|
874
|
-
requestId: string;
|
|
875
|
-
delegationCid: string;
|
|
876
|
-
delegation: PortableDelegation;
|
|
877
|
-
permissions: PermissionEntry[];
|
|
878
|
-
expiry: string;
|
|
879
|
-
/** Whether issuing the delegation triggered a wallet prompt. */
|
|
880
|
-
prompted: boolean;
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* Minimal owner-side capability {@link grantAuthRequest} needs: the signed
|
|
884
|
-
* `delegateTo` primitive. `TinyCloudNode` satisfies this directly; web/SDK
|
|
885
|
-
* contexts can supply any object that exposes the same method.
|
|
886
|
-
*/
|
|
887
|
-
interface DelegationAuthority {
|
|
888
|
-
delegateTo(did: string, permissions: PermissionEntry[], options?: {
|
|
889
|
-
expiry?: string | number;
|
|
890
|
-
forceWalletSign?: boolean;
|
|
891
|
-
}): Promise<{
|
|
892
|
-
delegation: PortableDelegation;
|
|
893
|
-
prompted: boolean;
|
|
894
|
-
}>;
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* Authority that the validated runtime-delegation activation helper needs.
|
|
898
|
-
* `TinyCloudNode` implements this surface directly; keeping it structural
|
|
899
|
-
* makes the helper usable by a compatible Node wrapper without exposing node
|
|
900
|
-
* internals.
|
|
901
|
-
*/
|
|
902
|
-
interface RuntimeDelegationActivator {
|
|
903
|
-
readonly sessionDid: string;
|
|
904
|
-
readonly did?: string;
|
|
905
|
-
readonly isSessionOnly?: boolean;
|
|
906
|
-
computeDelegationCid(authorization: string): string;
|
|
907
|
-
useRuntimeDelegation(delegation: PortableDelegation): Promise<void>;
|
|
908
|
-
useDelegation?(delegation: PortableDelegation): Promise<unknown>;
|
|
909
|
-
getRuntimePermissionDelegations(): PortableDelegation[];
|
|
910
|
-
/**
|
|
911
|
-
* Verify a wallet-signed session grant issued to this runtime's live session
|
|
912
|
-
* key. Required to activate a CACAO grant; compact UCANs do not use it.
|
|
913
|
-
*/
|
|
914
|
-
verifySessionGrant?(grant: SessionGrantProof): VerifiedSessionGrant;
|
|
915
|
-
}
|
|
916
|
-
/** The installed authority returned by {@link activateValidatedRuntimeDelegation}. */
|
|
917
|
-
interface ValidatedRuntimeDelegation {
|
|
918
|
-
/** CID recomputed from the signed authorization bytes. */
|
|
919
|
-
readonly cid: string;
|
|
920
|
-
/** The authority object installed by the node runtime. */
|
|
921
|
-
readonly delegation: PortableDelegation;
|
|
922
|
-
/** Capabilities read from the signed compact UCAN attenuation or SIWE ReCap. */
|
|
923
|
-
readonly effectivePermissions: readonly PermissionEntry[];
|
|
924
|
-
/** Expiry read from the signed compact UCAN payload or SIWE. */
|
|
925
|
-
readonly expiry: Date;
|
|
926
|
-
/** Audience read from the signed compact UCAN payload or SIWE. */
|
|
927
|
-
readonly audience: string;
|
|
928
|
-
/** Host selected for, and used by, the runtime activation. */
|
|
929
|
-
readonly host: string;
|
|
930
|
-
}
|
|
931
|
-
interface CompactRuntimeDelegationInput {
|
|
932
|
-
readonly authorization: string;
|
|
933
|
-
readonly cid: string;
|
|
934
|
-
readonly host: string;
|
|
935
|
-
readonly ownerAddress: string;
|
|
936
|
-
readonly chainId: number;
|
|
937
|
-
}
|
|
938
|
-
/** A CACAO session grant and the signed SIWE proof it was built from. */
|
|
939
|
-
interface SessionGrantProof {
|
|
940
|
-
readonly delegationHeader: {
|
|
941
|
-
Authorization: string;
|
|
942
|
-
};
|
|
943
|
-
readonly delegationCid: string;
|
|
944
|
-
readonly spaceId: string;
|
|
945
|
-
readonly address: string;
|
|
946
|
-
readonly chainId: number;
|
|
947
|
-
readonly siwe: string;
|
|
948
|
-
readonly signature: string;
|
|
949
|
-
}
|
|
950
|
-
/** Authority read from a verified session grant's signed ReCap. */
|
|
951
|
-
interface VerifiedSessionGrant {
|
|
952
|
-
readonly recap: readonly {
|
|
953
|
-
service: string;
|
|
954
|
-
space: string;
|
|
955
|
-
path: string;
|
|
956
|
-
actions: string[];
|
|
957
|
-
caveats?: Record<string, unknown>[];
|
|
958
|
-
}[];
|
|
959
|
-
readonly expiresAt: Date;
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Stable reasons {@link activateValidatedRuntimeDelegation} refuses a
|
|
963
|
-
* delegation for. The error message is for the caller and may quote
|
|
964
|
-
* transport fields or a node's response; the reason is safe to publish.
|
|
965
|
-
*/
|
|
966
|
-
declare const RUNTIME_DELEGATION_REJECTIONS: readonly ["host_mismatch", "expired", "cid_mismatch", "authority_invalid", "proof_missing", "proof_invalid", "owner_mismatch", "audience_mismatch", "resources_mismatch", "unsupported", "activation_rejected", "activation_unavailable", "activation_unauthenticated"];
|
|
967
|
-
type RuntimeDelegationRejection = typeof RUNTIME_DELEGATION_REJECTIONS[number];
|
|
968
|
-
declare class RuntimeDelegationRejectedError extends Error {
|
|
969
|
-
readonly reason: RuntimeDelegationRejection;
|
|
970
|
-
constructor(reason: RuntimeDelegationRejection, message: string);
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* The expiry a compact UCAN authorization signs: its payload's `exp`. Reads
|
|
974
|
-
* the bytes the issuer's signature covers without verifying that signature,
|
|
975
|
-
* which the node does. `undefined` when `authorization` is not a compact UCAN
|
|
976
|
-
* or its payload has no finite numeric `exp`; then no local expiry decision
|
|
977
|
-
* can be made (activation refuses such a UCAN).
|
|
978
|
-
*/
|
|
979
|
-
declare function signedCompactUcanExpiry(authorization: string): Date | undefined;
|
|
980
|
-
/**
|
|
981
|
-
* CID-bind and activate one runtime delegation.
|
|
982
|
-
*
|
|
983
|
-
* A compact UCAN's audience, expiry and permissions come from its signed
|
|
984
|
-
* payload, and its transport fields must agree with them. A CACAO session
|
|
985
|
-
* grant (OpenKey `/delegate`, `grantRuntimePermissions`) is verified from its
|
|
986
|
-
* `siweProof` against this runtime's live session key; its installed
|
|
987
|
-
* authority is exactly the verified ReCap, and its transport `resources` are
|
|
988
|
-
* display data that is never consulted. Either way the helper then invokes
|
|
989
|
-
* {@link TinyCloudNode.useRuntimeDelegation}; the node activation call remains
|
|
990
|
-
* the authority and delegation-chain validation boundary.
|
|
991
|
-
*
|
|
992
|
-
* `options.authorize`, when given, sees the signed capabilities before
|
|
993
|
-
* anything is activated or installed; returning `false` refuses the
|
|
994
|
-
* delegation.
|
|
995
|
-
*/
|
|
996
|
-
declare function activateValidatedRuntimeDelegation(node: RuntimeDelegationActivator, delegation: PortableDelegation, options: {
|
|
997
|
-
host: string;
|
|
998
|
-
authorize?: (effectivePermissions: readonly PermissionEntry[]) => boolean;
|
|
999
|
-
}): Promise<ValidatedRuntimeDelegation>;
|
|
1000
|
-
/**
|
|
1001
|
-
* Import compact UCAN bytes returned by an authority ceremony through the
|
|
1002
|
-
* ordinary runtime-delegation activation path. All transport projections are
|
|
1003
|
-
* derived from signed bytes before `/delegate` is called.
|
|
1004
|
-
*/
|
|
1005
|
-
declare function activateCompactRuntimeDelegation(node: RuntimeDelegationActivator, input: CompactRuntimeDelegationInput): Promise<ValidatedRuntimeDelegation>;
|
|
1006
|
-
/**
|
|
1007
|
-
* Project an OpenKey signed-login delegation from the same verified CACAO
|
|
1008
|
-
* authority used when the runtime activates and replays it.
|
|
1009
|
-
*/
|
|
1010
|
-
declare function siweRuntimeDelegation(node: RuntimeDelegationActivator, input: {
|
|
1011
|
-
readonly authorization: string;
|
|
1012
|
-
readonly cid: string;
|
|
1013
|
-
readonly spaceId: string;
|
|
1014
|
-
readonly ownerAddress: string;
|
|
1015
|
-
readonly chainId: number;
|
|
1016
|
-
readonly siwe: string;
|
|
1017
|
-
readonly signature: string;
|
|
1018
|
-
readonly host: string;
|
|
1019
|
-
}): PortableDelegation;
|
|
1020
|
-
/**
|
|
1021
|
-
* Turn a delegation REQUEST into a signed GRANT.
|
|
1022
|
-
*
|
|
1023
|
-
* Lifts the body of `tc auth grant` into the SDK so the request→grant
|
|
1024
|
-
* handshake is callable programmatically (future SDK/web owner tooling and the
|
|
1025
|
-
* KV delegation inbox), with the CLI verb reduced to a thin wrapper. The owner
|
|
1026
|
-
* `authority` (a `TinyCloudNode`) signs a delegation scoped to exactly the
|
|
1027
|
-
* requested caps, audienced to the requester's `sessionDid`, honoring the
|
|
1028
|
-
* request's expiry. The returned artifact round-trips through `tc auth import`.
|
|
1029
|
-
*
|
|
1030
|
-
* Authorization is enforced cryptographically by `delegateTo`: caps that are
|
|
1031
|
-
* not derivable from the owner's own session capability chain are rejected
|
|
1032
|
-
* (it throws), so this never widens authority the owner doesn't hold.
|
|
1033
|
-
*/
|
|
1034
|
-
declare function grantAuthRequest(authority: DelegationAuthority, request: AuthRequestArtifact, options?: {
|
|
1035
|
-
expiry?: string | number;
|
|
1036
|
-
}): Promise<AuthDelegationArtifact>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Serialize a PortableDelegation for transport (e.g., over network).
|
|
1039
|
-
*/
|
|
1040
|
-
declare function serializeDelegation(delegation: PortableDelegation): string;
|
|
1041
|
-
/**
|
|
1042
|
-
* Deserialize a PortableDelegation from transport.
|
|
1043
|
-
*/
|
|
1044
|
-
declare function deserializeDelegation(data: string): PortableDelegation;
|
|
1045
|
-
|
|
1046
799
|
/**
|
|
1047
800
|
* The handles needed to rehydrate this delegation activation in a fresh
|
|
1048
801
|
* `TinyCloudNode` via `TinyCloudNode.restoreSession(...)` in another process
|
|
@@ -2895,4 +2648,4 @@ declare class TinyCloudNode {
|
|
|
2895
2648
|
}): Promise<PortableDelegation>;
|
|
2896
2649
|
}
|
|
2897
2650
|
|
|
2898
|
-
export { ACCEPTED_MARKER_VERSIONS as A,
|
|
2651
|
+
export { ACCEPTED_MARKER_VERSIONS as A, type BootstrapWarning as B, type CreateOwnerDelegationParams as C, type DelegateToOptions as D, type EnsureEncryptionNetworkOptions as E, InvalidRestoredSessionError as I, type NodeEventEmitterStrategy as N, type OwnerDelegationReceipt as O, type RuntimePermissionGrantOptions as R, type SecretPermissionHint as S, TinyCloudNode as T, type UnifiedOwnerRootInput as U, type DelegateToResult as a, DelegatedAccess as b, NodeUserAuthorization as c, type NodeUserAuthorizationConfig as d, type SecretReadInput as e, type SecretReadResult as f, type SignStrategy as g, type TinyCloudNodeConfig as h, type UnifiedOwnerRootReceipt as i, UnsupportedSessionRestoreError as j, defaultSignStrategy as k, BOOTSTRAP_COMPLETION_MARKER_KEY as l, BOOTSTRAP_COMPLETION_MARKER_VERSION as m, type BootstrapCompletionMarker as n, type NodeUserAuthorizationAuthorizeFn as o, type OpenKeyAuthorizationResultV1 as p, type OpenKeyAuthorizeInput as q, type OpenKeyAuthorizeTinyCloud as r, type OpenKeyBridgeInput as s, type RestorableSession as t, wireOpenKeyAuthorize as w };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-CIGurdHw.cjs';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-B5WCe_ps.js';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
package/dist/core.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReplicationOptions } 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-Beg1WM2U.cjs';
|
|
5
5
|
import { _ as __runtime } from './runtime-D1o9Eybt.cjs';
|
|
6
6
|
import { ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
7
7
|
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider } from './WasmKeyProvider-5Ee7fcAw.cjs';
|
|
8
|
-
export {
|
|
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 OwnerDelegationReceipt, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, e as SecretReadInput, f as SecretReadResult, g as SignStrategy, T as TinyCloudNode, h as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, i as UnifiedOwnerRootReceipt, j as UnsupportedSessionRestoreError, k as defaultSignStrategy } from './TinyCloudNode-CIGurdHw.cjs';
|
|
9
|
+
export { C as CompactRuntimeDelegationInput, P as PortableDelegation, V as ValidatedRuntimeDelegation, a as activateCompactRuntimeDelegation, d as deserializeDelegation, s as serializeDelegation } from './delegation-0LKZkmP2.cjs';
|
|
9
10
|
import '@tinycloud/sdk-services';
|
|
10
11
|
import 'events';
|
|
11
12
|
|
package/dist/core.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReplicationOptions } 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-Vh7ike0I.js';
|
|
5
5
|
import { _ as __runtime } from './runtime-v62FzQHz.js';
|
|
6
6
|
import { ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
7
7
|
export { F as FileSessionStorage, M as MemorySessionStorage, W as WasmKeyProvider, a as WasmKeyProviderConfig, c as createWasmKeyProvider } from './WasmKeyProvider-5Ee7fcAw.js';
|
|
8
|
-
export {
|
|
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 OwnerDelegationReceipt, R as RuntimePermissionGrantOptions, S as SecretPermissionHint, e as SecretReadInput, f as SecretReadResult, g as SignStrategy, T as TinyCloudNode, h as TinyCloudNodeConfig, U as UnifiedOwnerRootInput, i as UnifiedOwnerRootReceipt, j as UnsupportedSessionRestoreError, k as defaultSignStrategy } from './TinyCloudNode-B5WCe_ps.js';
|
|
9
|
+
export { C as CompactRuntimeDelegationInput, P as PortableDelegation, V as ValidatedRuntimeDelegation, a as activateCompactRuntimeDelegation, d as deserializeDelegation, s as serializeDelegation } from './delegation-0LKZkmP2.js';
|
|
9
10
|
import '@tinycloud/sdk-services';
|
|
10
11
|
import 'events';
|
|
11
12
|
|