@campnetwork/origin 1.0.0-alpha.9 → 1.0.0

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
@@ -447,6 +447,7 @@ declare class Origin {
447
447
  getData(tokenId: bigint): Promise<any>;
448
448
  /**
449
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.
450
451
  * @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
451
452
  * @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
452
453
  * @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
@@ -496,16 +497,12 @@ declare class Auth {
496
497
  * @param {object} options The options object.
497
498
  * @param {string} options.clientId The client ID.
498
499
  * @param {string|object} options.redirectUri The redirect URI used for oauth. Leave empty if you want to use the current URL. If you want different redirect URIs for different socials, pass an object with the socials as keys and the redirect URIs as values.
499
- * @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
500
- * @param {object} [options.ackeeInstance] The Ackee instance.
501
500
  * @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
502
501
  * @throws {APIError} - Throws an error if the clientId is not provided.
503
502
  */
504
- constructor({ clientId, redirectUri, allowAnalytics, ackeeInstance, environment, }: {
503
+ constructor({ clientId, redirectUri, environment, }: {
505
504
  clientId: string;
506
505
  redirectUri: string | Record<string, string>;
507
- allowAnalytics?: boolean;
508
- ackeeInstance?: any;
509
506
  environment?: "DEVELOPMENT" | "PRODUCTION";
510
507
  });
511
508
  /**
@@ -519,6 +516,13 @@ declare class Auth {
519
516
  * });
520
517
  */
521
518
  on(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
519
+ /**
520
+ * Unsubscribe from an event. Possible events are "state", "provider", "providers", and "viem".
521
+ * @param {("state"|"provider"|"providers"|"viem")} event The event.
522
+ * @param {function} callback The callback function.
523
+ * @returns {void}
524
+ */
525
+ off(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
522
526
  /**
523
527
  * Set the loading state.
524
528
  * @param {boolean} loading The loading state.
@@ -447,6 +447,7 @@ declare class Origin {
447
447
  getData(tokenId: bigint): Promise<any>;
448
448
  /**
449
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.
450
451
  * @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
451
452
  * @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
452
453
  * @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
@@ -496,16 +497,12 @@ declare class Auth {
496
497
  * @param {object} options The options object.
497
498
  * @param {string} options.clientId The client ID.
498
499
  * @param {string|object} options.redirectUri The redirect URI used for oauth. Leave empty if you want to use the current URL. If you want different redirect URIs for different socials, pass an object with the socials as keys and the redirect URIs as values.
499
- * @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
500
- * @param {object} [options.ackeeInstance] The Ackee instance.
501
500
  * @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
502
501
  * @throws {APIError} - Throws an error if the clientId is not provided.
503
502
  */
504
- constructor({ clientId, redirectUri, allowAnalytics, ackeeInstance, environment, }: {
503
+ constructor({ clientId, redirectUri, environment, }: {
505
504
  clientId: string;
506
505
  redirectUri: string | Record<string, string>;
507
- allowAnalytics?: boolean;
508
- ackeeInstance?: any;
509
506
  environment?: "DEVELOPMENT" | "PRODUCTION";
510
507
  });
511
508
  /**
@@ -519,6 +516,13 @@ declare class Auth {
519
516
  * });
520
517
  */
521
518
  on(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
519
+ /**
520
+ * Unsubscribe from an event. Possible events are "state", "provider", "providers", and "viem".
521
+ * @param {("state"|"provider"|"providers"|"viem")} event The event.
522
+ * @param {function} callback The callback function.
523
+ * @returns {void}
524
+ */
525
+ off(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
522
526
  /**
523
527
  * Set the loading state.
524
528
  * @param {boolean} loading The loading state.