SDK Reference
Royalty
Royalty allows you to manage royalty payments and claims within Story.
Royalty
Methods
- pay_royalty_on_behalf
- claimable_revenue
- claim_all_revenue
- get_royalty_vault_address
- transfer_to_vault
pay_royalty_on_behalf
Allows the function caller to pay royalties to a receiver IP asset on behalf of the payer IP Asset.
Method |
---|
pay_royalty_on_behalf |
Parameters:
receiver_ip_id
: The ipId that receives the royalties.payer_ip_id
: The ID of the IP asset that pays the royalties.token
: The token to use to pay the royalties.amount
: The amount to pay.tx_options
: [Optional] The transaction options dictionary.
claimable_revenue
Get total amount of revenue token claimable by a royalty token holder.
Method |
---|
claimable_revenue |
Parameters:
royalty_vault_ip_id
: The id of the royalty vault.claimer
: The address of the royalty token holder.token
: The revenue token to claim.
claim_all_revenue
Claims all revenue from child IP Assets and/or from your own IP Royalty Vault.
Method |
---|
claim_all_revenue |
Parameters:
ancestor_ip_id
: The address of the ancestor IP from which the revenue is being claimed.claimer
: The address of the claimer of the currency (revenue) tokens. This is normally the ipId of the ancestor IP if the IP has all royalty tokens. Otherwise, this would be the address that is holding the ancestor IP royalty tokens.child_ip_ids
: The addresses of the child IPs from which royalties are derived.royalty_policies
: The addresses of the royalty policies, where royalty_policies[i] governs the royalty flow for child_ip_ids[i].currency_tokens
: The addresses of the currency tokens in which royalties will be claimed.claim_options
: [Optional]claim_options['auto_transfer_all_claimed_tokens_from_ip']
: [Optional] When enabled, all claimed tokens on the claimer are transferred to the wallet address if the wallet owns the IP. If the wallet is the claimer or if the claimer is not an IP owned by the wallet, then the tokens will not be transferred. Set to False to disable auto transferring claimed tokens from the claimer. Default: True
get_royalty_vault_address
Get the royalty vault proxy address of given ip_id
.
Method |
---|
get_royalty_vault_address |
Parameters:
ip_id
: theipId
associated with the royalty vault.
transfer_to_vault
Transfers to vault an amount of revenue tokens claimable via a royalty policy.
Method |
---|
transfer_to_vault |
Parameters:
ip_id
: The ID of the IP asset that pays the royalties.ancestor_ip_id
: The ID of the ancestor IP asset.token
: The token address to transfer.royalty_policy
: [Optional] The royalty policy to use (“LAP” or “LRP”). Default: “LAP”tx_options
: [Optional] The transaction options dictionary.