@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.
@@ -27,10 +27,10 @@ declare enum DataStatus {
27
27
  DELETED = 2
28
28
  }
29
29
  /**
30
- * Represents the source of a Data NFT.
30
+ * Represents the source of an IpNFT.
31
31
  * This can be one of the supported social media platforms or a file upload.
32
32
  */
33
- type DataNFTSource = "spotify" | "twitter" | "tiktok" | "file";
33
+ type IpNFTSource = "spotify" | "twitter" | "tiktok" | "file";
34
34
 
35
35
  /**
36
36
  * Mints a Data NFT with a signature.
@@ -43,11 +43,7 @@ type DataNFTSource = "spotify" | "twitter" | "tiktok" | "file";
43
43
  * @param signature The signature for the minting operation.
44
44
  * @returns A promise that resolves when the minting is complete.
45
45
  */
46
- declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature: {
47
- v: number;
48
- r: Hex;
49
- s: Hex;
50
- }): Promise<any>;
46
+ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, hash: Hex, uri: string, licenseTerms: LicenseTerms, deadline: bigint, signature: Hex): Promise<any>;
51
47
  /**
52
48
  * Registers a Data NFT with the Origin service in order to obtain a signature for minting.
53
49
  * @param source The source of the Data NFT (e.g., "spotify", "twitter", "tiktok", or "file").
@@ -55,7 +51,7 @@ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, h
55
51
  * @param fileKey Optional file key for file uploads.
56
52
  * @return A promise that resolves with the registration data.
57
53
  */
58
- declare function registerDataNFT(this: Origin, source: DataNFTSource, deadline: bigint, fileKey?: string | string[]): Promise<any>;
54
+ declare function registerIpNFT(this: Origin, source: IpNFTSource, deadline: bigint, licenseTerms: LicenseTerms, fileKey?: string | string[]): Promise<any>;
59
55
 
60
56
  declare function updateTerms(this: Origin, tokenId: bigint, newTerms: LicenseTerms): Promise<any>;
61
57
 
@@ -116,7 +112,7 @@ type CallOptions = {
116
112
  declare class Origin {
117
113
  #private;
118
114
  mintWithSignature: typeof mintWithSignature;
119
- registerDataNFT: typeof registerDataNFT;
115
+ registerIpNFT: typeof registerIpNFT;
120
116
  updateTerms: typeof updateTerms;
121
117
  requestDelete: typeof requestDelete;
122
118
  getTerms: typeof getTerms;
@@ -147,7 +143,7 @@ declare class Origin {
147
143
  mintFile: (file: File, license: LicenseTerms, options?: {
148
144
  progressCallback?: (percent: number) => void;
149
145
  }) => Promise<string | null>;
150
- mintSocial: (source: "spotify" | "twitter" | "tiktok") => Promise<string | null>;
146
+ mintSocial: (source: "spotify" | "twitter" | "tiktok", license: LicenseTerms) => Promise<string | null>;
151
147
  getOriginUploads: () => Promise<any>;
152
148
  /**
153
149
  * Get the user's Origin stats (multiplier, consent, usage, etc.).