@campnetwork/origin 1.4.0-alpha.0 → 1.4.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.
- package/dist/core.cjs +91 -84
- package/dist/core.d.ts +10 -6
- package/dist/core.esm.d.ts +10 -6
- package/dist/core.esm.js +112 -105
- package/dist/react/index.esm.d.ts +10 -6
- package/dist/react/index.esm.js +38 -11
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -716,18 +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
|
|
719
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
720
|
+
* since RT tokens are held in the TBA by default.
|
|
720
721
|
*
|
|
721
722
|
* @param tokenId The token ID whose vault to query.
|
|
722
723
|
* @param revenueToken The ERC20 revenue token address.
|
|
723
|
-
* @param holder Optional holder address. Defaults to
|
|
724
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
724
725
|
* @returns The claimable amount in the revenue token's smallest unit.
|
|
725
726
|
*/
|
|
726
727
|
declare function claimableRevenue(this: Origin, tokenId: bigint, revenueToken: Address, holder?: Address): Promise<bigint>;
|
|
727
728
|
|
|
728
729
|
/**
|
|
729
730
|
* Claims accumulated revenue for a token from a specific revenue token.
|
|
730
|
-
*
|
|
731
|
+
* Executes the claim through the NFT's Token Bound Account (TBA),
|
|
732
|
+
* since the TBA holds the Royalty Tokens.
|
|
731
733
|
*
|
|
732
734
|
* @param tokenId The token ID whose vault to claim from.
|
|
733
735
|
* @param revenueToken The ERC20 revenue token address to claim.
|
|
@@ -737,7 +739,8 @@ declare function claimRevenue(this: Origin, tokenId: bigint, revenueToken: Addre
|
|
|
737
739
|
|
|
738
740
|
/**
|
|
739
741
|
* Claims accumulated revenue for a token from multiple revenue tokens in a single transaction.
|
|
740
|
-
*
|
|
742
|
+
* Executes the claim through the NFT's Token Bound Account (TBA),
|
|
743
|
+
* since the TBA holds the Royalty Tokens.
|
|
741
744
|
*
|
|
742
745
|
* @param tokenId The token ID whose vault to claim from.
|
|
743
746
|
* @param revenueTokens Array of ERC20 revenue token addresses to claim.
|
|
@@ -763,10 +766,11 @@ interface RoyaltyTokenBalance {
|
|
|
763
766
|
}
|
|
764
767
|
/**
|
|
765
768
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
766
|
-
* If no holder is provided, the
|
|
769
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
770
|
+
* since RT tokens are minted to the TBA by default.
|
|
767
771
|
*
|
|
768
772
|
* @param tokenId The token ID whose vault to query.
|
|
769
|
-
* @param holder Optional holder address. Defaults to
|
|
773
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
770
774
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
771
775
|
*/
|
|
772
776
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -716,18 +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
|
|
719
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
720
|
+
* since RT tokens are held in the TBA by default.
|
|
720
721
|
*
|
|
721
722
|
* @param tokenId The token ID whose vault to query.
|
|
722
723
|
* @param revenueToken The ERC20 revenue token address.
|
|
723
|
-
* @param holder Optional holder address. Defaults to
|
|
724
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
724
725
|
* @returns The claimable amount in the revenue token's smallest unit.
|
|
725
726
|
*/
|
|
726
727
|
declare function claimableRevenue(this: Origin, tokenId: bigint, revenueToken: Address, holder?: Address): Promise<bigint>;
|
|
727
728
|
|
|
728
729
|
/**
|
|
729
730
|
* Claims accumulated revenue for a token from a specific revenue token.
|
|
730
|
-
*
|
|
731
|
+
* Executes the claim through the NFT's Token Bound Account (TBA),
|
|
732
|
+
* since the TBA holds the Royalty Tokens.
|
|
731
733
|
*
|
|
732
734
|
* @param tokenId The token ID whose vault to claim from.
|
|
733
735
|
* @param revenueToken The ERC20 revenue token address to claim.
|
|
@@ -737,7 +739,8 @@ declare function claimRevenue(this: Origin, tokenId: bigint, revenueToken: Addre
|
|
|
737
739
|
|
|
738
740
|
/**
|
|
739
741
|
* Claims accumulated revenue for a token from multiple revenue tokens in a single transaction.
|
|
740
|
-
*
|
|
742
|
+
* Executes the claim through the NFT's Token Bound Account (TBA),
|
|
743
|
+
* since the TBA holds the Royalty Tokens.
|
|
741
744
|
*
|
|
742
745
|
* @param tokenId The token ID whose vault to claim from.
|
|
743
746
|
* @param revenueTokens Array of ERC20 revenue token addresses to claim.
|
|
@@ -763,10 +766,11 @@ interface RoyaltyTokenBalance {
|
|
|
763
766
|
}
|
|
764
767
|
/**
|
|
765
768
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
766
|
-
* If no holder is provided, the
|
|
769
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
770
|
+
* since RT tokens are minted to the TBA by default.
|
|
767
771
|
*
|
|
768
772
|
* @param tokenId The token ID whose vault to query.
|
|
769
|
-
* @param holder Optional holder address. Defaults to
|
|
773
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
770
774
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
771
775
|
*/
|
|
772
776
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|