# streamnfttech

> Solana SDK of streamNFT

Latest version **1.0.2** (published 2023-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install streamnfttech
pnpm add streamnfttech
yarn add streamnfttech
bun add streamnfttech
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-05-18 |
| First published | 2023-05-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 198.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | streamnft |

## Links

- npm: https://www.npmjs.com/package/streamnfttech
- npm.io page: https://npm.io/package/streamnfttech

## Dependencies (13)

- [npm](https://npm.io/package/npm.md) ^9.6.3
- [install](https://npm.io/package/install.md) ^0.13.0
- [@types/bn.js](https://npm.io/package/@types/bn.js.md) ^5.1.1
- [@solana/web3.js](https://npm.io/package/@solana/web3.js.md) ^1.74.0
- [@solana/spl-token](https://npm.io/package/@solana/spl-token.md) ^0.3.7
- [@project-serum/borsh](https://npm.io/package/@project-serum/borsh.md) ^0.2.5
- [@project-serum/anchor](https://npm.io/package/@project-serum/anchor.md) ^0.26.0
- [@metaplex-foundation/js](https://npm.io/package/@metaplex-foundation/js.md) ^0.18.3
- [@solana/wallet-adapter-base](https://npm.io/package/@solana/wallet-adapter-base.md) ^0.9.22
- [@solana/wallet-adapter-react](https://npm.io/package/@solana/wallet-adapter-react.md) ^0.15.32
- [@solana/wallet-adapter-phantom](https://npm.io/package/@solana/wallet-adapter-phantom.md) ^0.9.22
- [@solana/wallet-adapter-wallets](https://npm.io/package/@solana/wallet-adapter-wallets.md) ^0.19.16
- [@metaplex-foundation/mpl-token-metadata](https://npm.io/package/@metaplex-foundation/mpl-token-metadata.md) ^2.9.1

## Recent versions

- 1.0.2 (latest) — 2023-05-18
- 1.0.1 — 2023-05-18
- 1.0.0 — 2023-05-17

## README

# 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.
```js
import {
initManager, initPool, initRent, processLoan, processRent, repayLoan, expireLoan, cancelManager, cancelPool, cancelRent, getAssetManager, getBidManager, getBidManagerByUser, getBidPool, 
initRent, processRent, expireRent, cancelRent
} from "streamnfttech";
```
Documentation on functions:

## [Initialize]
Initializes bid manager:
```ts
InitManagerArgs {
  biddingAmountInLamports: BN,
  totalBids: BN,
  biddingPoolPda: PublicKey,
}
 initManager(
  biddingAmountInLamports: BN,
  totalBids: BN,
  biddingPoolPda: PublicKey,
)
```

Initializes bidding pool:
```ts
InitPoolArgs {
  loanDurationInMinutes: number
  gracePeriodInMinutes: number
  interestRateLender: number
  interestRateProtocol: number
  collection: PublicKey
}
 initPool(
  loanDurationInMinutes: number,
  gracePeriodInMinutes: number,
  interestRateLender: number,
  interestRateProtocol: number,
  collection: PublicKey,
) 
```

Initializes rent:
```ts
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:
```ts
ProcessLoanAccounts {
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPool: PublicKey,
  protocolTreasury: PublicKey,
}
processLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPool: PublicKey,
  protocolTreasury: PublicKey,
)

```

Processes rent:
```ts
ProcessRentArgs {
  amount: BN
  timeInMinutes: BN
  nftMint: PublicKey
}
processRent(
  amount: BN,
  timeInMinutes: BN,
  nftMint: PublicKey,
) 

```

Repays loan:
```ts
RepayLoanAccounts {
  biddingManager: PublicKey
  nftMint: PublicKey
  biddingPoolAccount: PublicKey
}
repayLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPoolAccount: PublicKey,
) 

```

 
## [Cancel]
Cancels the bid manager created:
```ts
CancelManagerAccounts {
  biddingManager: PublicKey
  biddingPool: PublicKey
}
cancelManager(
  biddingManager: PublicKey,
  biddingPool: PublicKey,
)

```

Cancels the bid pool created:
```ts
CancelPoolAccounts {
  biddingPool: PublicKey
}
cancelPool(
  biddingPool: PublicKey,
)
```

Cancels the rent:
```ts
CancelRentArgs {
  nftMint: PublicKey
}
cancelRent(
  nftMint: PublicKey,
)

```
## [Expire]
Expire loan:
```ts
ExpireLoanArgs {
  biddingManager: PublicKey
  nftMint: PublicKey
  biddingPoolAccount: PublicKey
}
expireLoan(
  biddingManager: PublicKey,
  nftMint: PublicKey,
  biddingPoolAccount: PublicKey,
)
```
Expire Rent:
```ts
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
```ts
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

---
_Source: https://npm.io/package/streamnfttech · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
