Register PIL Terms

This section demonstrates how to register a selection of License Terms using the PIL.

๐Ÿ“˜

Before Reading

It's important to note that it would be rare for you to have to use this function. PIL Terms, which are defined by its parameters, only have to be created once. Thus, it is likely it has already been created by someone else.

You can view a list of popular premade License Terms here.

Prerequisites

  • Setup the client object.
  • If License Terms already exist for the identical set of parameters you intend to create, it is unnecessary to create it again and the function will simply return the existing licenseTermsId and an undefined txHash. You can use existing License Terms by its licenseTermsId.

Create a Commercial Use License

response = story_client.License.registerCommercialUsePIL(
    minting_fee=1,
    currency="0xB132A6B7AE652c974EE1557A3521D53d18F6739f",
    royalty_policy="0xAAbaf349C7a2A84564F9CC4Ac130B3f19A718E86"
)

print(f"PIL Terms registered at transaction hash {response['txHash']} License Terms ID: {response['licenseTermsId']}")
RegisterCommercialUsePILRequest = {
    'minting_fee': int,
    'currency': str,
    'royalty_policy': str,
    'tx_options': dict
}
RegisterPILResponse = {
    'txHash': str,
    'licenseTermsId': int
}

Create a Commercial Remix License

response = story_client.License.registerCommercialRemixPIL(
    minting_fee=1,
    currency="0xB132A6B7AE652c974EE1557A3521D53d18F6739f",
    commercial_rev_share=10,
    royalty_policy="0xAAbaf349C7a2A84564F9CC4Ac130B3f19A718E86"
)

print(f"PIL Terms registered at transaction hash {response['txHash']} License Terms ID: {response['licenseTermsId']}")
RegisterCommercialRemixPILRequest = {
    'minting_fee': int,
    'currency': str,
    'commercial_rev_share': int,
    'royalty_policy': str,
    'tx_options': dict
}
RegisterPILResponse = {
    'txHash': str,
    'licenseTermsId': int
}

Create a Non-Commercial Social Remixing License

There are currently no parameters to be passed in here, so this function should not really be used other than to get back the licenseTermsId for this license.

response = story_client.License.registerNonComSocialRemixingPIL()

print(f"PIL Terms registered at transaction hash {response['txHash']} License Terms ID: {response['licenseTermsId']}")
RegisterNonComSocialRemixingPILRequest = {
    'tx_options': dict
}
RegisterPILResponse = {
    'txHash': str,
    'licenseTermsId': int
}