STREAM NFT
This SDK provides an extension to integrate the STREAM NFT (https://www.streamnft.tech) smart contract to your EVM application. STREAM NFT is an cross-chain scalability layer for NFT liquidity. This can be used to unlock features like rental, loan, buy now pay later for your utilitarian NFT.
import { initPool, initManager, processLoan, repayLoan, expireLoan, cancelManager, initRent, processRent, expireRent, cancelRent } from "streamnfttech_evm";
Documentation on functions:
Rent Protocol
Following functions provide accesibility to rental services
[Initialize]
Initializes rent:
initRent(
tokenAddress: address,
tokenId: number,
ratePerMinute: number,
validityMinutes: number,
isFixed: bool,
fixedMinutes: number,
ownerShare: number,
whitelist: address,
signer
)
[Process]
Processes rent:
processRent(
tokenAddress: address,
tokenId: number,
durationMinutes: number,
signer
)
[Cancel]
Cancels the rent:
cancelRent(
tokenAddress: address,
tokenId: number,
signer
)
[Expire]
Expire Rent:
expireRent(
tokenAddress: address,
tokenId: number,
signer
)
Loan Protocol
[Initialize]
Initializes bidding pool:
initPool(
tokenAddress: address,
loanDurationInMinutes: number,
gracePeriodInMinutes: number,
interestRateLender: number,
signer
)
Initializes bid manager:
initManager(
bidPoolIndex: number,
bidAmount: number,
totalBids: number,
signer
)
[Process]
Processes loan:
processLoan(
bidPoolIndex: number,
bidManagerIndex: number,
tokenId: number,
signer
)
[Cancel]
Cancels the bid manager created:
cancelManager(
bidPoolIndex: number,
bidManagerIndex: number,
signer
)
[Expire]
Expire loan:
expireLoan(
userAssetIndex: number,
signer
)
Check out solana SDK: https://www.npmjs.com/package/streamnfttech