Managing Products
Valist helps developers monetize their projects, essentially making them products. The Valist SDK helps facilitate the price, royalties, supply, limit and NFT for products.
A project on Valist can be wrapped into an NFT and monetized. Owning a product's NFT means owning the product's license. At the moment, a project can support a single product. To release different editions, you will need to create different projects and configure their prices separately. However, this is beneficial to separate the content between the products.
Products support the following configurations:
  • Payment in MATIC and any ERC-20 token on the Polygon network
  • Setting supply limits for the product. This is great for special editions/releases.
  • Built-in Royalties to monetize secondary item sales.
Make sure to check out the Software License NFT page for more information! πŸ‘‡

Product Methods

The client class has the following methods for managing a product.

setProductLimit Method

Sets a limit on the supply of a product.
1
async setProductLimit(
2
projectID: ethers.BigNumberish,
3
limit: ethers.BigNumberish
4
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
limit
BigNumber
Supply limit. Set to zero for unlimited.

setProductRoyalty Method

Creates a stream of royalties for a recipient.
1
async setProductRoyalty(
2
projectID: ethers.BigNumberish,
3
recipient: string,
4
amount: ethers.BigNumberish
5
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
recipient
string
Address of the recipient.
amount
BigNumber
Amount of royalties for a project.

setProductPrice Method

Sets a price for the product's NFT in the chain's native token.
1
async setProductPrice(
2
projectID: ethers.BigNumberish,
3
price: ethers.BigNumberish
4
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
price
BigNumber
Price of minting the product NFT. (Price of the Product)
setProductTokenPrice Method
Sets a price for the product's NFT in a selected ERC20 token.
1
async setProductTokenPrice(
2
token: string,
3
projectID: ethers.BigNumberish,
4
price: ethers.BigNumberish
5
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
token
string
Address of the ERC20 token to be priced with.
projectID
BigNumber
The projectID of the product.
price
BigNumber
Price of minting the product NFT. (Price of the Product)

purchaseProduct Method

Purchases a product NFT using the chain's native token.
1
async purchaseProduct(
2
projectID: ethers.BigNumberish,
3
recipient: string
4
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
address
string
The recipient of the product NFT.

purchaseProductToken Method

Purchases a product NFT using the ERC20 token that the product was priced with.
1
async purchaseProductToken(
2
token: string,
3
projectID: ethers.BigNumberish,
4
recipient: string
5
): Promise<TransactionResponse>
Copied!
Parameters
Type
Description
token
string
Address of the ERC20 token to be purchased with.
projectID
BigNumber
The projectID of the product.
recipient
string
he recipient of the product NFT.
getProductPrice Method Readonly
gets a product's price in the chain's native token.
1
async getProductPrice(
2
projectID: ethers.BigNumberish
3
): Promise<ethers.BigNumber>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
getProductBalance Method Readonly
Checks if a user owns the NFT for a product.
1
async getProductBalance(
2
address: string,
3
projectID: ethers.BigNumberish
4
): Promise<ethers.BigNumber>
Copied!
Parameters
Type
Description
address
string
Address of the user.
projectID
BigNumber
The projectID of the product.
getProductTokenPrice Method Readonly
gets a product's price in the ERC20 token.
1
async getProductTokenPrice(
2
token: string,
3
projectID: ethers.BigNumberish
4
): Promise<ethers.BigNumber>
Copied!
Parameters
Type
Description
token
string
Address of the ERC20 token.
projectID
BigNumber
The projectID of the product.
getProductLimit Method Readonly
Returns the Product's supply limit.
1
async getProductLimit(
2
projectID: ethers.BigNumberish
3
): Promise<ethers.BigNumber>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
getProductRoyaltyInfo Method Readonly
Returns the royalty recipient address and amount owed to the recipient.
1
async getProductRoyaltyInfo(
2
projectID: ethers.BigNumberish,
3
price: ethers.BigNumberish
4
): Promise<[string, BigNumber]>
Copied!
Parameters
Type
Description
projectID
BigNumber
The projectID of the product.
price
BigNumber
The Price of the Product NFT
​
Export as PDF
Copy link