Client for interacting with the Cultura Rights Bound Account contract Handles payment distributions, royalty claims, and account management These accounts manage digital asset-related functions and handle royalty distributions to various stakeholders including verifiers, Cultura Treasury, and parent digital asset owners. They are automatically deployed during the attestation process.Documentation Index
Fetch the complete documentation index at: https://docs.cultura.xyz/llms.txt
Use this file to discover all available pages before exploring further.
new RightsBoundAccountClient()
new RightsBoundAccountClient(publicClient,walletClient,contractAddress):RightsBoundAccountClient
Parameters
publicClient
walletClient
contractAddress
`0x${string}`
Returns
RightsBoundAccountClient
Methods
getContractAddress()
getContractAddress(): `0x${string}`
Returns
`0x${string}`
claim()
claim(Claim rewards for a periodperiod):Promise<`0x${string}`>
Parameters
period
bigint
The period to claim rewards for
Returns
Promise<`0x${string}`>
Transaction hash
Remarks
Allows stakeholders to claim their share of royalties for a specific period.Example
claimFromChild()
claimFromChild(Claim from a child bound accountchildBoundAccount,period):Promise<`0x${string}`>
Parameters
childBoundAccount
`0x${string}`
The address of the child bound account to claim from (the derivative bound account)
period
bigint
The period to claim for
Returns
Promise<`0x${string}`>
Transaction hash
Remarks
This function allows a parent bound account to claim its allocated share from a downstream (child) bound account. This is part of the hierarchical royalty distribution system where VR (child) bound accounts distribute payments to their parent bound accounts. Important Notes:- Cannot override fixed distributions to:
- Verifier module (for verifiers who helped achieve Verified Rights status)
- Cultura Treasury
- Used by protocols to define custom royalty distribution logic
- Must include parent digital asset owners if the digital asset is a derivative work
Example
setPaymentInfo()
setPaymentInfo(Set payment info for a period. This function is used to distribute royalties.info):Promise<`0x${string}`>
Parameters
info
Payment information including total amount, sponsor, and authorization signature.totalAmount
bigint
sponsor
`0x${string}`
signature
`0x${string}`
signer
`0x${string}`
Returns
Promise<`0x${string}`>
Transaction hash
Remarks
The new simplified flow automatically calculates splits for parents, the Cultura Treasury, and the verifier module based on the total amount.signForSetPaymentInfo()
signForSetPaymentInfo(Generates a signature for setting payment info on a RightsBoundAccount.period,totalAmount,sponsor):Promise<`0x${string}`>
Parameters
period
bigint
The period index of the royalty payment.
totalAmount
bigint
The total amount of the payment.
sponsor
`0x${string}`
The address that will sponsor the token transfer.
Returns
Promise<`0x${string}`>
Signature for setting the payment info.
getCurrentPeriod()
getCurrentPeriod():Get current periodPromise<bigint>
Returns
Promise<bigint>
The current period as a bigint
getPaymentAmount()
getPaymentAmount(Get payment amount for a beneficiary in a specific period This can be used to determine if a royalty has been claimedperiod,beneficiary):Promise<bigint>
Parameters
period
bigint
The payment period
beneficiary
`0x${string}`
The address of the beneficiary
Returns
Promise<bigint>
The payment amount for the beneficiary in the specified period
getVerifierModule()
getVerifierModule():Get verifier module addressPromise<`0x${string}`>
Returns
Promise<`0x${string}`>
The address of the verifier module contract
getCulturaTreasury()
getCulturaTreasury():Get Cultura treasury addressPromise<`0x${string}`>
Returns
Promise<`0x${string}`>
The address of the Cultura treasury
getRightsBoundAccountAsset()
getRightsBoundAccountAsset():Get rights bound account asset address and token idPromise<{assetAddress:`0x${string}`;tokenId:bigint; }>
Returns
Promise<{ assetAddress: `0x${string}`; tokenId: bigint; }>
The address of the parent bound account
