@tinycloud/sdk-core 3.3.0-beta.17 → 3.3.0-beta.18
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/index.cjs +385 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -1
- package/dist/index.d.ts +139 -1
- package/dist/index.js +385 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3591,6 +3591,144 @@ declare function verifyOwnerNodeBinding(options: VerifyOwnerNodeBindingOptions):
|
|
|
3591
3591
|
declare function httpUrlToMultiaddr(input: string): string;
|
|
3592
3592
|
declare function verifyDidKeyEd25519Signature(did: string, payload: Uint8Array, signature: Uint8Array): boolean;
|
|
3593
3593
|
|
|
3594
|
+
/**
|
|
3595
|
+
* Three-state registry verdict for an owner DID (TC-1443, TC-1444).
|
|
3596
|
+
*
|
|
3597
|
+
* A registry lookup has exactly three outcomes, and callers must never
|
|
3598
|
+
* collapse them:
|
|
3599
|
+
*
|
|
3600
|
+
* - `registered`: a verified owner record exists. `hosts: []` is a valid
|
|
3601
|
+
* registered record with no usable hosts (for example a tombstone), not
|
|
3602
|
+
* "no record".
|
|
3603
|
+
* - `unregistered`: the registry said there is no record and nothing
|
|
3604
|
+
* remembered says otherwise. Only this state may route an owner to a
|
|
3605
|
+
* new-user default.
|
|
3606
|
+
* - `unavailable`: anything else. Network errors, timeouts, non-200/404
|
|
3607
|
+
* statuses, unrecognised or oversize bodies, subject mismatches, bad
|
|
3608
|
+
* signatures, and records older than the remembered sequence all fail
|
|
3609
|
+
* closed here.
|
|
3610
|
+
*
|
|
3611
|
+
* {@link classifyRegistryLookup} is a pure classifier over one registry
|
|
3612
|
+
* response. It performs no I/O and is not used by host resolution yet. Its
|
|
3613
|
+
* rules are written to be portable: the shared vectors in
|
|
3614
|
+
* `test-vectors/registry-verdict/` state them for other implementations.
|
|
3615
|
+
*/
|
|
3616
|
+
type RegistryVerdictStatus = "registered" | "unregistered" | "unavailable";
|
|
3617
|
+
/** Which registry source produced a verdict. */
|
|
3618
|
+
type RegistryVerdictSource = "chain" | "chain-cache" | "offchain";
|
|
3619
|
+
/** Which source listed a host. `hint` is an address hint not yet confirmed by a node record. */
|
|
3620
|
+
type RegistryHostSource = RegistryVerdictSource | "hint";
|
|
3621
|
+
interface RegistryHost {
|
|
3622
|
+
/** Node DID that must answer `/info` at these origins, when the record names one. */
|
|
3623
|
+
readonly nodeDid?: string;
|
|
3624
|
+
/**
|
|
3625
|
+
* HTTP(S) origins (`scheme://host[:port]`, no path, query, fragment or
|
|
3626
|
+
* userinfo). Not filtered for HTTPS, address class or node identity: host
|
|
3627
|
+
* selection applies that policy.
|
|
3628
|
+
*/
|
|
3629
|
+
readonly urls: readonly string[];
|
|
3630
|
+
readonly source: RegistryHostSource;
|
|
3631
|
+
/** Expiry of the node record the origins came from, when it has one. */
|
|
3632
|
+
readonly expiresAt?: string;
|
|
3633
|
+
}
|
|
3634
|
+
type RegistryUnavailableReason =
|
|
3635
|
+
/** The registry could not be reached (refused, DNS, TLS, redirect refused). */
|
|
3636
|
+
"network-error"
|
|
3637
|
+
/** The lookup exceeded its time budget. */
|
|
3638
|
+
| "timeout"
|
|
3639
|
+
/** The registry answered with a status other than 200 or 404. */
|
|
3640
|
+
| "http-status"
|
|
3641
|
+
/** The body is not the registry's record or not-found response. */
|
|
3642
|
+
| "malformed-response"
|
|
3643
|
+
/** The body exceeds {@link REGISTRY_LOOKUP_MAX_BODY_BYTES}. */
|
|
3644
|
+
| "oversize-response"
|
|
3645
|
+
/** A record was returned for a different subject. */
|
|
3646
|
+
| "subject-mismatch"
|
|
3647
|
+
/** The record signature does not verify for its subject. */
|
|
3648
|
+
| "invalid-signature"
|
|
3649
|
+
/** The record's sequence is below the remembered sequence. */
|
|
3650
|
+
| "rollback"
|
|
3651
|
+
/** The registry said "not found" for a subject remembered as registered. */
|
|
3652
|
+
| "not-found-after-registered";
|
|
3653
|
+
interface RegisteredRegistryVerdict {
|
|
3654
|
+
readonly status: "registered";
|
|
3655
|
+
readonly subject: string;
|
|
3656
|
+
readonly source: RegistryVerdictSource;
|
|
3657
|
+
/** Sequence of the accepted record. Callers persist the maximum they have seen. */
|
|
3658
|
+
readonly sequence: number;
|
|
3659
|
+
/** Listed hosts in record order. Empty when the record lists no usable host. */
|
|
3660
|
+
readonly hosts: readonly RegistryHost[];
|
|
3661
|
+
}
|
|
3662
|
+
interface UnregisteredRegistryVerdict {
|
|
3663
|
+
readonly status: "unregistered";
|
|
3664
|
+
readonly subject: string;
|
|
3665
|
+
readonly source: RegistryVerdictSource;
|
|
3666
|
+
readonly hosts: readonly [];
|
|
3667
|
+
}
|
|
3668
|
+
interface UnavailableRegistryVerdict {
|
|
3669
|
+
readonly status: "unavailable";
|
|
3670
|
+
readonly subject: string;
|
|
3671
|
+
readonly source: RegistryVerdictSource;
|
|
3672
|
+
readonly reason: RegistryUnavailableReason;
|
|
3673
|
+
/** Human-readable detail for logs and errors. Not part of the contract. */
|
|
3674
|
+
readonly message: string;
|
|
3675
|
+
readonly hosts: readonly [];
|
|
3676
|
+
}
|
|
3677
|
+
type RegistryVerdict = RegisteredRegistryVerdict | UnregisteredRegistryVerdict | UnavailableRegistryVerdict;
|
|
3678
|
+
/**
|
|
3679
|
+
* One observed registry lookup: an HTTP response, or the reason none arrived.
|
|
3680
|
+
* The I/O layer must cap the raw body while reading it (as
|
|
3681
|
+
* `fetchLocationRecord` does); `body` is that capped body decoded as UTF-8.
|
|
3682
|
+
*/
|
|
3683
|
+
type RegistryLookupResponse = {
|
|
3684
|
+
readonly kind: "http";
|
|
3685
|
+
readonly status: number;
|
|
3686
|
+
readonly body: string;
|
|
3687
|
+
} | {
|
|
3688
|
+
readonly kind: "network-error";
|
|
3689
|
+
} | {
|
|
3690
|
+
readonly kind: "timeout";
|
|
3691
|
+
};
|
|
3692
|
+
interface ClassifyRegistryLookupOptions {
|
|
3693
|
+
/**
|
|
3694
|
+
* Highest record sequence previously accepted for this subject. Its
|
|
3695
|
+
* presence means the subject is known to be registered: a later not-found
|
|
3696
|
+
* or an older record is `unavailable`, never `unregistered`.
|
|
3697
|
+
*/
|
|
3698
|
+
rememberedSequence?: number | null;
|
|
3699
|
+
}
|
|
3700
|
+
type RegistryLookupInputErrorCode = "invalid-subject" | "invalid-remembered-sequence";
|
|
3701
|
+
/** The caller passed a lookup input that cannot be classified. */
|
|
3702
|
+
declare class RegistryLookupInputError extends TypeError {
|
|
3703
|
+
readonly code: RegistryLookupInputErrorCode;
|
|
3704
|
+
constructor(code: RegistryLookupInputErrorCode, message: string);
|
|
3705
|
+
}
|
|
3706
|
+
/** Largest registry response body accepted, in UTF-8 bytes. */
|
|
3707
|
+
declare const REGISTRY_LOOKUP_MAX_BODY_BYTES: number;
|
|
3708
|
+
/** The exact body of the location registry's 404 for a subject with no record. */
|
|
3709
|
+
declare const REGISTRY_NOT_FOUND_BODY = "{\"error\":\"location record not found\"}";
|
|
3710
|
+
/**
|
|
3711
|
+
* Classify one off-chain location registry v1 response for `subject`.
|
|
3712
|
+
*
|
|
3713
|
+
* Checks run in this order, and the first failure decides the reason:
|
|
3714
|
+
* transport (`network-error`, `timeout`); status other than 200 or 404
|
|
3715
|
+
* (`http-status`); body over 65536 UTF-8 bytes (`oversize-response`). A 404
|
|
3716
|
+
* is `unregistered` only if its body, with leading and trailing JSON
|
|
3717
|
+
* whitespace removed, is exactly {@link REGISTRY_NOT_FOUND_BODY} and no
|
|
3718
|
+
* sequence is remembered. A 200 must be strict JSON holding a valid v1
|
|
3719
|
+
* `record` (`malformed-response`) for exactly `subject`
|
|
3720
|
+
* (`subject-mismatch`) whose signature verifies (`invalid-signature`) and
|
|
3721
|
+
* whose sequence is not below the remembered one (`rollback`).
|
|
3722
|
+
*
|
|
3723
|
+
* A 404 is unauthenticated: its exact bytes are the only evidence that the
|
|
3724
|
+
* registry itself answered.
|
|
3725
|
+
*
|
|
3726
|
+
* @throws RegistryLookupInputError if `subject` is not a canonical
|
|
3727
|
+
* `did:pkh:eip155:<chainId>:<EIP-55 address>` or Ed25519 `did:key`, or
|
|
3728
|
+
* `rememberedSequence` is not a non-negative safe integer.
|
|
3729
|
+
*/
|
|
3730
|
+
declare function classifyRegistryLookup(subject: string, response: RegistryLookupResponse, options?: ClassifyRegistryLookupOptions): Promise<RegistryVerdict>;
|
|
3731
|
+
|
|
3594
3732
|
/**
|
|
3595
3733
|
* Default lifetimes for the various delegation shapes the SDK mints.
|
|
3596
3734
|
*
|
|
@@ -3620,4 +3758,4 @@ declare const EXPIRY: {
|
|
|
3620
3758
|
declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
|
|
3621
3759
|
type ExpiryTier = keyof typeof EXPIRY;
|
|
3622
3760
|
|
|
3623
|
-
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountApplicationRegisterOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, CREDENTIAL_ERROR_CODES, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CanonicalTinyCloudIdentity, type CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, CredentialError, type CredentialErrorCode, CredentialFlowDescriptor, CredentialHolderBinding, CredentialIssuerMetadata, CredentialRequirement, CredentialStorageReceipt, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, EMAIL_CREDENTIAL_MAX_AGE_SECONDS, EMAIL_DOMAIN_CREDENTIAL_MAX_AGE_SECONDS, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type ImmutableSiweFields, IssuedCredentialEnvelope, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, LocationRegistryHttpError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, OWNER_NODE_BINDING_TIMEOUT_MS, type OpenKeyCallbackStrategy, type OpenKeyManageKeyCallbackStrategy, OpenKeyManageKeyError, type OpenKeyManageKeyErrorCode, type OpenKeyManageKeyFetch, type OpenKeyManageKeySigningRequestBody, type OpenKeyManageKeySigningResponseBody, type OpenKeyManageKeySigningStrategyOptions, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type PublishLocationRecordOptions, type RecapAttenuation, type RegisterBatchSuccess, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, type SignedSiweCacao, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, StoredCredentialRecord, type SubsetCheckResult, TERMINAL_DELEGATION_FACT, TINYCLOUD_CANONICAL_IDENTITY_CLAIM, TINYCLOUD_MANAGE_KEY_SCOPE, type TerminalDelegationSigningKey, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VerifiedCredential, type VerifiedOwnerNodeBinding, type VerifyOwnerNodeBindingOptions, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalDigest, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createEmailCredentialRequirement, createEmailDomainCredentialRequirement, createHolderBinding, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createOpenKeyManageKeySigningStrategy, createSpaceService, createStorageReceipt, createStoredCredentialRecord, credentialEndpointPath, credentialError, credentialIndexKey, credentialMatchesRequirement, credentialRecordKey, credentialRequirementDigest, decodeBase64Url, defaultSignStrategy, defaultSpaceCreationHandler, descriptorSatisfiesRequirement, didCacheKey, didEquals, diffImmutableSiweFields, discoverLocalTinyCloudNode, encodeBase64Url, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, extractImmutableSiweFields, extractRecapAttenuations, fetchLocationRecord, fetchPeerId, hasTinyCloudManageKeyScope, holderBindingCanonicalBytes, holderBindingSigningBytes, httpResponseError, httpUrlToMultiaddr, isCapabilitySubset, isDigest, isEvmAddress, isExplicitOnlyAction, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, markDelegationTerminal, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseCanonicalTinyCloudIdentity, parseCanonicalTinyCloudIdentityClaims, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSignedSiweCacao, parseSpaceUri, pkhDid, principalDid, principalDidEquals, publishLocationRecord, recapCaveatsEqual, requestTinyCloudManageKeyScope, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, sha256Base64Url, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateCredentialFlowDescriptor, validateCredentialHolderBinding, validateCredentialRequirement, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyEip191MessageSignature, verifyIssuedCredential, verifyLocationRecord, verifyOwnerNodeBinding, verifyStorageReceipt };
|
|
3761
|
+
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountApplicationRegisterOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, CREDENTIAL_ERROR_CODES, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CanonicalTinyCloudIdentity, type CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClassifyRegistryLookupOptions, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, CredentialError, type CredentialErrorCode, CredentialFlowDescriptor, CredentialHolderBinding, CredentialIssuerMetadata, CredentialRequirement, CredentialStorageReceipt, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, EMAIL_CREDENTIAL_MAX_AGE_SECONDS, EMAIL_DOMAIN_CREDENTIAL_MAX_AGE_SECONDS, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type ImmutableSiweFields, IssuedCredentialEnvelope, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, LocationRegistryHttpError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, OWNER_NODE_BINDING_TIMEOUT_MS, type OpenKeyCallbackStrategy, type OpenKeyManageKeyCallbackStrategy, OpenKeyManageKeyError, type OpenKeyManageKeyErrorCode, type OpenKeyManageKeyFetch, type OpenKeyManageKeySigningRequestBody, type OpenKeyManageKeySigningResponseBody, type OpenKeyManageKeySigningStrategyOptions, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type PublishLocationRecordOptions, REGISTRY_LOOKUP_MAX_BODY_BYTES, REGISTRY_NOT_FOUND_BODY, type RecapAttenuation, type RegisterBatchSuccess, type RegisteredRegistryVerdict, type RegistryHost, type RegistryHostSource, RegistryLookupInputError, type RegistryLookupInputErrorCode, type RegistryLookupResponse, type RegistryUnavailableReason, type RegistryVerdict, type RegistryVerdictSource, type RegistryVerdictStatus, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, type SignedSiweCacao, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, StoredCredentialRecord, type SubsetCheckResult, TERMINAL_DELEGATION_FACT, TINYCLOUD_CANONICAL_IDENTITY_CLAIM, TINYCLOUD_MANAGE_KEY_SCOPE, type TerminalDelegationSigningKey, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, type UnavailableRegistryVerdict, type UnregisteredRegistryVerdict, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VerifiedCredential, type VerifiedOwnerNodeBinding, type VerifyOwnerNodeBindingOptions, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalDigest, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, classifyRegistryLookup, composeManifestRequest, createEmailCredentialRequirement, createEmailDomainCredentialRequirement, createHolderBinding, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createOpenKeyManageKeySigningStrategy, createSpaceService, createStorageReceipt, createStoredCredentialRecord, credentialEndpointPath, credentialError, credentialIndexKey, credentialMatchesRequirement, credentialRecordKey, credentialRequirementDigest, decodeBase64Url, defaultSignStrategy, defaultSpaceCreationHandler, descriptorSatisfiesRequirement, didCacheKey, didEquals, diffImmutableSiweFields, discoverLocalTinyCloudNode, encodeBase64Url, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, extractImmutableSiweFields, extractRecapAttenuations, fetchLocationRecord, fetchPeerId, hasTinyCloudManageKeyScope, holderBindingCanonicalBytes, holderBindingSigningBytes, httpResponseError, httpUrlToMultiaddr, isCapabilitySubset, isDigest, isEvmAddress, isExplicitOnlyAction, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, markDelegationTerminal, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseCanonicalTinyCloudIdentity, parseCanonicalTinyCloudIdentityClaims, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSignedSiweCacao, parseSpaceUri, pkhDid, principalDid, principalDidEquals, publishLocationRecord, recapCaveatsEqual, requestTinyCloudManageKeyScope, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, sha256Base64Url, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateCredentialFlowDescriptor, validateCredentialHolderBinding, validateCredentialRequirement, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyEip191MessageSignature, verifyIssuedCredential, verifyLocationRecord, verifyOwnerNodeBinding, verifyStorageReceipt };
|
package/dist/index.d.ts
CHANGED
|
@@ -3591,6 +3591,144 @@ declare function verifyOwnerNodeBinding(options: VerifyOwnerNodeBindingOptions):
|
|
|
3591
3591
|
declare function httpUrlToMultiaddr(input: string): string;
|
|
3592
3592
|
declare function verifyDidKeyEd25519Signature(did: string, payload: Uint8Array, signature: Uint8Array): boolean;
|
|
3593
3593
|
|
|
3594
|
+
/**
|
|
3595
|
+
* Three-state registry verdict for an owner DID (TC-1443, TC-1444).
|
|
3596
|
+
*
|
|
3597
|
+
* A registry lookup has exactly three outcomes, and callers must never
|
|
3598
|
+
* collapse them:
|
|
3599
|
+
*
|
|
3600
|
+
* - `registered`: a verified owner record exists. `hosts: []` is a valid
|
|
3601
|
+
* registered record with no usable hosts (for example a tombstone), not
|
|
3602
|
+
* "no record".
|
|
3603
|
+
* - `unregistered`: the registry said there is no record and nothing
|
|
3604
|
+
* remembered says otherwise. Only this state may route an owner to a
|
|
3605
|
+
* new-user default.
|
|
3606
|
+
* - `unavailable`: anything else. Network errors, timeouts, non-200/404
|
|
3607
|
+
* statuses, unrecognised or oversize bodies, subject mismatches, bad
|
|
3608
|
+
* signatures, and records older than the remembered sequence all fail
|
|
3609
|
+
* closed here.
|
|
3610
|
+
*
|
|
3611
|
+
* {@link classifyRegistryLookup} is a pure classifier over one registry
|
|
3612
|
+
* response. It performs no I/O and is not used by host resolution yet. Its
|
|
3613
|
+
* rules are written to be portable: the shared vectors in
|
|
3614
|
+
* `test-vectors/registry-verdict/` state them for other implementations.
|
|
3615
|
+
*/
|
|
3616
|
+
type RegistryVerdictStatus = "registered" | "unregistered" | "unavailable";
|
|
3617
|
+
/** Which registry source produced a verdict. */
|
|
3618
|
+
type RegistryVerdictSource = "chain" | "chain-cache" | "offchain";
|
|
3619
|
+
/** Which source listed a host. `hint` is an address hint not yet confirmed by a node record. */
|
|
3620
|
+
type RegistryHostSource = RegistryVerdictSource | "hint";
|
|
3621
|
+
interface RegistryHost {
|
|
3622
|
+
/** Node DID that must answer `/info` at these origins, when the record names one. */
|
|
3623
|
+
readonly nodeDid?: string;
|
|
3624
|
+
/**
|
|
3625
|
+
* HTTP(S) origins (`scheme://host[:port]`, no path, query, fragment or
|
|
3626
|
+
* userinfo). Not filtered for HTTPS, address class or node identity: host
|
|
3627
|
+
* selection applies that policy.
|
|
3628
|
+
*/
|
|
3629
|
+
readonly urls: readonly string[];
|
|
3630
|
+
readonly source: RegistryHostSource;
|
|
3631
|
+
/** Expiry of the node record the origins came from, when it has one. */
|
|
3632
|
+
readonly expiresAt?: string;
|
|
3633
|
+
}
|
|
3634
|
+
type RegistryUnavailableReason =
|
|
3635
|
+
/** The registry could not be reached (refused, DNS, TLS, redirect refused). */
|
|
3636
|
+
"network-error"
|
|
3637
|
+
/** The lookup exceeded its time budget. */
|
|
3638
|
+
| "timeout"
|
|
3639
|
+
/** The registry answered with a status other than 200 or 404. */
|
|
3640
|
+
| "http-status"
|
|
3641
|
+
/** The body is not the registry's record or not-found response. */
|
|
3642
|
+
| "malformed-response"
|
|
3643
|
+
/** The body exceeds {@link REGISTRY_LOOKUP_MAX_BODY_BYTES}. */
|
|
3644
|
+
| "oversize-response"
|
|
3645
|
+
/** A record was returned for a different subject. */
|
|
3646
|
+
| "subject-mismatch"
|
|
3647
|
+
/** The record signature does not verify for its subject. */
|
|
3648
|
+
| "invalid-signature"
|
|
3649
|
+
/** The record's sequence is below the remembered sequence. */
|
|
3650
|
+
| "rollback"
|
|
3651
|
+
/** The registry said "not found" for a subject remembered as registered. */
|
|
3652
|
+
| "not-found-after-registered";
|
|
3653
|
+
interface RegisteredRegistryVerdict {
|
|
3654
|
+
readonly status: "registered";
|
|
3655
|
+
readonly subject: string;
|
|
3656
|
+
readonly source: RegistryVerdictSource;
|
|
3657
|
+
/** Sequence of the accepted record. Callers persist the maximum they have seen. */
|
|
3658
|
+
readonly sequence: number;
|
|
3659
|
+
/** Listed hosts in record order. Empty when the record lists no usable host. */
|
|
3660
|
+
readonly hosts: readonly RegistryHost[];
|
|
3661
|
+
}
|
|
3662
|
+
interface UnregisteredRegistryVerdict {
|
|
3663
|
+
readonly status: "unregistered";
|
|
3664
|
+
readonly subject: string;
|
|
3665
|
+
readonly source: RegistryVerdictSource;
|
|
3666
|
+
readonly hosts: readonly [];
|
|
3667
|
+
}
|
|
3668
|
+
interface UnavailableRegistryVerdict {
|
|
3669
|
+
readonly status: "unavailable";
|
|
3670
|
+
readonly subject: string;
|
|
3671
|
+
readonly source: RegistryVerdictSource;
|
|
3672
|
+
readonly reason: RegistryUnavailableReason;
|
|
3673
|
+
/** Human-readable detail for logs and errors. Not part of the contract. */
|
|
3674
|
+
readonly message: string;
|
|
3675
|
+
readonly hosts: readonly [];
|
|
3676
|
+
}
|
|
3677
|
+
type RegistryVerdict = RegisteredRegistryVerdict | UnregisteredRegistryVerdict | UnavailableRegistryVerdict;
|
|
3678
|
+
/**
|
|
3679
|
+
* One observed registry lookup: an HTTP response, or the reason none arrived.
|
|
3680
|
+
* The I/O layer must cap the raw body while reading it (as
|
|
3681
|
+
* `fetchLocationRecord` does); `body` is that capped body decoded as UTF-8.
|
|
3682
|
+
*/
|
|
3683
|
+
type RegistryLookupResponse = {
|
|
3684
|
+
readonly kind: "http";
|
|
3685
|
+
readonly status: number;
|
|
3686
|
+
readonly body: string;
|
|
3687
|
+
} | {
|
|
3688
|
+
readonly kind: "network-error";
|
|
3689
|
+
} | {
|
|
3690
|
+
readonly kind: "timeout";
|
|
3691
|
+
};
|
|
3692
|
+
interface ClassifyRegistryLookupOptions {
|
|
3693
|
+
/**
|
|
3694
|
+
* Highest record sequence previously accepted for this subject. Its
|
|
3695
|
+
* presence means the subject is known to be registered: a later not-found
|
|
3696
|
+
* or an older record is `unavailable`, never `unregistered`.
|
|
3697
|
+
*/
|
|
3698
|
+
rememberedSequence?: number | null;
|
|
3699
|
+
}
|
|
3700
|
+
type RegistryLookupInputErrorCode = "invalid-subject" | "invalid-remembered-sequence";
|
|
3701
|
+
/** The caller passed a lookup input that cannot be classified. */
|
|
3702
|
+
declare class RegistryLookupInputError extends TypeError {
|
|
3703
|
+
readonly code: RegistryLookupInputErrorCode;
|
|
3704
|
+
constructor(code: RegistryLookupInputErrorCode, message: string);
|
|
3705
|
+
}
|
|
3706
|
+
/** Largest registry response body accepted, in UTF-8 bytes. */
|
|
3707
|
+
declare const REGISTRY_LOOKUP_MAX_BODY_BYTES: number;
|
|
3708
|
+
/** The exact body of the location registry's 404 for a subject with no record. */
|
|
3709
|
+
declare const REGISTRY_NOT_FOUND_BODY = "{\"error\":\"location record not found\"}";
|
|
3710
|
+
/**
|
|
3711
|
+
* Classify one off-chain location registry v1 response for `subject`.
|
|
3712
|
+
*
|
|
3713
|
+
* Checks run in this order, and the first failure decides the reason:
|
|
3714
|
+
* transport (`network-error`, `timeout`); status other than 200 or 404
|
|
3715
|
+
* (`http-status`); body over 65536 UTF-8 bytes (`oversize-response`). A 404
|
|
3716
|
+
* is `unregistered` only if its body, with leading and trailing JSON
|
|
3717
|
+
* whitespace removed, is exactly {@link REGISTRY_NOT_FOUND_BODY} and no
|
|
3718
|
+
* sequence is remembered. A 200 must be strict JSON holding a valid v1
|
|
3719
|
+
* `record` (`malformed-response`) for exactly `subject`
|
|
3720
|
+
* (`subject-mismatch`) whose signature verifies (`invalid-signature`) and
|
|
3721
|
+
* whose sequence is not below the remembered one (`rollback`).
|
|
3722
|
+
*
|
|
3723
|
+
* A 404 is unauthenticated: its exact bytes are the only evidence that the
|
|
3724
|
+
* registry itself answered.
|
|
3725
|
+
*
|
|
3726
|
+
* @throws RegistryLookupInputError if `subject` is not a canonical
|
|
3727
|
+
* `did:pkh:eip155:<chainId>:<EIP-55 address>` or Ed25519 `did:key`, or
|
|
3728
|
+
* `rememberedSequence` is not a non-negative safe integer.
|
|
3729
|
+
*/
|
|
3730
|
+
declare function classifyRegistryLookup(subject: string, response: RegistryLookupResponse, options?: ClassifyRegistryLookupOptions): Promise<RegistryVerdict>;
|
|
3731
|
+
|
|
3594
3732
|
/**
|
|
3595
3733
|
* Default lifetimes for the various delegation shapes the SDK mints.
|
|
3596
3734
|
*
|
|
@@ -3620,4 +3758,4 @@ declare const EXPIRY: {
|
|
|
3620
3758
|
declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
|
|
3621
3759
|
type ExpiryTier = keyof typeof EXPIRY;
|
|
3622
3760
|
|
|
3623
|
-
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountApplicationRegisterOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, CREDENTIAL_ERROR_CODES, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CanonicalTinyCloudIdentity, type CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, CredentialError, type CredentialErrorCode, CredentialFlowDescriptor, CredentialHolderBinding, CredentialIssuerMetadata, CredentialRequirement, CredentialStorageReceipt, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, EMAIL_CREDENTIAL_MAX_AGE_SECONDS, EMAIL_DOMAIN_CREDENTIAL_MAX_AGE_SECONDS, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type ImmutableSiweFields, IssuedCredentialEnvelope, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, LocationRegistryHttpError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, OWNER_NODE_BINDING_TIMEOUT_MS, type OpenKeyCallbackStrategy, type OpenKeyManageKeyCallbackStrategy, OpenKeyManageKeyError, type OpenKeyManageKeyErrorCode, type OpenKeyManageKeyFetch, type OpenKeyManageKeySigningRequestBody, type OpenKeyManageKeySigningResponseBody, type OpenKeyManageKeySigningStrategyOptions, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type PublishLocationRecordOptions, type RecapAttenuation, type RegisterBatchSuccess, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, type SignedSiweCacao, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, StoredCredentialRecord, type SubsetCheckResult, TERMINAL_DELEGATION_FACT, TINYCLOUD_CANONICAL_IDENTITY_CLAIM, TINYCLOUD_MANAGE_KEY_SCOPE, type TerminalDelegationSigningKey, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VerifiedCredential, type VerifiedOwnerNodeBinding, type VerifyOwnerNodeBindingOptions, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalDigest, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createEmailCredentialRequirement, createEmailDomainCredentialRequirement, createHolderBinding, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createOpenKeyManageKeySigningStrategy, createSpaceService, createStorageReceipt, createStoredCredentialRecord, credentialEndpointPath, credentialError, credentialIndexKey, credentialMatchesRequirement, credentialRecordKey, credentialRequirementDigest, decodeBase64Url, defaultSignStrategy, defaultSpaceCreationHandler, descriptorSatisfiesRequirement, didCacheKey, didEquals, diffImmutableSiweFields, discoverLocalTinyCloudNode, encodeBase64Url, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, extractImmutableSiweFields, extractRecapAttenuations, fetchLocationRecord, fetchPeerId, hasTinyCloudManageKeyScope, holderBindingCanonicalBytes, holderBindingSigningBytes, httpResponseError, httpUrlToMultiaddr, isCapabilitySubset, isDigest, isEvmAddress, isExplicitOnlyAction, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, markDelegationTerminal, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseCanonicalTinyCloudIdentity, parseCanonicalTinyCloudIdentityClaims, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSignedSiweCacao, parseSpaceUri, pkhDid, principalDid, principalDidEquals, publishLocationRecord, recapCaveatsEqual, requestTinyCloudManageKeyScope, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, sha256Base64Url, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateCredentialFlowDescriptor, validateCredentialHolderBinding, validateCredentialRequirement, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyEip191MessageSignature, verifyIssuedCredential, verifyLocationRecord, verifyOwnerNodeBinding, verifyStorageReceipt };
|
|
3761
|
+
export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountApplicationRegisterOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, CREDENTIAL_ERROR_CODES, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CanonicalTinyCloudIdentity, type CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClassifyRegistryLookupOptions, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, CredentialError, type CredentialErrorCode, CredentialFlowDescriptor, CredentialHolderBinding, CredentialIssuerMetadata, CredentialRequirement, CredentialStorageReceipt, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, EMAIL_CREDENTIAL_MAX_AGE_SECONDS, EMAIL_DOMAIN_CREDENTIAL_MAX_AGE_SECONDS, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type ImmutableSiweFields, IssuedCredentialEnvelope, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, LocationRegistryHttpError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, OWNER_NODE_BINDING_TIMEOUT_MS, type OpenKeyCallbackStrategy, type OpenKeyManageKeyCallbackStrategy, OpenKeyManageKeyError, type OpenKeyManageKeyErrorCode, type OpenKeyManageKeyFetch, type OpenKeyManageKeySigningRequestBody, type OpenKeyManageKeySigningResponseBody, type OpenKeyManageKeySigningStrategyOptions, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type PublishLocationRecordOptions, REGISTRY_LOOKUP_MAX_BODY_BYTES, REGISTRY_NOT_FOUND_BODY, type RecapAttenuation, type RegisterBatchSuccess, type RegisteredRegistryVerdict, type RegistryHost, type RegistryHostSource, RegistryLookupInputError, type RegistryLookupInputErrorCode, type RegistryLookupResponse, type RegistryUnavailableReason, type RegistryVerdict, type RegistryVerdictSource, type RegistryVerdictStatus, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, type SignedSiweCacao, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, StoredCredentialRecord, type SubsetCheckResult, TERMINAL_DELEGATION_FACT, TINYCLOUD_CANONICAL_IDENTITY_CLAIM, TINYCLOUD_MANAGE_KEY_SCOPE, type TerminalDelegationSigningKey, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, type UnavailableRegistryVerdict, type UnregisteredRegistryVerdict, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VerifiedCredential, type VerifiedOwnerNodeBinding, type VerifyOwnerNodeBindingOptions, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalDigest, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, classifyRegistryLookup, composeManifestRequest, createEmailCredentialRequirement, createEmailDomainCredentialRequirement, createHolderBinding, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createOpenKeyManageKeySigningStrategy, createSpaceService, createStorageReceipt, createStoredCredentialRecord, credentialEndpointPath, credentialError, credentialIndexKey, credentialMatchesRequirement, credentialRecordKey, credentialRequirementDigest, decodeBase64Url, defaultSignStrategy, defaultSpaceCreationHandler, descriptorSatisfiesRequirement, didCacheKey, didEquals, diffImmutableSiweFields, discoverLocalTinyCloudNode, encodeBase64Url, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, extractImmutableSiweFields, extractRecapAttenuations, fetchLocationRecord, fetchPeerId, hasTinyCloudManageKeyScope, holderBindingCanonicalBytes, holderBindingSigningBytes, httpResponseError, httpUrlToMultiaddr, isCapabilitySubset, isDigest, isEvmAddress, isExplicitOnlyAction, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, markDelegationTerminal, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseCanonicalTinyCloudIdentity, parseCanonicalTinyCloudIdentityClaims, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSignedSiweCacao, parseSpaceUri, pkhDid, principalDid, principalDidEquals, publishLocationRecord, recapCaveatsEqual, requestTinyCloudManageKeyScope, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, sha256Base64Url, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateCredentialFlowDescriptor, validateCredentialHolderBinding, validateCredentialRequirement, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyEip191MessageSignature, verifyIssuedCredential, verifyLocationRecord, verifyOwnerNodeBinding, verifyStorageReceipt };
|