streamnfttechtest

1.1.3 • Public • Published

STREAM NFT

This SDK provides an extension to integrate the STREAM NFT (https://www.streamnft.tech) smart contract to your 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 "testsdkforstreammoney";

Documentation on functions:

[Initialize]

Initializes bid manager:

InitManagerArgs {
  biddingAmountInLamports: BN,
  totalBids: BN,
  biddingPoolPda: PublicKey,
}
 initManager(
  biddingAmountInLamports: BN,
  totalBids: BN,
  biddingPoolPda: PublicKey,
)

Initializes bidding pool:

InitPoolArgs {
  loanDurationInMinutes: number
  gracePeriodInMinutes: number
  interestRateLender: number
  interestRateProtocol: number
  collection: PublicKey
}
 initPool(
  loanDurationInMinutes: number,
  gracePeriodInMinutes: number,
  interestRateLender: number,
  interestRateProtocol: number,
  collection: PublicKey,
) 

Initializes rent:

InitRentArgs {
  rate: BN
  offerDurationInMinutes: BN
  fixedDurationInMinutes: BN
  rentIsFixed: boolean
  ownerRevenue: BN
}
 initRent(
  rate: BN,
  offerDurationInMinutes: BN,
  fixedDurationInMinutes: BN,
  rentIsFixed: boolean,
  ownerRevenue: BN,
  mint: PublicKey,
  ) 

[Process]

Processes loan:

ProcessLoanAccounts {
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPool: PublicKey,
  protocolTreasury: PublicKey,
}
processLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPool: PublicKey,
  protocolTreasury: PublicKey,
)

Processes rent:

ProcessRentArgs {
  amount: BN
  timeInMinutes: BN
  nftMint: PublicKey
}
processRent(
  amount: BN,
  timeInMinutes: BN,
  nftMint: PublicKey,
) 

Repays loan:

RepayLoanAccounts {
  biddingManager: PublicKey
  nftMint: PublicKey
  biddingPoolAccount: PublicKey
}
repayLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPoolAccount: PublicKey,
) 

[Cancel]

Cancels the bid manager created:

CancelManagerAccounts {
  biddingManager: PublicKey
  biddingPool: PublicKey
}
cancelManager(
  biddingManager: PublicKey,
  biddingPool: PublicKey,
)

Cancels the bid pool created:

CancelPoolAccounts {
  biddingPool: PublicKey
}
cancelPool(
  biddingPool: PublicKey,
)

Cancels the rent:

CancelRentArgs {
  nftMint: PublicKey
}
cancelRent(
  nftMint: PublicKey,
)

[Expire]

Expire loan:

ExpireLoanArgs {
  biddingManager: PublicKey
  nftMint: PublicKey
  biddingPoolAccount: PublicKey
}
expireLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPoolAccount: PublicKey,
)

Expire Rent:

ExpireRentArgs {
  nftMint: PublicKey
}
expireRent(
  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()

Stream NFT currently supports Solana, also expanding to other chains as well soon.. stay tuned :)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.33latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.33
1.1.20
1.1.11
1.1.00
1.0.91
1.0.80
1.0.70
1.0.60
1.0.50
1.0.41
1.0.30
1.0.20
1.0.10
1.0.01

Package Sidebar

Install

npm i streamnfttechtest

Weekly Downloads

0

Version

1.1.3

License

ISC

Unpacked Size

204 kB

Total Files

35

Last publish

Collaborators

  • streamnft