STREAM NFT
This SDK provides an extension to integrate the STREAM NFT (https://www.streamnft.tech) smart contract to your Solana 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 {
initManager, initPool, initRent, processLoan, processRent, repayLoan, expireLoan, cancelManager, cancelPool, cancelRent, getAssetManager, getBidManager, getBidManagerByUser, getBidPool,
initRent, processRent, expireRent, cancelRent
} from "streamnfttech_sol";
Documentation on functions:
Rent Protocol
[Initialize]
Initializes lending:
initRent(
rate: BN,
offerDurationInMinutes: BN,
rentIsFixed: boolean,
fixedDurationInMinutes: BN,
ownerRevenue: BN,
mint: PublicKey,
)
[Process]
Processes rent:
processRent(
timeInMinutes: BN,
nftMint: PublicKey,
)
[Cancel]
Cancels the rent:
cancelRent(
nftMint: PublicKey,
)
[Expire]
Expire Rent:
expireRent(
nftMint: PublicKey,
)
Loan Protocol
[Initialize]
Initializes bidding pool:
initPool(
loanDurationInMinutes: number,
gracePeriodInMinutes: number,
interestRateLender: number,
collection: PublicKey,
)
Initializes bid manager:
initManager(
biddingAmountInLamports: BN,
totalBids: BN,
biddingPoolPda: PublicKey,
)
[Process]
Processes loan:
processLoan(
biddingManager: PublicKey,
nftMint: PublicKey,
)
Repays loan:
repayLoan(
biddingManager: PublicKey,
nftMint: PublicKey,
)
[Cancel]
Cancels the bid manager created:
cancelManager(
biddingManager: PublicKey
)
Cancels the bid pool created:
cancelPool(
biddingPool: PublicKey,
)
[Expire]
Expire loan:
expireLoan(
biddingManager: PublicKey,
nftMint: PublicKey,
)
[Get]
Get the list of the asset managers
getAssetManager()
Get the list of the bid managers
getBidManager()
Get the list of the bid managers by user
interface BidManagerByUserArgs {
address: PublicKey,
}
getBidManagerByUser(
address: PublicKey,
)
Get the list of the bid pool
getBidPool()
Check out EVM SDK at: https://www.npmjs.com/package/streamnfttech_evm