@campnetwork/origin 1.2.0-3 → 1.2.0-4

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
@@ -254,6 +254,7 @@ type IpNFTSource = "spotify" | "twitter" | "tiktok" | "file";
254
254
  * @param to The address to mint the NFT to.
255
255
  * @param tokenId The ID of the token to mint.
256
256
  * @param parents The IDs of the parent NFTs, if applicable.
257
+ * @param isIp Whether the NFT is an IP NFT.
257
258
  * @param hash The hash of the data associated with the NFT.
258
259
  * @param uri The URI of the NFT metadata.
259
260
  * @param licenseTerms The terms of the license for the NFT.
@@ -266,7 +267,10 @@ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, p
266
267
  * Registers a Data NFT with the Origin service in order to obtain a signature for minting.
267
268
  * @param source The source of the Data NFT (e.g., "spotify", "twitter", "tiktok", or "file").
268
269
  * @param deadline The deadline for the registration operation.
269
- * @param fileKey Optional file key for file uploads.
270
+ * @param licenseTerms The terms of the license for the NFT.
271
+ * @param metadata The metadata associated with the NFT.
272
+ * @param fileKey The file key(s) if the source is "file".
273
+ * @param parents The IDs of the parent NFTs, if applicable.
270
274
  * @return A promise that resolves with the registration data.
271
275
  */
272
276
  declare function registerIpNFT(this: Origin, source: IpNFTSource, deadline: bigint, licenseTerms: LicenseTerms, metadata: Record<string, unknown>, fileKey?: string | string[], parents?: bigint[]): Promise<any>;
@@ -414,7 +418,8 @@ declare class Origin {
414
418
  private jwt;
415
419
  environment: Environment;
416
420
  private viemClient?;
417
- constructor(jwt: string, environment: Environment, viemClient?: WalletClient);
421
+ baseParentId?: bigint;
422
+ constructor(jwt: string, environment: Environment, viemClient?: WalletClient, baseParentId?: bigint);
418
423
  getJwt(): string;
419
424
  setViemClient(client: WalletClient): void;
420
425
  uploadFile(file: File, options?: {
@@ -547,6 +552,7 @@ declare class Auth {
547
552
  viem: any;
548
553
  origin: Origin | null;
549
554
  environment: Environment;
555
+ baseParentId?: bigint;
550
556
  /**
551
557
  * Constructor for the Auth class.
552
558
  * @param {object} options The options object.
@@ -556,10 +562,11 @@ declare class Auth {
556
562
  * @param {StorageAdapter} [options.storage] Custom storage adapter. Defaults to localStorage in browser, memory storage in Node.js.
557
563
  * @throws {APIError} - Throws an error if the clientId is not provided.
558
564
  */
559
- constructor({ clientId, redirectUri, environment, storage, }: {
565
+ constructor({ clientId, redirectUri, environment, baseParentId, storage, }: {
560
566
  clientId: string;
561
567
  redirectUri: string | Record<string, string>;
562
568
  environment?: "DEVELOPMENT" | "PRODUCTION";
569
+ baseParentId?: bigint;
563
570
  storage?: StorageAdapter;
564
571
  });
565
572
  /**
@@ -254,6 +254,7 @@ type IpNFTSource = "spotify" | "twitter" | "tiktok" | "file";
254
254
  * @param to The address to mint the NFT to.
255
255
  * @param tokenId The ID of the token to mint.
256
256
  * @param parents The IDs of the parent NFTs, if applicable.
257
+ * @param isIp Whether the NFT is an IP NFT.
257
258
  * @param hash The hash of the data associated with the NFT.
258
259
  * @param uri The URI of the NFT metadata.
259
260
  * @param licenseTerms The terms of the license for the NFT.
@@ -266,7 +267,10 @@ declare function mintWithSignature(this: Origin, to: Address, tokenId: bigint, p
266
267
  * Registers a Data NFT with the Origin service in order to obtain a signature for minting.
267
268
  * @param source The source of the Data NFT (e.g., "spotify", "twitter", "tiktok", or "file").
268
269
  * @param deadline The deadline for the registration operation.
269
- * @param fileKey Optional file key for file uploads.
270
+ * @param licenseTerms The terms of the license for the NFT.
271
+ * @param metadata The metadata associated with the NFT.
272
+ * @param fileKey The file key(s) if the source is "file".
273
+ * @param parents The IDs of the parent NFTs, if applicable.
270
274
  * @return A promise that resolves with the registration data.
271
275
  */
272
276
  declare function registerIpNFT(this: Origin, source: IpNFTSource, deadline: bigint, licenseTerms: LicenseTerms, metadata: Record<string, unknown>, fileKey?: string | string[], parents?: bigint[]): Promise<any>;
@@ -414,7 +418,8 @@ declare class Origin {
414
418
  private jwt;
415
419
  environment: Environment;
416
420
  private viemClient?;
417
- constructor(jwt: string, environment: Environment, viemClient?: WalletClient);
421
+ baseParentId?: bigint;
422
+ constructor(jwt: string, environment: Environment, viemClient?: WalletClient, baseParentId?: bigint);
418
423
  getJwt(): string;
419
424
  setViemClient(client: WalletClient): void;
420
425
  uploadFile(file: File, options?: {
@@ -547,6 +552,7 @@ declare class Auth {
547
552
  viem: any;
548
553
  origin: Origin | null;
549
554
  environment: Environment;
555
+ baseParentId?: bigint;
550
556
  /**
551
557
  * Constructor for the Auth class.
552
558
  * @param {object} options The options object.
@@ -556,10 +562,11 @@ declare class Auth {
556
562
  * @param {StorageAdapter} [options.storage] Custom storage adapter. Defaults to localStorage in browser, memory storage in Node.js.
557
563
  * @throws {APIError} - Throws an error if the clientId is not provided.
558
564
  */
559
- constructor({ clientId, redirectUri, environment, storage, }: {
565
+ constructor({ clientId, redirectUri, environment, baseParentId, storage, }: {
560
566
  clientId: string;
561
567
  redirectUri: string | Record<string, string>;
562
568
  environment?: "DEVELOPMENT" | "PRODUCTION";
569
+ baseParentId?: bigint;
563
570
  storage?: StorageAdapter;
564
571
  });
565
572
  /**