@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
|
@@ -85,9 +85,10 @@ declare function finalizeDelete(this: Origin, tokenId: bigint): Promise<any>;
|
|
|
85
85
|
/**
|
|
86
86
|
* Calls the getOrCreateRoyaltyVault method on the IPNFT contract.
|
|
87
87
|
* @param tokenOwner The address of the token owner for whom to get or create the royalty vault.
|
|
88
|
+
* @param simulateOnly If true, simulates the transaction without executing it.
|
|
88
89
|
* @returns The address of the royalty vault associated with the specified token owner.
|
|
89
90
|
*/
|
|
90
|
-
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address): Promise<Address>;
|
|
91
|
+
declare function getOrCreateRoyaltyVault(this: Origin, tokenOwner: Address, simulateOnly?: boolean): Promise<Address>;
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Returns the license terms associated with a specific token ID.
|
|
@@ -252,6 +253,7 @@ declare class Origin {
|
|
|
252
253
|
getData(tokenId: bigint): Promise<any>;
|
|
253
254
|
/**
|
|
254
255
|
* Get royalty information for a wallet address, including the royalty vault address and its balance.
|
|
256
|
+
* @param {Address} [token] - Optional token address to check royalties for. If not provided, checks for native token.
|
|
255
257
|
* @param {Address} [owner] - Optional wallet address to check royalties for. If not provided, uses the connected wallet.
|
|
256
258
|
* @returns {Promise<RoyaltyInfo>} A promise that resolves with the royalty vault address and balance information.
|
|
257
259
|
* @throws {Error} Throws an error if no wallet is connected and no owner address is provided.
|
|
@@ -301,16 +303,12 @@ declare class Auth {
|
|
|
301
303
|
* @param {object} options The options object.
|
|
302
304
|
* @param {string} options.clientId The client ID.
|
|
303
305
|
* @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.
|
|
304
|
-
* @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
|
|
305
|
-
* @param {object} [options.ackeeInstance] The Ackee instance.
|
|
306
306
|
* @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
|
|
307
307
|
* @throws {APIError} - Throws an error if the clientId is not provided.
|
|
308
308
|
*/
|
|
309
|
-
constructor({ clientId, redirectUri,
|
|
309
|
+
constructor({ clientId, redirectUri, environment, }: {
|
|
310
310
|
clientId: string;
|
|
311
311
|
redirectUri: string | Record<string, string>;
|
|
312
|
-
allowAnalytics?: boolean;
|
|
313
|
-
ackeeInstance?: any;
|
|
314
312
|
environment?: "DEVELOPMENT" | "PRODUCTION";
|
|
315
313
|
});
|
|
316
314
|
/**
|
|
@@ -324,6 +322,13 @@ declare class Auth {
|
|
|
324
322
|
* });
|
|
325
323
|
*/
|
|
326
324
|
on(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
325
|
+
/**
|
|
326
|
+
* Unsubscribe from an event. Possible events are "state", "provider", "providers", and "viem".
|
|
327
|
+
* @param {("state"|"provider"|"providers"|"viem")} event The event.
|
|
328
|
+
* @param {function} callback The callback function.
|
|
329
|
+
* @returns {void}
|
|
330
|
+
*/
|
|
331
|
+
off(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
327
332
|
/**
|
|
328
333
|
* Set the loading state.
|
|
329
334
|
* @param {boolean} loading The loading state.
|
|
@@ -468,8 +473,6 @@ interface CampContextType {
|
|
|
468
473
|
auth: Auth | null;
|
|
469
474
|
setAuth: React.Dispatch<React.SetStateAction<Auth | null>>;
|
|
470
475
|
wagmiAvailable: boolean;
|
|
471
|
-
ackee: any;
|
|
472
|
-
setAckee: any;
|
|
473
476
|
environment: Environment;
|
|
474
477
|
}
|
|
475
478
|
declare const CampContext: React.Context<CampContextType>;
|