@campnetwork/origin 1.3.0-alpha.8 → 1.3.0-alpha.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/core.d.ts CHANGED
@@ -489,12 +489,13 @@ interface RaiseDisputeSmartResult {
489
489
  declare function raiseDisputeSmart(this: Origin, targetIpId: bigint, evidence: Record<string, any>, disputeTag: Hex): Promise<RaiseDisputeSmartResult>;
490
490
 
491
491
  /**
492
- * Encode CIDv0 to bytes32 by stripping the 0x1220 multihash prefix.
493
- * Only works with CIDv0 (SHA-256 hash, starts with "Qm").
492
+ * Encode a CID to bytes32 by extracting the 32-byte SHA-256 digest.
493
+ * Supports both CIDv0 (starts with "Qm") and CIDv1 (starts with "bafy").
494
494
  */
495
495
  declare function encodeCidToBytes32(cid: string): Hex;
496
496
  /**
497
- * Decode bytes32 back to CIDv0 by prepending 0x1220 multihash prefix.
497
+ * Decode bytes32 back to CIDv1 format (base32, dag-pb codec).
498
+ * Returns a CID starting with "bafybei" that works with Pinata gateways.
498
499
  */
499
500
  declare function decodeCidFromBytes32(bytes32: Hex): string;
500
501
 
@@ -489,12 +489,13 @@ interface RaiseDisputeSmartResult {
489
489
  declare function raiseDisputeSmart(this: Origin, targetIpId: bigint, evidence: Record<string, any>, disputeTag: Hex): Promise<RaiseDisputeSmartResult>;
490
490
 
491
491
  /**
492
- * Encode CIDv0 to bytes32 by stripping the 0x1220 multihash prefix.
493
- * Only works with CIDv0 (SHA-256 hash, starts with "Qm").
492
+ * Encode a CID to bytes32 by extracting the 32-byte SHA-256 digest.
493
+ * Supports both CIDv0 (starts with "Qm") and CIDv1 (starts with "bafy").
494
494
  */
495
495
  declare function encodeCidToBytes32(cid: string): Hex;
496
496
  /**
497
- * Decode bytes32 back to CIDv0 by prepending 0x1220 multihash prefix.
497
+ * Decode bytes32 back to CIDv1 format (base32, dag-pb codec).
498
+ * Returns a CID starting with "bafybei" that works with Pinata gateways.
498
499
  */
499
500
  declare function decodeCidFromBytes32(bytes32: Hex): string;
500
501