@tinycloud/sdk-core 2.11.0-beta.8 → 2.11.0
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/bootstrap/index.cjs +0 -4
- package/dist/delegations/index.cjs +630 -314
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.d.cts +32 -32
- package/dist/delegations/index.d.ts +32 -32
- package/dist/delegations/index.js +632 -231
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +2923 -1500
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +583 -17
- package/dist/index.d.ts +583 -17
- package/dist/index.js +2892 -1151
- package/dist/index.js.map +1 -1
- package/dist/policy/index.cjs +878 -250
- package/dist/policy/index.cjs.map +1 -1
- package/dist/policy/index.d.cts +3 -2
- package/dist/policy/index.d.ts +3 -2
- package/dist/policy/index.js +878 -184
- package/dist/policy/index.js.map +1 -1
- package/dist/{recipient-types.schema-D5pDlIqn.d.cts → recipient-types.schema-CieclU3Z.d.cts} +232 -175
- package/dist/{recipient-types.schema-D5pDlIqn.d.ts → recipient-types.schema-CieclU3Z.d.ts} +232 -175
- package/dist/requester/index.cjs +10 -38
- package/dist/requester/index.cjs.map +1 -1
- package/dist/requester/index.js +11 -9
- package/dist/requester/index.js.map +1 -1
- package/dist/unified-BlXXf3l7.d.cts +429 -0
- package/dist/unified-HWqC-h7O.d.ts +429 -0
- package/package.json +5 -5
- package/dist/signed-object-C6mWbTbB.d.ts +0 -149
- package/dist/signed-object-IMAm5a32.d.cts +0 -149
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, ServiceSession, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
|
|
3
3
|
export { BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CanonicalDecryptRequest, CanonicalJson, ColumnInfo, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DecryptTransportResponseError, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IEncryptionService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVBatchReadResponse, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, PrefixedKVService, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, SubscribeOptions, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, clearTinyCloudDebugLogs, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, tinyCloudDebugLogger, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
|
|
4
4
|
export { HOLDER_KEY_BINDING_PRESENTATION_SCHEMA, HolderKeyBindingPresentation, LISTEN_SQL_STATEMENT_CATALOG, ListenSqlStatementName, POLICY_ENGINE_CHALLENGE_REQUEST_SCHEMA, POLICY_ENGINE_CHALLENGE_RESPONSE_SCHEMA, POLICY_ENGINE_DENIAL_SCHEMA, POLICY_ENGINE_GRANT_PRESENTATION_DENIAL_CODES, POLICY_ENGINE_RESOLVE_REQUEST_SCHEMA, PORTABLE_DELEGATION_SCHEMA, PolicyEngineGrantPresentationDenialCode, PortableDelegation, REQUESTER_ENGINE_RETRY_ATTEMPTS, REQUESTER_ENGINE_RETRY_MAX_DELAY_MS, REQUESTER_NEAR_EXPIRY_SECONDS, RequesterEndpointResolution, RequesterHttpRequest, RequesterHttpResponse, RequesterInvocationCapability, RequesterSigningCapability, RequesterTransport, TranscriptRequester, TranscriptRequesterError, TranscriptRequesterErrorCode, TranscriptRequesterErrorState, TranscriptRequesterOptions, TranscriptRequesterReadKvResult, TranscriptRequesterReadSqlResult, createTranscriptRequester, deriveDelegationCid, parseNodeNativePortableDelegation } from './requester/index.js';
|
|
5
|
-
import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams,
|
|
6
|
-
export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry,
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
5
|
+
import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aC as ShareLink, bc as SpaceInfo, I as ICapabilityKeyRegistry, y as ISharingService, D as DelegationManager, b as AccountDelegationQueryOptions, A as AccountDelegationPage, w as DelegationRevocationReceipt } from './recipient-types.schema-CieclU3Z.js';
|
|
6
|
+
export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry, bP as CapabilityKeyRegistry, bQ as CapabilityKeyRegistryErrorCode, bR as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as DelegateReceivedShareParams, j as DelegatedResource, k as DelegatedShareAccess, l as DelegatedShareKey, n as DelegationApiResponse, o as DelegationChain, p as DelegationChainV2, q as DelegationDirection, a as DelegationError, r as DelegationErrorCode, s as DelegationErrorCodes, t as DelegationFilters, u as DelegationManagerConfig, v as DelegationRecord, R as DelegationResult, x as DelegationStatus, E as EncodedShareData, z as IngestOptions, J as JWK, K as KeyInfo, B as KeyProvider, F as KeyType, M as MAX_CONTENT_BYTES, H as MAX_SEALED_SHARE_CONTENT_BYTES, L as MAX_SHARE_ARTIFACT_BYTES, N as MAX_SHARE_CONTENT_BYTES, O as MemorySenderShareKeyStorage, P as MemorySenderShareRecordStorage, Q as MemoryShareCache, S as OwnerDelegationPermission, T as OwnerDelegationReceipt, U as OwnerShareAction, V as OwnerShareDecryption, W as OwnerShareMatcher, X as OwnerSharePolicyRegistration, Y as OwnerSharePolicyRegistrationReceipt, Z as OwnerSharePolicyV2, _ as PortableDelegationImportReceipt, $ as ReceiveOptions, a0 as RegisterOwnerSharePolicyParams, a1 as SHARE_DELIVERY_AUTHORIZATION_DOMAIN, a2 as SenderShareKeyStorage, a3 as SenderShareRecord, a4 as SenderShareRecordStorage, a5 as SenderShareRevocationScope, a6 as SenderShareStore, a7 as ShareAccess, a8 as ShareAccessError, a9 as ShareAccessV2, aa as ShareAction, ac as ShareAddressedDelegationEnvelopeV2, ad as ShareAddressedDelegationEnvelopeV2Schema, ae as ShareAddressedDelegationRequestV2, af as ShareAddressedDelegationRequestV2Schema, ag as ShareAddressedDelegationResponseV2, ah as ShareAddressedDelegationResponseV2Schema, ai as ShareAddressedRecipientMatcher, aj as ShareArtifactInput, ak as ShareArtifactResult, al as ShareArtifactV2, am as ShareCache, an as ShareCacheEntry, ao as ShareCacheKey, ap as ShareCacheMetadata, aq as ShareCapabilityLike, ar as ShareConflict, as as ShareContentMetadata, at as ShareContentSource, au as ShareDeliveryAuthorization, av as ShareDeliveryAuthorizationReceipt, aw as ShareDeliveryAuthorizationRequest, ax as ShareDetachedProof, ay as ShareEnvelopeError, az as ShareEnvelopeV2, aA as ShareExpiryBounds, aB as ShareKvContentSource, aD as ShareLinkData, aE as ShareLinkLocation, aF as ShareListEntry, aG as ShareListResult, aH as ShareNativeAction, aI as ShareNativeInvokeEnvelopeV1, aJ as ShareNativeInvokeErrorResult, aK as ShareNativeInvokeInput, aL as ShareNativeInvokeResult, aM as ShareNativeInvokeSuccessResult, aN as ShareNativeResponse, aO as ShareNativeResponseSchema, aP as SharePolicy, aQ as SharePolicyBinding, aR as SharePolicySession, aS as SharePolicySessionV1, aT as SharePolicySessionWireV1, aU as SharePortableDelegation, aV as ShareReadInvocationV1, aW as ShareReadResult, aX as ShareRecipientClient, aY as ShareRecipientClientOptions, a_ as ShareRecipientPolicy, b0 as ShareRecipientResult, b1 as ShareRecipientTarget, b3 as ShareResource, b5 as ShareSaveOptions, b6 as ShareSchema, b7 as ShareSqlContentSource, b8 as ShareWireAction, b9 as SharingService, ba as SharingServiceConfig, bb as SignedDelegation, bd as SpaceOwnership, bS as StoredDelegationChain, be as ValidateShareDeliveryAuthorizationExpected, bf as VerifyShareEnvelopeOptions, bg as canonicalOwnerSharePolicy, bh as computeOwnerShareRegistrationCid, bi as computeShareCid, bT as createCapabilityKeyRegistry, bj as createDelegatedShareKey, bk as createPolicyEnforcementDelegation, bl as createShareArtifact, bm as createShareArtifactAsync, bn as createSharePolicy, bo as createSharingService, bp as decryptShareBytesAsync, bq as delegatePortablePolicySession, br as encodeInlineShareUrl, bs as encodeShareArtifact, bt as encodeShareUrl, bu as encryptShareBytes, bv as encryptShareBytesAsync, bw as importPortableDelegation, bx as intersectShareCapabilities, by as isV2ShareLink, bz as normalizeShareActions, bA as normalizeShareRecipientTarget, bB as normalizeShareResource, bC as parsePortableDelegation, bD as parseShareArtifact, bE as parseShareUrl, bF as restoreDelegatedShareKey, bG as serializePortableDelegation, bH as shareCapabilityAllows, bI as shareDeliveryTrustedKid, bJ as signShareEnvelope, bK as validateOwnerSharePolicyRegistration, bL as validateOwnerSharePolicyRegistrationBytes, bM as validateShareDeliveryAuthorizationBytes, bN as verifyShareCid, bO as verifyShareEnvelope } from './recipient-types.schema-CieclU3Z.js';
|
|
7
|
+
export { A as ATTESTED_ENFORCER_BINDING_V2_SCHEMA, C as CONTENT_SOURCE_V1_DOMAIN, c as CompactUcanAuthorizationV1, E as ED25519_JCS_SIGNATURE_SUITE, d as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, L as LAST_V2_CREATE_AT, e as LAST_V2_READ_AT, M as MAX_LEGACY_ENVELOPE_EXPIRES_AT, N as NATIVE_PROJECTION_V1_DOMAIN, f as POLICY_CAPABILITY_V1_DOMAIN, g as POLICY_CAPABILITY_V1_SCHEMA, h as POLICY_ENFORCEMENT_DELEGATION_V2_SCHEMA, i as POLICY_ENGINE_RECORD_SCHEMA, j as POLICY_SCHEMA, k as POLICY_SESSION_UCAN_V1_PROFILE, l as POLICY_STATUS_SCHEMA, m as POLICY_V1_DOMAIN, n as POLICY_V1_SCHEMA, a as Policy, P as PolicyEngineRecord, p as PolicyRootStatusV3, q as PolicySessionUcanV1, r as PolicyStatus, R as ROOT_REVOCATION_V1_DOMAIN, s as ROOT_REVOCATION_V1_SCHEMA, t as ROOT_STATUS_CHECKPOINT_V1_SCHEMA, u as ROOT_STATUS_RENEWAL_V1_DOMAIN, v as ROOT_STATUS_V1_DOMAIN, w as SignCompactUcanAuthorizationInput, x as SignatureMaterialError, y as SignatureSuite, z as SignatureVerificationError, B as SignedObjectCanonicalizationError, D as SignedObjectDigestError, F as SignedObjectErrorCode, G as SignedObjectIdError, H as SignedObjectKind, I as SignedObjectMaterial, K as SignedObjectProfileError, O as SignedObjectSchemaError, Q as SignedObjectSignature, S as SignedObjectSigner, T as SignedObjectVerificationResult, V as SignedPolicyObject, W as SigningKeyBindingError, X as UnifiedContentSource, Y as UnifiedEncryptionCapability, Z as UnifiedKvCapability, _ as UnifiedNativeCapability, $ as UnifiedPolicyCapability, a0 as UnifiedPolicyV1, a1 as UnifiedResourceSelector, a2 as UnsignedPolicy, U as UnsignedPolicyEngineRecord, a3 as UnsignedPolicyObject, a4 as UnsignedPolicyStatus, a5 as UnsupportedSignatureSuiteError, a6 as canonicalizeSignedObjectUnsigned, a7 as canonicalizeUnifiedPolicyCapability, a8 as compactAttenuationContains, a9 as contentSourceDigestHex, aa as createAndSignPolicy, ab as createAndSignPolicyEngineRecord, ac as createAndSignPolicyStatus, ad as createAndSignSignedObject, ag as deriveSignedObjectMaterial, ah as getPolicyRootStatusV3, aj as normalizeUnifiedPolicyCapability, ak as parseCompactUcanAuthorization, al as parsePolicySessionUcan, am as policyCidFromCanonicalBytes, an as policyDigestHex, ao as policyIdForDigestHex, ap as projectUnifiedPolicyCapabilities, aq as projectUnifiedPolicyCapability, ar as renewPolicyRootStatusV3, at as revokePolicyRootV3, au as signCompactUcanAuthorization, av as signedObjectIdFor, aw as toSignedObjectError, ax as unifiedNativeProjectionHashHex, ay as unifiedPolicyCapabilityContains, az as unifiedPolicyCapabilityDigestHex, aA as unifiedPolicyCapabilityFromNative, aB as validatePolicyEngineRecordSigned, aC as validatePolicyEngineRecordSignedShape, aD as validatePolicyEngineRecordUnsigned, aE as validatePolicySigned, aF as validatePolicySignedShape, aG as validatePolicyStatusSigned, aH as validatePolicyStatusSignedShape, aI as validatePolicyStatusUnsigned, aJ as validatePolicyUnsigned, aK as verifyPolicy, aL as verifyPolicyEngineRecord, aM as verifyPolicyRootRevocationV3, aN as verifyPolicyRootStatusCheckpointV3, aO as verifyPolicyStatus, aP as verifySignedObject } from './unified-HWqC-h7O.js';
|
|
8
|
+
export { ACCOUNT_INDEX_SCHEMA, ACCOUNT_MANIFEST_PERMISSIONS, BOOTSTRAP_ALLOWLIST, BOOTSTRAP_DEFAULT_ONLY_SESSION_REQUEST, BOOTSTRAP_DEFAULT_SPACE, BOOTSTRAP_ENCRYPTION_NETWORK_NAME, BOOTSTRAP_ENCRYPTION_NETWORK_RESOURCE_TEMPLATE, BOOTSTRAP_MANIFEST, BOOTSTRAP_PERSISTED_APPLICATION_MANIFESTS, BOOTSTRAP_PUBLIC_SPACE, BOOTSTRAP_SESSION_REQUESTS, BOOTSTRAP_SPACE_MANIFESTS, BOOTSTRAP_SPACE_NAMES, BootstrapAllowlistEntry, BootstrapAllowlistKind, BootstrapEncryptionNetworkStep, BootstrapManifest, BootstrapRawAbilityAllowlistEntry, BootstrapSchemaStep, BootstrapSeedApplicationsStep, BootstrapSeedSpacesStep, BootstrapSpaceDescriptor, BootstrapSpaceName, BootstrapSpaceStep, BootstrapStep, BootstrapStepKind, CAPABILITIES, CAPABILITY_REGISTRY, CapabilityRegistryEntry, CapabilityStatus, DUCKDB, ENCRYPTION, HOOKS, KV, SECRET_RECORDS_SCHEMA, SPACE, SQL, TINYCLOUD_ACCOUNT_SPACE_MANIFEST, TINYCLOUD_APPLICATIONS_SPACE_MANIFEST, TINYCLOUD_DEFAULT_SPACE_MANIFEST, TINYCLOUD_PUBLIC_SPACE_MANIFEST, TINYCLOUD_SECRETS_BOOTSTRAP_MANIFEST, bootstrapEncryptionNetworkId, bootstrapSpaceId, bootstrapSteps, composeBootstrapSpaceManifest } from '@tinycloud/bootstrap';
|
|
9
9
|
export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BjzXwtNw.js';
|
|
10
10
|
export { SiweMessage } from 'siwe';
|
|
11
11
|
|
|
@@ -185,6 +185,311 @@ interface IENSResolver {
|
|
|
185
185
|
resolveAvatar?(ensName: string): Promise<string | null>;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
declare const CREDENTIAL_ACQUISITION_PROTOCOL: "tinycloud.credentials/acquisition/v1";
|
|
189
|
+
declare const HOLDER_BINDING_DOMAIN: "tinycloud.credentials/holder-binding/v1";
|
|
190
|
+
declare const CREDENTIAL_CONTRACT_VERSION: 1;
|
|
191
|
+
declare const CREDENTIAL_STEP_REGISTRY_VERSION: 1;
|
|
192
|
+
declare const CREDENTIAL_FORMAT: "vc+sd-jwt";
|
|
193
|
+
type CredentialStepType = "collect_input" | "mailbox_otp" | "holder_signature";
|
|
194
|
+
type CredentialEndpointId = "request" | "state" | "challenge" | "proof" | "holder_binding" | "holder_signature" | "issue" | "result";
|
|
195
|
+
interface CredentialClaimDescriptor {
|
|
196
|
+
readonly name: string;
|
|
197
|
+
readonly matching: "normalized_exact";
|
|
198
|
+
readonly selectiveDisclosure: boolean;
|
|
199
|
+
}
|
|
200
|
+
interface CredentialInputDescriptor {
|
|
201
|
+
readonly id: string;
|
|
202
|
+
readonly label: string;
|
|
203
|
+
readonly schema: {
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly minLength?: number;
|
|
206
|
+
readonly maxLength?: number;
|
|
207
|
+
readonly pattern?: string;
|
|
208
|
+
readonly format?: "email";
|
|
209
|
+
};
|
|
210
|
+
readonly prefill: "privacy_hint_only";
|
|
211
|
+
readonly autocomplete: "off";
|
|
212
|
+
}
|
|
213
|
+
interface CredentialStepDescriptor {
|
|
214
|
+
readonly type: CredentialStepType;
|
|
215
|
+
readonly version: 1;
|
|
216
|
+
}
|
|
217
|
+
/** The canonical TC-462 descriptor. Its bytes are hashed without normalization. */
|
|
218
|
+
interface CredentialFlowDescriptor {
|
|
219
|
+
readonly type: "tinycloud.credentials/descriptor/v1";
|
|
220
|
+
readonly contractVersion: 1;
|
|
221
|
+
readonly protocol: typeof CREDENTIAL_ACQUISITION_PROTOCOL;
|
|
222
|
+
readonly profile: string;
|
|
223
|
+
readonly profileVersion: 1;
|
|
224
|
+
readonly display: {
|
|
225
|
+
readonly title: string;
|
|
226
|
+
readonly description: string;
|
|
227
|
+
readonly consent: string;
|
|
228
|
+
readonly securityTextLocked: true;
|
|
229
|
+
};
|
|
230
|
+
readonly accessibility: {
|
|
231
|
+
readonly progressLabel: string;
|
|
232
|
+
readonly errorLiveRegion: "assertive";
|
|
233
|
+
};
|
|
234
|
+
readonly theme: {
|
|
235
|
+
readonly tokenVersion: "tinycloud.credentials/tokens/v1";
|
|
236
|
+
readonly allowed: readonly ("accentColor" | "fontFamily" | "borderRadius")[];
|
|
237
|
+
};
|
|
238
|
+
readonly issuer: {
|
|
239
|
+
readonly origin: string;
|
|
240
|
+
readonly did: string;
|
|
241
|
+
readonly kid: string;
|
|
242
|
+
};
|
|
243
|
+
readonly interaction: {
|
|
244
|
+
readonly origin: "https://credentials.org";
|
|
245
|
+
readonly pathTemplate: "/credentials/acquire/{requestId}";
|
|
246
|
+
};
|
|
247
|
+
readonly format: {
|
|
248
|
+
readonly id: typeof CREDENTIAL_FORMAT;
|
|
249
|
+
readonly vct: string;
|
|
250
|
+
};
|
|
251
|
+
readonly claims: readonly CredentialClaimDescriptor[];
|
|
252
|
+
readonly subjectRelationship: "holder_is_subject";
|
|
253
|
+
readonly inputs: readonly CredentialInputDescriptor[];
|
|
254
|
+
readonly steps: readonly CredentialStepDescriptor[];
|
|
255
|
+
readonly holderBinding: {
|
|
256
|
+
readonly required: true;
|
|
257
|
+
readonly alg: "EdDSA";
|
|
258
|
+
readonly domain: typeof HOLDER_BINDING_DOMAIN;
|
|
259
|
+
readonly version: 1;
|
|
260
|
+
};
|
|
261
|
+
readonly endpoints: Readonly<Record<"request" | "state" | "challenge" | "proof" | "holderBinding" | "holderSignature" | "issue" | "result", CredentialEndpointId>>;
|
|
262
|
+
readonly lifecycle: {
|
|
263
|
+
readonly requestTtlSeconds: number;
|
|
264
|
+
readonly challengeTtlSeconds: number;
|
|
265
|
+
readonly maxProofAttempts: number;
|
|
266
|
+
readonly challengeConsumption: "atomic_once";
|
|
267
|
+
readonly retry: "bounded";
|
|
268
|
+
};
|
|
269
|
+
readonly status: {
|
|
270
|
+
readonly type: "none";
|
|
271
|
+
readonly freshnessSeconds: number;
|
|
272
|
+
};
|
|
273
|
+
readonly revocation: {
|
|
274
|
+
readonly supported: false;
|
|
275
|
+
};
|
|
276
|
+
readonly presentation: {
|
|
277
|
+
readonly stateVersion: "tinycloud.credentials/ux-states/v1";
|
|
278
|
+
readonly states: readonly CredentialUxState[];
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
interface CredentialRequirement {
|
|
282
|
+
readonly type: "TinyCloudCredentialRequirement";
|
|
283
|
+
readonly version: 1;
|
|
284
|
+
readonly profile: {
|
|
285
|
+
readonly id: string;
|
|
286
|
+
readonly version: 1;
|
|
287
|
+
};
|
|
288
|
+
readonly credentialType: {
|
|
289
|
+
readonly id: string;
|
|
290
|
+
readonly version: 1;
|
|
291
|
+
};
|
|
292
|
+
readonly claims: Readonly<Record<string, string>>;
|
|
293
|
+
readonly maxAgeSeconds?: number;
|
|
294
|
+
}
|
|
295
|
+
interface CredentialHolderBinding {
|
|
296
|
+
readonly type: typeof HOLDER_BINDING_DOMAIN;
|
|
297
|
+
readonly protocol: typeof CREDENTIAL_ACQUISITION_PROTOCOL;
|
|
298
|
+
readonly requestId: string;
|
|
299
|
+
readonly profile: string;
|
|
300
|
+
readonly profileVersion: 1;
|
|
301
|
+
readonly descriptorDigest: string;
|
|
302
|
+
readonly requirementDigest: string;
|
|
303
|
+
readonly issuer: string;
|
|
304
|
+
readonly issuerKid: string;
|
|
305
|
+
readonly holderDid: string;
|
|
306
|
+
readonly normalizedClaimsDigest: string;
|
|
307
|
+
readonly challengeNonce: string;
|
|
308
|
+
readonly audience: string;
|
|
309
|
+
readonly openerOrigin: string;
|
|
310
|
+
readonly completionOrigin: string;
|
|
311
|
+
readonly completionContext: string;
|
|
312
|
+
readonly jti: string;
|
|
313
|
+
readonly issuedAt: string;
|
|
314
|
+
readonly expiresAt: string;
|
|
315
|
+
}
|
|
316
|
+
interface IssuerVerificationKey {
|
|
317
|
+
readonly kid: string;
|
|
318
|
+
readonly alg: "EdDSA";
|
|
319
|
+
readonly jwk: {
|
|
320
|
+
readonly kty: "OKP";
|
|
321
|
+
readonly crv: "Ed25519";
|
|
322
|
+
readonly x: string;
|
|
323
|
+
};
|
|
324
|
+
readonly validFrom: string;
|
|
325
|
+
readonly validUntil: string;
|
|
326
|
+
readonly retiredAt?: string;
|
|
327
|
+
}
|
|
328
|
+
interface CredentialIssuerMetadata {
|
|
329
|
+
readonly type: "OpenCredentialsIssuerMetadata";
|
|
330
|
+
readonly version: 1;
|
|
331
|
+
readonly origin: string;
|
|
332
|
+
readonly issuerDid: string;
|
|
333
|
+
readonly keys: readonly IssuerVerificationKey[];
|
|
334
|
+
readonly cache: {
|
|
335
|
+
readonly maxAgeSeconds: number;
|
|
336
|
+
readonly etag: string;
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
interface IssuedCredentialEnvelope {
|
|
340
|
+
readonly type: "OpenCredentialsIssuedCredential";
|
|
341
|
+
readonly version: 1;
|
|
342
|
+
readonly protocol: typeof CREDENTIAL_ACQUISITION_PROTOCOL;
|
|
343
|
+
readonly profile: {
|
|
344
|
+
readonly id: string;
|
|
345
|
+
readonly version: 1;
|
|
346
|
+
};
|
|
347
|
+
readonly credentialType: {
|
|
348
|
+
readonly id: string;
|
|
349
|
+
readonly version: 1;
|
|
350
|
+
};
|
|
351
|
+
readonly schema: string;
|
|
352
|
+
readonly format: typeof CREDENTIAL_FORMAT;
|
|
353
|
+
readonly issuerDid: string;
|
|
354
|
+
readonly issuerKid: string;
|
|
355
|
+
readonly subjectDid: string;
|
|
356
|
+
readonly holderDid: string;
|
|
357
|
+
readonly claims: Readonly<Record<string, string>>;
|
|
358
|
+
readonly claimsDigest: string;
|
|
359
|
+
readonly descriptorDigest: string;
|
|
360
|
+
readonly credentialId: string;
|
|
361
|
+
readonly issuedAt: string;
|
|
362
|
+
readonly notBefore: string;
|
|
363
|
+
readonly expiresAt: string;
|
|
364
|
+
readonly status: {
|
|
365
|
+
readonly method: "none";
|
|
366
|
+
readonly freshnessSeconds: number;
|
|
367
|
+
};
|
|
368
|
+
readonly credential: string;
|
|
369
|
+
}
|
|
370
|
+
interface VerifiedCredential extends IssuedCredentialEnvelope {
|
|
371
|
+
readonly verifiedAt: string;
|
|
372
|
+
readonly credentialDigest: string;
|
|
373
|
+
readonly statusCheckedAt: string;
|
|
374
|
+
}
|
|
375
|
+
interface StoredCredentialRecord {
|
|
376
|
+
readonly type: "TinyCloudStoredCredential";
|
|
377
|
+
readonly version: 1;
|
|
378
|
+
readonly ownerDid: string;
|
|
379
|
+
readonly recordId: string;
|
|
380
|
+
readonly requirementDigest: string;
|
|
381
|
+
readonly descriptorDigest: string;
|
|
382
|
+
readonly profile: {
|
|
383
|
+
readonly id: string;
|
|
384
|
+
readonly version: 1;
|
|
385
|
+
};
|
|
386
|
+
readonly credentialType: {
|
|
387
|
+
readonly id: string;
|
|
388
|
+
readonly version: 1;
|
|
389
|
+
};
|
|
390
|
+
readonly issuerDid: string;
|
|
391
|
+
readonly issuerKid: string;
|
|
392
|
+
readonly holderDid: string;
|
|
393
|
+
readonly claims: Readonly<Record<string, string>>;
|
|
394
|
+
readonly claimsDigest: string;
|
|
395
|
+
readonly credentialDigest: string;
|
|
396
|
+
readonly credential: string;
|
|
397
|
+
readonly schema: string;
|
|
398
|
+
readonly credentialId: string;
|
|
399
|
+
readonly issuedAt: string;
|
|
400
|
+
readonly notBefore: string;
|
|
401
|
+
readonly expiresAt: string;
|
|
402
|
+
readonly status: {
|
|
403
|
+
readonly method: "none";
|
|
404
|
+
readonly freshnessSeconds: number;
|
|
405
|
+
};
|
|
406
|
+
readonly verifiedAt: string;
|
|
407
|
+
readonly storedAt: string;
|
|
408
|
+
}
|
|
409
|
+
interface CredentialStorageReceipt {
|
|
410
|
+
readonly type: "TinyCloudCredentialStorageReceipt";
|
|
411
|
+
readonly version: 1;
|
|
412
|
+
readonly ownerDid: string;
|
|
413
|
+
readonly recordId: string;
|
|
414
|
+
readonly recordDigest: string;
|
|
415
|
+
readonly storedAt: string;
|
|
416
|
+
readonly etag?: string;
|
|
417
|
+
}
|
|
418
|
+
type CredentialUxState = "collecting" | "challenging" | "proving" | "signing" | "issuing" | "verifying" | "saving" | "success" | "recovery";
|
|
419
|
+
interface CredentialProgressEvent {
|
|
420
|
+
readonly state: CredentialUxState | "checking";
|
|
421
|
+
readonly stepId?: string;
|
|
422
|
+
readonly correlationId?: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
declare function createHolderBinding(input: Omit<CredentialHolderBinding, "type" | "protocol">): CredentialHolderBinding;
|
|
426
|
+
/** Rejects unknown binding fields before any active-session signing operation. */
|
|
427
|
+
declare function validateCredentialHolderBinding(value: unknown): CredentialHolderBinding;
|
|
428
|
+
declare function holderBindingCanonicalBytes(binding: CredentialHolderBinding): Uint8Array;
|
|
429
|
+
declare function holderBindingSigningBytes(binding: CredentialHolderBinding): Uint8Array;
|
|
430
|
+
|
|
431
|
+
/** Strictly validates and preserves the Rust-owned canonical descriptor bytes. */
|
|
432
|
+
declare function validateCredentialFlowDescriptor(value: unknown): CredentialFlowDescriptor;
|
|
433
|
+
declare function credentialEndpointPath(id: "request" | "state" | "challenge" | "proof" | "holder_binding" | "holder_signature" | "issue" | "result" | "issuer_metadata", requestId?: string): string;
|
|
434
|
+
|
|
435
|
+
declare function encodeBase64Url(bytes: Uint8Array): string;
|
|
436
|
+
declare function decodeBase64Url(value: string): Uint8Array;
|
|
437
|
+
declare function sha256Base64Url(value: string | Uint8Array): Promise<string>;
|
|
438
|
+
declare function canonicalDigest(value: unknown): Promise<string>;
|
|
439
|
+
declare function isDigest(value: unknown): value is string;
|
|
440
|
+
|
|
441
|
+
declare const CREDENTIAL_ERROR_CODES: readonly ["ACTIVE_SESSION_REQUIRED", "CANCELED", "DESCRIPTOR_INVALID", "HOLDER_MISMATCH", "ISSUER_UNREADY", "OFFLINE", "POPUP_BLOCKED", "REQUEST_EXPIRED", "REQUEST_SUBSTITUTED", "SIGNATURE_REJECTED", "UNSUPPORTED_PROFILE", "VERIFICATION_FAILED", "VERIFIED_NOT_SAVED"];
|
|
442
|
+
type CredentialErrorCode = (typeof CREDENTIAL_ERROR_CODES)[number];
|
|
443
|
+
/** Stable, redaction-safe error returned by the credential acquisition module. */
|
|
444
|
+
declare class CredentialError extends Error {
|
|
445
|
+
readonly code: CredentialErrorCode;
|
|
446
|
+
readonly details: {
|
|
447
|
+
readonly retryAfterMs?: number;
|
|
448
|
+
readonly state?: string;
|
|
449
|
+
readonly correlationId?: string;
|
|
450
|
+
readonly cause?: unknown;
|
|
451
|
+
};
|
|
452
|
+
readonly name = "CredentialError";
|
|
453
|
+
readonly recoverable: boolean;
|
|
454
|
+
constructor(code: CredentialErrorCode, message: string, details?: {
|
|
455
|
+
readonly retryAfterMs?: number;
|
|
456
|
+
readonly state?: string;
|
|
457
|
+
readonly correlationId?: string;
|
|
458
|
+
readonly cause?: unknown;
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
declare function credentialError(value: unknown, fallbackCode?: CredentialErrorCode): CredentialError;
|
|
462
|
+
|
|
463
|
+
declare function validateCredentialRequirement(value: unknown): CredentialRequirement;
|
|
464
|
+
declare function credentialRequirementDigest(requirement: CredentialRequirement): Promise<string>;
|
|
465
|
+
declare function descriptorSatisfiesRequirement(descriptor: CredentialFlowDescriptor, requirement: CredentialRequirement): boolean;
|
|
466
|
+
declare function credentialMatchesRequirement(requirement: CredentialRequirement, candidate: Pick<StoredCredentialRecord | VerifiedCredential, "profile" | "credentialType" | "claims" | "holderDid" | "expiresAt" | "issuedAt">, holderDid: string, now?: Date): boolean;
|
|
467
|
+
|
|
468
|
+
declare function credentialRecordKey(recordId: string): string;
|
|
469
|
+
declare function credentialIndexKey(requirementDigest: string, recordId: string): string;
|
|
470
|
+
declare function createStoredCredentialRecord(input: {
|
|
471
|
+
readonly verified: VerifiedCredential;
|
|
472
|
+
readonly ownerDid: string;
|
|
473
|
+
readonly requirement: CredentialRequirement;
|
|
474
|
+
readonly requirementDigest: string;
|
|
475
|
+
readonly storedAt?: string;
|
|
476
|
+
}): Promise<StoredCredentialRecord>;
|
|
477
|
+
declare function createStorageReceipt(record: StoredCredentialRecord, etag?: string): Promise<CredentialStorageReceipt>;
|
|
478
|
+
declare function verifyStorageReceipt(record: StoredCredentialRecord, receipt: CredentialStorageReceipt, activeOwnerDid: string, activeHolderDid: string): Promise<boolean>;
|
|
479
|
+
|
|
480
|
+
/** Independently verifies the Rust-owned SD-JWT profile contract before storage. */
|
|
481
|
+
declare function verifyIssuedCredential(input: {
|
|
482
|
+
readonly envelope: IssuedCredentialEnvelope;
|
|
483
|
+
readonly descriptor: CredentialFlowDescriptor;
|
|
484
|
+
readonly descriptorDigest: string;
|
|
485
|
+
readonly requirement: CredentialRequirement;
|
|
486
|
+
readonly holderDid: string;
|
|
487
|
+
readonly issuerMetadata: CredentialIssuerMetadata;
|
|
488
|
+
readonly now?: Date;
|
|
489
|
+
readonly checkStatus: (status: IssuedCredentialEnvelope["status"], signal?: AbortSignal) => Promise<boolean>;
|
|
490
|
+
readonly signal?: AbortSignal;
|
|
491
|
+
}): Promise<VerifiedCredential>;
|
|
492
|
+
|
|
188
493
|
/**
|
|
189
494
|
* TinyCloud App Manifest
|
|
190
495
|
*
|
|
@@ -934,6 +1239,8 @@ declare class IdentityParseError extends Error {
|
|
|
934
1239
|
}
|
|
935
1240
|
declare function isEvmAddress(input: string): boolean;
|
|
936
1241
|
declare function canonicalizeAddress(address: string): CanonicalAddress;
|
|
1242
|
+
/** Verify EIP-191 evidence over the exact UTF-8 message and recover its signer. */
|
|
1243
|
+
declare function verifyEip191MessageSignature(message: string, signature: string, expectedAddress: string): Promise<boolean>;
|
|
937
1244
|
declare function addressStorageKey(address: string): CanonicalAddress;
|
|
938
1245
|
declare function pkhDid(address: string, chainId?: number): string;
|
|
939
1246
|
declare function parsePkhDid(did: string): PkhDidParts | null;
|
|
@@ -991,18 +1298,18 @@ declare const PersistedTinyCloudSessionSchema: z.ZodObject<{
|
|
|
991
1298
|
verificationMethod: z.ZodString;
|
|
992
1299
|
}, "strip", z.ZodTypeAny, {
|
|
993
1300
|
spaceId: string;
|
|
994
|
-
delegationCid: string;
|
|
995
1301
|
delegationHeader: {
|
|
996
1302
|
Authorization: string;
|
|
997
1303
|
};
|
|
1304
|
+
delegationCid: string;
|
|
998
1305
|
verificationMethod: string;
|
|
999
1306
|
spaces?: Record<string, string> | undefined;
|
|
1000
1307
|
}, {
|
|
1001
1308
|
spaceId: string;
|
|
1002
|
-
delegationCid: string;
|
|
1003
1309
|
delegationHeader: {
|
|
1004
1310
|
Authorization: string;
|
|
1005
1311
|
};
|
|
1312
|
+
delegationCid: string;
|
|
1006
1313
|
verificationMethod: string;
|
|
1007
1314
|
spaces?: Record<string, string> | undefined;
|
|
1008
1315
|
}>;
|
|
@@ -1043,18 +1350,18 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
|
|
|
1043
1350
|
verificationMethod: z.ZodString;
|
|
1044
1351
|
}, "strip", z.ZodTypeAny, {
|
|
1045
1352
|
spaceId: string;
|
|
1046
|
-
delegationCid: string;
|
|
1047
1353
|
delegationHeader: {
|
|
1048
1354
|
Authorization: string;
|
|
1049
1355
|
};
|
|
1356
|
+
delegationCid: string;
|
|
1050
1357
|
verificationMethod: string;
|
|
1051
1358
|
spaces?: Record<string, string> | undefined;
|
|
1052
1359
|
}, {
|
|
1053
1360
|
spaceId: string;
|
|
1054
|
-
delegationCid: string;
|
|
1055
1361
|
delegationHeader: {
|
|
1056
1362
|
Authorization: string;
|
|
1057
1363
|
};
|
|
1364
|
+
delegationCid: string;
|
|
1058
1365
|
verificationMethod: string;
|
|
1059
1366
|
spaces?: Record<string, string> | undefined;
|
|
1060
1367
|
}>>;
|
|
@@ -1091,19 +1398,19 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
|
|
|
1091
1398
|
sessionKey: string;
|
|
1092
1399
|
siwe: string;
|
|
1093
1400
|
signature: string;
|
|
1094
|
-
createdAt: string;
|
|
1095
1401
|
expiresAt: string;
|
|
1096
1402
|
version: string;
|
|
1403
|
+
createdAt: string;
|
|
1097
1404
|
ens?: {
|
|
1098
1405
|
domain?: string | null | undefined;
|
|
1099
1406
|
avatarUrl?: string | null | undefined;
|
|
1100
1407
|
} | undefined;
|
|
1101
1408
|
tinycloudSession?: {
|
|
1102
1409
|
spaceId: string;
|
|
1103
|
-
delegationCid: string;
|
|
1104
1410
|
delegationHeader: {
|
|
1105
1411
|
Authorization: string;
|
|
1106
1412
|
};
|
|
1413
|
+
delegationCid: string;
|
|
1107
1414
|
verificationMethod: string;
|
|
1108
1415
|
spaces?: Record<string, string> | undefined;
|
|
1109
1416
|
} | undefined;
|
|
@@ -1114,19 +1421,19 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
|
|
|
1114
1421
|
sessionKey: string;
|
|
1115
1422
|
siwe: string;
|
|
1116
1423
|
signature: string;
|
|
1117
|
-
createdAt: string;
|
|
1118
1424
|
expiresAt: string;
|
|
1119
1425
|
version: string;
|
|
1426
|
+
createdAt: string;
|
|
1120
1427
|
ens?: {
|
|
1121
1428
|
domain?: string | null | undefined;
|
|
1122
1429
|
avatarUrl?: string | null | undefined;
|
|
1123
1430
|
} | undefined;
|
|
1124
1431
|
tinycloudSession?: {
|
|
1125
1432
|
spaceId: string;
|
|
1126
|
-
delegationCid: string;
|
|
1127
1433
|
delegationHeader: {
|
|
1128
1434
|
Authorization: string;
|
|
1129
1435
|
};
|
|
1436
|
+
delegationCid: string;
|
|
1130
1437
|
verificationMethod: string;
|
|
1131
1438
|
spaces?: Record<string, string> | undefined;
|
|
1132
1439
|
} | undefined;
|
|
@@ -1173,14 +1480,14 @@ declare const TinyCloudSessionSchema: z.ZodObject<{
|
|
|
1173
1480
|
sessionKey: string;
|
|
1174
1481
|
siwe: string;
|
|
1175
1482
|
signature: string;
|
|
1176
|
-
spaceId: string;
|
|
1177
1483
|
jwk: {} & {
|
|
1178
1484
|
[k: string]: unknown;
|
|
1179
1485
|
};
|
|
1180
|
-
|
|
1486
|
+
spaceId: string;
|
|
1181
1487
|
delegationHeader: {
|
|
1182
1488
|
Authorization: string;
|
|
1183
1489
|
};
|
|
1490
|
+
delegationCid: string;
|
|
1184
1491
|
verificationMethod: string;
|
|
1185
1492
|
spaces?: Record<string, string> | undefined;
|
|
1186
1493
|
}, {
|
|
@@ -1189,14 +1496,14 @@ declare const TinyCloudSessionSchema: z.ZodObject<{
|
|
|
1189
1496
|
sessionKey: string;
|
|
1190
1497
|
siwe: string;
|
|
1191
1498
|
signature: string;
|
|
1192
|
-
spaceId: string;
|
|
1193
1499
|
jwk: {} & {
|
|
1194
1500
|
[k: string]: unknown;
|
|
1195
1501
|
};
|
|
1196
|
-
|
|
1502
|
+
spaceId: string;
|
|
1197
1503
|
delegationHeader: {
|
|
1198
1504
|
Authorization: string;
|
|
1199
1505
|
};
|
|
1506
|
+
delegationCid: string;
|
|
1200
1507
|
verificationMethod: string;
|
|
1201
1508
|
spaces?: Record<string, string> | undefined;
|
|
1202
1509
|
}>;
|
|
@@ -1315,6 +1622,8 @@ interface SignResponse {
|
|
|
1315
1622
|
signature?: string;
|
|
1316
1623
|
/** Reason for rejection if not approved */
|
|
1317
1624
|
reason?: string;
|
|
1625
|
+
/** The policy declined automatic signing and requires normal user consent. */
|
|
1626
|
+
needsApproval?: boolean;
|
|
1318
1627
|
}
|
|
1319
1628
|
/**
|
|
1320
1629
|
* Callback handler type for sign requests.
|
|
@@ -1345,6 +1654,8 @@ interface OpenKeySigningStrategyOptions {
|
|
|
1345
1654
|
fetch?: typeof fetch;
|
|
1346
1655
|
/** Request credentials mode for browser integrations. */
|
|
1347
1656
|
credentials?: "include" | "omit" | "same-origin";
|
|
1657
|
+
/** Normal user-visible approval for a request that is outside Auto-Sign policy. */
|
|
1658
|
+
requestApproval?: SignCallback;
|
|
1348
1659
|
}
|
|
1349
1660
|
interface OpenKeySigningRequestBody extends SignRequest {
|
|
1350
1661
|
keyId?: string;
|
|
@@ -1360,6 +1671,8 @@ interface OpenKeySigningResponseBody {
|
|
|
1360
1671
|
interface OpenKeyCallbackStrategy extends CallbackStrategy {
|
|
1361
1672
|
/** Marker used by SDK runtimes to choose the bootstrap-safe initial SIWE. */
|
|
1362
1673
|
openKeyAutoSign: true;
|
|
1674
|
+
/** Separate interactive approval path; never treated as an Auto-Sign grant. */
|
|
1675
|
+
openKeyRequestApproval?: SignCallback;
|
|
1363
1676
|
}
|
|
1364
1677
|
/**
|
|
1365
1678
|
* Create a callback signing strategy that delegates message signing to OpenKey.
|
|
@@ -1562,6 +1875,259 @@ declare class AutoApproveSpaceCreationHandler implements ISpaceCreationHandler {
|
|
|
1562
1875
|
*/
|
|
1563
1876
|
declare const defaultSpaceCreationHandler: ISpaceCreationHandler;
|
|
1564
1877
|
|
|
1878
|
+
interface TinyCloudAuthorizationRequestV1 {
|
|
1879
|
+
protocolVersion: 1;
|
|
1880
|
+
/** The suggested SIWE. OpenKey may narrow this before signing. */
|
|
1881
|
+
siwe: string;
|
|
1882
|
+
/** Which OpenKey keyId to sign with. Optional; user may pick. */
|
|
1883
|
+
keyId?: string;
|
|
1884
|
+
/** Optional presentation envelope for the review page. */
|
|
1885
|
+
presentation?: CapabilityPresentationEnvelopeV1;
|
|
1886
|
+
}
|
|
1887
|
+
interface TinyCloudAuthorizationResultV1 {
|
|
1888
|
+
protocolVersion: 1;
|
|
1889
|
+
/** EIP-55 encoded signer address. */
|
|
1890
|
+
address: string;
|
|
1891
|
+
/** Signature over `signedMessage`, hex-encoded (0x…). */
|
|
1892
|
+
signature: string;
|
|
1893
|
+
/**
|
|
1894
|
+
* The EXACT bytes the signature verifies against. When the user narrows
|
|
1895
|
+
* capabilities in the review, this is the regenerated SIWE — not the
|
|
1896
|
+
* caller's original request.
|
|
1897
|
+
*/
|
|
1898
|
+
signedMessage: string;
|
|
1899
|
+
/** Action IDs the user selected (or default consent). Opaque strings. */
|
|
1900
|
+
selectedActionKeys: string[];
|
|
1901
|
+
/** Effective grant set after narrowing. */
|
|
1902
|
+
permissions: Array<TinyCloudEffectiveGrantV1>;
|
|
1903
|
+
}
|
|
1904
|
+
interface TinyCloudEffectiveGrantV1 {
|
|
1905
|
+
service: string;
|
|
1906
|
+
space: string;
|
|
1907
|
+
path: string;
|
|
1908
|
+
actions: string[];
|
|
1909
|
+
}
|
|
1910
|
+
interface CapabilityPresentationEnvelopeV1 {
|
|
1911
|
+
protocolVersion: 1;
|
|
1912
|
+
displayName?: string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Reason string the caller supplied for the delegation. Rendered as
|
|
1915
|
+
* caller-supplied context — NEVER treated as verified metadata unless
|
|
1916
|
+
* the receiving side origin-binds a manifest that carries the same
|
|
1917
|
+
* text. The OpenKey widget marks this as "reason provided by caller".
|
|
1918
|
+
*/
|
|
1919
|
+
reason?: string;
|
|
1920
|
+
manifestId?: string;
|
|
1921
|
+
manifestDigest?: string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Full manifest payload(s) the SDK forwards so the OpenKey review UI
|
|
1924
|
+
* can render honest provenance labels. Display-only:
|
|
1925
|
+
* - The envelope MUST NEVER expand authority; the ReCap payload is
|
|
1926
|
+
* the sole gate for what the user can approve.
|
|
1927
|
+
* - The widget transport size-bounds and validates the envelope
|
|
1928
|
+
* before use; oversized/malformed envelopes are dropped.
|
|
1929
|
+
* - The OpenKey server's /authorize-sign-prepare route decides trust
|
|
1930
|
+
* — even a well-formed envelope stays `unsigned` unless the
|
|
1931
|
+
* browser origin is verifiable and its well-known manifest
|
|
1932
|
+
* content-digest matches `manifestDigest`.
|
|
1933
|
+
*/
|
|
1934
|
+
manifests?: Array<{
|
|
1935
|
+
name?: string;
|
|
1936
|
+
appId?: string;
|
|
1937
|
+
payload?: Record<string, unknown>;
|
|
1938
|
+
}>;
|
|
1939
|
+
}
|
|
1940
|
+
/**
|
|
1941
|
+
* Runtime validator for a TinyCloudAuthorizationResultV1. Returns null when
|
|
1942
|
+
* the payload matches the expected shape; returns an error message string
|
|
1943
|
+
* otherwise. Designed for use at the js-sdk trust boundary (browser-auth,
|
|
1944
|
+
* NodeUserAuthorization) so a compromised OpenKey response cannot inject
|
|
1945
|
+
* unexpected fields into a session.
|
|
1946
|
+
*/
|
|
1947
|
+
declare function validateAuthorizationResultV1(value: unknown): {
|
|
1948
|
+
ok: true;
|
|
1949
|
+
value: TinyCloudAuthorizationResultV1;
|
|
1950
|
+
} | {
|
|
1951
|
+
ok: false;
|
|
1952
|
+
error: string;
|
|
1953
|
+
};
|
|
1954
|
+
/**
|
|
1955
|
+
* Selected action ID rules. The OpenKey side builds these with the exact
|
|
1956
|
+
* separator convention below (mirror of `packages/capability-review/src/ids`).
|
|
1957
|
+
* Consumers should treat them as opaque; only equality comparisons and set
|
|
1958
|
+
* membership are guaranteed to be stable.
|
|
1959
|
+
*/
|
|
1960
|
+
declare const OPENKEY_ACTION_ID_SEPARATOR = "\0";
|
|
1961
|
+
declare function isPlausibleOpenKeyActionId(id: unknown): id is string;
|
|
1962
|
+
/**
|
|
1963
|
+
* Canonical decomposition of a ReCap `att` resource URI into `{ space, path }`
|
|
1964
|
+
* matching the SEMANTIC the WASM `parseRecapFromSiwe` emitter uses.
|
|
1965
|
+
*
|
|
1966
|
+
* Sol final continuation contract requirement 1: every producer AND consumer
|
|
1967
|
+
* of canonical four-part action IDs must parse resources the same way. The
|
|
1968
|
+
* on-wire structure of a TinyCloud ReCap resource is:
|
|
1969
|
+
*
|
|
1970
|
+
* `<space>/<short-service>[/<sub-path>]`
|
|
1971
|
+
*
|
|
1972
|
+
* where `<space>` is a `tinycloud:pkh:...` URN and `<short-service>` is the
|
|
1973
|
+
* unqualified service name (`kv`, `sql`, `capabilities`, …). WASM's
|
|
1974
|
+
* `parseRecapFromSiwe` returns `{ service: <short>, space: <space>, path: <sub-path OR "">}`
|
|
1975
|
+
* — the service segment is NEVER part of the `path`. Prior consumer parsing
|
|
1976
|
+
* left the service segment INSIDE `path`, which produced a four-part ID
|
|
1977
|
+
* different from what OpenKey emits (which uses WASM's `entry.path`
|
|
1978
|
+
* directly). That divergence caused every real production round-trip to
|
|
1979
|
+
* fail the `grantedFourPartIndex.get(rawKey)` lookup silently — Sol
|
|
1980
|
+
* explicitly cited this as blocking approval.
|
|
1981
|
+
*
|
|
1982
|
+
* Behaviour:
|
|
1983
|
+
* - Non-`tinycloud:` URIs are returned unchanged as `{ space: uri, path: "" }`.
|
|
1984
|
+
* - `tinycloud:<...>` without any `/` → `{ space: uri, path: "" }`.
|
|
1985
|
+
* - `tinycloud:<...>/short` → `{ space, path: "" }` (service segment stripped).
|
|
1986
|
+
* - `tinycloud:<...>/short/rest...` → `{ space, path: "rest..." }`.
|
|
1987
|
+
*
|
|
1988
|
+
* This makes the consumer's canonical `path` byte-for-byte equal to WASM's
|
|
1989
|
+
* `entry.path`, and therefore byte-for-byte equal to the `path` OpenKey's
|
|
1990
|
+
* `computeActionKey` uses when emitting four-part IDs.
|
|
1991
|
+
*/
|
|
1992
|
+
declare function parseCanonicalRecapResource(resource: string): {
|
|
1993
|
+
space: string;
|
|
1994
|
+
path: string;
|
|
1995
|
+
};
|
|
1996
|
+
/**
|
|
1997
|
+
* Immutable SIWE header fields the OpenKey widget is NOT allowed to alter.
|
|
1998
|
+
* The user may narrow capabilities (which changes the ReCap `urn:recap:`
|
|
1999
|
+
* resource AND — because the WASM statement is a human-readable rendering of
|
|
2000
|
+
* the ReCap — the statement text along with it). But domain/address/URI/
|
|
2001
|
+
* version/chainId/nonce/issuedAt bind the message to a specific relying party
|
|
2002
|
+
* plus a specific session-key request and MUST come back identical byte-for-byte.
|
|
2003
|
+
*
|
|
2004
|
+
* `statement` is intentionally NOT part of the immutable set: it derives from
|
|
2005
|
+
* the ReCap and MUST be allowed to change when the ReCap changes. The
|
|
2006
|
+
* capability-subset check (via `unauthorizedRecapCapabilities`) is the
|
|
2007
|
+
* authoritative gate for what the widget was allowed to change.
|
|
2008
|
+
*/
|
|
2009
|
+
interface ImmutableSiweFields {
|
|
2010
|
+
domain?: string;
|
|
2011
|
+
address?: string;
|
|
2012
|
+
uri?: string;
|
|
2013
|
+
version?: string;
|
|
2014
|
+
chainId?: string;
|
|
2015
|
+
nonce?: string;
|
|
2016
|
+
issuedAt?: string;
|
|
2017
|
+
expirationTime?: string;
|
|
2018
|
+
notBefore?: string;
|
|
2019
|
+
requestId?: string;
|
|
2020
|
+
statement?: string;
|
|
2021
|
+
nonRecapResources?: string;
|
|
2022
|
+
}
|
|
2023
|
+
/**
|
|
2024
|
+
* Extract the header fields that must be preserved byte-for-byte between the
|
|
2025
|
+
* caller's original prepared SIWE and the bytes OpenKey actually signed. Uses
|
|
2026
|
+
* line-based parsing tolerant of the specific format the WASM emitter uses:
|
|
2027
|
+
*
|
|
2028
|
+
* <domain> wants you to sign in with your Ethereum account:
|
|
2029
|
+
* <address>
|
|
2030
|
+
*
|
|
2031
|
+
* <statement>
|
|
2032
|
+
*
|
|
2033
|
+
* URI: <uri>
|
|
2034
|
+
* Version: <n>
|
|
2035
|
+
* Chain ID: <n>
|
|
2036
|
+
* Nonce: <hex>
|
|
2037
|
+
* Issued At: <iso8601>
|
|
2038
|
+
* Resources:
|
|
2039
|
+
* - <resource1>
|
|
2040
|
+
* ...
|
|
2041
|
+
*
|
|
2042
|
+
* Returns fields it was able to identify; downstream comparison is field-by-field
|
|
2043
|
+
* so a missing field on both sides is treated as equal.
|
|
2044
|
+
*/
|
|
2045
|
+
declare function extractImmutableSiweFields(siwe: string): ImmutableSiweFields;
|
|
2046
|
+
/**
|
|
2047
|
+
* Diff two SIWE header field sets. Returns the field names that differ. An
|
|
2048
|
+
* empty array means the caller's prepared header and the signed header agree
|
|
2049
|
+
* on every immutable field.
|
|
2050
|
+
*
|
|
2051
|
+
* Sol final continuation contract requirement 2: `statement` is
|
|
2052
|
+
* ReCap-DERIVED whenever the SIWE carries a `urn:recap:` resource — the
|
|
2053
|
+
* WASM `prepareSession` emitter renders "I further authorize the stated URI
|
|
2054
|
+
* to perform the following actions..." from the ReCap contents and DROPS
|
|
2055
|
+
* any caller-supplied `statement`. Narrowing the ReCap therefore ALWAYS
|
|
2056
|
+
* changes the statement, and treating statement as byte-immutable made
|
|
2057
|
+
* every legitimate narrowing fail immediate rejection — the exact
|
|
2058
|
+
* production round-trip failure Sol cited as blocking approval.
|
|
2059
|
+
*
|
|
2060
|
+
* Correct semantics:
|
|
2061
|
+
* - For ReCap-bearing SIWEs, statement is validated indirectly via the
|
|
2062
|
+
* `unauthorizedRecapCapabilities` subset check (the ReCap the
|
|
2063
|
+
* statement renders is the true authoritative narrowing check).
|
|
2064
|
+
* - For plain (no-ReCap) SIWEs, statement IS caller-authored and MUST
|
|
2065
|
+
* remain byte-for-byte identical.
|
|
2066
|
+
*
|
|
2067
|
+
* Callers signal which regime applies via `options.originalHasRecap`.
|
|
2068
|
+
* When omitted (legacy callers), statement is included in the diff — the
|
|
2069
|
+
* safer default for non-ReCap flows.
|
|
2070
|
+
*/
|
|
2071
|
+
declare function diffImmutableSiweFields(original: ImmutableSiweFields, signed: ImmutableSiweFields, options?: {
|
|
2072
|
+
originalHasRecap?: boolean;
|
|
2073
|
+
}): string[];
|
|
2074
|
+
/**
|
|
2075
|
+
* Parsed ReCap attenuation payload. Keyed by resource URI ("space/service/path"),
|
|
2076
|
+
* each value is a map of action -> list of caveat objects. Consumers care about
|
|
2077
|
+
* subset comparisons on (resource, action) pairs; caveats are compared shallowly
|
|
2078
|
+
* (any narrowing of caveats is treated as still a subset when the parent grants
|
|
2079
|
+
* the same action).
|
|
2080
|
+
*/
|
|
2081
|
+
interface RecapAttenuation {
|
|
2082
|
+
[resource: string]: {
|
|
2083
|
+
[action: string]: unknown[];
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Extract the union of `att` maps from every `urn:recap:` resource in a SIWE
|
|
2088
|
+
* message. Returns an empty object if the SIWE contains no ReCap resources
|
|
2089
|
+
* (which is legal — a plain SIWE grants nothing beyond the message itself).
|
|
2090
|
+
*
|
|
2091
|
+
* Throws if a `urn:recap:` payload is present but cannot be decoded as
|
|
2092
|
+
* base64url JSON with an `att` object. Silent tolerance would let a compromised
|
|
2093
|
+
* OpenKey response bypass the subset check by returning garbage.
|
|
2094
|
+
*/
|
|
2095
|
+
declare function extractRecapAttenuations(siwe: string): RecapAttenuation;
|
|
2096
|
+
/**
|
|
2097
|
+
* Prove that `child` grants are a subset of `parent` grants. Returns a list of
|
|
2098
|
+
* unauthorized (resource, action) pairs — empty means every capability in
|
|
2099
|
+
* `child` was authorized by `parent`.
|
|
2100
|
+
*
|
|
2101
|
+
* "Subset" here means:
|
|
2102
|
+
* 1. Every (resource, action) pair the child grants must appear in the parent.
|
|
2103
|
+
* 2. Every caveat object in the child's caveat list for a given (resource,
|
|
2104
|
+
* action) must be present (by deep-equality with sorted-key canonicalization)
|
|
2105
|
+
* in the parent's caveat list for the same pair. That is: child caveats ⊆
|
|
2106
|
+
* parent caveats as sets of caveat objects.
|
|
2107
|
+
*
|
|
2108
|
+
* ReCap caveat semantics: a caveat list is a DISJUNCTION of alternatives — the
|
|
2109
|
+
* caller may exercise the ability under ANY listed caveat. Broadening a list
|
|
2110
|
+
* (adding a new alternative not in parent) is a violation. Removing an
|
|
2111
|
+
* alternative is fine (narrowing). Replacing a restrictive alternative with a
|
|
2112
|
+
* less-restrictive one is a violation (the replacement is a different object).
|
|
2113
|
+
*
|
|
2114
|
+
* The conservative safe rule: reject if child has ANY caveat not present in the
|
|
2115
|
+
* parent's caveat set. This catches:
|
|
2116
|
+
* - Removed caveats (parent had 1+, child has 0): the empty list is "no
|
|
2117
|
+
* restriction" which is broader than any restriction — reject.
|
|
2118
|
+
* - Broadened caveats (parent had caveat X, child has caveat Y not equal to
|
|
2119
|
+
* X): Y is a new alternative — reject.
|
|
2120
|
+
* - Incompatible duplicate caveats (child adds a new caveat alongside a
|
|
2121
|
+
* parent one): the new caveat is unauthorized — reject.
|
|
2122
|
+
*
|
|
2123
|
+
* Special case: when both parent and child have empty caveat lists, that means
|
|
2124
|
+
* neither imposes restrictions, and the child is a subset.
|
|
2125
|
+
*/
|
|
2126
|
+
declare function unauthorizedRecapCapabilities(child: RecapAttenuation, parent: RecapAttenuation): Array<{
|
|
2127
|
+
resource: string;
|
|
2128
|
+
action: string;
|
|
2129
|
+
}>;
|
|
2130
|
+
|
|
1565
2131
|
/**
|
|
1566
2132
|
* Interface for an extension to TCW.
|
|
1567
2133
|
* This is the platform-agnostic subset — browser-coupled extensions
|
|
@@ -3016,4 +3582,4 @@ declare const EXPIRY: {
|
|
|
3016
3582
|
declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
|
|
3017
3583
|
type ExpiryTier = keyof typeof EXPIRY;
|
|
3018
3584
|
|
|
3019
|
-
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, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, 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, 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, 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, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, 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, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, discoverLocalTinyCloudNode, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, recapCaveatsEqual, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
|
|
3585
|
+
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_ACQUISITION_PROTOCOL, CREDENTIAL_CONTRACT_VERSION, CREDENTIAL_ERROR_CODES, CREDENTIAL_FORMAT, CREDENTIAL_ACQUISITION_PROTOCOL as CREDENTIAL_PROTOCOL, CREDENTIAL_STEP_REGISTRY_VERSION, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, type CredentialClaimDescriptor, type CredentialEndpointId, CredentialError, type CredentialErrorCode, type CredentialFlowDescriptor, type CredentialHolderBinding, type CredentialInputDescriptor, type CredentialIssuerMetadata, type CredentialProgressEvent, type CredentialRequirement, type CredentialStepDescriptor, type CredentialStepType, type CredentialStorageReceipt, type CredentialUxState, 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, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, HOLDER_BINDING_DOMAIN, 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, type IssuedCredentialEnvelope, type IssuerVerificationKey, 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, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, 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, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, SpaceInfo, SpaceService, type SpaceServiceConfig, type StoredCredentialRecord, type SubsetCheckResult, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, type VerifiedCredential, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalDigest, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createHolderBinding, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, 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, holderBindingCanonicalBytes, holderBindingSigningBytes, httpUrlToMultiaddr, isCapabilitySubset, isDigest, isEvmAddress, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, recapCaveatsEqual, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, sha256Base64Url, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateCredentialFlowDescriptor, validateCredentialHolderBinding, validateCredentialRequirement, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyEip191MessageSignature, verifyIssuedCredential, verifyLocationRecord, verifyStorageReceipt };
|