@campnetwork/origin 1.3.0-alpha.7 → 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.cjs +97 -77
- package/dist/core.d.ts +12 -1
- package/dist/core.esm.d.ts +12 -1
- package/dist/core.esm.js +94 -75
- package/dist/react/index.esm.js +51 -7
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -488,6 +488,17 @@ interface RaiseDisputeSmartResult {
|
|
|
488
488
|
*/
|
|
489
489
|
declare function raiseDisputeSmart(this: Origin, targetIpId: bigint, evidence: Record<string, any>, disputeTag: Hex): Promise<RaiseDisputeSmartResult>;
|
|
490
490
|
|
|
491
|
+
/**
|
|
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
|
+
*/
|
|
495
|
+
declare function encodeCidToBytes32(cid: string): Hex;
|
|
496
|
+
/**
|
|
497
|
+
* Decode bytes32 back to CIDv1 format (base32, dag-pb codec).
|
|
498
|
+
* Returns a CID starting with "bafybei" that works with Pinata gateways.
|
|
499
|
+
*/
|
|
500
|
+
declare function decodeCidFromBytes32(bytes32: Hex): string;
|
|
501
|
+
|
|
491
502
|
/**
|
|
492
503
|
* Asserts a dispute as the IP owner with counter-evidence.
|
|
493
504
|
* Must be called by the owner of the disputed IP within the cooldown period.
|
|
@@ -1493,4 +1504,4 @@ declare class Auth {
|
|
|
1493
1504
|
unlinkTelegram(): Promise<any>;
|
|
1494
1505
|
}
|
|
1495
1506
|
|
|
1496
|
-
export { type AppInfo, Auth, type BaseSigner, BrowserStorage, type BulkCostPreview, type BuyParams, CustomSignerAdapter, DataStatus, type Dispute, type DisputeProgress, DisputeStatus, EthersSignerAdapter, type FractionOwnership, type FractionalizeEligibility, type LicenseTerms, LicenseType, MemoryStorage, Origin, type SignerAdapter, type SignerType, type StorageAdapter, type TokenInfo, type TolerantResult, ViemSignerAdapter, type VoteEligibility, mainnet as campMainnet, testnet as campTestnet, createLicenseTerms, createNodeWalletClient, createSignerAdapter };
|
|
1507
|
+
export { type AppInfo, Auth, type BaseSigner, BrowserStorage, type BulkCostPreview, type BuyParams, CustomSignerAdapter, DataStatus, type Dispute, type DisputeProgress, DisputeStatus, EthersSignerAdapter, type FractionOwnership, type FractionalizeEligibility, type LicenseTerms, LicenseType, MemoryStorage, Origin, type SignerAdapter, type SignerType, type StorageAdapter, type TokenInfo, type TolerantResult, ViemSignerAdapter, type VoteEligibility, mainnet as campMainnet, testnet as campTestnet, createLicenseTerms, createNodeWalletClient, createSignerAdapter, decodeCidFromBytes32, encodeCidToBytes32 };
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -488,6 +488,17 @@ interface RaiseDisputeSmartResult {
|
|
|
488
488
|
*/
|
|
489
489
|
declare function raiseDisputeSmart(this: Origin, targetIpId: bigint, evidence: Record<string, any>, disputeTag: Hex): Promise<RaiseDisputeSmartResult>;
|
|
490
490
|
|
|
491
|
+
/**
|
|
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
|
+
*/
|
|
495
|
+
declare function encodeCidToBytes32(cid: string): Hex;
|
|
496
|
+
/**
|
|
497
|
+
* Decode bytes32 back to CIDv1 format (base32, dag-pb codec).
|
|
498
|
+
* Returns a CID starting with "bafybei" that works with Pinata gateways.
|
|
499
|
+
*/
|
|
500
|
+
declare function decodeCidFromBytes32(bytes32: Hex): string;
|
|
501
|
+
|
|
491
502
|
/**
|
|
492
503
|
* Asserts a dispute as the IP owner with counter-evidence.
|
|
493
504
|
* Must be called by the owner of the disputed IP within the cooldown period.
|
|
@@ -1493,4 +1504,4 @@ declare class Auth {
|
|
|
1493
1504
|
unlinkTelegram(): Promise<any>;
|
|
1494
1505
|
}
|
|
1495
1506
|
|
|
1496
|
-
export { type AppInfo, Auth, type BaseSigner, BrowserStorage, type BulkCostPreview, type BuyParams, CustomSignerAdapter, DataStatus, type Dispute, type DisputeProgress, DisputeStatus, EthersSignerAdapter, type FractionOwnership, type FractionalizeEligibility, type LicenseTerms, LicenseType, MemoryStorage, Origin, type SignerAdapter, type SignerType, type StorageAdapter, type TokenInfo, type TolerantResult, ViemSignerAdapter, type VoteEligibility, mainnet as campMainnet, testnet as campTestnet, createLicenseTerms, createNodeWalletClient, createSignerAdapter };
|
|
1507
|
+
export { type AppInfo, Auth, type BaseSigner, BrowserStorage, type BulkCostPreview, type BuyParams, CustomSignerAdapter, DataStatus, type Dispute, type DisputeProgress, DisputeStatus, EthersSignerAdapter, type FractionOwnership, type FractionalizeEligibility, type LicenseTerms, LicenseType, MemoryStorage, Origin, type SignerAdapter, type SignerType, type StorageAdapter, type TokenInfo, type TolerantResult, ViemSignerAdapter, type VoteEligibility, mainnet as campMainnet, testnet as campTestnet, createLicenseTerms, createNodeWalletClient, createSignerAdapter, decodeCidFromBytes32, encodeCidToBytes32 };
|