@campnetwork/origin 0.0.5 → 0.0.7
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/README.md +83 -0
- package/dist/core.cjs +72 -62
- package/dist/core.d.ts +6 -10
- package/dist/core.esm.d.ts +6 -10
- package/dist/core.esm.js +78 -68
- package/dist/react/index.esm.d.ts +6 -10
- package/dist/react/index.esm.js +692 -564
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -221,10 +221,10 @@ declare enum DataStatus {
|
|
|
221
221
|
DELETED = 2
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Represents the source of
|
|
224
|
+
* Represents the source of an IpNFT.
|
|
225
225
|
* This can be one of the supported social media platforms or a file upload.
|
|
226
226
|
*/
|
|
227
|
-
type
|
|
227
|
+
type IpNFTSource = "spotify" | "twitter" | "tiktok" | "file";
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Mints a Data NFT with a signature.
|
|
@@ -237,11 +237,7 @@ type DataNFTSource = "spotify" | "twitter" | "tiktok" | "file";
|
|
|
237
237
|
* @param signature The signature for the minting operation.
|
|
238
238
|
* @returns A promise that resolves when the minting is complete.
|
|
239
239
|
*/
|
|
240
|
-
declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature:
|
|
241
|
-
v: number;
|
|
242
|
-
r: Hex;
|
|
243
|
-
s: Hex;
|
|
244
|
-
}): Promise<any>;
|
|
240
|
+
declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature: Hex): Promise<any>;
|
|
245
241
|
/**
|
|
246
242
|
* Registers a Data NFT with the Origin service in order to obtain a signature for minting.
|
|
247
243
|
* @param source The source of the Data NFT (e.g., "spotify", "twitter", "tiktok", or "file").
|
|
@@ -249,7 +245,7 @@ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, h
|
|
|
249
245
|
* @param fileKey Optional file key for file uploads.
|
|
250
246
|
* @return A promise that resolves with the registration data.
|
|
251
247
|
*/
|
|
252
|
-
declare function
|
|
248
|
+
declare function registerIpNFT(this: Origin, source: IpNFTSource, deadline: bigint, licenseTerms: LicenseTerms, fileKey?: string | string[]): Promise<any>;
|
|
253
249
|
|
|
254
250
|
declare function updateTerms(this: Origin, tokenId: bigint, newTerms: LicenseTerms): Promise<any>;
|
|
255
251
|
|
|
@@ -310,7 +306,7 @@ type CallOptions = {
|
|
|
310
306
|
declare class Origin {
|
|
311
307
|
#private;
|
|
312
308
|
mintWithSignature: typeof mintWithSignature;
|
|
313
|
-
|
|
309
|
+
registerIpNFT: typeof registerIpNFT;
|
|
314
310
|
updateTerms: typeof updateTerms;
|
|
315
311
|
requestDelete: typeof requestDelete;
|
|
316
312
|
getTerms: typeof getTerms;
|
|
@@ -341,7 +337,7 @@ declare class Origin {
|
|
|
341
337
|
mintFile: (file: File, license: LicenseTerms, options?: {
|
|
342
338
|
progressCallback?: (percent: number) => void;
|
|
343
339
|
}) => Promise<string | null>;
|
|
344
|
-
mintSocial: (source: "spotify" | "twitter" | "tiktok") => Promise<string | null>;
|
|
340
|
+
mintSocial: (source: "spotify" | "twitter" | "tiktok", license: LicenseTerms) => Promise<string | null>;
|
|
345
341
|
getOriginUploads: () => Promise<any>;
|
|
346
342
|
/**
|
|
347
343
|
* Get the user's Origin stats (multiplier, consent, usage, etc.).
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -221,10 +221,10 @@ declare enum DataStatus {
|
|
|
221
221
|
DELETED = 2
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Represents the source of
|
|
224
|
+
* Represents the source of an IpNFT.
|
|
225
225
|
* This can be one of the supported social media platforms or a file upload.
|
|
226
226
|
*/
|
|
227
|
-
type
|
|
227
|
+
type IpNFTSource = "spotify" | "twitter" | "tiktok" | "file";
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Mints a Data NFT with a signature.
|
|
@@ -237,11 +237,7 @@ type DataNFTSource = "spotify" | "twitter" | "tiktok" | "file";
|
|
|
237
237
|
* @param signature The signature for the minting operation.
|
|
238
238
|
* @returns A promise that resolves when the minting is complete.
|
|
239
239
|
*/
|
|
240
|
-
declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature:
|
|
241
|
-
v: number;
|
|
242
|
-
r: Hex;
|
|
243
|
-
s: Hex;
|
|
244
|
-
}): Promise<any>;
|
|
240
|
+
declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature: Hex): Promise<any>;
|
|
245
241
|
/**
|
|
246
242
|
* Registers a Data NFT with the Origin service in order to obtain a signature for minting.
|
|
247
243
|
* @param source The source of the Data NFT (e.g., "spotify", "twitter", "tiktok", or "file").
|
|
@@ -249,7 +245,7 @@ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, h
|
|
|
249
245
|
* @param fileKey Optional file key for file uploads.
|
|
250
246
|
* @return A promise that resolves with the registration data.
|
|
251
247
|
*/
|
|
252
|
-
declare function
|
|
248
|
+
declare function registerIpNFT(this: Origin, source: IpNFTSource, deadline: bigint, licenseTerms: LicenseTerms, fileKey?: string | string[]): Promise<any>;
|
|
253
249
|
|
|
254
250
|
declare function updateTerms(this: Origin, tokenId: bigint, newTerms: LicenseTerms): Promise<any>;
|
|
255
251
|
|
|
@@ -310,7 +306,7 @@ type CallOptions = {
|
|
|
310
306
|
declare class Origin {
|
|
311
307
|
#private;
|
|
312
308
|
mintWithSignature: typeof mintWithSignature;
|
|
313
|
-
|
|
309
|
+
registerIpNFT: typeof registerIpNFT;
|
|
314
310
|
updateTerms: typeof updateTerms;
|
|
315
311
|
requestDelete: typeof requestDelete;
|
|
316
312
|
getTerms: typeof getTerms;
|
|
@@ -341,7 +337,7 @@ declare class Origin {
|
|
|
341
337
|
mintFile: (file: File, license: LicenseTerms, options?: {
|
|
342
338
|
progressCallback?: (percent: number) => void;
|
|
343
339
|
}) => Promise<string | null>;
|
|
344
|
-
mintSocial: (source: "spotify" | "twitter" | "tiktok") => Promise<string | null>;
|
|
340
|
+
mintSocial: (source: "spotify" | "twitter" | "tiktok", license: LicenseTerms) => Promise<string | null>;
|
|
345
341
|
getOriginUploads: () => Promise<any>;
|
|
346
342
|
/**
|
|
347
343
|
* Get the user's Origin stats (multiplier, consent, usage, etc.).
|