Register an IPA as a Derivative in TypeScript
This section demonstrates how to register an IP Asset as a derivative of another. There are generally three methods of registering an IPA remix:
- Link an existing IPA as a derivative of a "parent" IPA using a License Token.
- Link an existing IPA as a derivative of a "parent" IPA directly.
Prerequisites
- Setup the client object.
- The "parent" IPA must be registered.
- The "child" IPA must be registered.
Register Derivative using License Token
Additional Prerequisites
- An already minted License Token from the "parent" IPA. Learn how to mint a License Token here.
If you already have a License Token, it is easier to register a derivative this way. We can register a child IPA as a derivative of a parent IPA by calling client.ipAsset.registerDerivativeWithLicenseTokens()
like so:
const response = await client.ipAsset.registerDerivativeWithLicenseTokens({
childIpId: "0xC92EC2f4c86458AFee7DD9EB5d8c57920BfCD0Ba",
licenseTokenIds: ["5"], // array of license ids relevant to the creation of the derivative, minted from the parent IPA
txOptions: { waitForTransaction: true }
});
console.log(`Derivative IPA linked to parent at transaction hash ${response.txHash}`)
export type RegisterDerivativeWithLicenseTokensRequest = {
licenseTokenIds: string[];
childIpId: Address;
txOptions?: TxOptions;
};
export type RegisterDerivativeWithLicenseTokensResponse = {
txHash: string;
};
Register Derivative Directly
You can also register a derivative directly, without needing a License Token. There is no real difference between registerDerivativeWithLicenseTokens
(above) and registerDerivative
(below) except that the former requires an already minted License Token and the latter is a convenient function that handles it for you.
Quick Note
Remember that once License Terms are attached to an IP Asset, it becomes public to register a derivative with those terms, which is why you don't necessarily need a License Token first. Read more on that here .
const response = await client.ipAsset.registerDerivative({
childIpId: "0xC92EC2f4c86458AFee7DD9EB5d8c57920BfCD0Ba",
parentIpIds: ["0xC92EC2f4c86458AFee7DD9EB5d8c57920BfCD0Ba"],
licenseTermsIds: ["5"],
txOptions: { waitForTransaction: true }
});
console.log(`Derivative IPA linked to parent at transaction hash ${response.txHash}`)
export type RegisterDerivativeRequest = {
childIpId: Address;
parentIpIds: Address[];
licenseTermsIds: string[];
licenseTemplate?: Address;
txOptions?: TxOptions;
};
export type RegisterDerivativeResponse = {
txHash?: string;
childIpId?: Address;
};
Updated 18 days ago