IPAssetClient
Methods
- registerIpAsset
- registerDerivativeIpAsset
- linkDerivative
registerIpAsset
Register your IP as an 🧩 IP Asset. It supports the following workflows:- Register an IP Asset 1a. register an existing NFT as an IP Asset 1b. mint a new NFT and register as an IP Asset
- Attach license terms to the IP Asset
- Distribute royalty tokens
Note that this function will also set the underlying NFT’s
tokenUri
to
whatever is passed under ipMetadata.nftMetadataURI
.Method | Type |
---|---|
registerIpAsset | (request: RegisterIpAssetRequest) => Promise<RegisterIpAssetResponse> |
request.nft
: You have two options here{ type: "minted", nftContract: Address, tokenId: number | bigint }
: Register an existing NFT as an IP Asset. This is typically the harder option because you need to already have an NFT minted.{ type: "mint", spgNftContract: Address, recipient?: Address, allowDuplicates?: boolean }
: Mint a new NFT and register as an IP Asset. This is typically the easier option because you don’t need to worry about already having an NFT minted. Just create an spgNftContract, or use a default one, to mint for you.
request.licenseTermsData
: If you want to attach license terms.request.licenseTermsData.terms
: The license terms to attach to the IP Asset.request.licenseTermsData.licensingConfig
: The licensing config to attach to the IP Asset.request.licenseTermsData.maxLicenseTokens
: The max number of license tokens that can be minted from this license term.
request.royaltyShares
: If you want to distribute royalty tokens out.request.royaltyShares.recipient
: The address of the recipient of the royalty shares.request.royaltyShares.percentage
: The percentage of the royalty shares.
request.ipMetadata
: The metadata of the IP Assetrequest.ipMetadata.ipMetadataURI
: The URI of the metadata for the IP.request.ipMetadata.ipMetadataHash
: The hash of the metadata for the IP.request.ipMetadata.nftMetadataURI
: The URI of the metadata for the NFT.request.ipMetadata.nftMetadataHash
: The hash of the metadata for the IP NFT.
request.deadline
: The deadline for the signature in milliseconds. Defaults to 1000.
registerDerivativeIpAsset
Register an IP as a derivative of another IP Asset. This function allows you to use an existing license token to register as derivative, or it will mint one for you. To register an IP as a derivative, it must be an IP Asset itself. So this function allows you to register an existing NFT as an IP Asset (which will be the derivative), or mint a new NFT for you (and register it as a derivative).Method | Type |
---|---|
registerDerivativeIpAsset | (request: RegisterDerivativeIpRequest) => Promise<RegisterDerivativeIpResponse> |
request.nft
: You have two options here{ type: "minted", nftContract: Address, tokenId: number | bigint }
: Register an existing NFT as an IP Asset. This is typically the harder option because you need to already have an NFT minted.{ type: "mint", spgNftContract: Address, recipient?: Address, allowDuplicates?: boolean }
: Mint a new NFT and register as an IP Asset. This is typically the easier option because you don’t need to worry about already having an NFT minted. Just create an spgNftContract, or use a default one, to mint for you.
request.licenseTokenIds
: If you want to use a license token to register as derivative.request.derivData
: If you want to mint a license token for you.request.derivData.parentIpIds
: The IDs of the parent IPs to link the registered derivative IP.request.derivData.licenseTermsIds
: The IDs of the license terms to be used for the linking.
request.royaltyShares
: If you want to distribute royalty tokens out.request.royaltyShares.recipient
: The address of the recipient of the royalty shares.request.royaltyShares.percentage
: The percentage of the royalty shares.
request.maxRts
: The maximum number of royalty tokens that can be distributed to the external royalty policies. Must be between 0 and 100,000,000. Recommended for simplicity: 100_000_000request.ipMetadata
: The metadata of the IP Assetrequest.ipMetadata.ipMetadataURI
: The URI of the metadata for the IP.request.ipMetadata.ipMetadataHash
: The hash of the metadata for the IP.request.ipMetadata.nftMetadataURI
: The URI of the metadata for the NFT.request.ipMetadata.nftMetadataHash
: The hash of the metadata for the IP NFT.
request.deadline
: The deadline for the signature in milliseconds. Defaults to 1000.
linkDerivative
Link an existing derivative IP to a parent IP.Method | Type |
---|---|
linkDerivative | (request: LinkDerivativeRequest) => Promise<LinkDerivativeResponse> |
- Without License Tokens
- With License Tokens
request.childIpId
: The ID of the child IP.request.licenseTermIds
: The IDs of the license terms to be used for the linking.request.parentIpIds
: The IDs of the parent IPs.