@campnetwork/origin 1.4.0-alpha.2 → 1.4.0-alpha.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.cjs +34 -29
- package/dist/core.d.ts +16 -10
- package/dist/core.esm.d.ts +16 -10
- package/dist/core.esm.js +82 -77
- package/dist/react/index.esm.d.ts +16 -10
- package/dist/react/index.esm.js +30 -42
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -716,20 +716,20 @@ declare function getVaultRevenueTokens(this: Origin, tokenId: bigint): Promise<A
|
|
|
716
716
|
|
|
717
717
|
/**
|
|
718
718
|
* Returns the amount of revenue claimable by a holder for a given token and revenue token.
|
|
719
|
-
* If no holder is provided, the
|
|
720
|
-
* since RT tokens are
|
|
719
|
+
* If no holder is provided, the connected wallet address is used,
|
|
720
|
+
* since RT tokens are sent directly to the wallet.
|
|
721
721
|
*
|
|
722
722
|
* @param tokenId The token ID whose vault to query.
|
|
723
723
|
* @param revenueToken The ERC20 revenue token address.
|
|
724
|
-
* @param holder Optional holder address. Defaults to the
|
|
724
|
+
* @param holder Optional holder address. Defaults to the connected wallet.
|
|
725
725
|
* @returns The claimable amount in the revenue token's smallest unit.
|
|
726
726
|
*/
|
|
727
727
|
declare function claimableRevenue(this: Origin, tokenId: bigint, revenueToken: Address, holder?: Address): Promise<bigint>;
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
730
|
* Claims accumulated revenue for a token from a specific revenue token.
|
|
731
|
-
*
|
|
732
|
-
*
|
|
731
|
+
* The connected wallet must hold Royalty Tokens for the given token.
|
|
732
|
+
* Revenue is sent directly to the connected wallet.
|
|
733
733
|
*
|
|
734
734
|
* @param tokenId The token ID whose vault to claim from.
|
|
735
735
|
* @param revenueToken The ERC20 revenue token address to claim.
|
|
@@ -739,8 +739,8 @@ declare function claimRevenue(this: Origin, tokenId: bigint, revenueToken: Addre
|
|
|
739
739
|
|
|
740
740
|
/**
|
|
741
741
|
* Claims accumulated revenue for a token from multiple revenue tokens in a single transaction.
|
|
742
|
-
*
|
|
743
|
-
*
|
|
742
|
+
* The connected wallet must hold Royalty Tokens for the given token.
|
|
743
|
+
* Revenue is sent directly to the connected wallet.
|
|
744
744
|
*
|
|
745
745
|
* @param tokenId The token ID whose vault to claim from.
|
|
746
746
|
* @param revenueTokens Array of ERC20 revenue token addresses to claim.
|
|
@@ -766,11 +766,11 @@ interface RoyaltyTokenBalance {
|
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
768
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
769
|
-
* If no holder is provided, the
|
|
770
|
-
* since RT tokens are
|
|
769
|
+
* If no holder is provided, the connected wallet address is used,
|
|
770
|
+
* since RT tokens are sent directly to the wallet.
|
|
771
771
|
*
|
|
772
772
|
* @param tokenId The token ID whose vault to query.
|
|
773
|
-
* @param holder Optional holder address. Defaults to the
|
|
773
|
+
* @param holder Optional holder address. Defaults to the connected wallet.
|
|
774
774
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
775
775
|
*/
|
|
776
776
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
|
@@ -1235,6 +1235,12 @@ declare class Origin {
|
|
|
1235
1235
|
* ```
|
|
1236
1236
|
*/
|
|
1237
1237
|
claimRoyalties(tokenId: bigint, recipient?: Address, token?: Address): Promise<any>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Get the connected wallet address.
|
|
1240
|
+
* @returns {Promise<Address>} The connected wallet address.
|
|
1241
|
+
* @throws {WalletError} Throws if no wallet is connected.
|
|
1242
|
+
*/
|
|
1243
|
+
getWalletAddress(): Promise<Address>;
|
|
1238
1244
|
}
|
|
1239
1245
|
|
|
1240
1246
|
declare global {
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -716,20 +716,20 @@ declare function getVaultRevenueTokens(this: Origin, tokenId: bigint): Promise<A
|
|
|
716
716
|
|
|
717
717
|
/**
|
|
718
718
|
* Returns the amount of revenue claimable by a holder for a given token and revenue token.
|
|
719
|
-
* If no holder is provided, the
|
|
720
|
-
* since RT tokens are
|
|
719
|
+
* If no holder is provided, the connected wallet address is used,
|
|
720
|
+
* since RT tokens are sent directly to the wallet.
|
|
721
721
|
*
|
|
722
722
|
* @param tokenId The token ID whose vault to query.
|
|
723
723
|
* @param revenueToken The ERC20 revenue token address.
|
|
724
|
-
* @param holder Optional holder address. Defaults to the
|
|
724
|
+
* @param holder Optional holder address. Defaults to the connected wallet.
|
|
725
725
|
* @returns The claimable amount in the revenue token's smallest unit.
|
|
726
726
|
*/
|
|
727
727
|
declare function claimableRevenue(this: Origin, tokenId: bigint, revenueToken: Address, holder?: Address): Promise<bigint>;
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
730
|
* Claims accumulated revenue for a token from a specific revenue token.
|
|
731
|
-
*
|
|
732
|
-
*
|
|
731
|
+
* The connected wallet must hold Royalty Tokens for the given token.
|
|
732
|
+
* Revenue is sent directly to the connected wallet.
|
|
733
733
|
*
|
|
734
734
|
* @param tokenId The token ID whose vault to claim from.
|
|
735
735
|
* @param revenueToken The ERC20 revenue token address to claim.
|
|
@@ -739,8 +739,8 @@ declare function claimRevenue(this: Origin, tokenId: bigint, revenueToken: Addre
|
|
|
739
739
|
|
|
740
740
|
/**
|
|
741
741
|
* Claims accumulated revenue for a token from multiple revenue tokens in a single transaction.
|
|
742
|
-
*
|
|
743
|
-
*
|
|
742
|
+
* The connected wallet must hold Royalty Tokens for the given token.
|
|
743
|
+
* Revenue is sent directly to the connected wallet.
|
|
744
744
|
*
|
|
745
745
|
* @param tokenId The token ID whose vault to claim from.
|
|
746
746
|
* @param revenueTokens Array of ERC20 revenue token addresses to claim.
|
|
@@ -766,11 +766,11 @@ interface RoyaltyTokenBalance {
|
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
768
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
769
|
-
* If no holder is provided, the
|
|
770
|
-
* since RT tokens are
|
|
769
|
+
* If no holder is provided, the connected wallet address is used,
|
|
770
|
+
* since RT tokens are sent directly to the wallet.
|
|
771
771
|
*
|
|
772
772
|
* @param tokenId The token ID whose vault to query.
|
|
773
|
-
* @param holder Optional holder address. Defaults to the
|
|
773
|
+
* @param holder Optional holder address. Defaults to the connected wallet.
|
|
774
774
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
775
775
|
*/
|
|
776
776
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
|
@@ -1235,6 +1235,12 @@ declare class Origin {
|
|
|
1235
1235
|
* ```
|
|
1236
1236
|
*/
|
|
1237
1237
|
claimRoyalties(tokenId: bigint, recipient?: Address, token?: Address): Promise<any>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Get the connected wallet address.
|
|
1240
|
+
* @returns {Promise<Address>} The connected wallet address.
|
|
1241
|
+
* @throws {WalletError} Throws if no wallet is connected.
|
|
1242
|
+
*/
|
|
1243
|
+
getWalletAddress(): Promise<Address>;
|
|
1238
1244
|
}
|
|
1239
1245
|
|
|
1240
1246
|
declare global {
|