@campnetwork/origin 1.0.0-alpha.8 → 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/LICENSE +21 -21
- package/README.md +1073 -1139
- package/dist/core.cjs +73 -71
- package/dist/core.d.ts +11 -6
- package/dist/core.esm.d.ts +11 -6
- package/dist/core.esm.js +76 -74
- package/dist/react/index.esm.d.ts +11 -8
- package/dist/react/index.esm.js +205 -147
- package/package.json +82 -73
package/dist/core.d.ts
CHANGED
|
@@ -279,9 +279,10 @@ declare function finalizeDelete(this: Origin, tokenId: bigint): Promise<any>;
|
|
|
279
279
|
/**
|
|
280
280
|
* Calls the getOrCreateRoyaltyVault method on the IPNFT contract.
|
|
281
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.
|
|
282
283
|
* @returns The address of the royalty vault associated with the specified token owner.
|
|
283
284
|
*/
|
|
284
|
-
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address): Promise<Address>;
|
|
285
|
+
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address, simulateOnly?: boolean): Promise<Address>;
|
|
285
286
|
|
|
286
287
|
/**
|
|
287
288
|
* Returns the license terms associated with a specific token ID.
|
|
@@ -446,6 +447,7 @@ declare class Origin {
|
|
|
446
447
|
getData(tokenId: bigint): Promise<any>;
|
|
447
448
|
/**
|
|
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.
|
|
449
451
|
* @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
|
|
450
452
|
* @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
|
|
451
453
|
* @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
|
|
@@ -495,16 +497,12 @@ declare class Auth {
|
|
|
495
497
|
* @param {object} options The options object.
|
|
496
498
|
* @param {string} options.clientId The client ID.
|
|
497
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.
|
|
498
|
-
* @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
|
|
499
|
-
* @param {object} [options.ackeeInstance] The Ackee instance.
|
|
500
500
|
* @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
|
|
501
501
|
* @throws {APIError} - Throws an error if the clientId is not provided.
|
|
502
502
|
*/
|
|
503
|
-
constructor({ clientId, redirectUri,
|
|
503
|
+
constructor({ clientId, redirectUri, environment, }: {
|
|
504
504
|
clientId: string;
|
|
505
505
|
redirectUri: string | Record<string, string>;
|
|
506
|
-
allowAnalytics?: boolean;
|
|
507
|
-
ackeeInstance?: any;
|
|
508
506
|
environment?: "DEVELOPMENT" | "PRODUCTION";
|
|
509
507
|
});
|
|
510
508
|
/**
|
|
@@ -518,6 +516,13 @@ declare class Auth {
|
|
|
518
516
|
* });
|
|
519
517
|
*/
|
|
520
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;
|
|
521
526
|
/**
|
|
522
527
|
* Set the loading state.
|
|
523
528
|
* @param {boolean} loading The loading state.
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -279,9 +279,10 @@ declare function finalizeDelete(this: Origin, tokenId: bigint): Promise<any>;
|
|
|
279
279
|
/**
|
|
280
280
|
* Calls the getOrCreateRoyaltyVault method on the IPNFT contract.
|
|
281
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.
|
|
282
283
|
* @returns The address of the royalty vault associated with the specified token owner.
|
|
283
284
|
*/
|
|
284
|
-
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address): Promise<Address>;
|
|
285
|
+
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address, simulateOnly?: boolean): Promise<Address>;
|
|
285
286
|
|
|
286
287
|
/**
|
|
287
288
|
* Returns the license terms associated with a specific token ID.
|
|
@@ -446,6 +447,7 @@ declare class Origin {
|
|
|
446
447
|
getData(tokenId: bigint): Promise<any>;
|
|
447
448
|
/**
|
|
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.
|
|
449
451
|
* @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
|
|
450
452
|
* @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
|
|
451
453
|
* @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
|
|
@@ -495,16 +497,12 @@ declare class Auth {
|
|
|
495
497
|
* @param {object} options The options object.
|
|
496
498
|
* @param {string} options.clientId The client ID.
|
|
497
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.
|
|
498
|
-
* @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
|
|
499
|
-
* @param {object} [options.ackeeInstance] The Ackee instance.
|
|
500
500
|
* @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
|
|
501
501
|
* @throws {APIError} - Throws an error if the clientId is not provided.
|
|
502
502
|
*/
|
|
503
|
-
constructor({ clientId, redirectUri,
|
|
503
|
+
constructor({ clientId, redirectUri, environment, }: {
|
|
504
504
|
clientId: string;
|
|
505
505
|
redirectUri: string | Record<string, string>;
|
|
506
|
-
allowAnalytics?: boolean;
|
|
507
|
-
ackeeInstance?: any;
|
|
508
506
|
environment?: "DEVELOPMENT" | "PRODUCTION";
|
|
509
507
|
});
|
|
510
508
|
/**
|
|
@@ -518,6 +516,13 @@ declare class Auth {
|
|
|
518
516
|
* });
|
|
519
517
|
*/
|
|
520
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;
|
|
521
526
|
/**
|
|
522
527
|
* Set the loading state.
|
|
523
528
|
* @param {boolean} loading The loading state.
|