@tinycloud/sdk-core 2.11.0-beta.7 → 2.11.0-beta.9
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/{capability-BjzXwtNw.d.cts → capability-BA49Uboq.d.cts} +1 -1
- package/dist/{capability-BjzXwtNw.d.ts → capability-BA49Uboq.d.ts} +1 -1
- package/dist/delegations/index.cjs +11 -120
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.js +15 -39
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +250 -367
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +247 -48
- package/dist/index.js.map +1 -1
- package/dist/policy/index.cjs +10 -74
- package/dist/policy/index.cjs.map +1 -1
- package/dist/policy/index.d.cts +4 -4
- package/dist/policy/index.d.ts +4 -4
- package/dist/policy/index.js +10 -8
- package/dist/policy/index.js.map +1 -1
- package/dist/requester/index.cjs +10 -38
- package/dist/requester/index.cjs.map +1 -1
- package/dist/requester/index.d.cts +1 -1
- package/dist/requester/index.d.ts +1 -1
- package/dist/requester/index.js +10 -8
- package/dist/requester/index.js.map +1 -1
- package/dist/{signed-object-C6mWbTbB.d.ts → signed-object-B3dMzh8O.d.ts} +1 -1
- package/dist/{signed-object-IMAm5a32.d.cts → signed-object-DwPZl6kV.d.cts} +1 -1
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ export { HOLDER_KEY_BINDING_PRESENTATION_SCHEMA, HolderKeyBindingPresentation, L
|
|
|
5
5
|
import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aB as ShareLink, ba as SpaceInfo, I as ICapabilityKeyRegistry, y as ISharingService, D as DelegationManager, b as AccountDelegationQueryOptions, A as AccountDelegationPage, w as DelegationRevocationReceipt } from './recipient-types.schema-D5pDlIqn.cjs';
|
|
6
6
|
export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry, bJ as CapabilityKeyRegistry, bK as CapabilityKeyRegistryErrorCode, bL 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 ReceiveOptions, $ as RegisterOwnerSharePolicyParams, a0 as SHARE_DELIVERY_AUTHORIZATION_DOMAIN, a1 as SenderShareKeyStorage, a2 as SenderShareRecord, a3 as SenderShareRecordStorage, a4 as SenderShareRevocationScope, a5 as SenderShareStore, a6 as ShareAccess, a7 as ShareAccessError, a8 as ShareAccessV2, a9 as ShareAction, ab as ShareAddressedDelegationEnvelopeV2, ac as ShareAddressedDelegationEnvelopeV2Schema, ad as ShareAddressedDelegationRequestV2, ae as ShareAddressedDelegationRequestV2Schema, af as ShareAddressedDelegationResponseV2, ag as ShareAddressedDelegationResponseV2Schema, ah as ShareAddressedRecipientMatcher, ai as ShareArtifactInput, aj as ShareArtifactResult, ak as ShareArtifactV2, al as ShareCache, am as ShareCacheEntry, an as ShareCacheKey, ao as ShareCacheMetadata, ap as ShareCapabilityLike, aq as ShareConflict, ar as ShareContentMetadata, as as ShareContentSource, at as ShareDeliveryAuthorization, au as ShareDeliveryAuthorizationReceipt, av as ShareDeliveryAuthorizationRequest, aw as ShareDetachedProof, ax as ShareEnvelopeError, ay as ShareEnvelopeV2, az as ShareExpiryBounds, aA as ShareKvContentSource, aC as ShareLinkData, aD as ShareLinkLocation, aE as ShareListEntry, aF as ShareListResult, aG as ShareNativeAction, aH as ShareNativeInvokeEnvelopeV1, aI as ShareNativeInvokeErrorResult, aJ as ShareNativeInvokeInput, aK as ShareNativeInvokeResult, aL as ShareNativeInvokeSuccessResult, aM as ShareNativeResponse, aN as ShareNativeResponseSchema, aO as SharePolicy, aP as SharePolicyBinding, aQ as SharePolicySession, aR as SharePolicySessionV1, aS as SharePolicySessionWireV1, aT as ShareReadInvocationV1, aU as ShareReadResult, aV as ShareRecipientClient, aW as ShareRecipientClientOptions, aY as ShareRecipientPolicy, a_ as ShareRecipientResult, a$ as ShareRecipientTarget, b1 as ShareResource, b3 as ShareSaveOptions, b4 as ShareSchema, b5 as ShareSqlContentSource, b6 as ShareWireAction, b7 as SharingService, b8 as SharingServiceConfig, b9 as SignedDelegation, bb as SpaceOwnership, bM as StoredDelegationChain, bc as ValidateShareDeliveryAuthorizationExpected, bd as VerifyShareEnvelopeOptions, be as canonicalOwnerSharePolicy, bf as computeOwnerShareRegistrationCid, bg as computeShareCid, bN as createCapabilityKeyRegistry, bh as createDelegatedShareKey, bi as createPolicyEnforcementDelegation, bj as createShareArtifact, bk as createShareArtifactAsync, bl as createSharePolicy, bm as createSharingService, bn as decryptShareBytesAsync, bo as encodeInlineShareUrl, bp as encodeShareArtifact, bq as encodeShareUrl, br as encryptShareBytes, bs as encryptShareBytesAsync, bt as intersectShareCapabilities, bu as isV2ShareLink, bv as normalizeShareActions, bw as normalizeShareRecipientTarget, bx as normalizeShareResource, by as parseShareArtifact, bz as parseShareUrl, bA as restoreDelegatedShareKey, bB as shareCapabilityAllows, bC as shareDeliveryTrustedKid, bD as signShareEnvelope, bE as validateOwnerSharePolicyRegistration, bF as validateOwnerSharePolicyRegistrationBytes, bG as validateShareDeliveryAuthorizationBytes, bH as verifyShareCid, bI as verifyShareEnvelope } from './recipient-types.schema-D5pDlIqn.cjs';
|
|
7
7
|
export { ACCOUNT_INDEX_SCHEMA, BOOTSTRAP_ALLOWLIST, 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';
|
|
8
|
-
export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-
|
|
9
|
-
export {
|
|
8
|
+
export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-DwPZl6kV.cjs';
|
|
9
|
+
export { b as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BA49Uboq.cjs';
|
|
10
10
|
export { SiweMessage } from 'siwe';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { HOLDER_KEY_BINDING_PRESENTATION_SCHEMA, HolderKeyBindingPresentation, L
|
|
|
5
5
|
import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aB as ShareLink, ba as SpaceInfo, I as ICapabilityKeyRegistry, y as ISharingService, D as DelegationManager, b as AccountDelegationQueryOptions, A as AccountDelegationPage, w as DelegationRevocationReceipt } from './recipient-types.schema-D5pDlIqn.js';
|
|
6
6
|
export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry, bJ as CapabilityKeyRegistry, bK as CapabilityKeyRegistryErrorCode, bL 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 ReceiveOptions, $ as RegisterOwnerSharePolicyParams, a0 as SHARE_DELIVERY_AUTHORIZATION_DOMAIN, a1 as SenderShareKeyStorage, a2 as SenderShareRecord, a3 as SenderShareRecordStorage, a4 as SenderShareRevocationScope, a5 as SenderShareStore, a6 as ShareAccess, a7 as ShareAccessError, a8 as ShareAccessV2, a9 as ShareAction, ab as ShareAddressedDelegationEnvelopeV2, ac as ShareAddressedDelegationEnvelopeV2Schema, ad as ShareAddressedDelegationRequestV2, ae as ShareAddressedDelegationRequestV2Schema, af as ShareAddressedDelegationResponseV2, ag as ShareAddressedDelegationResponseV2Schema, ah as ShareAddressedRecipientMatcher, ai as ShareArtifactInput, aj as ShareArtifactResult, ak as ShareArtifactV2, al as ShareCache, am as ShareCacheEntry, an as ShareCacheKey, ao as ShareCacheMetadata, ap as ShareCapabilityLike, aq as ShareConflict, ar as ShareContentMetadata, as as ShareContentSource, at as ShareDeliveryAuthorization, au as ShareDeliveryAuthorizationReceipt, av as ShareDeliveryAuthorizationRequest, aw as ShareDetachedProof, ax as ShareEnvelopeError, ay as ShareEnvelopeV2, az as ShareExpiryBounds, aA as ShareKvContentSource, aC as ShareLinkData, aD as ShareLinkLocation, aE as ShareListEntry, aF as ShareListResult, aG as ShareNativeAction, aH as ShareNativeInvokeEnvelopeV1, aI as ShareNativeInvokeErrorResult, aJ as ShareNativeInvokeInput, aK as ShareNativeInvokeResult, aL as ShareNativeInvokeSuccessResult, aM as ShareNativeResponse, aN as ShareNativeResponseSchema, aO as SharePolicy, aP as SharePolicyBinding, aQ as SharePolicySession, aR as SharePolicySessionV1, aS as SharePolicySessionWireV1, aT as ShareReadInvocationV1, aU as ShareReadResult, aV as ShareRecipientClient, aW as ShareRecipientClientOptions, aY as ShareRecipientPolicy, a_ as ShareRecipientResult, a$ as ShareRecipientTarget, b1 as ShareResource, b3 as ShareSaveOptions, b4 as ShareSchema, b5 as ShareSqlContentSource, b6 as ShareWireAction, b7 as SharingService, b8 as SharingServiceConfig, b9 as SignedDelegation, bb as SpaceOwnership, bM as StoredDelegationChain, bc as ValidateShareDeliveryAuthorizationExpected, bd as VerifyShareEnvelopeOptions, be as canonicalOwnerSharePolicy, bf as computeOwnerShareRegistrationCid, bg as computeShareCid, bN as createCapabilityKeyRegistry, bh as createDelegatedShareKey, bi as createPolicyEnforcementDelegation, bj as createShareArtifact, bk as createShareArtifactAsync, bl as createSharePolicy, bm as createSharingService, bn as decryptShareBytesAsync, bo as encodeInlineShareUrl, bp as encodeShareArtifact, bq as encodeShareUrl, br as encryptShareBytes, bs as encryptShareBytesAsync, bt as intersectShareCapabilities, bu as isV2ShareLink, bv as normalizeShareActions, bw as normalizeShareRecipientTarget, bx as normalizeShareResource, by as parseShareArtifact, bz as parseShareUrl, bA as restoreDelegatedShareKey, bB as shareCapabilityAllows, bC as shareDeliveryTrustedKid, bD as signShareEnvelope, bE as validateOwnerSharePolicyRegistration, bF as validateOwnerSharePolicyRegistrationBytes, bG as validateShareDeliveryAuthorizationBytes, bH as verifyShareCid, bI as verifyShareEnvelope } from './recipient-types.schema-D5pDlIqn.js';
|
|
7
7
|
export { ACCOUNT_INDEX_SCHEMA, BOOTSTRAP_ALLOWLIST, 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';
|
|
8
|
-
export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-
|
|
9
|
-
export {
|
|
8
|
+
export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-B3dMzh8O.js';
|
|
9
|
+
export { b as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BA49Uboq.js';
|
|
10
10
|
export { SiweMessage } from 'siwe';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1858,13 +1858,12 @@ function digest(input, options2) {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
var identity2 = { code: code2, name, encode: encode4, digest };
|
|
1860
1860
|
|
|
1861
|
-
// ../../node_modules/multiformats/dist/src/hashes/sha2.js
|
|
1862
|
-
var
|
|
1863
|
-
__export(
|
|
1861
|
+
// ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
|
|
1862
|
+
var sha2_browser_exports = {};
|
|
1863
|
+
__export(sha2_browser_exports, {
|
|
1864
1864
|
sha256: () => sha2562,
|
|
1865
1865
|
sha512: () => sha512
|
|
1866
1866
|
});
|
|
1867
|
-
import crypto2 from "crypto";
|
|
1868
1867
|
|
|
1869
1868
|
// ../../node_modules/multiformats/dist/src/hashes/hasher.js
|
|
1870
1869
|
var DEFAULT_MIN_DIGEST_LENGTH = 20;
|
|
@@ -1914,21 +1913,24 @@ function createDigest(digest4, code3, truncate) {
|
|
|
1914
1913
|
return create(code3, digest4);
|
|
1915
1914
|
}
|
|
1916
1915
|
|
|
1917
|
-
// ../../node_modules/multiformats/dist/src/hashes/sha2.js
|
|
1916
|
+
// ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
|
|
1917
|
+
function sha(name2) {
|
|
1918
|
+
return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
|
|
1919
|
+
}
|
|
1918
1920
|
var sha2562 = from2({
|
|
1919
1921
|
name: "sha2-256",
|
|
1920
1922
|
code: 18,
|
|
1921
|
-
encode: (
|
|
1923
|
+
encode: sha("SHA-256")
|
|
1922
1924
|
});
|
|
1923
1925
|
var sha512 = from2({
|
|
1924
1926
|
name: "sha2-512",
|
|
1925
1927
|
code: 19,
|
|
1926
|
-
encode: (
|
|
1928
|
+
encode: sha("SHA-512")
|
|
1927
1929
|
});
|
|
1928
1930
|
|
|
1929
1931
|
// ../../node_modules/multiformats/dist/src/basics.js
|
|
1930
1932
|
var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
|
|
1931
|
-
var hashes = { ...
|
|
1933
|
+
var hashes = { ...sha2_browser_exports, ...identity_exports2 };
|
|
1932
1934
|
|
|
1933
1935
|
// src/policy/signed-object.ts
|
|
1934
1936
|
import { bytesToHex as bytesToHex2, sha256 as sha2563, verifyMessage } from "viem";
|
|
@@ -13628,17 +13630,9 @@ function equals3(a, b) {
|
|
|
13628
13630
|
return true;
|
|
13629
13631
|
}
|
|
13630
13632
|
|
|
13631
|
-
// ../../node_modules/uint8arrays/dist/src/alloc.
|
|
13632
|
-
import { Buffer as Buffer2 } from "buffer";
|
|
13633
|
-
|
|
13634
|
-
// ../../node_modules/uint8arrays/dist/src/util/as-uint8array.node.js
|
|
13635
|
-
function asUint8Array(buf) {
|
|
13636
|
-
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
13637
|
-
}
|
|
13638
|
-
|
|
13639
|
-
// ../../node_modules/uint8arrays/dist/src/alloc.node.js
|
|
13633
|
+
// ../../node_modules/uint8arrays/dist/src/alloc.js
|
|
13640
13634
|
function allocUnsafe(size = 0) {
|
|
13641
|
-
return
|
|
13635
|
+
return new Uint8Array(size);
|
|
13642
13636
|
}
|
|
13643
13637
|
|
|
13644
13638
|
// ../../node_modules/uint8-varint/dist/src/index.js
|
|
@@ -13814,14 +13808,24 @@ function decode6(buf, offset = 0) {
|
|
|
13814
13808
|
}
|
|
13815
13809
|
}
|
|
13816
13810
|
|
|
13817
|
-
// ../../node_modules/uint8arrays/dist/src/
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
return asUint8Array(Buffer3.concat(arrays, length2));
|
|
13811
|
+
// ../../node_modules/uint8arrays/dist/src/util/as-uint8array.js
|
|
13812
|
+
function asUint8Array(buf) {
|
|
13813
|
+
return buf;
|
|
13821
13814
|
}
|
|
13822
13815
|
|
|
13823
|
-
// ../../node_modules/uint8arrays/dist/src/
|
|
13824
|
-
|
|
13816
|
+
// ../../node_modules/uint8arrays/dist/src/concat.js
|
|
13817
|
+
function concat(arrays, length2) {
|
|
13818
|
+
if (length2 == null) {
|
|
13819
|
+
length2 = arrays.reduce((acc, curr) => acc + curr.length, 0);
|
|
13820
|
+
}
|
|
13821
|
+
const output = allocUnsafe(length2);
|
|
13822
|
+
let offset = 0;
|
|
13823
|
+
for (const arr of arrays) {
|
|
13824
|
+
output.set(arr, offset);
|
|
13825
|
+
offset += arr.length;
|
|
13826
|
+
}
|
|
13827
|
+
return asUint8Array(output);
|
|
13828
|
+
}
|
|
13825
13829
|
|
|
13826
13830
|
// ../../node_modules/uint8arrays/dist/src/util/bases.js
|
|
13827
13831
|
function createCodec(name2, prefix, encode5, decode7) {
|
|
@@ -13870,28 +13874,21 @@ var BASES = {
|
|
|
13870
13874
|
};
|
|
13871
13875
|
var bases_default = BASES;
|
|
13872
13876
|
|
|
13873
|
-
// ../../node_modules/uint8arrays/dist/src/from-string.
|
|
13877
|
+
// ../../node_modules/uint8arrays/dist/src/from-string.js
|
|
13874
13878
|
function fromString2(string2, encoding = "utf8") {
|
|
13875
13879
|
const base3 = bases_default[encoding];
|
|
13876
13880
|
if (base3 == null) {
|
|
13877
13881
|
throw new Error(`Unsupported encoding "${encoding}"`);
|
|
13878
13882
|
}
|
|
13879
|
-
if (encoding === "utf8" || encoding === "utf-8") {
|
|
13880
|
-
return asUint8Array(Buffer4.from(string2, "utf-8"));
|
|
13881
|
-
}
|
|
13882
13883
|
return base3.decoder.decode(`${base3.prefix}${string2}`);
|
|
13883
13884
|
}
|
|
13884
13885
|
|
|
13885
|
-
// ../../node_modules/uint8arrays/dist/src/to-string.
|
|
13886
|
-
import { Buffer as Buffer5 } from "buffer";
|
|
13886
|
+
// ../../node_modules/uint8arrays/dist/src/to-string.js
|
|
13887
13887
|
function toString2(array, encoding = "utf8") {
|
|
13888
13888
|
const base3 = bases_default[encoding];
|
|
13889
13889
|
if (base3 == null) {
|
|
13890
13890
|
throw new Error(`Unsupported encoding "${encoding}"`);
|
|
13891
13891
|
}
|
|
13892
|
-
if (encoding === "utf8" || encoding === "utf-8") {
|
|
13893
|
-
return Buffer5.from(array.buffer, array.byteOffset, array.byteLength).toString("utf8");
|
|
13894
|
-
}
|
|
13895
13892
|
return base3.encoder.encode(array).substring(1);
|
|
13896
13893
|
}
|
|
13897
13894
|
|
|
@@ -13925,8 +13922,218 @@ var UnknownProtocolError = class extends Error {
|
|
|
13925
13922
|
};
|
|
13926
13923
|
__publicField(UnknownProtocolError, "name", "UnknownProtocolError");
|
|
13927
13924
|
|
|
13928
|
-
// ../../node_modules/@chainsafe/is-ip/lib/
|
|
13929
|
-
|
|
13925
|
+
// ../../node_modules/@chainsafe/is-ip/lib/parser.js
|
|
13926
|
+
var Parser = class {
|
|
13927
|
+
constructor() {
|
|
13928
|
+
__publicField(this, "index", 0);
|
|
13929
|
+
__publicField(this, "input", "");
|
|
13930
|
+
}
|
|
13931
|
+
new(input) {
|
|
13932
|
+
this.index = 0;
|
|
13933
|
+
this.input = input;
|
|
13934
|
+
return this;
|
|
13935
|
+
}
|
|
13936
|
+
/** Run a parser, and restore the pre-parse state if it fails. */
|
|
13937
|
+
readAtomically(fn) {
|
|
13938
|
+
const index = this.index;
|
|
13939
|
+
const result = fn();
|
|
13940
|
+
if (result === void 0) {
|
|
13941
|
+
this.index = index;
|
|
13942
|
+
}
|
|
13943
|
+
return result;
|
|
13944
|
+
}
|
|
13945
|
+
/** Run a parser, but fail if the entire input wasn't consumed. Doesn't run atomically. */
|
|
13946
|
+
parseWith(fn) {
|
|
13947
|
+
const result = fn();
|
|
13948
|
+
if (this.index !== this.input.length) {
|
|
13949
|
+
return void 0;
|
|
13950
|
+
}
|
|
13951
|
+
return result;
|
|
13952
|
+
}
|
|
13953
|
+
/** Peek the next character from the input */
|
|
13954
|
+
peekChar() {
|
|
13955
|
+
if (this.index >= this.input.length) {
|
|
13956
|
+
return void 0;
|
|
13957
|
+
}
|
|
13958
|
+
return this.input[this.index];
|
|
13959
|
+
}
|
|
13960
|
+
/** Read the next character from the input */
|
|
13961
|
+
readChar() {
|
|
13962
|
+
if (this.index >= this.input.length) {
|
|
13963
|
+
return void 0;
|
|
13964
|
+
}
|
|
13965
|
+
return this.input[this.index++];
|
|
13966
|
+
}
|
|
13967
|
+
/** Read the next character from the input if it matches the target. */
|
|
13968
|
+
readGivenChar(target) {
|
|
13969
|
+
return this.readAtomically(() => {
|
|
13970
|
+
const char = this.readChar();
|
|
13971
|
+
if (char !== target) {
|
|
13972
|
+
return void 0;
|
|
13973
|
+
}
|
|
13974
|
+
return char;
|
|
13975
|
+
});
|
|
13976
|
+
}
|
|
13977
|
+
/**
|
|
13978
|
+
* Helper for reading separators in an indexed loop. Reads the separator
|
|
13979
|
+
* character iff index > 0, then runs the parser. When used in a loop,
|
|
13980
|
+
* the separator character will only be read on index > 0 (see
|
|
13981
|
+
* readIPv4Addr for an example)
|
|
13982
|
+
*/
|
|
13983
|
+
readSeparator(sep, index, inner) {
|
|
13984
|
+
return this.readAtomically(() => {
|
|
13985
|
+
if (index > 0) {
|
|
13986
|
+
if (this.readGivenChar(sep) === void 0) {
|
|
13987
|
+
return void 0;
|
|
13988
|
+
}
|
|
13989
|
+
}
|
|
13990
|
+
return inner();
|
|
13991
|
+
});
|
|
13992
|
+
}
|
|
13993
|
+
/**
|
|
13994
|
+
* Read a number off the front of the input in the given radix, stopping
|
|
13995
|
+
* at the first non-digit character or eof. Fails if the number has more
|
|
13996
|
+
* digits than max_digits or if there is no number.
|
|
13997
|
+
*/
|
|
13998
|
+
readNumber(radix, maxDigits, allowZeroPrefix, maxBytes) {
|
|
13999
|
+
return this.readAtomically(() => {
|
|
14000
|
+
let result = 0;
|
|
14001
|
+
let digitCount = 0;
|
|
14002
|
+
const leadingChar = this.peekChar();
|
|
14003
|
+
if (leadingChar === void 0) {
|
|
14004
|
+
return void 0;
|
|
14005
|
+
}
|
|
14006
|
+
const hasLeadingZero = leadingChar === "0";
|
|
14007
|
+
const maxValue2 = 2 ** (8 * maxBytes) - 1;
|
|
14008
|
+
while (true) {
|
|
14009
|
+
const digit = this.readAtomically(() => {
|
|
14010
|
+
const char = this.readChar();
|
|
14011
|
+
if (char === void 0) {
|
|
14012
|
+
return void 0;
|
|
14013
|
+
}
|
|
14014
|
+
const num = Number.parseInt(char, radix);
|
|
14015
|
+
if (Number.isNaN(num)) {
|
|
14016
|
+
return void 0;
|
|
14017
|
+
}
|
|
14018
|
+
return num;
|
|
14019
|
+
});
|
|
14020
|
+
if (digit === void 0) {
|
|
14021
|
+
break;
|
|
14022
|
+
}
|
|
14023
|
+
result *= radix;
|
|
14024
|
+
result += digit;
|
|
14025
|
+
if (result > maxValue2) {
|
|
14026
|
+
return void 0;
|
|
14027
|
+
}
|
|
14028
|
+
digitCount += 1;
|
|
14029
|
+
if (maxDigits !== void 0) {
|
|
14030
|
+
if (digitCount > maxDigits) {
|
|
14031
|
+
return void 0;
|
|
14032
|
+
}
|
|
14033
|
+
}
|
|
14034
|
+
}
|
|
14035
|
+
if (digitCount === 0) {
|
|
14036
|
+
return void 0;
|
|
14037
|
+
} else if (!allowZeroPrefix && hasLeadingZero && digitCount > 1) {
|
|
14038
|
+
return void 0;
|
|
14039
|
+
} else {
|
|
14040
|
+
return result;
|
|
14041
|
+
}
|
|
14042
|
+
});
|
|
14043
|
+
}
|
|
14044
|
+
/** Read an IPv4 address. */
|
|
14045
|
+
readIPv4Addr() {
|
|
14046
|
+
return this.readAtomically(() => {
|
|
14047
|
+
const out = new Uint8Array(4);
|
|
14048
|
+
for (let i = 0; i < out.length; i++) {
|
|
14049
|
+
const ix = this.readSeparator(".", i, () => this.readNumber(10, 3, false, 1));
|
|
14050
|
+
if (ix === void 0) {
|
|
14051
|
+
return void 0;
|
|
14052
|
+
}
|
|
14053
|
+
out[i] = ix;
|
|
14054
|
+
}
|
|
14055
|
+
return out;
|
|
14056
|
+
});
|
|
14057
|
+
}
|
|
14058
|
+
/** Read an IPv6 Address. */
|
|
14059
|
+
readIPv6Addr() {
|
|
14060
|
+
const readGroups = (groups) => {
|
|
14061
|
+
for (let i = 0; i < groups.length / 2; i++) {
|
|
14062
|
+
const ix = i * 2;
|
|
14063
|
+
if (i < groups.length - 3) {
|
|
14064
|
+
const ipv4 = this.readSeparator(":", i, () => this.readIPv4Addr());
|
|
14065
|
+
if (ipv4 !== void 0) {
|
|
14066
|
+
groups[ix] = ipv4[0];
|
|
14067
|
+
groups[ix + 1] = ipv4[1];
|
|
14068
|
+
groups[ix + 2] = ipv4[2];
|
|
14069
|
+
groups[ix + 3] = ipv4[3];
|
|
14070
|
+
return [ix + 4, true];
|
|
14071
|
+
}
|
|
14072
|
+
}
|
|
14073
|
+
const group = this.readSeparator(":", i, () => this.readNumber(16, 4, true, 2));
|
|
14074
|
+
if (group === void 0) {
|
|
14075
|
+
return [ix, false];
|
|
14076
|
+
}
|
|
14077
|
+
groups[ix] = group >> 8;
|
|
14078
|
+
groups[ix + 1] = group & 255;
|
|
14079
|
+
}
|
|
14080
|
+
return [groups.length, false];
|
|
14081
|
+
};
|
|
14082
|
+
return this.readAtomically(() => {
|
|
14083
|
+
const head = new Uint8Array(16);
|
|
14084
|
+
const [headSize, headIp4] = readGroups(head);
|
|
14085
|
+
if (headSize === 16) {
|
|
14086
|
+
return head;
|
|
14087
|
+
}
|
|
14088
|
+
if (headIp4) {
|
|
14089
|
+
return void 0;
|
|
14090
|
+
}
|
|
14091
|
+
if (this.readGivenChar(":") === void 0) {
|
|
14092
|
+
return void 0;
|
|
14093
|
+
}
|
|
14094
|
+
if (this.readGivenChar(":") === void 0) {
|
|
14095
|
+
return void 0;
|
|
14096
|
+
}
|
|
14097
|
+
const tail = new Uint8Array(14);
|
|
14098
|
+
const limit = 16 - (headSize + 2);
|
|
14099
|
+
const [tailSize] = readGroups(tail.subarray(0, limit));
|
|
14100
|
+
head.set(tail.subarray(0, tailSize), 16 - tailSize);
|
|
14101
|
+
return head;
|
|
14102
|
+
});
|
|
14103
|
+
}
|
|
14104
|
+
/** Read an IP Address, either IPv4 or IPv6. */
|
|
14105
|
+
readIPAddr() {
|
|
14106
|
+
return this.readIPv4Addr() ?? this.readIPv6Addr();
|
|
14107
|
+
}
|
|
14108
|
+
};
|
|
14109
|
+
|
|
14110
|
+
// ../../node_modules/@chainsafe/is-ip/lib/parse.js
|
|
14111
|
+
var MAX_IPV6_LENGTH = 45;
|
|
14112
|
+
var MAX_IPV4_LENGTH = 15;
|
|
14113
|
+
var parser = new Parser();
|
|
14114
|
+
function parseIPv4(input) {
|
|
14115
|
+
if (input.length > MAX_IPV4_LENGTH) {
|
|
14116
|
+
return void 0;
|
|
14117
|
+
}
|
|
14118
|
+
return parser.new(input).parseWith(() => parser.readIPv4Addr());
|
|
14119
|
+
}
|
|
14120
|
+
function parseIPv6(input) {
|
|
14121
|
+
if (input.includes("%")) {
|
|
14122
|
+
input = input.split("%")[0];
|
|
14123
|
+
}
|
|
14124
|
+
if (input.length > MAX_IPV6_LENGTH) {
|
|
14125
|
+
return void 0;
|
|
14126
|
+
}
|
|
14127
|
+
return parser.new(input).parseWith(() => parser.readIPv6Addr());
|
|
14128
|
+
}
|
|
14129
|
+
|
|
14130
|
+
// ../../node_modules/@chainsafe/is-ip/lib/is-ip.js
|
|
14131
|
+
function isIPv4(input) {
|
|
14132
|
+
return Boolean(parseIPv4(input));
|
|
14133
|
+
}
|
|
14134
|
+
function isIPv6(input) {
|
|
14135
|
+
return Boolean(parseIPv6(input));
|
|
14136
|
+
}
|
|
13930
14137
|
|
|
13931
14138
|
// ../../node_modules/@multiformats/multiaddr/dist/src/constants.js
|
|
13932
14139
|
var CODE_IP4 = 4;
|
|
@@ -14883,25 +15090,17 @@ ipRegex.v4 = (options2) => options2 && options2.exact ? v4exact : new RegExp(`${
|
|
|
14883
15090
|
ipRegex.v6 = (options2) => options2 && options2.exact ? v6exact : new RegExp(`${boundry(options2)}${v6}${boundry(options2)}`, "g");
|
|
14884
15091
|
var ip_regex_default = ipRegex;
|
|
14885
15092
|
|
|
14886
|
-
// ../../node_modules/function-timeout/
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
const script = new vm.Script("returnValue = function_()");
|
|
14890
|
-
const wrappedFunction = (...arguments_) => {
|
|
14891
|
-
const context = {
|
|
14892
|
-
function_: () => function_(...arguments_)
|
|
14893
|
-
};
|
|
14894
|
-
script.runInNewContext(context, { timeout });
|
|
14895
|
-
return context.returnValue;
|
|
14896
|
-
};
|
|
15093
|
+
// ../../node_modules/function-timeout/browser.js
|
|
15094
|
+
function functionTimeout(function_) {
|
|
15095
|
+
const wrappedFunction = (...arguments_) => function_(...arguments_);
|
|
14897
15096
|
Object.defineProperty(wrappedFunction, "name", {
|
|
14898
15097
|
value: `functionTimeout(${function_.name || "<anonymous>"})`,
|
|
14899
15098
|
configurable: true
|
|
14900
15099
|
});
|
|
14901
15100
|
return wrappedFunction;
|
|
14902
15101
|
}
|
|
14903
|
-
function isTimeoutError(
|
|
14904
|
-
return
|
|
15102
|
+
function isTimeoutError() {
|
|
15103
|
+
return false;
|
|
14905
15104
|
}
|
|
14906
15105
|
|
|
14907
15106
|
// ../../node_modules/clone-regexp/node_modules/is-regexp/index.js
|