@campnetwork/origin 1.0.0-alpha.13 → 1.0.0-alpha.2

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.
@@ -1,4 +1,4 @@
1
- import { Address, Hex, WalletClient, Abi } from 'viem';
1
+ import { Address, Hex, Abi } from 'viem';
2
2
 
3
3
  /**
4
4
  * The TwitterAPI class.
@@ -206,7 +206,6 @@ interface Environment {
206
206
  CHAIN: any;
207
207
  IPNFT_ABI?: any;
208
208
  MARKETPLACE_ABI?: any;
209
- ROYALTY_VAULT_ABI?: any;
210
209
  }
211
210
 
212
211
  /**
@@ -276,14 +275,6 @@ declare function updateTerms(this: Origin, tokenId: bigint, newTerms: LicenseTer
276
275
  */
277
276
  declare function finalizeDelete(this: Origin, tokenId: bigint): Promise<any>;
278
277
 
279
- /**
280
- * Calls the getOrCreateRoyaltyVault method on the IPNFT contract.
281
- * @param tokenOwner The address of the token owner for whom to get or create the royalty vault.
282
- * @param simulateOnly If true, simulates the transaction without executing it.
283
- * @returns The address of the royalty vault associated with the specified token owner.
284
- */
285
- declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address, simulateOnly?: boolean): Promise<Address>;
286
-
287
278
  /**
288
279
  * Returns the license terms associated with a specific token ID.
289
280
  * @param tokenId The token ID to query.
@@ -366,16 +357,10 @@ interface OriginUsageReturnType {
366
357
  teams: Array<any>;
367
358
  dataSources: Array<any>;
368
359
  }
369
- interface RoyaltyInfo {
370
- royaltyVault: Address;
371
- balance: bigint;
372
- balanceFormatted: string;
373
- }
374
360
  type CallOptions = {
375
361
  value?: bigint;
376
362
  gas?: bigint;
377
363
  waitForReceipt?: boolean;
378
- simulate?: boolean;
379
364
  };
380
365
  /**
381
366
  * The Origin class
@@ -387,7 +372,6 @@ declare class Origin {
387
372
  registerIpNFT: typeof registerIpNFT;
388
373
  updateTerms: typeof updateTerms;
389
374
  finalizeDelete: typeof finalizeDelete;
390
- getOrCreateRoyaltyVault: typeof getOrCreateRoyaltyVault;
391
375
  getTerms: typeof getTerms;
392
376
  ownerOf: typeof ownerOf;
393
377
  balanceOf: typeof balanceOf;
@@ -404,17 +388,17 @@ declare class Origin {
404
388
  private jwt;
405
389
  environment: Environment;
406
390
  private viemClient?;
407
- constructor(jwt: string, environment: Environment, viemClient?: WalletClient);
391
+ constructor(jwt: string, environment: Environment, viemClient?: any);
408
392
  getJwt(): string;
409
- setViemClient(client: WalletClient): void;
410
- uploadFile(file: File, options?: {
393
+ setViemClient(client: any): void;
394
+ uploadFile: (file: File, options?: {
411
395
  progressCallback?: (percent: number) => void;
412
- }): Promise<any>;
413
- mintFile(file: File, metadata: Record<string, unknown>, license: LicenseTerms, parents?: bigint[], options?: {
396
+ }) => Promise<any>;
397
+ mintFile: (file: File, metadata: Record<string, unknown>, license: LicenseTerms, parents?: bigint[], options?: {
414
398
  progressCallback?: (percent: number) => void;
415
- }): Promise<string | null>;
416
- mintSocial(source: "spotify" | "twitter" | "tiktok", metadata: Record<string, unknown>, license: LicenseTerms): Promise<string | null>;
417
- getOriginUploads(): Promise<any[] | null>;
399
+ }) => Promise<string | null>;
400
+ mintSocial: (source: "spotify" | "twitter" | "tiktok", metadata: Record<string, unknown>, license: LicenseTerms) => Promise<string | null>;
401
+ getOriginUploads: () => Promise<any>;
418
402
  /**
419
403
  * Get the user's Origin stats (multiplier, consent, usage, etc.).
420
404
  * @returns {Promise<OriginUsageReturnType>} A promise that resolves with the user's Origin stats.
@@ -445,30 +429,6 @@ declare class Origin {
445
429
  */
446
430
  buyAccessSmart(tokenId: bigint): Promise<any>;
447
431
  getData(tokenId: bigint): Promise<any>;
448
- /**
449
- * Get royalty information for a wallet address, including the royalty vault address and its balance.
450
- * @param {Address} [token] - Optional token address to check royalties for. If not provided, checks for native token.
451
- * @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
452
- * @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
453
- * @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
454
- * @example
455
- * ```typescript
456
- * // Get royalties for connected wallet
457
- * const royalties = await origin.getRoyalties();
458
- *
459
- * // Get royalties for specific address
460
- * const royalties = await origin.getRoyalties("0x1234...");
461
- * ```
462
- */
463
- getRoyalties(token?: Address, owner?: Address): Promise<RoyaltyInfo>;
464
- /**
465
- * Claim royalties from the royalty vault.
466
- * @param {Address} [token] - Optional token address to claim royalties in. If not provided, claims in native token.
467
- * @param {Address} [owner] - Optional wallet address to claim royalties for. If not provided, uses the connected wallet.
468
- * @returns {Promise<any>} A promise that resolves when the claim transaction is confirmed.
469
- * @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
470
- */
471
- claimRoyalties(token?: Address, owner?: Address): Promise<any>;
472
432
  }
473
433
 
474
434
  declare global {