KOR Protocol Developer Docs
  • KOR Protocol: Introduction
    • Overview
    • Partners
  • Overview of KOR SDK
    • Notable Features
    • Merits of using KOR SDK
    • Use Cases
  • SDK Reference
    • Introduction
    • SDK Installation
    • SDK Initialization
    • Client Methods
      • Asset
      • NFT
      • On-Chain IP
      • On-Chain License
      • Royalty Distribution
      • Conflict Management
    • Tutorials
      • Pre-requisites
      • Mint and Register in Own Collection
      • Mint in KOR Collection and Register
      • Register Existing Minted Token as IP
      • Launch 100-Song Album via IPFS
      • Launch 5-Song Album via AWS S3
      • Register Asset as Derivative
      • Update License Terms of Existing IP
      • Raise, resolve and cancel conflicts
      • Create a copy NFT of an IP
    • Releases
    • Deployed Smart Contracts
  • Essential Business Flows
  • Architecture
    • Overview
    • Event Listener
    • Modules
      • Asset Module
      • NFT Module
      • On-Chain IP Module
      • On-Chain License Module
      • Royalty Distribution Module
      • Conflict Management Module
  • Key Definitions
  • Community
Powered by GitBook
On this page
  • OnChainLicenseClient
  • Methods
  • createSmartLicense
  • createCustomLicense
  • attachSmartLicense
  • attachCustomLicense
  • updateSmartLicense
  • updateCustomLicense
  1. SDK Reference
  2. Client Methods

On-Chain License

OnChainLicenseClient

The OnChainLicenseClient is used to register and manage licenses.

Methods

  • createSmartLicense

  • createCustomLicense

  • attachSmartLicense

  • attachCustomLicense

  • updateSmartLicense

  • updateCustomLicense

createSmartLicense

The createSmartLicense function is used to create a smart license with predefined terms

Method
Type

createSmartLicense

(request: ICreateSmartLicense) => Promise<{transactionResponse, result}>

  • Parameters:

Name
Type
Description

isRoyaltyAllowed

boolean

States whether royalty is allowed

isCommercialUseAllowed

boolean

States whether license is for commercial use

isExpirable

boolean

States whether license can be expired

isDerivativeAllowed

boolean

States whether derivative is allowed

licenseFee

number

Fee associated with the license

royaltyPercentage

number

Royalty percentage that will be shared whenever a derivative IP royalty is paid

licenseExpiryTimestamp

number

Expiry timestamp of the license

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

result

Object

Object containing the license pdf url and term id of the newly created smart license.

  • response.transactionResponse.transactionHash - The transaction hash.

  • response.result.licenseURI - The ipfs URI of the newly created smart license.

  • response.result.licenseTermId - The term id of the newly created smart license.

createCustomLicense

The createCustomLicense function is used to create a custom license with predefined and user defined terms

Method
Type

createCustomLicense

(request: ICreateCustomLicense) => Promise<{transactionResponse, result}>

  • Parameters:

Name
Type
Description

isRoyaltyAllowed

boolean

States whether royalty is allowed

isCommercialUseAllowed

boolean

States whether license is for commercial use

isExpirable

boolean

States whether license can be expired

isDerivativeAllowed

boolean

States whether derivative is allowed

licenseFee

number

Fee associated with the license

customKey

Object

JSON object containing custom term as key value pairs. Eg: {isCustomTerm1: true, isCustomTerm2: false}

royaltyPercentage

number

Royalty percentage that will be shared whenever a derivative IP royalty is paid

licenseExpiryTimestamp

number

Expiry timestamp of the license

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

result

Object

Object containing the license pdf url and term id of the newly created smart license.

  • response.transactionResponse.transactionHash - The transaction hash.

  • response.result.licenseURI - The ipfs URI of the newly created smart license.

  • response.result.licenseTermId - The term id of the newly created smart license.

attachSmartLicense

The attachSmartLicense function is used to attach smart license to an IP asset

Method
Type

attachSmartLicense

(request: IAttachLicense) => Promise<{transactionResponse}>

  • Parameters:

Name
Type
Description

ipId

address

Address of the ip asset to attach license on

licenseTermId

number

Term id of the license received in the createSmartLicense function

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

  • response.transactionResponse.transactionHash - The transaction hash.

attachCustomLicense

The attachCustomLicense function is used to attach custom license to an IP asset

Method
Type

attachCustomLicense

(request: IAttachLicense) => Promise<{transactionResponse}>

  • Parameters:

Name
Type
Description

ipId

address

Address of the ip asset to attach license on

licenseTermId

number

Term id of the license

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

  • response.transactionResponse.transactionHash - The transaction hash.

updateSmartLicense

The updateSmartLicense function is used to update smart license to an IP asset

Method
Type

updateSmartLicense

(request: IAttachLicense) => Promise<{transactionResponse}>

  • Parameters:

Name
Type
Description

ipId

address

Address of the ip asset to attach license on

licenseTermId

number

Term id of the license received in the createSmartLicense function

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

  • response.transactionResponse.transactionHash - The transaction hash.

updateCustomLicense

The updateCustomLicense function is used to attach custom license to an IP asset

Method
Type

updateCustomLicense

(request: IAttachLicense) => Promise<{transactionResponse}>

  • Parameters:

Name
Type
Description

ipId

address

Address of the ip asset to attach license on

licenseTermId

number

Term id of the license

  • Returns:

Name
Type
Description

transactionResponse

Object

Contains details of the transaction, including the transactionHash, logs, and other relevant information.

  • response.transactionResponse.transactionHash - The transaction hash.

PreviousOn-Chain IPNextRoyalty Distribution

Last updated 4 months ago