@campnetwork/origin 1.4.0-alpha.3 → 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.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 NFT's Token Bound Account (TBA) is used,
720
- * since RT tokens are held in the TBA by default.
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 NFT's TBA.
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
- * Executes the claim through the NFT's Token Bound Account (TBA),
732
- * since the TBA holds the Royalty Tokens.
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
- * Executes the claim through the NFT's Token Bound Account (TBA),
743
- * since the TBA holds the Royalty Tokens.
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 NFT's Token Bound Account (TBA) is used,
770
- * since RT tokens are minted to the TBA by default.
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 NFT's TBA.
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 {
@@ -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 NFT's Token Bound Account (TBA) is used,
720
- * since RT tokens are held in the TBA by default.
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 NFT's TBA.
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
- * Executes the claim through the NFT's Token Bound Account (TBA),
732
- * since the TBA holds the Royalty Tokens.
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
- * Executes the claim through the NFT's Token Bound Account (TBA),
743
- * since the TBA holds the Royalty Tokens.
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 NFT's Token Bound Account (TBA) is used,
770
- * since RT tokens are minted to the TBA by default.
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 NFT's TBA.
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 {