# IP Client

## IPClient

The `IPClient` provides functionality for managing intellectual property (IP) assets. The `IPClient` simplifies the management of IP assets, making it easier to create, retrieve, and list them as needed.

### Methods

* registerIp
* registerDerivative
* mintAndRegisterIp
* registerIpAndAttachLicense
* getIpAsset

### registerIp

Register an NFT as an Intellectual Property Asset

| Method       | Type                                                          |
| ------------ | ------------------------------------------------------------- |
| `registerIp` | `(request: registerIpRequest) => Promise<registerIpResponse>` |

* **Parameters**:
  * `request.nftContractAddress`: The address of the NFT Contract address.
  * `request.tokenId`: The token id of the NFT.
  * `request.signature`: Data signature.
  * `request.deadline`: The deadline for the signature in milliseconds.
  * `request.licenseeRoles[]`: An address array specifying the roles assigned to licensees
  * `request.copyrightRoles[]`: An address array detailing the roles related to copyrights.
  * `request.chainId`: The identifier for the blockchain network in the request.
* **Returns**:
  * `response.txhash` - The transaction hash.
  * `response.ipId` - The ipId of the newly registered Ip Asset.

### registerDerivative

Register an derivative of an Ip Asset

| Method               | Type                                                                          |
| -------------------- | ----------------------------------------------------------------------------- |
| `registerDerivative` | `(request: registerDerivativeRequest) => Promise<registerDerivativeResponse>` |

* **Parameters**:
  * `request.parentIpId`: The identifier for the parent intellectual property (IP) in the request
  * `request.signature`: Data signature.
  * `request.deadline`: The deadline for the signature in milliseconds.
  * `request.chainId`: The identifier for the blockchain network in the request.
* **Returns**:
  * `response.txhash` - The transaction hash.
  * `response.ipId` - The Ip Id of the newly registered Ip Asset.

### mintAndRegisterIp

Mint an NFT and regsiter it as an Intellectual Property Asset

| Method              | Type                                                                        |
| ------------------- | --------------------------------------------------------------------------- |
| `mintAndRegisterIp` | `(request: mintAndRegisterIpRequest) => Promise<mintAndRegisterIpResponse>` |

* **Parameters**:
  * `request.nftContractAddress`: The address of the NFT Contract address.
  * `request.signature`: Data signature.
  * `request.deadline`: The deadline for the signature in milliseconds.
  * `request.licenseeRoles[]`: An address array specifying the roles assigned to licensees
  * `request.copyrightRoles[]`: An address array detailing the roles related to copyrights.
  * `request.chainId`: The identifier for the blockchain network in the request.
* **Returns**:
  * `response.txhash` - The transaction hash.
  * `response.ipId` - The Ip Id of the newly registered Ip Asset.
  * `response.tokenId` - The tokenId of the issued NFT.

### registerIpAndAttachLicense

Register an Ip and attach a license to it.

| Method                       | Type                                                                                          |
| ---------------------------- | --------------------------------------------------------------------------------------------- |
| `registerIpAndAttachLicense` | `(request: registerIpAndAttachLicenseRequest) => Promise<registerIpAndAttachLicenseResponse>` |

* **Parameters**:
  * `request.nftContractAddress`: The address of the NFT Contract address.
  * `request.tokenId`: The token id of the NFT.
  * `request.licenseTermId`: The term id of the license.
  * `request.signature`: Data signature.
  * `request.deadline`: The deadline for the signature in milliseconds.
  * `request.licenseeRoles[]`: An address array specifying the roles assigned to licensees
  * `request.copyrightRoles[]`: An address array detailing the roles related to copyrights.
  * `request.chainId`: The identifier for the blockchain network in the request.
* **Returns**:
  * `response.txhash` - The transaction hash.
  * `response.ipId` - The Ip Id of the newly registered Ip Asset.

### getIpAsset

Get details of a registered Ip.

| Method       | Type                                                          |
| ------------ | ------------------------------------------------------------- |
| `getIpAsset` | `(request: getIpAssetRequest) => Promise<getIpAssetResponse>` |

* **Parameters**:
  * `response.ipId` - The Ip Id of the registered Ip Asset.
  * `request.chainId`: The identifier for the blockchain network in the request.
* **Returns**:
  * `response.license` - The license details.
    * `response.license.id` - The license Id.
    * `response.license.termId` - The identifier for the license term.
    * `response.license.templateAddress` - The address of the license template.
    * `response.license.ipfsUri` - The IPFS URI for the license document.
  * `response.royalty` - The royalty information.
    * `response.royalty.vaultAddress` - The address of the royalty vault.
    * `response.royalty.royaltyTokenAddress` - The address of the royalty token.
  * `response.dispute` - The dispute details.
    * `response.dispute.disputed`- Indicates if there is a dispute.
    * `response.dispute.tag` - The tag associated with the dispute.
    * `response.dispute.disputeCount` - The number of disputes.
    * `response.dispute.locked` - Indicates if the dispute is locked.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://techdocs.korprotocol.io/sdk-reference/client_methods/ip_client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
