Register an NFT as an IP Asset

This section demonstrates how to register an IP asset using the TypeScript SDK. There are generally two methods of IP registration:

  1. Register an existing NFT as an IP asset
  2. Create an NFT and register it as an IP asset in one transaction

Prerequisites

  • Setup the client object.

Register an Existing NFT as an IP Asset

You can register your NFT as an IP Asset by simply calling client.ipAsset.register() and passing in the token's contract address and token ID, like so:

ℹ️ If the provided tokenId from the tokenContract has already been registered, the response object will contain the ipId of the existing IP Asset.

const response = await client.ipAsset.register({
  tokenContract: "0xd516482bef63Ff19Ed40E4C6C2e626ccE04e19ED", // your NFT contract address
  tokenId: "12", // your NFT token ID
  txOptions: { waitForTransaction: true }
});

console.log(`Root IPA created at transaction hash ${response.txHash}, IPA ID: ${response.ipId}`);
export type RegisterIpRequest = {
  tokenContract: string;
  tokenId: string;
  txOptions?: TxOptions;
};

export type RegisterIpResponse = {
  txHash?: string;
  ipId?: string;
};

Setting waitForTransaction: true in the transaction options will return the ipId of the newly registered IP asset.

After we run the above code, the console output will look like:

Root IPA created at transaction hash 0xa3e1caa7c2124b1550d459abc739291cb1be77ac73b99c097707878ac4ef57ae,
IPA ID: 0x4c1f8c1035a8cE379dd4ed666758Fb29696CF721

Create an NFT and Register it as an IP Asset

You can follow the Mint and Register recipe to see how you would first mint an NFT and then register it as an IP Asset normally.