@tinycloud/share-sdk 1.3.0 → 1.4.0-beta.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.
Files changed (38) hide show
  1. package/README.md +6 -0
  2. package/dist/{addressed-publish-Db-6rqkA.d.cts → addressed-publish-BP6nsgRq.d.cts} +58 -2
  3. package/dist/{addressed-publish-CAdGCqiX.d.ts → addressed-publish-CpkwV-Au.d.ts} +58 -2
  4. package/dist/artifact.cjs +2 -2
  5. package/dist/artifact.cjs.map +1 -1
  6. package/dist/artifact.js +2 -2
  7. package/dist/artifact.js.map +1 -1
  8. package/dist/{history-ZJFHV-IU.d.cts → history-Bg25JIsi.d.cts} +1 -1
  9. package/dist/{history-q0ALXTv7.d.ts → history-kwJxrZgq.d.ts} +1 -1
  10. package/dist/index.cjs +304 -154
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +6 -6
  13. package/dist/index.d.ts +6 -6
  14. package/dist/index.js +290 -154
  15. package/dist/index.js.map +1 -1
  16. package/dist/{owner-policy-CRFeEC98.d.cts → owner-policy-aPmXIR3e.d.cts} +1 -1
  17. package/dist/{owner-policy-CRFeEC98.d.ts → owner-policy-aPmXIR3e.d.ts} +1 -1
  18. package/dist/share-index.cjs +47 -87
  19. package/dist/share-index.cjs.map +1 -1
  20. package/dist/share-index.d.cts +28 -30
  21. package/dist/share-index.d.ts +28 -30
  22. package/dist/share-index.js +46 -86
  23. package/dist/share-index.js.map +1 -1
  24. package/dist/share-root.cjs +2 -2
  25. package/dist/share-root.cjs.map +1 -1
  26. package/dist/share-root.d.cts +2 -2
  27. package/dist/share-root.d.ts +2 -2
  28. package/dist/share-root.js +2 -2
  29. package/dist/share-root.js.map +1 -1
  30. package/dist/{web-recipient-entry-D9IJEyRA.d.cts → web-recipient-entry-CiUzdSQs.d.cts} +9 -1
  31. package/dist/{web-recipient-entry-CKA_vCi5.d.ts → web-recipient-entry-DVyTQBl0.d.ts} +9 -1
  32. package/dist/web-recipient.cjs +76 -105
  33. package/dist/web-recipient.cjs.map +1 -1
  34. package/dist/web-recipient.d.cts +1 -1
  35. package/dist/web-recipient.d.ts +1 -1
  36. package/dist/web-recipient.js +66 -105
  37. package/dist/web-recipient.js.map +1 -1
  38. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { CompactUcanAuthorization, UnifiedContentSource } from '@tinycloud/share-envelope';
2
- import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-Db-6rqkA.cjs';
3
- import { C as CreateOwnerDelegationParams, f as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-CRFeEC98.cjs';
2
+ import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-BP6nsgRq.cjs';
3
+ import { C as CreateOwnerDelegationParams, g as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-aPmXIR3e.cjs';
4
4
  import './authorization-CmP1skO8.cjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { CompactUcanAuthorization, UnifiedContentSource } from '@tinycloud/share-envelope';
2
- import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-CAdGCqiX.js';
3
- import { C as CreateOwnerDelegationParams, f as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-CRFeEC98.js';
2
+ import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-CpkwV-Au.js';
3
+ import { C as CreateOwnerDelegationParams, g as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-aPmXIR3e.js';
4
4
  import './authorization-CmP1skO8.js';
5
5
 
6
6
  /**
@@ -4917,7 +4917,8 @@ function isCanonicalRawCid(cidString) {
4917
4917
  } catch {
4918
4918
  return false;
4919
4919
  }
4920
- return cid.version === 1 && cid.code === code && cid.multihash.code === SHA256_CODE && cid.toString() === cidString;
4920
+ return cid.version === 1 && cid.code === code && cid.multihash.code === SHA256_CODE && // `toString` of a parsed CID gives back the string it was parsed from; a fresh CID is encoded again.
4921
+ CID.createV1(cid.code, cid.multihash).toString() === cidString;
4921
4922
  }
4922
4923
  var base64 = rfc4648({
4923
4924
  prefix: "m",
@@ -5515,7 +5516,6 @@ function assertExactKeys(value, keys, label) {
5515
5516
  function equal(left, right) {
5516
5517
  return left.length === right.length && left.every((byte, index) => byte === right[index]);
5517
5518
  }
5518
- var MAX_INLINE_BYTES = 256 * 1024;
5519
5519
 
5520
5520
  // src/owner-root-cacao.ts
5521
5521
  import { blake3 as blake32 } from "@noble/hashes/blake3";