nucypher-experimental-taco-storage
Version:
TypeScript SDK for encrypted data storage with TACo (Threshold Access Control), supporting multiple storage providers including IPFS and SQLite
26 lines • 736 B
JavaScript
;
// Mock for multiformats/cid to avoid ES module issues in Jest
Object.defineProperty(exports, "__esModule", { value: true });
exports.CID = void 0;
class CID {
constructor(code, multihash, version = 1) {
this.code = code;
this.multihash = multihash;
this.version = version;
}
static parse(cid) {
// Simple mock parsing
if (typeof cid !== 'string' || cid.length < 10) {
throw new Error('Invalid CID');
}
return new CID(0x55, new Uint8Array([1, 2, 3]), 1);
}
toString() {
return 'QmMockCIDHash123456789';
}
static isCID(obj) {
return obj instanceof CID;
}
}
exports.CID = CID;
//# sourceMappingURL=cid.js.map