Skip to main content

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.

Client for interacting with the VerifierModule contract Manages reward distribution to verifiers based on their bonded tokens for verified rights

new VerifierModuleClient()

new VerifierModuleClient(publicClient, walletClient, contractAddress): VerifierModuleClient

Parameters

publicClient
walletClient
contractAddress
`0x${string}`

Returns

VerifierModuleClient

Methods

distributeRewards()

distributeRewards(digitalAssetAddress, digitalAssetId, boundAccount, period): Promise<`0x${string}`>
Distributes rewards from the bound account to the verifier module

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset
boundAccount
`0x${string}` The address of the CulturaRightsBoundAccount
period
bigint The payment period to claim from

Returns

Promise<`0x${string}`> Transaction hash

claimRewards()

claimRewards(digitalAssetAddress, digitalAssetId): Promise<`0x${string}`>
Allows a verifier to claim their rewards for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset

Returns

Promise<`0x${string}`> Transaction hash

calculateClaimableRewards()

calculateClaimableRewards(digitalAssetAddress, digitalAssetId, verifier): Promise<bigint>
Calculate the claimable rewards for a verifier for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset
verifier
`0x${string}` The address of the verifier

Returns

Promise<bigint> The amount of tokens the verifier can claim

getVerifierBond()

getVerifierBond(digitalAssetAddress, digitalAssetId, verifier): Promise<bigint>
Get the amount of tokens a verifier has bonded for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset
verifier
`0x${string}` The address of the verifier

Returns

Promise<bigint> The amount of tokens bonded by the verifier

getTotalBondedAmount()

getTotalBondedAmount(digitalAssetAddress, digitalAssetId): Promise<bigint>
Get the total amount of tokens bonded for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset

Returns

Promise<bigint> The total amount of tokens bonded for the verified right

getTotalRewards()

getTotalRewards(digitalAssetAddress, digitalAssetId): Promise<bigint>
Get the total rewards (collected fees) for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset

Returns

Promise<bigint> The total amount of rewards accumulated for the verified right

receiveFees()

receiveFees(digitalAssetAddress, digitalAssetId, amount, sender): Promise<`0x${string}`>
Manually send fees to the verifier module for a specific verified right

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset
amount
bigint The amount of fees to send
sender
`0x${string}` The address of the sender

Returns

Promise<`0x${string}`> Transaction hash

bondTokens()

bondTokens(digitalAssetAddress, digitalAssetId, amount): Promise<`0x${string}`>
Allows a verifier to bond tokens for a specific digital asset

Parameters

digitalAssetAddress
`0x${string}` The address of the digital asset contract
digitalAssetId
bigint The token ID of the digital asset
amount
bigint The amount of tokens to bond

Returns

Promise<`0x${string}`> Transaction hash