# Taking NFT mainStream!

NFT Utility Infrastructure for on-chain communities

## Lack of utility, liquidity, and accessibility hindering NFT adoption&#x20;

**NFT** space, valued at **$20 billion**, lacks utility infrastructure for on-chain communities due to a lack of industry standards to preserve on-chain ownership while sharing conditionally with beneficiaries. Unlike DeFi, NFTs require specific standards for the transfer of conditional ownership, posing a challenge to composability. \
\
As the NFT market gears up for a tenfold surge in active participants and an estimated **$130 billion** economy by 2030, addressing issues such as value flow due to frequent capital formation at mints, and lower secondary volume becomes crucial. Value redistribution mechanics need to be solved to create a vibrant liquid market for NFTs and L1s need such infrastructure to attract a larger dev and user community. Furthermore, Complicated processes for offering utility post-mint result in reduced liquidity and trading activity due to the perceived lack of utility in NFTs.

## A Primer on NFTs

The NFT market presents a significant and potentially larger opportunity than commonly perceived, with approximately **$10 billion** currently locked in NFTs. However, only about **15%** of these digital assets have a tangible purpose, leaving the majority as illiquid and speculative. Future projections estimate the NFT market to reach a valuation of **$130 billion** by 2030.

One of the key drivers of this burgeoning market is the **Web3 gaming sector**, expected to expand from $4.6 billion to an impressive **$65 billion** by 2027. Beyond gaming, the NFT ecosystem holds untapped potential, especially as the metaverse develops. Possibilities include revolutionizing commerce for digital wearables and virtual land spaces, as well as tokenizing physical assets.

As the average NFT holding period increases (currently at 35 days), there is a growing demand for short-term liquidity and additional utility for NFT holdings. Innovative solutions like a loan protocol can address this demand, offering instant borrowing options for NFT holders and potentially expanding and enhancing the NFT economy through Utility services. In summary, the NFT market not only promises substantial growth but also has the potential to create new markets and redefine interactions with digital and physical assets.

## Why StreamNFT?

\
The future for blockchain art and collectibles is undoubtedly bright, but what is perhaps more intriguing is that for all of the other potential NFT use cases. But the developer/NFT creator has less developer tooling to deliver **Defi NFTs** to their holders and relies on royalties for revenue. There is no way to add a **Utility** post mint for a developer. Additionally, writing custom contracts is a high cost and security risk. To save developer efforts in providing liquid NFTs to their holders, StreamNFT has developed a set of protocols to maximize liquidity & utility across the chain and protocol.

In essence, the current landscape represents a unique opportunity for our company to step in and lay the necessary groundwork, offering the essential infrastructure and support that the growing NFT market requires. This is the right moment to build a foundation for the future of NFTs and empower creators and developers to maximize the potential of this dynamic and evolving ecosystem.

Our company is strategically positioned to address these burgeoning needs and challenges within the NFT ecosystem. We are dedicated to tackling the critical infrastructure issues that have hindered the full realization of NFT potential. Our goal is to optimize the liquidity and utility of NFTs, making them more accessible and valuable for a diverse range of creators and developers across various domains, including GameFi, RWA, Collectibles, and Brands. We are chain-agnostic, focusing on providing comprehensive support to the ever-expanding NFT ecosystem.

The timing for our company is ideal for several compelling reasons. Currently, the NFT market has not yet fully realized its potential in terms of widespread utility. Moreover, there is a substantial influx of entertainment-focused games and brands scheduled for launch in the upcoming years. We anticipate that the number of participants in the NFT market is set to increase dramatically, possibly by a factor of 50, over the next five years. These participants will require both liquidity and utility for their NFT assets.

<br>


# StreamNFT Protocol

NFT 2.0 : Composable Cross-chain Liquidity & Utility Protocol

**StreamNFT** provides liquidity layer for NFTs to unlock value transfer across **chains and protocols**. It is to be believed that the next set of NFT adoption will be brought by the utilitarian aspect and we look to provide an **Infrastructure** to power the next generation of NFTs. \
\
**StreamNFT** is building a scalability layer for NFTs to maximize liquidity & utility for a more accessible Web3 future. It enables **liquidity** with its composable protocols (i.e. P2P Rent, P2P loan, Staking) deployed across chains to facilitate value transfer and **offer utility** to existing NFT collection to build new distribution channels. \
\
🌟 ***Composable Contracts***: Take a loan for instant cash and put on rent to maximize returns from NFT assets at the same time\
✨ Proposed [ERC-7066](https://eips.ethereum.org/EIPS/eip-7066) to bring locking functionalities into NFTs on EVM chains\
🟢 Live on Solana, Mantle, Hedera, Polygon, and Other EVM-compatible chains\
\
We have a modular smart contract where conditional ownership protocol is the base for the below protocols :

* **Rent Protocol**: Assist NFT owners in generating interest from an idle asset. We provide smart registry as well as wrapped token method to enable rentals for end users on EVM whereas on Solana, rentals are enabled by transfer of actual NFT and using freezing authority. Protocol feature includes&#x20;
  * Private rentals for whitelisted users &#x20;
  * Custom Payment Token to bring balance between sink & faucet for economy
  * To Learn more, Go to [Rent Protocol ](/streamnft-protocol/rent-protocol)Section and Explore Integration [here](broken://pages/g0wSoDdR7yv3kZsjOuOk)[ ](https://docs.streamnft.tech/streamnft-protocol/rent-protocol)<br>

* **Loan Protocol:** It is a peer-to-peer decentralized NFT-backed loan protocol. The borrower can deposit NFT from any collection to get an instant loan whereas lenders can place in a bidding pool for a collection. We've simplified term loans by providing fixed-term loans.&#x20;
  * To Learn more, Go to [Loan Protocol](/streamnft-protocol/loan-protocol) Section

* **Utility Protocol:** Add exclusive offers to specific NFT collections and attract engagement from holders. It helps creators with new distribution channels.

## How StreamNFT Protocol is Unique?

* **Escrow-less**: NFT is never kept in an escrow account. Instead, it is sent to the relevant address and then NFT is frozen so that the conditional owner cannot move the asset while using the rent/loan protocol.<br>
* **Collateral-less**: No need to squeeze liquidity by providing collateral to access rent and loan protocol. StreamNFT protocol transfers NFTs in a secure and restrictive way with pre-determined conditions, eliminating the need for collateral.<br>
* **Composable**: It's not possible to **use** multiple financial instruments at a time but we've made this a reality. StreamNFT can enable the use of loans and rentals at a time by atomic transactions. Imagine taking a loan and then putting it on rentals to maximize liquidity.

NFTs on EVM are not inherently lockable, therefore StreamNFT has proposed[ ERC7066](https://eips.ethereum.org/EIPS/eip-7066) to enable escrowless financialization tools on EVM.&#x20;

<br>


# Roadmap

How we've progressed and where we stand

### Q1 2022

✅ Two of the siblings who have been discussing blockchain technology since 2017 reunite when Yugal found friction in playing web3 games. Given Piyush is a blockchain architect, they deep-dived into an understanding of NFT technical architecture.  &#x20;

### Q2 2022

✅ First Prototype of NFT Rental on Solana was built with minimal UI&#x20;

### Q3 2022

✅ Won Conquest ( <https://conquest.org.in/> ) and initial product validation from the set of developers that gave us better insights.&#x20;

### Q4 2022

✅ Built loan protocol for the Hedera network and won a grant from HBAR foundation to continue the development

✅ Architecture finalization for Loan smart contract on Solana keeping composability in center

### Q1 2023

✅ Rent and Loan Protocol Devnet Launch on Solana

### Q2 2023

✅ Proposed ERC-7066\
✅ Rent and Loan Protocol Testnet Launch on Hedera, Mantle\
✅ Got into Solana Accelerator\
✅ Ran Static code analysis for EVM codebase and found no venerability

### Q3 2023<br>

🔜  Utility protocol, Staking protocol, Partnership announcements, Solana Mainnet Launch, Hedera, and EVM compatible chains Mainnet launch


# Security Audit

StreamNFT is a utility protocol that encompasses P2P NFT Rental and P2P Loans. Below audit was conducted by Beosin for EVM contract as well as Hedera contract. \
&#x20;\
<https://beosin.com/audits/StreamNFT_202311171648.pdf>


# Rent Protocol

Owner can transfer NFT to a borrower with zero collateral

The protocol secures tokens by a set of contracts deployed that are managed by the smart contract. NFT Owner puts their NFT on rent, sets the rules of the contract, and deposits their NFT to the protocol. Borrowers, or customers, can claim the token, and get conditional ownership as parameters set by the issuer.&#x20;

The protocol works permissionless without needing any collateral and aims to solve the following :&#x20;

* The capability to share idle digital assets ( In-game assets, tokenized real estate, digital content, etc. ) for their utility and generate interest<br>
* Lowering the entry barrier for new consumers by providing a medium to experience at low cost and then make the buying decision<br>
* Simplifying asset management for institutional holders such as gaming guilds, and DAOs by enabling private rentals. They can simply whitelist the beneficiary's address ( Scholars, etc. ).&#x20;

**🌟 Supported Chains -** Solana, Ethereum, Polygon, Hedera, Mantle, Telos, & more coming soon ( Pipeline - Avalanche, Arbitrum, Scroll, etc. )<br>

{% tabs %}
{% tab title="Rentals on EVM" %}

NFTs on EVM are not inherently lockable, therefore StreamNFT has proposed [ERC7066](https://eips.ethereum.org/EIPS/eip-7066) to enable escrowless financialization tools on EVM. StreamNFT currently supports ERC721, ERC1155 and ERC7066 NFTs. Integration steps for these can be found [here](broken://pages/g0wSoDdR7yv3kZsjOuOk).

### Features:

Projects can customize own rental solutions using provided features:

1. **Asset Receipt**
   * Smart Registry: Low cost solution where smart contract stores the token states
   * Wrapped Token: Mint an [ERC7066](https://eips.ethereum.org/EIPS/eip-7066) wrapped token as receipt (an extension of ERC721 and supports all ERC721 functions). [ERC7066](https://eips.ethereum.org/EIPS/eip-7066) copy of token is transferred and locked to user wallet. Only one token is minted for each NFT and all subsequent rentals lock/unlock and transfer the wrapped token using [ERC7066](https://eips.ethereum.org/EIPS/eip-7066) capabilities, thus making the solution gas optimal.&#x20;
2. **Private Rental**\
   Configure rental within a specific guild or targeted user base
3. **Custom Payment Token**\
   Configure rental payment in chain native token or your own ERC20 token
4. **Partner Fee**\
   Project/Collection can configure their fee, which shall be processed to partner treasury on each successful rental
5. **Reward sharing**\
   Reward NFT holders in native tokens or any ERC20 token, which gets distributed to NFT owner and NFT rentee as per configurable reward share
6. **Trials**\
   Project can choose to list NFTs on trial for no cost. Incentivising users to experience projects and NFT utilities for free.
   {% endtab %}

{% tab title="Rentals on Solana" %}

StreamNFT brings truly decentralized and no-collateralization rental protocol, enabling digital asset owners and projects to make their NFTs rentable. Borrowers can own digital assets for their utility for a specified duration without locking up capital or exposing themselves to volatility by just paying small fees.&#x20;

**Supported Standard :** Metaplex Editions, pNFT

### Features:

1. **Decentralized and Escrowless**\
   NFT never leaves your wallet. While renting out or on loan, NFT stays within your wallet. Enabling users to exercise utility of NFT. NFT successful rental transfers NFT to rentee and locks the NFT in the wallet.
2. **Integration require 0 line of code**\
   StreamNFT moves NFTs to user wallets and enabling rental for your project require 0 development efforts
3. **Time Based and Use Based Rentals**\
   NFT rental expiry can be configured based on time. Optionally with 2 lines of code on-chain / off-chain use based expiry can be configured.
4. **Private Rental**\
   Configure rental within a specific guild or targeted user base
5. **Custom Payment Token**\
   Configure rental payment in chain native token or your own SPL token
6. **Partner Fee**\
   Project/Collection can configure their fee, which shall be processed to partner treasury on each successful rental
7. **Reward sharing**\
   Reward NFT holders in native tokens or any SPL token, which gets distributed to NFT owner and NFT rentee as per configurable reward share
8. **Trials**\
   Project can choose to list NFTs on trial for no cost. Incentivising users to experience projects and NFT utilities for free.
   {% endtab %}
   {% endtabs %}

<figure><img src="/files/mH2hRyhWpBSiQb0BIjWS" alt=""><figcaption><p>Rental Protocol Flow</p></figcaption></figure>

##


# Loan Protocol

The owner can get instant liquidity from a lender while the lender earns > 50% APY

StreamNFT is a peer-to-peer decentralized NFT-backed loan protocol. The borrower can deposit NFT from any collection to get an instant loan whereas lenders can place in a bidding pool for a collection. We've simplified term loans by providing fixed-term loans so that lenders & borrowers don't get overwhelmed with crunching numbers.

The protocol secures tokens by a set of contracts deployed that are managed by the smart contract. NFT Owners can simply invoke the smart contract and initialize, and choose their NFT to get capital from the lender while NFT is locked in the borrower's wallet.

The protocol works permissionless without needing any collateral or integration and aims to solve the following :&#x20;

* The illiquid nature of digital assets ( In-game assets, tokenized real estate, digital content, etc. ), and provide on-demand liquidity to NFT holders <br>
* Maximizing returns for institutional holders such as gaming guilds, and DAOs by letting them act as lenders&#x20;

## How does StreamNFT do it?

Short-term borrowing usually has high interest, so lenders can earn good returns for their risk in a short amount of time. NFT Owners may have an immediate need for cash now to sweep new mint. We connect the Lender and Borrower, and they both get a good deal. Even in the case where the Borrower fails to pay the loan back, the Lender is still protected because the NFT is worth more than what they paid to offer the loan. Make sense? <br>

<figure><img src="/files/ECP49uiTS4n4MtCGHKjj" alt=""><figcaption><p>Loan Protocol Flow</p></figcaption></figure>

## How StreamNFT offers the best price to borrowers?

You probably are aware of the Orderbook concept. Likewise, protocol maintains offer bids placed by lenders for a collection and shows the best offer to the borrower. The protocol works asynchronously where the lender can place a bid anytime and the borrower can get capital instantly. \
\
Let's say, Alice is quite interested in the 'Moonshot Rocket' NFT project and decides to deploy capital for a loan at an offer price of $105 whereas 'Bob' with a higher risk appetite wants to offer a price of $110. At this stage, lenders compete among themselves to be discovered as the best offer by borrowers.\
\
Now, NFT owners from the 'Moonshot Rocket' collection will see the best price at $110. Once Eve has taken a loan at $110 then only Trudy will discover the next best offer of Alice ( $105 ).&#x20;

### What makes StreamNFT awesome?

* We understand the importance of retaining conditional ownership of NFTs. Escrowless transfer of NFTs adds more utility where it can be used for its utility while the loan is active<br>
* We believe in instant loans since you don't have the time to haggle over the loan price. The opportunity may pass or the value of the NFT can change if it takes too long. Traditional Peer-to-peer lending models suffer this downside<br>
* We respect your degen knowledge and it becomes powerful when the community decides on fair loan offers that make protocol truly decentralized


# How does a loan work?

The owner of the NFT can **initialize** a smart contract and Program derived address ( PDA ) is created from the mint key of the NFT to store specific data including **interest, duration, transferability,** and **state** (issued, transferred, or terminated).

* Lender interacts with protocol to offer capital to the collection-specific pool with defined interest & duration.
  * Lender can choose to cancel the offer bid anytime if an order doesn't fill for longer. <br>
* Owner agrees to the best offer for a specific collection pool and the protocol locks NFT in the owner's wallet. <br>
* If the loan is repaid with interest within the specified loan duration then NFT is unfreeze.<br>
* If the loan is not repaid within the specified loan duration then NFT is transferred to the lender.

\
The lifecycle of the offer is completed upon cancellation, or necessary payments are settled, and the token is returned back to the right owner.

## How NFT can be used for its utility while on loan?

StreamNFT locks NFT in your wallet during the loan, despite using it as collateral. We want to bring same benefit with your NFTs as real-world financing. If you take a bank loan against a house, you still get to live inside it and retain conditional ownership unless the loan defaults.&#x20;

You can remain in your DAO, vote in governance, get airdrops, and get in-game utility for gaming NFTs.&#x20;

During the loan period, the lender cannot transfer the NFT as it is locked in the wallet. If the borrower doesn’t pay back, it will be transferred to the lender automatically. If the borrower does, then NFT is unlocked & freed.&#x20;

## Things to consider

* Each collection has multiple sub-pools with variable interest & duration. So, lenders can access their risk appetite and opt for better-suited sub-pool<br>
* &#x20;NFTs in a collection are regarded as equal at the moment, so you don’t need to pick your super rare NFT as collateral. Rather, you can pick an NFT you’re comfortable parting with. That way, in the unlikely event of a default, you don’t lose a sentimental NFT<br>
* The main risk Lenders have to consider, is the event of the NFT’s value dropping below the loan offer. If you think the NFT is worth 50 SOL/ETH/HBAR, but tomorrow you think the value is now 45 SOL/ETH/HBAR, then if the Borrower defaults, you lose money. This is why Lenders often choose to over-collateralize, meaning they offer lower than what they think the NFT is worth. It’s up to you and your bullishness on a project. Maybe you think the value would go up, and no chance of it going down.<br>
* In the case of a default, you get the NFT instead of your loan payment. So you should be comfortable with your loan offer in exchange for the NFT. You want to pay as low of a cost as possible for this consideration.<br>
* The reason you shouldn’t offer 0.001 SOL/ETH/HBAR, is that it’s a terrible deal for the Borrower, and they may not ever take your offer. If your offer is always lower than what other Lenders offer, then it could be a long time, if ever, before your loan is accepted.


# Utility Protocol

Offer utility, rewards or any value to holders post mint to increase engagement

In the dynamic landscape of Non-Fungible Tokens (NFTs), the benefit protocol emerges as a groundbreaking initiative aimed at enhancing post-mint NFT experiences and fostering collaboration among diverse stakeholders within the NFT ecosystem. Its primary objective is to establish an infrastructure that allows NFT collections, brands, GameFi projects, and DAOs to offer tangible benefits to any NFT collection, while enabling retail and investor holders to easily access and redeem these benefits.

**Unveiling the Assumptions**

Recognizing the multifaceted nature of utility, the benefit protocol operates on the premise that some aspects will remain on-chain, while others may extend into the off-chain realm. This strategic approach enables a flexible and inclusive utility framework that accommodates a wide range of offerings. The envisioned benefits include both tangible and intangible elements, such as physical products, exclusive access to events, promo codes, services like consultations, and voting rights. These utilities are designed to enrich the NFT experience and create tangible value for both creators and holders.

**Examples of On-chain and Off-chain Benefits**:

1. ***Physical Products Exclusive Access*****:** Merchandise that extends the NFT experience into the physical realm.
2. ***Promo or Discount Codes*****:** Providing holders with exclusive discounts on associated products or services.
3. ***Services like 1-1 Consultations*****:** NFT holders gain access to personalized consultations.
4. ***Access to Events ( IRL/Digital ), Communities, and Digital Content*****:** Exclusive entry to real-world events and virtual engagements, fostering a sense of community. Unlocking premium digital content as an exclusive benefit for NFT holders.
5. ***Voting Rights (On-chain)*****:** Empowering NFT holders with decision-making capabilities within the ecosystem.
6. ***Opportunities for New Projects*****:** NFT collections serve as gateways for new projects to gain exposure and engagement.

**What Value Benefit Protocol Adds?**

In a crowded NFT landscape, simply minting unique artwork is no longer enough to guarantee long-term success. Post-mint benefits serves as a powerful tool to:

* ***Increase engagement***: By providing exclusive access to content, experiences, or communities, NFT holders are incentivized to stay involved with the project.
* ***Boost perceived value***: The addition of ongoing utility strengthens the perception of an NFT's value, potentially leading to price appreciation and increased demand.
* ***Foster community***: Shared utility can create a sense of belonging and community among NFT holders, fostering a more loyal and invested user base.

**How does it assist different Stakeholders?** \
\
Benefit protocol brings together a diverse set of stakeholders, each playing a pivotal role in shaping the collaborative landscape:

* ***NFT Collections*****:** Entities with limited utility within their NFTs, seeking to enhance the value proposition for their holders.
* ***Brands*****:** Eager to promote their utility offerings through collaboration with NFT collections or games.
* ***GameFi*****:** Seeking to expand its reach by distributing games among new audiences through NFT partnerships. Allow NFT holders to use their NFTs as avatars within a gamified space exploration experience, earning rewards and unlocking new content.
* ***DAOs*****:** Attracting specific collection holders to participate in decentralized decision-making and governance.
* ***Retail/Investor Holders*****:** End users who stand to benefit directly by redeeming the utilities embedded within their NFT holdings.


# How does it work?

In the ever-evolving landscape of Non-Fungible Tokens (NFTs), the Protocol stands as a revolutionary framework designed to enhance the utility and engagement of NFTs post-mint. By integrating a dynamic and modular approach, the Protocol enables seamless interaction between various stakeholders, including NFT creators, brands, GameFi projects, DAOs, and individual holders. This document provides a comprehensive overview of how the Protocol functions and the benefits it brings to the NFT ecosystem.

#### Core Components of the Protocol

1. **Smart Contracts**: At the heart of the Protocol are smart contracts, which ensure secure, transparent, and automated execution of benefit functions. These contracts are deployed on-chain and can interact with multiple blockchain networks, enabling cross-chain operability among benefits.
2. **Utility Portal**: The Utility Portal serves as the interface where stakeholders can create, manage, and redeem utilities. It acts as a hub for all activities related to post-mint NFT utility, providing a user-friendly experience for both creators and holders.
3. **Modular Utility Framework**: The protocol is designed to be modular, allowing for the easy addition and customization of utilities. This framework supports various utilities, from physical product redemption to exclusive digital content access and governance participation across chains.

#### Workflow of the Product Protocol

**1. Creation of Utilities**

* **On-chain benefits**: NFT creators, brands, and other stakeholders can offer tangible benefits and post them on-chain with the Benefits protocol. They can define various benefits such as discounts, event access, consultations, etc.
* **Smart Contract Deployment**: Each utility is encoded into a smart contract, ensuring that terms and conditions are immutable and transparent. These contracts are deployed on across the blockchain, making them accessible to all relevant parties.

**2. Utility Management**

* **Dashboard Access**: Stakeholders access a centralized dashboard on the Utility Portal to manage their benefits. This includes updating offerings, setting redemption conditions, and monitoring engagement metrics.
* **Interoperability**: The modular framework allows utilities to be interoperable across different NFT collections and blockchain networks, enhancing the scope and reach of each offering.

**3. Utility Redemption**

* **Holder Interaction**: NFT holders can browse available benefits through the Utility Portal. They can see detailed information about each benefit, including how to redeem it and any associated conditions.
* **Redemption Process**: When an NFT holder chooses to redeem a benefit, the corresponding smart contract is triggered. This ensures the utility is provided in a secure and automated manner, whether it’s shipping a physical product, granting access to an event, or unlocking digital content.

**4. Tracking and Reporting**

* **Real-Time Analytics**: The Utility Portal provides real-time analytics and reporting tools. Stakeholders can track the performance of their offerings, monitor engagement levels, and adjust their strategies accordingly.

#### Benefits of the Protocol

\
**1. For Retail/Investor Holders**

* **Value Appreciation**: The ongoing utility can increase the perceived value and market demand for their NFTs.
* **Tangible Benefits**: NFT holders gain access to a wide range of tangible and intangible benefits, enhancing the overall ownership experience.

2. **For NFT Creators and Collections**

* **Enhanced Value Proposition**: By offering diverse and engaging utilities, NFT creators can significantly enhance the value proposition of their collections.
* **Increased Engagement**: Continuous interaction with holders through utilities fosters a loyal and active community.

3. **For Brands and Partners**

* **New Marketing Channels**: Brands can leverage the Product Protocol to reach targeted audiences within the NFT ecosystem, offering exclusive promotions and experiences.
* **Collaborative Opportunities**: Partnerships with NFT projects can lead to innovative collaborations, expanding brand presence in the digital space.

4. **For GameFi Projects**

* **Expanded Reach**: GameFi projects can integrate NFT utilities to attract new players and enhance in-game experiences.
* **Reward Mechanisms**: NFTs can be used as avatars or items within games, providing additional rewards and engagement opportunities for players.

5. **For DAOs and Communities**

* **Governance Participation**: DAOs can use the protocol to grant voting rights and other governance utilities to specific NFT holders, promoting decentralized decision-making.
* **Community Building**: Shared utilities can strengthen community bonds and foster active participation in DAO activities.

#### Conclusion

The Benefit Protocol is a game-changer in the NFT space, transforming static digital assets into dynamic and value-rich experiences. By fostering collaboration among various stakeholders and providing a robust infrastructure for utility management, the protocol ensures that NFTs continue to offer value long after the initial mint. This not only enhances the NFT ecosystem but also paves the way for innovative applications and sustainable growth.


# Web3 Gaming Services

StreamNFT is building web2/web3 gaming backend services, enabling games to simplify their development needs. Providing scalable infrastructure with few lines of code instead of building from scratch.\
\
Stay tuned for upcoming features!


# Matchmaking


# Token Gated Matchmaking

Ways to enable token gated matchmaking with tokens as NFT rewards:\
\
1\. ERC721: tokens are moved to an escrow account, afterwards a match room is created. Tokens are moved to match winners after match completion.\
\
2\. [ERC7066](https://eips.ethereum.org/EIPS/eip-7066): tokens are locked in user wallets to create a match room and transferred to the match winner.

{% hint style="success" %}
Added advantage of using ERC7066 is project access to integration-less [NFT liquidity solutions](broken://pages/OvkUgzieeQScDlie319V) requiring **0 dev efforts**.
{% endhint %}

Steps:<br>

1. Get signer

```javascript
// function to get user signer from wallet
user.signer=streamSDK.getWalletSigner()
```

```javascript
// function to get user signer from privatekey
user.signer=streamSDK.getSigner(privateKey)
```

2. Join room

```javascript
// function to create/join a room
// @param user.id is userId of player
// @param user.address user wallet address
// @param tokenAddress contract address of NFT
// @param tokenId token Id owned by user
// @param user.signer provides a wallet instance to sign txn
// @param roomSize number of players needed to create a room
// @returns userId of winner
await streamSDK.joinRoom(user.id, user.address, tokenAddress, tokenId, user.signer, roomSize) returns {roomId,userId}
```

3. Claim match reward

```javascript
// function to share winnings to winner
// @param roomId roomId of match
// @param user.address user wallet address
await streamSDK.winnerClaim(roomId, user.address);
```


# ERC-7066

Interface for enabling locking of ERC-721 using locker and approved

### Abstract <a href="#abstract" id="abstract"></a>

An extension of [ERC-721](https://eips.ethereum.org/EIPS/eip-721), this standard incorporates `locking` features into NFTs, allowing for various uses while preventing sale or transfer. The token’s `owner` can `lock` it, setting up locker address (either an EOA or a contract) that exclusively holds the power to unlock the token. Owner can also provide approval for tokenId, enabling ability to lock asset while address holds the token approval. Token can also be locked by `approved`, assigning locker to itself. Upon token transfer, these rights get purged.

### Backwards Compatibility <a href="#backwards-compatibility" id="backwards-compatibility"></a>

This standard is compatible with [ERC-721](https://eips.ethereum.org/EIPS/eip-721) standards.

Existing Upgradedable [ERC-721](https://eips.ethereum.org/EIPS/eip-721) can upgrade to this standard, enabling locking capability inherently and unlock underlying liquidity features.

### Motivation <a href="#motivation" id="motivation"></a>

[ERC-721](https://eips.ethereum.org/EIPS/eip-721) has sparked an unprecedented surge in demand for NFTs. However, despite this tremendous success, NFT economy suffers from secondary liquidity where it remains Illiquid in owner’s wallet. There are projects such as NFTfi, Paraspace which aims to address the liquidity challenge, but they entail below mentioned inconveniences and risks for owners as they necessitate transferring the participating NFTs to the projects’ contracts.

* **Loss of utility**: The utility value of NFTs diminishes when they are transferred to an escrow account, no longer remaining under the direct custody of the owners.
* **Lack of composability**: The market could benefit from increased liquidity if NFT owners had access to multiple financial tools, such as leveraging loans and renting out their assets for maximum returns. Composability serves as the missing piece in creating a more efficient market.
* **Smart contract vulnerabilities**: NFTs are susceptible to loss or theft due to potential bugs or vulnerabilities present in the smart contracts they rely on.

The aforementioned issues contribute to a poor user experience (UX), and we propose enhancing the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) standard by implementing a native locking mechanism: Rather than being transferred to a smart contract, an NFT remains securely stored in self-custody but is locked. During the lock period, the NFT’s transfer is restricted while its other properties remain unchanged. NFT Owner retains the ability to use or distribute it’s utility.

### Use-Cases <a href="#motivation" id="motivation"></a>

NFTs have numerous use cases where the NFT must remain within the owner’s wallet, even when it serves as collateral for a loan. Whether it’s authorizing access to a Discord server, or utilizing NFT within a play-to-earn (P2E) game, owner should have the freedom to do so throughout the lending period. Just as real estate owner can continue living in their mortgaged house, take personal loan or keep tenants to generate passive income, these functionalities should be available to NFT owners to bring more investors in NFT economy.

Lockable NFTs enable the following use cases :

* **NFT-collateralized loans**: Utilize NFT as collateral for a loan without locking it on the lending protocol contract. Instead, lock it within owner’s wallet while still enjoying all the utility of NFT.
* **No collateral rentals of NFTs**: Borrow an NFT for a fee without the need for significant collateral. Renter can use the NFT but not transfer it, ensuring the lender’s safety. The borrowing service contract automatically returns the NFT to the lender once the borrowing period expires.
* **Buy Now Pay Later**: The buyer receives the locked NFT and can immediately begin using it. However, they are unable to sell the NFT until all installments are paid. Failure to complete the full payment results in the NFT returning to the seller, along with a fee.
* **Composability**: Maximize liquidity by having access to multiple financial tools. Imagine taking a loan against NFT and putting it on rentals to generate passive income.
* **Primary sales**: Mint an NFT for a partial payment and settle the remaining amount once owner is satisfied with the collection’s progress.
* **Soulbound**: Organization can mint and self-assign `locker`, send token to user and lock the asset.
* **Safety**: Safely and conveniently use exclusive blue chip NFTs. Lockable extension allows owner to lock NFT and designate secure cold wallet as the unlocker. This way, owner can keep NFT on MetaMask and easily use it, even if a hacker gains access to MetaMask account. Without access to the cold wallet, the hacker cannot transfer NFT, ensuring its safety.


# Overview

[ERC-721](https://eips.ethereum.org/EIPS/eip-721) compliant contracts MAY implement this EIP to provide standard methods of locking and unlocking the token at its current owner address.

Token owner MAY `lock` the token and assign `locker` to some `address` using `lock(uint256 tokenId, address _locker)` function, this MUST set `locker` to `_locker`. Token owner or approved MAY `lock` the token using `lock(uint256 tokenId)` function, this MUST set `locker` to `msg.sender`. Token MAY be `unlocked` by `locker` using `unlock` function. `unlock` function MUST delete `locker` mapping and default to `address(0)`.

If the token is `locked`, the `lockerOf` function MUST return an address that is `locker` and can `unlock` the token. For tokens that are not `locked`, the `lockerOf` function MUST return `address(0)`.

`lock` function MUST revert if token is not already locked. `unlock` function MUST revert if token is not locked. ERC-721 `approve` function MUST revert if token is locked. ERC-721 `_tansfer` function MUST revert if token is locked. ERC-721 `_transfer` function MUST pass if token is locked and `msg.sender` is `approved` and `locker` both. After ERC-721 `_transfer`, values of `locker` and `approved` MUST be purged.

Token MAY be transferred and `locked`, and OPTIONAL setup `approval` to `locker` using `transferAndLock` function. This is RECOMMENDED for use-cases where Token transfer and subsequent revocation is REQUIRED.

#### INTERFACE

```
// SPDX-License-Identifier: CC0-1.0

pragma solidity >=0.7.0 <0.9.0;

/// @title Lockable Extension for ERC721
/// @dev Interface for the Lockable extension
/// @author StreamNFT 

interface IERC7066{

    /**
     * @dev Emitted when tokenId is locked
     */
    event Lock (uint256 indexed tokenId, address _locker);

    /**
     * @dev Emitted when tokenId is unlocked
     */
    event Unlock (uint256 indexed tokenId);

    /**
     * @dev Lock the tokenId if msg.sender is owner or approved and set locker to msg.sender
     */
    function lock(uint256 tokenId) external;

    /**
     * @dev Lock the tokenId if msg.sender is owner and set locker to _locker
     */
    function lock(uint256 tokenId, address _locker) external;

    /**
     * @dev Unlocks the tokenId if msg.sender is locker
     */
    function unlock(uint256 tokenId) external;

    /**
     * @dev Tranfer and lock the token if the msg.sender is owner or approved. 
     *      Lock the token and set locker to caller
     *      Optionally approve caller if bool setApprove flag is true
     */
    function transferAndLock(uint256 tokenId, address from, address to, bool setApprove) external;

    /**
     * @dev Returns the wallet, that is stated as unlocking wallet for the tokenId.
     *      If address(0) returned, that means token is not locked. Any other result means token is locked.
     */
    function lockerOf(uint256 tokenId) external view returns (address);
}
```


# NFT Rentals

Owner can transfer NFT to a borrower with zero collateral

**No Collateral NFT Rentals:**

NFT renting is a way of granting temporary access to an NFT for a fee. Users get to enjoy the utility and benefits of an NFT without owning it permanently and allows NFT owners to earn passive income from their NFTs without selling them.&#x20;

#### Case Study

{% tabs %}
{% tab title="Gaming" %}
**No Collateral NFT Rentals of In-game Assets:**

Enables NFT holders to lend their one-of-a-kind in-game assets to other gamers, thus enabling them access for a specific time. Games can attract wider participation by removing entry barriers i.e. insufficient capital or non-availability of NFT. Our 10+ demand channel partners (i.e. Guilds, Wallets, Communities) amplify the distribution of rentable NFTs\
\
**Features**: Guild Onboarding, Private Rentals, Custom Payment Token, Partner Fees

#### Case Study :&#x20;

\
The NFT rental case study explores the innovative application of non-fungible tokens (NFTs) in the GameFi rental industry, highlighting the benefits and challenges associated with this emerging trend\
\
**Problem :**&#x20;

* *High Entry Barriers*: The exorbitant prices of NFTs create a significant barrier for student gamers and those from developing nations.
* *Low Asset Utilization*: The concentrated distribution of assets limits the NFTs' contribution to the game economy, with a considerable percentage of holders remaining inactive.
* *Monetization Challenges*: The lack of avenues for monetization from the secondary market hampers the full potential of NFT mechanics.

**Solution** :

Implementing a decentralized peer-to-peer (P2P) NFT sharing model aims to address these challenges, allowing gamers to earn passive income from idle NFTs.

* *Monetization*: Projects can earn royalties from a secondary NFT sharing model by setting up partner fees
* *Accessible Ownership*: NFT rentals allow individuals to experience ownership of high-value assets without the financial burden
* *Increased Engagement and Distribution*: NFT sharing lets more gamers interact with rare experiences, creating a long tail of gamers who would buy NFTs that might result in high buy pressure
* *Custom Payment Token*: Integration with in-game tokens enables a custom payment feature, potentially appreciating the value of tokens through transactions during rentals.
* *Increased Liquidity*: Enables owners to unlock liquidity by renting out assets without selling them

**Features** :

* *Guild Onboarding*: Distributing rental NFTs through guilds broadens the distribution reach, engaging a wider audience
* *Private Rentals*: NFT sharing among whitelisted addresses allows guilds to collaborate with scholars and individual gamers to form micro guilds for NFT sharing

**Conclusion**: The NFT rental case study underscores the potential to enhance engagement and financial inclusivity within the gaming community. It not only offers a solution to entry barriers but also provides game developers with a novel approach to distributing assets widely and introduces additional layers of monetization. The combined benefits of increased liquidity, accessible ownership, and streamlined processes make NFT rentals a promising frontier for ongoing exploration and innovation in the gaming industry
{% endtab %}

{% tab title="NFT" %}
Artists may rent out their digital artworks to be exhibited, game producers can sublet in-game stuff, and landlords of digital land can allow temporary access to its virtual spaces.\
\
**UseCases:** Domain Rentals, RWA assets Rentals, Virtual Ad Spaces, Virtual Land, etc.\
\
**Problems**:\
\
***UnderUtilization***: Virtual real estate and digital spaces may remain underutilized if ownership barriers are high.\
\
Traditional licensing models may be restrictive and lack transparency.\
\
Limited engagement options for brands and sponsors in virtual events.\
\
**Solutions**:\
\
NFT rentals enable art enthusiasts to temporarily possess and display digital art, fostering wider access to the art market.\
\
NFT rentals allow individuals and businesses to lease virtual spaces, enabling temporary use without the need for substantial upfront investments.\
\
NFT rentals provide a flexible sponsorship model, allowing brands to lease virtual goods or spaces within events, fostering interactive and immersive experiences.\
\
NFT rentals offer a transparent and decentralized way for creators to license their intellectual property, allowing temporary use and compensating creators directly through smart contracts.\
\
**Conclusion**:

NFT rentals are expanding beyond the gaming industry, demonstrating their versatility and potential in various non-gaming sectors. This case study highlights the opportunities for increased accessibility, flexible licensing, and novel revenue streams through the application of NFT rentals in art, real estate, intellectual property, and event spaces. As the concept continues to evolve, businesses and creators need to explore innovative ways to leverage NFT rentals.
{% endtab %}
{% endtabs %}

##


# Ephemeral / Consumable NFTs

Introduce Ephemeral/Trial utility NFTs that grant access for a limited duration or after specific usage thresholds

Developers have the option to introduce Ephemeral/Trial utility NFTs that grant access for a limited duration or after specific usage thresholds. Particularly suitable for Free-to-Play games, this approach can enhance financial inclusion by capitalizing on the 'Try before Buy' concept.\
\
**Features**: Time-Based Expiry, Use Based Expiry\
\
**Case Study** :\
\
Ephemeral Utility NFTs represent a groundbreaking concept wherein developers introduce NFTs with disposable attributes, enabling access for a limited time or after specific usage conditions are met. This case study delves into the innovative realm of Ephemeral Utility NFTs, examining their impact on user engagement, financial dynamics, and the broader implications for digital ecosystems.\
\
**Problem** :

* *Limited Access and Exclusivity*: Traditional NFTs often lack a dynamic aspect, leading to a static sense of ownership without considering the evolving nature of digital content.
* *Risk in 'Try before Buy' Scenarios*: Users may be hesitant to purchase non-fungible tokens without experiencing the associated digital content, leading to potential dissatisfaction and financial risks.
* *Monetization in Free-to-Play Models*: Free-to-play models often face challenges in monetizing user engagement effectively, as not all users are willing to make upfront purchases.
* *Creating Scarcity in Digital Assets*: Scarcity is a fundamental driver of value, and digital assets often lack the scarcity element that physical assets inherently possess.

**Solution** :\
The introduction of Consumable/Ephemeral NFTs aims to address these challenges by redefining the concept of permanence. Unlike traditional NFTs, these tokens come with an expiration date or limited use, introducing a temporal element to digital ownership. This model opens the door for unique experiences and time-bound content within the NFT ecosystem.

* *Enhanced User Engagement*: Ephemeral NFTs introduce limited-time access, creating a sense of exclusivity and urgency. This dynamic feature encourages users to actively engage with the content during the specified period, enhancing the overall user experience.
* *Financial Inclusion*: The 'Try before Buy' concept allows users to experience premium features without committing to a full purchase, fostering a more inclusive environment for individuals with varying financial capacities.
* *Monetization*: Ephemeral NFTs provide a monetization strategy by offering temporary access to premium features. Users can opt to extend or enhance their experience through microtransactions, creating a revenue stream that caters to a broader user base.
* *Creating Scarcity in Digital Assets*: Ephemeral NFTs introduce a time-bound aspect to digital ownership, mimicking scarcity by limiting access. This scarcity can increase the perceived value of the NFT and encourage engagement.

**UseCases**:&#x20;

{% tabs %}
{% tab title="Gaming" %}
***Free-to-Play Games***:

Consider a Free-to-Play game that implements Ephemeral Utility NFTs to provide temporary access to premium in-game items, characters, or features. Users can engage with these exclusive elements for a limited time, enticing them to explore the game's full potential. The 'Try before Buy' approach leads to increased in-game transactions and a more inclusive gaming community.
{% endtab %}

{% tab title="Art/Culture" %}
Consider an artist, Mia, who mints a series of Consumable NFTs tied to an exclusive virtual concert experience. Each NFT provides the owner with access to the concert for a limited time, say 24 hours. Collectors are not just acquiring a static piece of digital art but a ticket to a unique, time-bound event. As the concert approaches, the value and demand for Mia's Consumable NFTs surge, creating a dynamic and time-sensitive market.

***Token Gated NFTs*** :

* Provide NFT-controlled access to the community, voting, file storage, etc.&#x20;
* Mint membership, subscription NFTs for your users that expire over time or after certain usage. &#x20;
* Mint tickets for your events, concerts, etc.
  {% endtab %}
  {% endtabs %}

\
\
**Conclusion**: Ephemeral Utility NFTs have the potential to reshape how users interact with digital content, offering a unique blend of exclusivity and accessibility. As demonstrated by the case study, these tokens can foster enhanced user engagement, create novel revenue streams, and promote financial inclusion in various industries, with the gaming sector serving as a compelling example of successful implementation. However, careful consideration of user experience and monetization strategies is crucial for maximizing the benefits of Ephemeral Utility NFTs.<br>


# NFT Mandates

Mandates when NFT is to be transferred later, but the commitment is to be made now

As the NFT ecosystem expands, the need arises for mechanisms that enable commitments to transfer NFTs at a later date, contingent on specific conditions or events. NFT Mandates address this by allowing users to make commitments for future transfers, opening up a range of use cases beyond immediate ownership.

**Problem**:\
\
Traditional NFT transfers are immediate and unconditional, limiting the scope of applications where conditional transfers based on future events or circumstances are required. The absence of a structured framework for such commitments hinders the development of innovative use cases in the NFT space.

**Solution**:\
\
NFT Mandates are introduced as a solution to address this gap. These mandates allow for commitments to transfer NFTs at a later time, under predefined conditions. This approach expands the utility of NFTs beyond static ownership, facilitating dynamic interactions and applications in various scenarios.\
\
***Smart Contract Automation***: Smart contracts play a central role in the implementation of NFT Mandates, automating the execution of transfers when the specified conditions are met, ensuring transparency and reliability.\
\
**Key Features**:

* *Conditional Transfers*: NFT Mandates enable conditional transfers based on predefined criteria, such as the occurrence of a specific event, the completion of a task, or the fulfillment of contractual agreements.
* *Token-Gating*: Mandated Transfers are utilized for token-gating scenarios, where access to specific content, events, or features is granted only upon the completion of certain conditions or criteria.
* *Matchmaking and Wagers*: NFT Mandates find application in matchmaking scenarios, where the transfer of NFTs is contingent on specific criteria being met between two parties. Additionally, they can be employed in wagering situations, with NFTs acting as collateral based on the outcome of an event.

**Case Study Scenario**:\
\
Consider a gaming platform that uses NFT Mandates for token-gating. Users commit to transferring specific in-game items (NFTs) to other players upon achieving certain milestones or completing challenges. The smart contract associated with the NFT Mandate ensures that the transfer occurs automatically once the conditions are met, creating a dynamic and engaging gaming experience.

**Conclusion**:\
\
The utilization of NFT Mandates for conditional transfers in future use cases showcases the adaptability and versatility of blockchain technology in the NFT space. By enabling commitments for transfers contingent on specific events or conditions, NFT Mandates pave the way for innovative applications such as token-gating, matchmaking, wagers, and more. As the NFT landscape evolves, the implementation of Mandated Transfers offers a glimpse into the future possibilities of dynamic and interactive digital asset ownership.

<br>


# Post-Mint Utility

Provide value to holders post mint to increase engagement

Post-mint utility refers to the value and benefits that are introduced to an NFT collection after the initial minting process. This goes beyond the inherent value associated with the digital artwork itself and instead focuses on creating ongoing engagement and rewarding ownership.\
\
**Why is Post-Mint Utility Important?**\
\
In a crowded NFT landscape, simply minting unique artwork is no longer enough to guarantee long-term success. Post-mint utility serves as a powerful tool to:

* *Increase engagement*: By providing exclusive access to content, experiences, or communities, NFT holders are incentivized to stay involved with the project.
* *Boost perceived value*: The addition of ongoing utility strengthens the perception of an NFT's value, potentially leading to price appreciation and increased demand.
* *Foster community*: Shared utility can create a sense of belonging and community among NFT holders, fostering a more loyal and invested user base.

**Examples of Post-Mint Utility in Action:**\
\
The article explores various examples of post-mint utility, and here are a few noteworthy ones:

* *Exclusive content*: Granting NFT holders access to gated Discord channels, early previews of new artwork, or private AMAs with creators.
* *Physical merchandise*: Offering limited-edition merchandise or collectibles redeemable with NFTs, blurring the lines between the digital and physical worlds.
* *Discounted access*: Providing discounts on future NFT drops, merchandise, or even real-world events and experiences.
* *Governance rights*: Enabling NFT holders to vote on project decisions or participate in shaping the future of the community.

**Implementing Post-Mint Utility: A Case Study**\
\
Imagine a hypothetical NFT project centered around a collection of space-themed artwork. To implement post-mint utility, the creators could:

* *Collaborate with the interactive online game*: Allow NFT holders to use their NFTs as avatars within a gamified space exploration experience, earning rewards and unlocking new content.
* *Partner with Brands*: Offer exclusive discounts on merchandise to NFT holders.

**Conclusion:**\
\
By strategically implementing a post-mint utility, NFT projects can move beyond the initial hype and cultivate a thriving community around their offerings. The key lies in understanding the needs and interests of the target audience and then crafting unique and engaging experiences that leverage the power of NFTs in innovative ways.\
\
This case study serves as a starting point for exploring the vast potential of post-mint utility. By embracing creativity and a commitment to long-term engagement, NFT projects can unlock new levels of value and success.

<br>


# Partial Payment at Mint

The owner can get instant liquidity from a lender while the lender earns > 50% APY

This case study explores the innovative concept of Partial Payment NFT Mint during primary sales, analyzing its impact on democratizing access to digital assets, fostering wider community engagement, and redefining the traditional model of NFT acquisition.

**Problem:**\
\
As the popularity of NFTs surged, a significant barrier to entry emerged for many enthusiasts who couldn't afford the upfront cost of purchasing high-value or limited edition NFTs during primary sales. The traditional model required full payment at the time of minting, limiting the accessibility of these digital assets to a select group of buyers.\
\
It is difficult for unrecognized artists to sell out at Mint and a barrier to developing trust among high-end collectors.\
\
**Solution:**

The introduction of Partial Payment NFT Mint at Primary Sales seeks to address the financial barriers associated with acquiring NFTs. This model allows buyers to make partial payments during the minting process, securing a stake in the NFT without the need for immediate full payment. This innovative approach aims to make NFTs more inclusive and accessible to a broader audience.\
\
It can also inculcate behavior where buyers acquire NFT with partial payment and pay the remaining amount based on the collection owner’s progress.&#x20;

**Key Features:**

* *Partial Payment Options*: Buyers have the flexibility to choose partial payment plans, allowing them to secure NFTs at a fraction of the total cost during the primary sales event.
* *Smart Contract Automation*: The use of smart contracts facilitates the automation of partial payments, ensuring a secure and transparent process without the need for intermediaries.
* *Tiered Ownership*: Depending on the level of partial payment made, buyers may receive tiered ownership benefits, such as early access to additional content, exclusive events, or governance rights within the NFT community.
* *Community Engagement*: The model encourages a more diverse and engaged community by lowering the financial barrier to entry, enabling a wider range of participants to become stakeholders in the NFT ecosystem.

**Case Study Scenario:**

Imagine an artist, Alex, launching a limited edition NFT collection with a total minting cost of 1 ETH per NFT. With Partial Payment NFT Mint, buyers can choose to make a 0.2 ETH partial payment during the minting process, securing their ownership stake in the NFT. The remaining balance can be paid over a specified period or before a set deadline. As a result, Alex's NFT collection attracts a more diverse group of buyers who may not have been able to participate in traditional sales due to financial constraints.<br>

**Conclusion:**

Partial Payment NFT Mint at Primary Sales presents a paradigm shift in the NFT market, fostering inclusivity and expanding access to digital assets. By allowing buyers to secure NFTs with partial payments, this model opens the door for a more diverse community of collectors and enthusiasts. As the NFT space continues to evolve, the impact of this innovative approach on democratizing ownership and fostering community engagement could redefine the future dynamics of primary NFT sales.


# NFT Rental

**NFT Rental Integration Overview**

Projects have the flexibility to choose between hosting a rental marketplace on the StreamNFT Dapp or seamlessly integrating it into their game or project environment.&#x20;

Integrate Rentals and host on StreamNFT Marketplace in **10 mins**

<details>

<summary><strong>Benefits of Hosting Rental marketplace with StreamNFT</strong></summary>

* Get live in 5 mins&#x20;
* No need to incur hefty cloud infra hosting cost&#x20;
* Cross promotion of NFTs who are engaged with other games
* Customize your own protocol treasury, protocol fee percentage, and payment token
* Marketplace can be deployed on project specific sub domain with brand specific guidelines ( Example : darkforest.streamnft.tech )&#x20;

</details>

{% hint style="success" %}
If you are looking to integrate NFT rentals within your own infrastructure please refer to [API](/for-developers/api-reference) and [SDK](/for-developers/sdk-reference) support for comprehensive list of functions
{% endhint %}

{% tabs %}
{% tab title="Solana (Escrowless)" %}
StreamNFT effortlessly accommodates metaplex NFTs and pNFTs, fostering a peer-to-peer rental ecosystem without the need for any explicit integration on the part of projects to support NFT rentals on StreamNFT hosted Rental Marketplace.\
\
StreamNFT provides a truly decentralized and escrowless solution, enabling out of the box support for solana based NFT projects.
{% endtab %}

{% tab title="EVM" %}

{% endtab %}
{% endtabs %}

<details>

<summary>Onboard Your Project</summary>

StreamNFT brings customisation to collection owner to define: protocol treasury, protocol fee percentage, and payment token type.\
\
To get started with renting your project or collection through StreamNFT hosted Dapp. please complete the onboarding process by filling out the form at the following link: [Onboard Your Project](https://tally.so/r/mVQDxE).\
\
*Onboarding Automation Coming Soon on Application*

</details>

**StreamNFT Rental Marketplace ( 1 API Integration )**

StreamNFT introduces **peer-to-peer** rentals, offering customization options for collection owners to define parameters such as the **protocol treasury**, **protocol fee percentage**, and **payment token** type.&#x20;

StreamNFT rentals supports both the [EVM](broken://pages/Xdns5YaJ67gUQ8octFTQ) and [Solana](broken://pages/xciVgdWb1U3EW0F1RjpI) ecosystems. Explore the integration methods provided below to effortlessly incorporate StreamNFT rentals for your project's NFT collection and get live in **10 mins.**

Rental marketplace can be accessed [here](https://rent.streamnft.tech/) to get list of all associated NFT collections.

[ Onboard Your Project NOW!](https://tally.so/r/mVQDxE)

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/W8e8EjiNUWDErv6fttSU">API Reference</a></td><td></td><td></td></tr><tr><td><a href="/pages/NZoVU3ph5E4TqrSO3rmC"><strong>SDK Reference</strong></a></td><td></td><td></td></tr><tr><td><a href="/pages/Zji2Nl8tvWXL3IMmjIAA">On-Chain Reference</a></td><td></td><td></td></tr></tbody></table>

For any queries or assistance, feel free to reach Piyush ( CTO ) on Telegram @PiyushChittara


# API Reference


# Utility Integration

Getting Started

### Step 1: Register As Client

To initiate the login process and receive an OTP, send a POST request to the authentication endpoint. The OTP will be sent to the email address you provide.

This call triggers the server to send an OTP to the provided email address. Check your email for the OTP code.

{% openapi src="/files/zZTgrjzo8UEmlTxIqrmc" path="/login/client" method="post" %}
[openapi: '3.0.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FQQ2XUo60tGd7WIRVNQBl%2Fopenapi%3A%20'3.0.yml?alt=media\&token=bc699aef-f42e-4792-a22a-006eb6d9b035)
{% endopenapi %}

### Step 2: Verify Client

Once you receive the OTP, verify it by sending another POST request to the same endpoint. This request should include both your email address and the OTP you received.

{% openapi src="/files/zZTgrjzo8UEmlTxIqrmc" path="/login/verify" method="post" %}
[openapi: '3.0.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FQQ2XUo60tGd7WIRVNQBl%2Fopenapi%3A%20'3.0.yml?alt=media\&token=bc699aef-f42e-4792-a22a-006eb6d9b035)
{% endopenapi %}

**Response:**

If the OTP is verified successfully, the response will include your API key:

```json
{
  "success": true,
  "API_KEY": "YOUR_API_KEY_HERE"
}
```

Use this API key for all subsequent API calls by including it in the header of your requests.


# Client


# Register

To initiate the login process and receive an OTP, send a POST request to the authentication endpoint. The OTP will be sent to the email address you provide.

This call triggers the server to send an OTP to the provided email address. Check your email for the OTP code.

{% openapi src="/files/zZTgrjzo8UEmlTxIqrmc" path="/login/client" method="post" %}
[openapi: '3.0.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FQQ2XUo60tGd7WIRVNQBl%2Fopenapi%3A%20'3.0.yml?alt=media\&token=bc699aef-f42e-4792-a22a-006eb6d9b035)
{% endopenapi %}


# Verify

Once you receive the OTP, verify it by sending another POST request to the same endpoint. This request should include both your email address and the OTP you received.

{% openapi src="/files/zZTgrjzo8UEmlTxIqrmc" path="/login/verify" method="post" %}
[openapi: '3.0.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FQQ2XUo60tGd7WIRVNQBl%2Fopenapi%3A%20'3.0.yml?alt=media\&token=bc699aef-f42e-4792-a22a-006eb6d9b035)
{% endopenapi %}

**Response:**

If the OTP is verified successfully, the response will include your API key:

```json
{
  "success": true,
  "API_KEY": "YOUR_API_KEY_HERE"
}
```

Use this API key for all subsequent API calls by including it in the header of your requests.


# Redeem Code

Redeem Coupon/QR code where codes are system generated for an utility

{% openapi src="/files/6WMtydhDwVMm0pUfgVCs" path="/verify" method="post" %}
[swagger.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2Flb84YMHKp9wxycUXPQRc%2Fswagger.yml?alt=media\&token=62f282b8-0a9f-44ba-ad5f-9714db8fc191)
{% endopenapi %}

*


# Get All Claimed Utility User

{% openapi src="/files/6WMtydhDwVMm0pUfgVCs" path="/claims/{utilityId}" method="get" %}
[swagger.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2Flb84YMHKp9wxycUXPQRc%2Fswagger.yml?alt=media\&token=62f282b8-0a9f-44ba-ad5f-9714db8fc191)
{% endopenapi %}


# Developer


# Get All Benefits By Collection

{% openapi src="/files/6WMtydhDwVMm0pUfgVCs" path="/collection/{address}" method="get" %}
[swagger.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2Flb84YMHKp9wxycUXPQRc%2Fswagger.yml?alt=media\&token=62f282b8-0a9f-44ba-ad5f-9714db8fc191)
{% endopenapi %}


# Rental Integration

**NFT Rental Integration Overview**

Projects have the flexibility to choose between hosting a rental marketplace on the StreamNFT Dapp or seamlessly integrating it into their game or project environment.&#x20;

Integrate Rentals and host on StreamNFT Marketplace in **10 mins**

<details>

<summary><strong>Benefits of Hosting Rental marketplace with StreamNFT</strong></summary>

* Get live in 5 mins&#x20;
* No need to incur hefty cloud infra hosting cost&#x20;
* Cross promotion of NFTs who are engaged with other games
* Marketplace can be deployed on project specific sub domain with brand specific guidelines ( Example : darkforest.streamnft.tech )&#x20;

</details>

{% hint style="success" %}
If you are looking to integrate NFT rentals within your own infrastructure please refer to [API](broken://pages/my1sHIi70hzNaDGdUaar) and [SDK](broken://pages/XSbU4wypMZQTnw4Jot5W) support for comprehensive list of functions
{% endhint %}

**StreamNFT Rental Marketplace ( 1 API Integration )**

StreamNFT introduces **peer-to-peer** rentals, offering customization options for collection owners to define parameters such as the **protocol treasury**, **protocol fee percentage**, and **payment token** type.&#x20;

StreamNFT rentals supports both the [EVM](broken://pages/Xdns5YaJ67gUQ8octFTQ) and [Solana](broken://pages/xciVgdWb1U3EW0F1RjpI) ecosystems. Explore the integration methods provided below to effortlessly incorporate StreamNFT rentals for your project's NFT collection and get live in **10 mins.**

Rental marketplace can be accessed [here](https://rent.streamnft.tech/) to get list of all associated NFT collections.

{% hint style="success" %}
To list your collections on the marketplace, complete the onboarding process by filling out the form at the following link: [Onboard Your Project](https://tally.so/r/mVQDxE).\
\
*Onboarding Automation Coming Soon on Application*
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>EVM</strong></td><td><br><a href="/pages/sHY3gGk9RB4zzkzoCJFv">On-Chain calls</a><br><a href="/pages/gnDLdBq3WfaGQwrNeJiT">Data Indexer</a></td><td></td></tr><tr><td><strong>Solana</strong><br><br><a href="/pages/xciVgdWb1U3EW0F1RjpI">Integration</a></td><td></td><td></td></tr></tbody></table>

For any queries or assistance, feel free to reach Piyush ( CTO ) on Telegram @PiyushChittara


# User NFTs

The Asset Manager API provides functionalities for managing asset managers in a blockchain-based ecosystem. Asset managers are entities responsible for managing various assets, such as digital tokens, NFTs (Non-Fungible Tokens), and other digital assets, on a blockchain network. These APIs allows users to retrieve information about asset managers based on their chain ID and contract address.

**Endpoint:**

> * Main Net Base URL: <https://indexer.streamnft.tech/>
> * Test Net Base URL: <https://stagingindexer.streamnft.tech/>

## **1. Use StreamNFT Indexer (1 API Call to get all User NFTs)**

{% openapi src="/files/JDvLeszlVCuXftU6TcEv" path="/getNFTs/{chainId}/{wallet}" method="get" %}
[openapi: 3.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FWP8VXOGi3kSHdwa6ls9J%2Fopenapi%3A%203.yml?alt=media\&token=ecf4e985-c4d9-4317-8a12-07f905e89c2f)
{% endopenapi %}

## **2. Use External Indexer (2 API Call to get all User NFTs)**

*Query Parameters specific for rentals***:**

* `collection`: Filter for token address of the NFT collection
* `rentee`: Filter for assets rented by a wallet
* `state`: Filter for all assets on Marketplace (STALE) or rented out (RENT)
* `onlyRentData` : Output only rental data (NFT rentee, NFT owner,  rental expiry, state)

{% openapi src="/files/YWXbKkMC1LmJdKtNi8qq" path="/assetManager/{chainId}" method="get" %}
[openapi.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2F487GZkzQet3aXAmxAbT0%2Fopenapi.yml?alt=media\&token=41d5ce99-7329-4bd4-bcfd-32dccbd1fb77)
{% endopenapi %}

**Response:**

* Successful responses return an array of asset managers for provided token address with detailed information, such as the current rentee and the state of each asset.

### Example: How to Integrate **External Indexer**

* Get all rented collection NFTs by user wallet

```javascript
let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await getNFTs(chainId,wallet.address,tokenAddress));

async function getNFTs(chainId, address,tokenAddress){
    const nfts = await fetch(`https://indexer.streamnft.tech/assetManager/${chainId}?user=${walletAddress}&collection=${collectionAddress}`)
    .then(response => {
        if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
        }
        return response.json();
    })
    .catch(error => {
        // Handle network errors or API response errors here
        console.error('Error:', error.message);
    });
    return nfts;
}
```

* Get all rented NFTs by user wallet

```javascript
let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await getNFTs(chainId,wallet.address));

async function getNFTs(chainId, address){
    const nfts = await fetch(`https://indexer.streamnft.tech/assetManager/${chainId}?user=${walletAddress}`)
    .then(response => {
        if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
        }
        return response.json();
    })
    .catch(error => {
        // Handle network errors or API response errors here
        console.error('Error:', error.message);
    });
    return nfts;
}
```


# Raw Transactions (Advanced)

#### 1. Lend NFT for rental

This operation will list the NFT on DApp for rentals.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/lendToken" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/lendToken", "POST", new
{
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h", 
  rate = "10", // rate per minute
  offerduration = "1",
  isfixed = true,
  fixedminutes = "10",
  ownershare = "10",
  whitelist = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h", // whitelist for private rental (undefined for public)
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/lendToken");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h", 
  rate = "10",
  offerduration = "1",
  isfixed = true,
  fixedminutes = "10",
  ownershare = "10",
  whitelist = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h", 
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot2cj5Cz56",
  raw = false
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 2. Take Rent for any NFT

User can take any NFT on rent for provided time duration.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/processRent" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/processRent", "POST", new
{
  durationminutes = "60",
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/processRent");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  durationminutes = "60",
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot2cj5Cz56", 
  raw = false
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}

{% tab title="Bash" %}

{% endtab %}
{% endtabs %}

#### 3. Cancel Rent

Cancel the rental offer and retrieve back the NFT.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/removeLendToken" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/cancelRent", "POST", new
{
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot2cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/cancelRent");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  nftmint = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}

{% tab title="Bash" %}

{% endtab %}
{% endtabs %}

#### 4. Get User Assets

This operation retrieves the assets of a specific user.

{% tabs %}
{% tab title="Unity" %}

```csharp
string userAddress = "userAddressHere"; // Replace with the actual user address
StartCoroutine(SendRequest($"http://api.streamnft.tech/getUserAssets/{userAddress}", "GET", null));// Some code
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var userAddress = "2FPSmq9njjsyr4Axb1LDzdooUaVJThXdgHE4Z6Gpaa3h";
var options = new RestClientOptions($"http://api.streamnft.tech/getUserAssets/{userAddress}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}

{% tab title="Bash" %}

{% endtab %}
{% endtabs %}

#### 5. Get Asset Manager

This operation retrieves the asset manager.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/getAssetInfo/{mint}" method="get" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp

string mint = "NFTmint"; // Replace with the NFT mint
StartCoroutine(SendRequest($"http://api.streamnft.tech/getAssetInfo/{mint}", "GET", null));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/getAssetManager");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}

{% tab title="Bash" %}

{% endtab %}
{% endtabs %}


# Loan Integration


# User Loans

The Asset Manager API provides functionalities for managing asset managers in a blockchain-based ecosystem. Asset managers are entities responsible for managing various assets, such as digital tokens, NFTs (Non-Fungible Tokens), and other digital assets, on a blockchain network. This API allows users to retrieve information about asset managers based on their chain ID and contract address.

**Endpoint:**

> * Main Net Base URL: <https://indexer.streamnft.tech/>
> * Test Net Base URL: <https://stagingindexer.streamnft.tech/>

* `GET /assetManager/{chainId}`: Retrieves asset managers by their chain ID and contract address.

**Parameters:**

* `chainId`: The ID of the blockchain chain where the asset managers are deployed.

**Query Parameters specific for rentals:**

* `collection`: Filter for token address of the NFT collection
* `rentee`: Filter for assets rented by a wallet
* `state`: Filter for all assets on loan (LOAN)

{% openapi src="/files/YWXbKkMC1LmJdKtNi8qq" path="/assetManager/{chainId}" method="get" %}
[openapi.yml](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2F487GZkzQet3aXAmxAbT0%2Fopenapi.yml?alt=media\&token=41d5ce99-7329-4bd4-bcfd-32dccbd1fb77)
{% endopenapi %}

**Response:**

* Successful responses return an array of asset managers for provided token address with detailed information, such as the current rentee and the state of each asset.


# Raw Transactions (Advanced)

#### 1. Create a Bid Pool

This operation creates a bid pool for a specific collection.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/createLoanPool" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/initPool", "POST", new
{
  interestrate = "1",
  graceperiod = "10",
  collection = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  loanduration = "10",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/initPool");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  interestrate = "1",
  graceperiod = "10",
  collection = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  loanduration = "10",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 2. Get Bid Pool

This operation retrieves the bid pool.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/getLoanPool" method="get" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/getBidPool", "GET", null));// Some code
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/getBidPool");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 3. Add Liquidity

This operation adds liquidity to a created Bid Pool.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/addLoanOffer" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/initManager", "POST", new
{
  biddingool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  bidamount = "100", // amount in lamports,
  totalbids = "10", // total bids
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/initManager");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  biddingool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  bidamount = "100", 
  totalbids = "10", 
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56",
  raw = false 
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 4. Get Bid Manager

This operation retrieves the bid manager.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/getLoanOffers" method="get" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/getBidManager", "GET", null));// Some code
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/getBidPool");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 5. Get User Assets

This operation retrieves the assets of a specific user.

{% tabs %}
{% tab title="Unity" %}

```csharp
string userAddress = "userAddressHere"; // Replace with the actual user address
StartCoroutine(SendRequest($"http://api.streamnft.tech/getUserAssets/{userAddress}", "GET", null));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var userAddress = "2FPSmq9njjsyr4Axb1LDzdooUaVJThXdgHE4Z6Gpaa3h";
var options = new RestClientOptions($"http://api.streamnft.tech/getUserAssets/{userAddress});
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

6\. **Get Asset Manager**

This operation retrieves the asset manager.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/getAssetInfo/{mint}" method="get" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp

string mint = "NFTmint"; // Replace with the NFT mint
StartCoroutine(SendRequest($"http://api.streamnft.tech/getAssetInfo/{mint}", "GET", null));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/getAssetManager");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 7. Take Loan

Collection holders can claim loan on their NFTs.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/processLoan" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/processLoan", "POST", new
{
  biddingpool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56",
  raw = false 
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/processLoan");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  biddingpool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56",
  raw = false
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 8. Repay Loan

Repay loan already taken by the user.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/repayLoan" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/repayLoan", "POST", new
{
  biddingpoolaccount = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  nftmint = "3YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa33",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/repayLoan");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  biddingpoolaccount = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  nftmint = "3YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa33",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56",
  raw = false 
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}

#### 9. Remove Liquidity

Liquidity providers can remove provided liquidity.

{% openapi src="/files/nGMccrYfuwtuWLCAKgwb" path="/removeLoanOffer" method="post" %}
[apidoc.json](https://2149345960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F60fGWUP51b2HhkWIrtTW%2Fuploads%2FntRhDvbTU49mheSVTA9E%2Fapidoc.json?alt=media\&token=cc6bb561-c675-4c84-ac12-178ff828a541)
{% endopenapi %}

{% tabs %}
{% tab title="Unity" %}

```csharp
StartCoroutine(SendRequest("http://api.streamnft.tech/cancelmanager", "POST", new
{
  biddingpool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
    secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56", //Optional (providing secret send on-chain transaction)
  raw = false //Optional (return raw transaction)
}));
```

{% endtab %}

{% tab title="C#" %}

```csharp
using RestSharp;

var options = new RestClientOptions("http://api.streamnft.tech/cancelmanager");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
var body= {
  biddingpool = "1YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  biddingmanager = "2YeSmq9njjsyr4AYb1LDzdooUaVJThXdgH34Z6Gpaa3h",
  secret = "4uzLYRhX2dnsgUZVNNY82TNFCZbDFt5D9KLJuTFM8X2mc83ACEybEAi8aurEEZJTkSBwp8xg65KKP2ot1cj5Cz56",
  raw = false
}
request.AddBody(body);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
```

{% endtab %}
{% endtabs %}


# Marketplace


# SDK Reference


# Utility Integration

To integrate the SDK with your repository, follow the steps below. The following code snippets provide examples of how to use the SDK functions to interact with the smart contract.

Testnet SDK: [streamnft-utility-test ](https://www.npmjs.com/package/streamnft-utility-test)\
Mainnet SDK: streamnft-evm (TBA)

```javascript
const stream = require('streamnft-utility-test');

//for browser wallets
signer = stream.getWalletSigner();  

//for signer using private key  
signer= stream.getSigner(chainId, privateKey, rpcUrl);    
```

\
1\.  Create Utility\
\
Create Utility on any NFT collection

* create utility schema with UtilitySchema

<details>

<summary>UtilitySchema</summary>

```json
{
  "utilityId": {
    "type": "String",
    "required": true,
    "unique": true
  },
  "utilityIndex": "Number",
  "provider": "String",
  "winners": [
    "String"
  ],
  "participants": [
    "String"
  ],
  "chainId": "Number",
  "utilityType": {
    "type": "String",
    "required": true
  },
  "usage": {
    "expiryOrUsage": "Number",
    "startOnClaim": "Boolean"
  },
  "raffle": {
    "totalEntries": {
      "type": "Number",
      "default": 0
    },
    "participants": [
      "String"
    ],
    "winners": [
      "String"
    ],
    "maxEntries": "Number",
    "winnersMerkle": "String",
    "claimDate": "Date"
  },
  "target": [
    {
      "collection": "String",
      "chainId": "String",
      "name": "String",
      "eligibleType": {
        "type": "String",
        "required": true
      },
      "traits": [
        {
          "key": "String",
          "value": "String"
        }
      ]
    }
  ],
  "eligible": {
    "type": "Map",
    "of": {
      "eligibleType": {
        "type": "String",
        "required": true
      },
      "participants": [
        "String"
      ],
      "externalService": {
        "type": "String"
      },
      "traits": [
        {
          "key": "String",
          "value": "String"
        }
      ],
      "numberOfEntries": "Number",
      "collectionImage": "String",
      "collectionName": "String",
      "chainId": "String",
      "collectionAddress": "String",
      "taskDetails": [
        {
          "taskInfo": "String",
          "serviceTarget": "String",
          "targetURL": "String",
          "numberOfEntries": "Number",
          "mandatory": "Boolean"
        }
      ]
    },
    "default": {}
  },
  "partner": "String",
  "selectionType": {
    "type": "String",
    "required": true
  },
  "title": "String",
  "category": "String",
  "image_url": "String",
  "reward": {
    "value": "String",
    "estimatedValue": "String",
    "mintPrice": "Number",
    "details": [
      "String"
    ],
    "image": "String",
    "type": {
      "type": "String",
      "required": true
    },
    "currency": {
      "type": "String",
      "default": "USD"
    },
    "count": "Number",
    "expiry": "String",
    "chainId": "Number",
    "secret": {
      "value": "String",
      "details": [
        {
          "value": "String",
          "claimed": "Boolean"
        }
      ]
    },
    "congratulationText": "String"
  },
  "createdAt": "Date",
  "description": "String",
  "startDate": "Date",
  "endDate": "Date"
}
```

</details>

```javascript
const stream = require('streamnft-utility-test');

stream.createUtility(utility, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

This shall return index of utility created: utilityId

```javascript
{success:true, data: <index> (int)}
```

2. Get All Utility By Collection&#x20;

Get Utilities present on a collection

```javascript
const stream = require('streamnft-utility-test');

stream.getAllUtilityByCollection(collectionAddress)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

3. Get All Utility By User

Get all Utilities accessible to a wallet

```javascript
const stream = require('streamnft-utility-test');

stream.getAllUtilityByUser(wallet, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

4. Join Raffle

Join Raffle Type Utility

```javascript
const stream = require('streamnft-utility-test');

stream.joinRaffle(chainId, utilityId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

5. Claim Reward

Claim reward for giveaways utilities

```javascript
const stream = require('streamnft-utility-test');

stream.claimReward(chainId, utilityId, user, proof, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

6. Claim Utility On NFT

Claim NFT benefit utility

```javascript
const stream = require('streamnft-utility-test');

stream.claimUtilityOnNFT(user, tokenId, utilityId, proof, chainId,signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

7. Redeem Utility On NFT

Redeem NFT benefit utility

```javascript
const stream = require('streamnft-utility-test');

stream.redeemUtilityOnNFT(tokenId, utilityId, chainId,signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

8. Check  NFT utility

Check if NFT is valid for any utility

```javascript
const stream = require('streamnft-utility-test');

stream.checkNFTUtility(tokenId, utilityId, chainId, provider)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```


# Rental Integration

> * Main Net SDK: <https://www.npmjs.com/package/streamnft-evm>
> * Test Net SDK: <https://www.npmjs.com/package/streamnft-evm-test>

* Get all rented collection NFTs by user wallet

```javascript
const streamNFT = require('streamnft-evm');

let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await streamNFT.getNFTs(chainId,wallet.address));
```

* Get all rented NFTs by user wallet

```javascript
const streamNFT = require('streamnft-evm');

let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await streamNFT.getNFTs(chainId,wallet.address));
```


# EVM

To integrate the SDK with your repository, follow the steps below. The following code snippets provide examples of how to use the SDK functions to interact with the smart contract.

**1. Get User Asset Details:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId&#x20;

{% tabs %}
{% tab title="JS" %}

```javascript
const userAddress = "USER_PUBLIC_KEY";

stream.getAssestsByUser(userAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will fetch the details of the user asset associated with the provided user address. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the user asset.

**2. Initialize Rent for a Specific Asset:**

To initiate a rent for a specific asset, you can use the following function:

* Provide the token address of the asset, the token ID, and other required parameters such as the rate per minute, validity duration, fixed/variable rent, owner share, and whitelist.
* Specify the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
const ratePerMinute = 10;
const validityMinutes = 60;
const isFixed = false;
const fixedMinutes = 0;
const doMint=false; // receipt type: smart registry, true=> mint wrapped token
const ownerShare = 80; // in percentage
const whitelist = []; // Array of whitelisted addresses

stream.lendToken(
  tokenAddress,
  tokenId,
  ratePerMinute,
  validityMinutes,
  isFixed,
  fixedMinutes,
  doMint,
  ownerShare,
  whitelist,
  chainId,
  signer
)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

**3. Get Asset Manager Details:**

To retrieve the asset manager details for a specific token, you can use the following function:

* Provide the token address and token ID of the asset.
* Specify the chainId&#x20;

{% tabs %}
{% tab title="JS" %}

<pre class="language-javascript"><code class="lang-javascript">const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
<strong>stream.getAssetManager(tokenAddress, tokenId, chainId)
</strong>  .then((result) => {
    // Handle the result (asset manager details)
  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

{% endtab %}
{% endtabs %}

Executing this code will fetch the asset manager details for the specified token. Ensure that you provide the correct token address and token ID corresponding to the asset you want to retrieve information for. The result will contain relevant details about the asset manager, which can be further processed or displayed as needed in your application.

**4. Process a Rent for a Specific Asset:**

To initiate a rental process for a specific asset, you can utilize the following function:

* Provide the token address and token ID of the asset.
* Specify the duration of the rent in minutes.
* Specify the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
const durationMinutes = 120;

stream.stream.processRent(tokenAddress, tokenId, durationMinutes, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will trigger the rental process for the specified asset. Ensure that you provide the correct token address and token ID corresponding to the asset you want to initiate the rent for. Set the desired duration of the rent in minutes. The result will indicate the success of the rental process, and you can handle it accordingly in your application.

**5. Expire a Rent for a Specific Asset:**

To expire a rent for a specific asset, you can use the following function:

* Provide the token address and token ID of the asset for which you want to expire the rent.
* Specify the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";

stream.expireRent(tokenAddress, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you initiate the process to expire the rent for the specified asset. Make sure to provide the correct token address and token ID corresponding to the asset you want to expire the rent for. The result will indicate the successful expiration of the rent, and you can handle it accordingly in your application logic.

**6. Cancel a Rent for a Specific Asset:**

To cancel a rent for a specific asset, you can use the following function:

* Provide the token address and token ID of the asset for which you want to cancel the rent.
* Specify the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";

stream.cancelRent(tokenAddress, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you initiate the process to cancel the rent for the specified asset. Make sure to provide the correct token address and token ID corresponding to the asset you want to cancel the rent for. The result will indicate the successful cancellation of the rent, and you can handle it accordingly in your application logic.

7. **Get Assets by collection**

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";

stream.getAssetsByCollection(tokenAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you get all all assets for provided collection

8. **Get Assets by collection and wallet**

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS";
const wallet = "USER_WALLET_ADDRESS";
stream.getAssetsByUserAndCollection(wallet, tokenAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you get all all assets for provided collection and user

Make sure to replace the placeholders (TOKEN\_ADDRESS, TOKEN\_ID, USER\_PUBLIC\_KEY, etc.) with the actual values specific to your use case.<br>

These examples demonstrate how to use the SDK functions to interact with the smart contract. You can integrate them into your application logic and handle the results and errors accordingly.


# Solana

SDK optional parameters:

|           | true                   | false                        |
| --------- | ---------------------- | ---------------------------- |
| secretKey | sign using secret key  | sign using wallet adapter    |
| raw       | return raw transaction | execute transaction on-chain |

### Initialize

Initializes NFT rental

{% tabs %}
{% tab title="JS" %}

```javascript
stream.initRent(
  rate: BN, // rent price per minute in lamport
  offerDurationInMinutes: BN, // lend offer duration in minutes
  fixedDurationInMinutes: BN, // fixed rent duration in minutes
  rentIsFixed: boolean, // if a lender decides to define fixed rent duration
  ownerRevenue: BN, // owner share for revenue
  trialType: TrialType | null, // not null if not on trial
  trialFee: BN | null, // not null if on trial
  mint: PublicKey, // mint address of NFT
  whiteList?: PublicKey, //optional
  secretKey?: string, //Optional (providing secret send on-chain transaction)
  raw?: boolean //Optional (return raw transaction)
)
```

{% endtab %}
{% endtabs %}

### \[Process]

Processes NFT rental

{% tabs %}
{% tab title="JS" %}

```javascript
processRent(
  timeInMinutes: BN, // rental duration in minutes
  nftMint: PublicKey, // mint address of NFT
  secretKey?: string, //Optional (providing secret send on-chain transaction)
  raw?: boolean //Optional (return raw transaction)
) 
```

{% endtab %}
{% endtabs %}

### \[Cancel]

Cancels the nft rental

{% tabs %}
{% tab title="JS" %}

```javascript
cancelRent(
  nftMint: PublicKey, // mint address of NFT
  secretKey?: string, //Optional (providing secret send on-chain transaction)
  raw?: boolean
)
```

{% endtab %}
{% endtabs %}

### \[Expire]

Expire NFT rental. This gets triggered by our revocation system.

{% tabs %}
{% tab title="JS" %}

```javascript
expireRent(
  nftMint: PublicKey, // mint address of NFT
  secretKey?: string,
  raw?: boolean
)
```

{% endtab %}
{% endtabs %}


# Loan Integration


# EVM

**1. Initialize a bid pool:**

To create a bid pool for your NFT collection, follow the steps below:

* `tokenAddress`: The address of the ERC721 token representing your NFT collection.
* `loanDurationInMinutes`: The duration of the loan period in minutes.
* `gracePeriodInMinutes`: The grace period in minutes before the loan expires.
* `interestRateLender`: The interest rate for the lender, specified in percentage.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS"; // ERC721 Token address
const loanDurationInMinutes = 60;
const gracePeriodInMinutes = 10;
const interestRateLender = 5; // in percentage

stream.createLoanPool(
  tokenAddress,
  loanDurationInMinutes,
  gracePeriodInMinutes,
  interestRateLender,
  chainId,
  signer
)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By following these steps, you can create a bid pool for your NFT collection and manage various loan-related operations efficiently using the SDK. Remember to replace the placeholder `TOKEN_ADDRESS` with the actual address of your ERC721 token.

**2. Get bid pool details by bidPoolIndex:**

To retrieve the bidding pool for your NFT collection, you can use the following method:

* `bidPoolIndex`: The index of the bid pool.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool

strean.getBidPoolByIndex(bidPoolIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

```javascript
Response object of bid pool :
    {
      initializerKey: the address of the administrator,
      tokenAddress: the address of the token (e.g., 'xyz'),
      loanDurationInMinutes: the duration of the loan (e.g., 30 days),
      gracePeriodInMinutes: the grace period of the loan,
      apy: the annual percentage yield (e.g., 20%),
      interestRateLender: the interest rate for the lender,
      interestRateProtocol: the interest rate for the protocol,
      totalBidManager: the total bids managed,
      lastBidAmount: the amount of the last bid,
      bidNftFloorPrice: the minimum bid price for the NFT,
    }    
```

This code snippet demonstrates how to use and handle the returned data from the `getBidPools` function, as well as provides descriptions of the properties in the BidPool data structure.

By executing this code snippet, you will receive the details and information associated with the bid pool for your NFT collection. Remember to replace the `bidPoolIndex` with the actual index of the bid pool you want to retrieve.

**3. Get the length of the bid pool:**&#x20;

To retrieve the length of the bidding pool for your NFT collection, you can use the following method: chainId: The identifier of the blockchain where the NFTs reside.

{% tabs %}
{% tab title="JS" %}

```javascript

getBidPoolLength(chainId)
  .then((result) => {
    // Handle the result
    // Result will be the length of the bid pool on the specified chain
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code snippet, you will receive the total number of bid pools associated with your NFT collection on the specified blockchain. Remember to replace the `chainId` with the actual identifier of the blockchain where your NFTs are located.

**4. Get all bid pools:**&#x20;

To retrieve all the bidding pools for your NFT collection, you can use the following method: chainId: The identifier of the blockchain where the NFTs reside.

{% tabs %}
{% tab title="JS" %}

```javascript
getBidPools(chainId)
  .then((result) => {
    // Handle the result
    // Result will be an array of all the bid pools on the specified chain
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

```javascript
Response object of bid pool List :
    [{
      initializerKey: the address of the administrator,
      tokenAddress: the address of the token (e.g., 'xyz'),
      loanDurationInMinutes: the duration of the loan (e.g., 30 days),
      gracePeriodInMinutes: the grace period of the loan,
      apy: the annual percentage yield (e.g., 20%),
      interestRateLender: the interest rate for the lender,
      interestRateProtocol: the interest rate for the protocol,
      totalBidManager: the total bids managed,
      lastBidAmount: the amount of the last bid,
      bidNftFloorPrice: the minimum bid price for the NFT,
    }]

    
```

This code snippet demonstrates how to use and handle the returned data from the `getBidPools` function, as well as provides descriptions of the properties in the BidPool data structure.

By executing this code snippet, you will receive a list of all the bid pools associated with your NFT collection on the specified blockchain. Remember to replace the `chainId` with the actual identifier of the blockchain where your NFTs are located.

**5. Creating a Bid Manager:**

To create a bid manager, you can use the following function:

* Provide the index of the bid pool, bid amount, total number of bids, chainId, and signer.

{% tabs %}
{% tab title="JS" %}

<pre class="language-javascript"><code class="lang-javascript">const bidPoolIndex = 0; // Index of the bid pool
const bidAmount = 100; // Amount of the bid
const totalBids = 10; // Total number of bids

stream.addLoanOffer(bidPoolIndex, bidAmount, totalBids, chainId, signer)
  .then((result) => {
<strong>    // Handle the result
</strong>  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

{% endtab %}
{% endtabs %}

By executing this code, a bid manager will be created within the specified bid pool. Ensure that you provide the appropriate values for the bid pool index, bid amount, and total number of bids to customize the bid manager according to your requirements.

**6. Retrieving Bid Manager Details:**

To retrieve the details of a bid manager, you can use the following function:

* Provide the index of the bid pool and the index of the bid manager, along with the chainId and provider.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager

stream.getLoanOffer(bidPoolIndex, bidManagerIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will fetch the details of the specified bid manager, including relevant information such as bid manager address, bid pool index, bid amount, and other related data. Make sure to provide the correct bid pool index and bid manager index to retrieve the desired bid manager details.

**7. Cancel a Bid Manager:**

To cancel a bid manager and remove it from the bidding pool, you can utilize the following function:

* Specify the bid pool index and bid manager index of the bid manager you want to cancel.
* Provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

<pre class="language-javascript"><code class="lang-javascript">const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager

<strong>stream.cancelManager(bidPoolIndex, bidManagerIndex, chainId, signer)
</strong>  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

{% endtab %}
{% endtabs %}

By executing this code, you will initiate the cancellation process for the specified bid manager within the bidding pool. Ensure that you provide the correct bid pool index and bid manager index to cancel the intended bid manager successfully.

**8. Processing a Loan:**

To initiate the loan processing, you can use the following function:

* Specify the bid pool index, bid manager index, and the token ID for the loan.
* Also, provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager
const tokenId = "TOKEN_ID";

processLoan(bidPoolIndex, bidManagerIndex, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will trigger the processing of the loan associated with the specified bid pool and bid manager. The provided token ID is used to identify the specific loan to be processed. Ensure that you provide the correct bid pool index, bid manager index, and token ID to process the desired loan successfully.

**9. Get User Asset Details:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId .

{% tabs %}
{% tab title="JS" %}

```javascript
const userAddress = "USER_PUBLIC_KEY";
const userAssetIndex = 0; // Index of the user asset

getUserAssets(userAddress, userAssetIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will fetch the details of the user asset associated with the provided user address and asset index. Ensure that you supply the correct user address and asset index to retrieve the desired asset details. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the user asset.

**10. Repaying a Loan:**

To initiate the repayment of a loan, you can use the following function:

* Specify the user asset index for the loan repayment.
* Also, provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const userAssetIndex = 0; // Index of the user asset

repayLoan(userAssetIndex, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will trigger the repayment process for the loan associated with the specified user asset index. Ensure that you provide the correct user asset index to repay the intended loan successfully.

**11. Expire a Loan:**

To expire a loan and terminate its active status, you can utilize the following function:

* Specify the user asset index for the loan to be expired.
* Provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const userAssetIndex = 0; // Index of the user asset

expireLoan(userAssetIndex, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will initiate the expiration process for the loan associated with the provided user asset index. Ensure that you provide the correct user asset index to expire the intended loan successfully.

Make sure to replace the placeholders (TOKEN\_ADDRESS, TOKEN\_ID, USER\_PUBLIC\_KEY, etc.) with the actual values specific to your use case.<br>

These examples demonstrate how to use the SDK functions to interact with the smart contract. You can integrate them into your application logic and handle the results and errors accordingly.


# Solana

**1. Initialize a bid pool:**

To create a bid pool for your NFT collection, follow the steps below:

* `tokenAddress`: The address of the ERC721 token representing your NFT collection.
* `loanDurationInMinutes`: The duration of the loan period in minutes.
* `gracePeriodInMinutes`: The grace period in minutes before the loan expires.
* `interestRateLender`: The interest rate for the lender, specified in percentage.

{% tabs %}
{% tab title="JS" %}

```javascript
const tokenAddress = "TOKEN_ADDRESS"; // ERC721 Token address
const loanDurationInMinutes = 60;
const gracePeriodInMinutes = 10;
const interestRateLender = 5; // in percentage

stream.createLoanPool(
  tokenAddress,
  loanDurationInMinutes,
  gracePeriodInMinutes,
  interestRateLender,
  chainId,
  signer
)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By following these steps, you can create a bid pool for your NFT collection and manage various loan-related operations efficiently using the SDK. Remember to replace the placeholder `TOKEN_ADDRESS` with the actual address of your ERC721 token.

**2. Get bid pool details by bidPoolIndex:**

To retrieve the bidding pool for your NFT collection, you can use the following method:

* `bidPoolIndex`: The index of the bid pool.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool

strean.getBidPoolByIndex(bidPoolIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

```javascript
Response object of bid pool :
    {
      initializerKey: the address of the administrator,
      tokenAddress: the address of the token (e.g., 'xyz'),
      loanDurationInMinutes: the duration of the loan (e.g., 30 days),
      gracePeriodInMinutes: the grace period of the loan,
      apy: the annual percentage yield (e.g., 20%),
      interestRateLender: the interest rate for the lender,
      interestRateProtocol: the interest rate for the protocol,
      totalBidManager: the total bids managed,
      lastBidAmount: the amount of the last bid,
      bidNftFloorPrice: the minimum bid price for the NFT,
    }    
```

This code snippet demonstrates how to use and handle the returned data from the `getBidPools` function, as well as provides descriptions of the properties in the BidPool data structure.

By executing this code snippet, you will receive the details and information associated with the bid pool for your NFT collection. Remember to replace the `bidPoolIndex` with the actual index of the bid pool you want to retrieve.

**3. Get the length of the bid pool:**&#x20;

To retrieve the length of the bidding pool for your NFT collection, you can use the following method: chainId: The identifier of the blockchain where the NFTs reside.

{% tabs %}
{% tab title="JS" %}

```javascript

getBidPoolLength(chainId)
  .then((result) => {
    // Handle the result
    // Result will be the length of the bid pool on the specified chain
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code snippet, you will receive the total number of bid pools associated with your NFT collection on the specified blockchain. Remember to replace the `chainId` with the actual identifier of the blockchain where your NFTs are located.

**4. Get all bid pools:**&#x20;

To retrieve all the bidding pools for your NFT collection, you can use the following method: chainId: The identifier of the blockchain where the NFTs reside.

{% tabs %}
{% tab title="JS" %}

```javascript
getBidPools(chainId)
  .then((result) => {
    // Handle the result
    // Result will be an array of all the bid pools on the specified chain
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

```javascript
Response object of bid pool List :
    [{
      initializerKey: the address of the administrator,
      tokenAddress: the address of the token (e.g., 'xyz'),
      loanDurationInMinutes: the duration of the loan (e.g., 30 days),
      gracePeriodInMinutes: the grace period of the loan,
      apy: the annual percentage yield (e.g., 20%),
      interestRateLender: the interest rate for the lender,
      interestRateProtocol: the interest rate for the protocol,
      totalBidManager: the total bids managed,
      lastBidAmount: the amount of the last bid,
      bidNftFloorPrice: the minimum bid price for the NFT,
    }]

    
```

This code snippet demonstrates how to use and handle the returned data from the `getBidPools` function, as well as provides descriptions of the properties in the BidPool data structure.

By executing this code snippet, you will receive a list of all the bid pools associated with your NFT collection on the specified blockchain. Remember to replace the `chainId` with the actual identifier of the blockchain where your NFTs are located.

**5. Creating a Bid Manager:**

To create a bid manager, you can use the following function:

* Provide the index of the bid pool, bid amount, total number of bids, chainId, and signer.

{% tabs %}
{% tab title="JS" %}

<pre class="language-javascript"><code class="lang-javascript">const bidPoolIndex = 0; // Index of the bid pool
const bidAmount = 100; // Amount of the bid
const totalBids = 10; // Total number of bids

stream.addLoanOffer(bidPoolIndex, bidAmount, totalBids, chainId, signer)
  .then((result) => {
<strong>    // Handle the result
</strong>  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

{% endtab %}
{% endtabs %}

By executing this code, a bid manager will be created within the specified bid pool. Ensure that you provide the appropriate values for the bid pool index, bid amount, and total number of bids to customize the bid manager according to your requirements.

**6. Retrieving Bid Manager Details:**

To retrieve the details of a bid manager, you can use the following function:

* Provide the index of the bid pool and the index of the bid manager, along with the chainId and provider.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager

stream.getLoanOffer(bidPoolIndex, bidManagerIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will fetch the details of the specified bid manager, including relevant information such as bid manager address, bid pool index, bid amount, and other related data. Make sure to provide the correct bid pool index and bid manager index to retrieve the desired bid manager details.

**7. Cancel a Bid Manager:**

To cancel a bid manager and remove it from the bidding pool, you can utilize the following function:

* Specify the bid pool index and bid manager index of the bid manager you want to cancel.
* Provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

<pre class="language-javascript"><code class="lang-javascript">const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager

<strong>stream.cancelManager(bidPoolIndex, bidManagerIndex, chainId, signer)
</strong>  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

{% endtab %}
{% endtabs %}

By executing this code, you will initiate the cancellation process for the specified bid manager within the bidding pool. Ensure that you provide the correct bid pool index and bid manager index to cancel the intended bid manager successfully.

**8. Processing a Loan:**

To initiate the loan processing, you can use the following function:

* Specify the bid pool index, bid manager index, and the token ID for the loan.
* Also, provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const bidPoolIndex = 0; // Index of the bid pool
const bidManagerIndex = 0; // Index of the bid manager
const tokenId = "TOKEN_ID";

processLoan(bidPoolIndex, bidManagerIndex, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will trigger the processing of the loan associated with the specified bid pool and bid manager. The provided token ID is used to identify the specific loan to be processed. Ensure that you provide the correct bid pool index, bid manager index, and token ID to process the desired loan successfully.

**9. Get User Asset Details:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId .

{% tabs %}
{% tab title="JS" %}

```javascript
const userAddress = "USER_PUBLIC_KEY";
const userAssetIndex = 0; // Index of the user asset

getUserAssets(userAddress, userAssetIndex, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

Executing this code will fetch the details of the user asset associated with the provided user address and asset index. Ensure that you supply the correct user address and asset index to retrieve the desired asset details. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the user asset.

**10. Repaying a Loan:**

To initiate the repayment of a loan, you can use the following function:

* Specify the user asset index for the loan repayment.
* Also, provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const userAssetIndex = 0; // Index of the user asset

repayLoan(userAssetIndex, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will trigger the repayment process for the loan associated with the specified user asset index. Ensure that you provide the correct user asset index to repay the intended loan successfully.

**11. Expire a Loan:**

To expire a loan and terminate its active status, you can utilize the following function:

* Specify the user asset index for the loan to be expired.
* Provide the chainId and signer information.

{% tabs %}
{% tab title="JS" %}

```javascript
const userAssetIndex = 0; // Index of the user asset

expireLoan(userAssetIndex, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

{% endtab %}
{% endtabs %}

By executing this code, you will initiate the expiration process for the loan associated with the provided user asset index. Ensure that you provide the correct user asset index to expire the intended loan successfully.

Make sure to replace the placeholders (TOKEN\_ADDRESS, TOKEN\_ID, USER\_PUBLIC\_KEY, etc.) with the actual values specific to your use case.<br>

These examples demonstrate how to use the SDK functions to interact with the smart contract. You can integrate them into your application logic and handle the results and errors accordingly.


# Marketplace


# On-Chain Reference

EVM

If your project uses on-chain calls for `token owner`, replace them with streamNFT contract calls using the streamNFT ABI

<details>

<summary>StreamNFT ABI for NFT State calls</summary>

```json
[
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      }
    ],
    "name": "ownerOf",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]
```

</details>

1. For ERC721 token, you need to update on-chain call with <br>

   ```javascript
   (ERC721) ownerOf(tokenId) -> (streamNFT) ownerOf(tokenAddress,tokenId)
   (ERC721) balanceOf(user) -> (streamNFT) balanceOf(tokenAddress,user)
   ```
2. For ERC1155 token, you need to update on-chain call with&#x20;

   ```javascript
   (ERC1155) balanceOf(tokenId,user) -> (streamNFT) balanceOf(tokenAddress,tokenId,user)
   ```


# Wallet Provider Reference


# Rental

The Custom Integration provides developers with the flexibility to fully integrate our functionalities within wallets. This guide walkthrough JS based SDK calls which interact with both on-chain and streamNFT indexers.&#x20;

{% hint style="info" %}
This is required for wallets who are interesting in implementing rental/loan infrastructure within their own ecosystem.
{% endhint %}

{% hint style="info" %}
For enabling rentals directly using [StreamNFT hosted application](https://rent.streamnft.tech/) check [quick guide](broken://pages/g0wSoDdR7yv3kZsjOuOk).
{% endhint %}


# EVM

To integrate the SDK with your repository, follow the steps below. The following code snippets provide examples of how to use the SDK functions to interact with the smart contract.

```
Testnet SDK: streamnft-evm-test
Mainnet SDK: streamnft-evm
```

**1. Get Rented NFTs By Wallet:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId&#x20;

```javascript
const stream = require('streamnft-evm-test');

stream.getRentedNFTs(wallet.address, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

Example Response:

<pre class="language-json"><code class="lang-json"><strong>{ success: true, data:
</strong>  [
    {
      "rentee": "0x000000000000000000000000000000000020e8fe",
      "rent_expiry": "1710344564",
      "initializer": "0x00000000000000000000000000000000003621e2",
      "state": "RENT",
      "token_address": "0x000000000000000000000000000000000030b248",
      "token_id": "46"
    },
    {
      "rentee": "0x000000000000000000000000000000000020e8fe",
      "rent_expiry": "1709029643",
      "initializer": "0x000000000000000000000000000000000020e8fe",
      "state": "RENT",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "6"
    }
  ]
}
</code></pre>

\
Executing this code will fetch the details of the user asset associated with the provided user address. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the asset rental.

**2. Get Rented NFTs By Wallet And Collection:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId&#x20;

```javascript
const stream = require('streamnft-evm-test');

stream.getRentedNFTs(wallet.address, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

Example Response:

```json
{ success: true, data:
  [
    {
        "rentee": "0x000000000000000000000000000000000020e8fe",
        "rent_expiry": "1710344564",
        "initializer": "0x00000000000000000000000000000000003621e2",
        "state": "RENT",
        "token_address": "0x000000000000000000000000000000000020e948",
        "token_id": "46"
      },
      {
        "rentee": "0x000000000000000000000000000000000020e8fe",
        "rent_expiry": "1709029643",
        "initializer": "0x000000000000000000000000000000000020e8fe",
        "state": "RENT",
        "token_address": "0x000000000000000000000000000000000020e948",
        "token_id": "6"
      }
  ]
}
```

```json
{ success: false, data: <error>}
```

Executing this code will fetch the details of the user asset associated with the provided user address and collection. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the asset rental.<br>

**3. Initialize Rent for a Specific Asset:**

To initiate a rent for a specific asset, you can use the following function:

* Provide the token address of the asset, the token ID, and other required parameters such as the rate per minute, validity duration, fixed/variable rent, owner share, and whitelist.
* Specify the chainId and signer information.

```javascript
const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
const ratePerMinute = 10;
const validityMinutes = 60;
const isFixed = false;
const fixedMinutes = 0;
const doMint=false; // receipt type: smart registry, true=> mint wrapped token
const ownerShare = 80; // in percentage
const whitelist = []; // Array of whitelisted addresses

stream.lendToken(
  tokenAddress,
  tokenId,
  ratePerMinute,
  validityMinutes,
  isFixed,
  fixedMinutes,
  doMint,
  ownerShare,
  whitelist,
  chainId,
  signer
)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

**Example Response:**

```json
{ success: true, data: <index>}
```

```json
{ success: false, data: <error>}
```

\
\
**4. Get Asset Manager Details:**

To retrieve the asset manager details for a specific token, you can use the following function:

* Provide the token address and token ID of the asset.
* Specify the chainId&#x20;

<pre class="language-javascript"><code class="lang-javascript">const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
<strong>stream.getAssetManager(tokenAddress, tokenId, chainId)
</strong>  .then((result) => {
    // Handle the result (asset manager details)
  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

Executing this code will fetch the asset manager details for the specified token. Ensure that you provide the correct token address and token ID corresponding to the asset you want to retrieve information for. The result will contain relevant details about the asset manager, which can be further processed or displayed as needed in your application.

**Example Response:**

```json
{ success: true, data: 
    {
      "id": 240,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "4",
      "loan_offer_index": "9",
      "state": "PRE_LOAN",
      "loan_expiry": "1708598493",
      "provider": "0x000000000000000000000000000000000009be43",
      "rate": null,
      "validity_expiry": null,
      "is_fixed": null,
      "fixed_minutes": null,
      "rent_expiry": null,
      "rentee": null,
      "private_rental": null,
      "owner_share": null,
      "whitelist": null,
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "1",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": null,
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "1200000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    }
}
```

```json
{ success: false, data: <error>}
```

**5. Process a Rent for a Specific Asset:**

To initiate a rental process for a specific asset, you can utilize the following function:

* Provide the token address and token ID of the asset.
* Specify the duration of the rent in minutes.
* Specify the chainId and signer information.

```javascript
const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";
const durationMinutes = 120;

stream.stream.processRent(tokenAddress, tokenId, durationMinutes, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

Executing this code will trigger the rental process for the specified asset. Ensure that you provide the correct token address and token ID corresponding to the asset you want to initiate the rent for. Set the desired duration of the rent in minutes. The result will indicate the success of the rental process, and you can handle it accordingly in your application.

**6. Expire a Rent for a Specific Asset:**

To expire a rent for a specific asset, you can use the following function:

* Provide the token address and token ID of the asset for which you want to expire the rent.
* Specify the chainId and signer information.

```javascript
const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";
const tokenId = "TOKEN_ID";

stream.expireRent(tokenAddress, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

By executing this code, you initiate the process to expire the rent for the specified asset. Make sure to provide the correct token address and token ID corresponding to the asset you want to expire the rent for. The result will indicate the successful expiration of the rent, and you can handle it accordingly in your application logic.

**Example Response:**

```json
{ success: true, data: }
```

```json
{ success: false, data: <error>}
```

**7. Cancel a Rent for a Specific Asset:**

To cancel a rent for a specific asset, you can use the following function:

* Provide the token address and token ID of the asset for which you want to cancel the rent.
* Specify the chainId and signer information.

<pre class="language-javascript"><code class="lang-javascript">const stream = require('streamnft-evm-test');

<strong>const tokenAddress = "TOKEN_ADDRESS";
</strong>const tokenId = "TOKEN_ID";

stream.cancelRent(tokenAddress, tokenId, chainId, signer)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
</code></pre>

By executing this code, you initiate the process to cancel the rent for the specified asset. Make sure to provide the correct token address and token ID corresponding to the asset you want to cancel the rent for. The result will indicate the successful cancellation of the rent, and you can handle it accordingly in your application logic.

**Example Response:**

```json
{ success: true, data: }
```

```json
{ success: false, data: <error>}
```

8. **Get Assets by collection**

```javascript
const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";

stream.getAssetsByCollection(tokenAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

By executing this code, you get all all assets for provided collection

**Example Response:**

```json
{ success: true, data: [
    {
      "id": 240,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "4",
      "loan_offer_index": "9",
      "state": "PRE_LOAN",
      "loan_expiry": "1708598493",
      "provider": "0x000000000000000000000000000000000009be43",
      "rate": null,
      "validity_expiry": null,
      "is_fixed": null,
      "fixed_minutes": null,
      "rent_expiry": null,
      "rentee": null,
      "private_rental": null,
      "owner_share": null,
      "whitelist": null,
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "1",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": null,
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "1200000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    },
    {
      "id": 267,
      "initializer": "0x000000000000000000000000000000000037d1f6",
      "loan_pool_index": "1",
      "loan_offer_index": "1",
      "state": "LOAN",
      "loan_expiry": "1709828808",
      "provider": "0x000000000000000000000000000000000020e8fe",
      "rate": "0",
      "validity_expiry": null,
      "is_fixed": false,
      "fixed_minutes": "0",
      "rent_expiry": "0",
      "rentee": "0x0000000000000000000000000000000000000000",
      "private_rental": null,
      "owner_share": "0",
      "whitelist": "",
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "51",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": "0",
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "10000000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    }
]}
```

```json
{ success: false, data: <error>}
```

8. **Get Assets by collection and wallet**

```javascript
const stream = require('streamnft-evm-test');

const tokenAddress = "TOKEN_ADDRESS";
const wallet = "USER_WALLET_ADDRESS";
stream.getAssetsByUserAndCollection(wallet, tokenAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

By executing this code, you get all all assets for provided collection and user<br>

**Example Response:**

```json
{ success: true, data: [
    {
      "id": 240,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "4",
      "loan_offer_index": "9",
      "state": "PRE_LOAN",
      "loan_expiry": "1708598493",
      "provider": "0x000000000000000000000000000000000009be43",
      "rate": null,
      "validity_expiry": null,
      "is_fixed": null,
      "fixed_minutes": null,
      "rent_expiry": null,
      "rentee": null,
      "private_rental": null,
      "owner_share": null,
      "whitelist": null,
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "1",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": null,
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "1200000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    },
    {
      "id": 267,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "1",
      "loan_offer_index": "1",
      "state": "LOAN",
      "loan_expiry": "1709828808",
      "provider": "0x000000000000000000000000000000000020e8fe",
      "rate": "0",
      "validity_expiry": null,
      "is_fixed": false,
      "fixed_minutes": "0",
      "rent_expiry": "0",
      "rentee": "0x0000000000000000000000000000000000000000",
      "private_rental": null,
      "owner_share": "0",
      "whitelist": "",
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "51",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": "0",
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "10000000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    }
]}
```

```json
{ success: false, data: <error>}
```

9. **Get User Asset Details:**

To retrieve the details of a specific user asset, you can use the following function:

* Specify the user's public address and the index of the user asset.
* Provide the chainId&#x20;

```javascript
const stream = require('streamnft-evm-test');

const userAddress = "USER_PUBLIC_KEY";

stream.getAssestsByUser(userAddress, chainId)
  .then((result) => {
    // Handle the result
  })
  .catch((error) => {
    // Handle the error
  });
```

**Example Response:**

```json
{ success: false, data: <error>}
```

```json
{ success: true, data: [
    {
      "id": 240,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "4",
      "loan_offer_index": "9",
      "state": "PRE_LOAN",
      "loan_expiry": "1708598493",
      "provider": "0x000000000000000000000000000000000009be43",
      "rate": null,
      "validity_expiry": null,
      "is_fixed": null,
      "fixed_minutes": null,
      "rent_expiry": null,
      "rentee": null,
      "private_rental": null,
      "owner_share": null,
      "whitelist": null,
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "1",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": null,
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "1200000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    },
    {
      "id": 267,
      "initializer": "0x000000000000000000000000000000000009be43",
      "loan_pool_index": "1",
      "loan_offer_index": "1",
      "state": "LOAN",
      "loan_expiry": "1709828808",
      "provider": "0x000000000000000000000000000000000020e8fe",
      "rate": "0",
      "validity_expiry": null,
      "is_fixed": false,
      "fixed_minutes": "0",
      "rent_expiry": "0",
      "rentee": "0x0000000000000000000000000000000000000000",
      "private_rental": null,
      "owner_share": "0",
      "whitelist": "",
      "chain_id": "296",
      "contract_address": "0xeB90f41DeAAe8D3Af051196E280ECfD2fedC293e",
      "token_address": "0x000000000000000000000000000000000020e948",
      "token_id": "51",
      "metadata_uri": "QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "metadata_link": "https://hashpack.b-cdn.net/ipfs/QmfDDKu2VhN9GMiYDdoQVZx7wkAp9gRdvJkxBMeJgHehpS",
      "name": "SIWAS by Kabila",
      "image": "https://hashpack.b-cdn.net/ipfs/QmXJqZH6NMaJh9LfLTn2SPkPVnf4LBs2RaHfrUqBnpnSrc",
      "profit": "0",
      "rental_type": null,
      "domint": null,
      "loan_expiry_utc": null,
      "rent_expiry_utc": null,
      "validity_expiry_utc": null,
      "loan_amount": "10000000000",
      "tx_hash": null,
      "version": null,
      "ERC1155_index": null,
      "index": null
    }
]}
```

\
Executing this code will fetch the details of the user asset associated with the provided user address. The result will contain information such as the asset's token address, token ID, and other relevant details pertaining to the user asset.

{% hint style="info" %}
Make sure to replace the placeholders (TOKEN\_ADDRESS, TOKEN\_ID, USER\_PUBLIC\_KEY, etc.) with the actual values specific to your use case.
{% endhint %}

These examples demonstrate how to use the SDK functions to interact with the smart contract. You can integrate them into your application logic and handle the results and errors accordingly.


# Solana

Coming Soon


# Loan

The Custom Integration provides developers with the flexibility to fully integrate our functionalities within wallets. This guide walkthrough JS based SDK calls which interact with both on-chain and streamNFT indexers.&#x20;

{% hint style="info" %}
This is required for wallets who are interesting in implementing rental/loan infrastructure within their own ecosystem.
{% endhint %}

{% hint style="info" %}
For enabling loans directly using [StreamNFT hosted application ](https://loan.streamnft.tech/)check [quick guide](broken://pages/pqjbrcSFUpmKFtVxyxVs).
{% endhint %}


# EVM


# Solana

Coming Soon


# Supported Chains

Supported Mainnet:

<table><thead><tr><th width="349">Network</th><th>Chain ID</th></tr></thead><tbody><tr><td>Skale Nebula</td><td>1482601649</td></tr><tr><td>Hedera</td><td>295</td></tr></tbody></table>

Supported Testnet:

| Network       | Chain ID   |
| ------------- | ---------- |
| Taiko Hekla   | 167009     |
| Mint          | 1687       |
| Kakarot       | 1802203764 |
| Rari          | 1918988905 |
| Kroma         | 2358       |
| Morph Holesky | 2810       |
| Ancient8      | 28122024   |
| Hedera        | 296        |
| SKALE Nebula  | 37084624   |
| Open Campus   | 656476     |
| Polygon Amoy  | 80002      |
| Bera          | 80084      |
| Base Sepolia  | 84532      |


# Step By Step Rent Tutorial

Welcome to StreamNFT's Rental Demo! Follow this guide to Unlock the true power of your NFTs

#### *Get started by Picking a chain of your choice*

#### 1. Click here to reveal drop down list of supported chains

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/z7hvGIDRQXYna3dbkF.png&#x26;x=1692&#x26;y=71&#x26;fill=318630&#x26;color=318630" alt=""><figcaption></figcaption></figure>

#### 2. Choose a Chain

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/H8bQko_IITNEAnfihR.png&#x26;x=1556&#x26;y=296&#x26;fill=318630&#x26;color=318630" alt=""><figcaption></figcaption></figure>

***

## STEP BY STEP RENT GUIDE

#### 1. Click on "Rent" to access the rental window

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/3JeyqxTO1JEll91Pvk.png&#x26;x=308&#x26;y=113&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 2. You can browse through collections

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/US6aAV9Fy1uk235akl.png&#x26;x=1793&#x26;y=251&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 3. Get started by clicking on "Connect"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/2CopbRiUSjIYZFtde7.png&#x26;x=1815&#x26;y=106&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 4. Select a Collection by clicking on the "Collection name"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/v7ziMqcxRLsOsQAZcT.png&#x26;x=411&#x26;y=400&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 5. Click on "My assets" to manage and lend NFTs

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/S1NrdqyaznSeseeeKL.png&#x26;x=772&#x26;y=189&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 6. Click on "Owned" to view assets owned by you

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/ljrcFfq7lIpIawUZcw.png&#x26;x=788&#x26;y=382&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 7. Click on "Lend" to make NFT available for rentals

![7 Upload](https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/ljrcFfq7lIpIawUZcw.png\&x=356\&y=705\&fill=16812f\&color=16812f)

#### 8. Specify the "Lend Duration"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/-MXUuGSGRzEW7M74sY.png&#x26;x=994&#x26;y=356&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 9. Specify the rent duration condition, select fixed if you want to restrict renter

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/bs-7TeF6Wt6h-zOKI7.png&#x26;x=994&#x26;y=503&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 10. Specify the "Rent price"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/6FVNicz3WjSHR_SBw9.png&#x26;x=1005&#x26;y=603&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 11. List addresses if you want to rent out privately

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/ikucxLQTNagbAVbK1v.png&#x26;x=1033&#x26;y=676&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 12. Click on Lend to confirm the transaction after defining lend conditions

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/q9SzrCGForJzzEVStT.png&#x26;x=1431&#x26;y=799&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 13. Next up, click on 'listed' to view the asset you have lent to protocol

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/Yr0_usxQsi08w1EQf4.png&#x26;x=1022&#x26;y=416&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 14. Click here to cancel listing and take asset back from protocol

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/xnyC561q1z_BKljgQO.png&#x26;x=1155&#x26;y=731&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 15. Then, click on "Cancel".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/U2eSDZgRWY5BSc6Zme.png&#x26;x=1415&#x26;y=830&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 16. Click on "Marketplace" to view rentable NFTs

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/MFWJmYSEpRI0uWG5p4.png&#x26;x=988&#x26;y=135&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 17. browse NFT and click on Rent to rent your preferred NFT

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/fH1fmapWj_o6vPasxc.png&#x26;x=915&#x26;y=659&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 18. Specify the duration for which you want to rent the asset

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/a1IuYqiRnUAw8Z-wa4.png&#x26;x=935&#x26;y=533&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 19. Click on "Rent" If rental conditions are agreed

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/6NjDPVxzASlYS03ONM.png&#x26;x=1409&#x26;y=807&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 20. Click on "My Rentals" to manage rented assets

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/14_M7OJsXs3kj_u9PW.png&#x26;x=1145&#x26;y=167&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 21. Click on "Rented" to view all rented NFTs from this collection

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/DUKXfrxri20blsOXAA.png&#x26;x=944&#x26;y=441&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 22. Click on "My Rentals" to manage my Rentals

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/GEMeRIa0ZAHmcQCump.png&#x26;x=1124&#x26;y=166&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

#### 23. You can manage your rented assets here

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/niOW5TPvw5IljX2XPu.png&#x26;x=617&#x26;y=598&#x26;fill=16812f&#x26;color=16812f" alt=""><figcaption></figcaption></figure>

***

[*This workflow was created with Supademo.*](https://app.supademo.com/demo/clu8hna5r0yjfsisn18lbstwm)


# Step By Step Loan tutorial

Welcome to StreamNFT's Loan demo!

*Get started by Picking a chain of your choice*

#### 1. Click here to reveal drop down list of supported chains

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/z7hvGIDRQXYna3dbkF.png&#x26;x=1692&#x26;y=71&#x26;fill=318630&#x26;color=318630" alt=""><figcaption></figcaption></figure>

#### 2. Choose a Chain

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/H8bQko_IITNEAnfihR.png&#x26;x=1556&#x26;y=296&#x26;fill=318630&#x26;color=318630" alt=""><figcaption></figcaption></figure>

***

#### 1. Click on "Loan" to access the Loan window

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/xUshpEz0JW9LLPEWsX.png&#x26;x=419&#x26;y=119&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 2. Get started by clicking on "Connect".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/GfCXXvD4gfRoNkbMiB.png&#x26;x=1799&#x26;y=107&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 3. Click on "Lend" to explore Liquidity pools

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/fC5U9Z-22afVl3C8bC.png&#x26;x=783&#x26;y=166&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 4. Explore collections and Choose a collection to deploy capital

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/-K6iW2nBV9MwMJcmeg.png&#x26;x=1018&#x26;y=514&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 5. Choose collection

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/Un28u_xwX-yEkEFVfQ.png&#x26;x=454&#x26;y=508&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 6. You can also explore multiple liquidity pools

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/Xck9OgPnY2Yn_b9-uZ.png&#x26;x=1624&#x26;y=534&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 7. Click on Lend to provide Liquidity

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/yHAqRJM9e2EqeKfHrb.png&#x26;x=1567&#x26;y=529&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 8. Specify Desired Loan Amount

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/dol5Q6RHkEhlFoYh9R.png&#x26;x=715&#x26;y=535&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 9. Input the number of Loans you'd like to back

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/DFeUa8_ukf6XxMmH-F.png&#x26;x=863&#x26;y=649&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 10. Confirm your choices by clicking on "Lend".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/z3TGlz1K1EjMh9Ce72.png&#x26;x=1390&#x26;y=764&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 11. Success message appears confirming transaction

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/3tIVw0DmzN-caS7Hnh.png&#x26;x=1741&#x26;y=110&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 12. Modify your Offers by clicking on "Offers".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/cU_0zKr9ukx7Nxd56n.png&#x26;x=905&#x26;y=146&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 13. Modify offers under Edit or cancel them by clicking on this popup

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/jxIk0oUC7j-b4q4cb0.png&#x26;x=1459&#x26;y=746&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 14. You can update Offer amount

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/VTRCzUmvm8-rh6PCEV.png&#x26;x=595&#x26;y=624&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 15. You can also update number of offers

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/jLvPmnORnLhKz0m3nH.png&#x26;x=596&#x26;y=643&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 16. Click on "Save" if satisfied with new Loan conditions

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/KfenAFejX_dHeQPE_J.png&#x26;x=1364&#x26;y=748&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 17. Scan multiple Pools and loan offers

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/BzUw1qt6OC-goHzTLt.png&#x26;x=1724&#x26;y=484&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 18. Browse through all offers available

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/hCoE0U4IERPvO59dK9.png&#x26;x=1669&#x26;y=523&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 19. Scan all available pools

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/0knLSD7qmx2Aqa8pKr.png&#x26;x=1058&#x26;y=557&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 20. Click on "Borrow" once liquidity pool is finalized

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/trwcDkdVrAX4WAja_l.png&#x26;x=1549&#x26;y=549&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 21. Select NFT as Collateral

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/XOyQ0enHDRXSYhB9Nf.png&#x26;x=589&#x26;y=288&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 22. Click on "Borrow Capital" if satisfied with Loan conditions

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/XOyQ0enHDRXSYhB9Nf.png&#x26;x=1325&#x26;y=821&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 23. Click on "Loans" to manage Loan active loans

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/xgxVxAII_taK8kMZga.png&#x26;x=1121&#x26;y=178&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 24. You can have a quick overview of Loan repayment conditions

<figure><img src="/files/YuTF4ZMDlUP2zmSNk4wH" alt=""><figcaption></figcaption></figure>

#### 25. Repay Capital to get NFT back, NFT returns to Lender if loan is not repaid in time

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/v-8QH-bxm1mQ6o97v3.png&#x26;x=1261&#x26;y=743&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 26. Click on "Borrow"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/ls-XhZWWXtdXfTxiq-.png&#x26;x=1013&#x26;y=167&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 27. Click on "NFT Listing to access custom Loan offer window

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/mZDaFCSBd4PjzNSa84.png&#x26;x=491&#x26;y=604&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 28. Click on "Place Offer".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/MXt6_nK7pU9L4bMANb.png&#x26;x=1530&#x26;y=485&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 29. Select NFT as collateral

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/xKmDRw0v-r-iYZ-lvA.png&#x26;x=585&#x26;y=323&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 30. Specify Desired Loan Amount

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/Ls7S_lQxkW0Cqg-VG0.png&#x26;x=615&#x26;y=550&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 31. Choose from drop-down or Specify your own interest rate

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/Q1B98dtJoWpfTTl9rQ.png&#x26;x=908&#x26;y=573&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 32. Choose from drop-down or Specify your own interest rate

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/UNgukTcsNPdf3fRzpM.png&#x26;x=1246&#x26;y=566&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 33. Click on "Borrow Offer".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/-NfSD7UlyLb4CYUH_7.png&#x26;x=1328&#x26;y=781&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 34. Success message confirms Transaction

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/cjvSSYOZ3v0j-rkwZ7.png&#x26;x=1721&#x26;y=159&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 35. Click on "Lend".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/m_4SvVL-vwGmGm0uDQ.png&#x26;x=797&#x26;y=141&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 36. Click on the drop down

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/HvryQRExbFwHFexhut.png&#x26;x=1664&#x26;y=523&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 37. Click on "NFT Listing" to access Custom Loan offer section

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/53T2K_oZQ39X9MXC5O.png&#x26;x=496&#x26;y=626&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>

#### 38. Click on "Accept" if Satisfied by custom Loan conditions

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/485iERMoUeA9hB924R.png&#x26;x=1418&#x26;y=553&#x26;fill=347e3e&#x26;color=347e3e" alt=""><figcaption></figcaption></figure>


# Step by Step Utility Tutorial

{% content-ref url="/spaces/60fGWUP51b2HhkWIrtTW/pages/AwhRBKVTHK3bgmtylfzA" %}
[Step by Step Utility Creation Tutorial](/for-users/step-by-step-utility-tutorial/step-by-step-utility-creation-tutorial)
{% endcontent-ref %}

{% content-ref url="/spaces/60fGWUP51b2HhkWIrtTW/pages/XMGcwkspSd4s1jhgbK4b" %}
[Step by step utility discover tutorial](/for-users/step-by-step-utility-tutorial/step-by-step-utility-discover-tutorial)
{% endcontent-ref %}


# Step by Step Utility Creation Tutorial

Here you can find a step by step tutorial on how to create Utility campaigns on our platform!

***

## Video tutorial ( <https://youtu.be/WW03nVceVXo> )&#x20;

#### 1. Click on “Connect wallet” to get started.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/jrfLNU4euyoou2GKQnZmx.jpg&#x26;x=2683&#x26;y=175&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 2. Go to “ Create reward” to offer tangible utilities

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/J3bc2dh0ape5CeEuH1mW1.jpg&#x26;x=1822&#x26;y=278&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 3. Specify whether you are an “NFT creator” or a “brand"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/trhz-32G7nuE8nRifT7vl.jpg&#x26;x=1901&#x26;y=628&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 4. If you’re a NFT creator, then choose your collection to target your holders

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/0_sSlVmtKtDNyfMNGszmH.jpg&#x26;x=1917&#x26;y=768&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 5. If you’re brand, then simply share your reward details and StreamNFT will auto-target

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/0_sSlVmtKtDNyfMNGszmH.jpg&#x26;x=907&#x26;y=720&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 6. Click on "Next".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/zwme6Ka2jyXEVYF7LjYQN.jpg&#x26;x=1774&#x26;y=1136&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 7. Choose collection from drop-down

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/o-N2Ttgqtq9zvc6SgaI60.jpg&#x26;x=1606&#x26;y=484&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 8. Specify your target NFT collection

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/2jzvAj9SgVdoZNTIj02L4.jpg&#x26;x=1507&#x26;y=741&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 9. Give “title” for your offering

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/gGP83HzHsmnFygK1vhZfK.jpg&#x26;x=1366&#x26;y=665&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 10. Select “industry type” for better visibility.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/gGP83HzHsmnFygK1vhZfK.jpg&#x26;x=2343&#x26;y=774&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 11. Provide a detailed description highlighting the unique value of your reward.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/gE2BTk9pxD9rDVZgGW9O1.jpg&#x26;x=1607&#x26;y=688&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 12. Upload compelling cover image that attracts participants.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/dMv1BAuXuhTyQv7jVfypQ.jpg&#x26;x=1414&#x26;y=1049&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 13. Click "Next" to Proceed

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/eAs77cakgrX0icdv0xjQc.jpg&#x26;x=2692&#x26;y=1075&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 14. Select the type of utility you want to offer.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/7uSmerxN_MsHONi1wxJc3.jpg&#x26;x=1356&#x26;y=783&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 15. Specify the number of winners, and reward value.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/E6C4dwqGtCWl4X-wu22Br.jpg&#x26;x=1374&#x26;y=776&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 16. Define reward validity conditions : Choose expiry method and details.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/pAesVtKSC4nrhzaWgcY0j.jpg&#x26;x=1164&#x26;y=720&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 17. Personalize the reward message with instructions on how to claim reward

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/E6C4dwqGtCWl4X-wu22Br.jpg&#x26;x=1733&#x26;y=1127&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 18. Click on "Next".

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/BqTaUGb4SgTO4ST3Ofbex.jpg&#x26;x=2701&#x26;y=1085&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 19. Choose between a “lucky draw” or “instant reward” for reward distribution.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/gZKpmrSc_iCf-CKs8h3CE.jpg&#x26;x=1650&#x26;y=754&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 20. Click “Next”.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/HajRaXOfWOLuHZvmLxTyE.jpg&#x26;x=2666&#x26;y=1108&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 21. ( Optional ) Add multiple tasks for users to earn rewards

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/P9JkNdEANz1RmlTU8Yz2K.jpg&#x26;x=836&#x26;y=505&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 22. Provide relevant information for event tracking and verification.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/CyXddW2W6LxcD4ULjY985.jpg&#x26;x=1222&#x26;y=918&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 23. Mark tasks as mandatory and assign point values to prioritize them.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/XM5ZtzCDGfcov5-048Gwe.jpg&#x26;x=1795&#x26;y=642&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>

#### 24. Click on “Submit” once you are satisfied with the campaign details to make it live.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/ZbiwC0dtraiwZKTWIRqEQ.jpg&#x26;x=2626&#x26;y=1069&#x26;fill=117427&#x26;color=117427" alt=""><figcaption></figcaption></figure>


# Step by step utility discover tutorial

Welcome to StreamNFT's Utility Discover tutorial ! Here you can find a step by step guide to discover available benefits on your NFTs and explore our rewards marketplace !

## Video tutorial ( <https://youtu.be/jvpe9o5lVJ4>)

***

#### 1. Click on “Connect wallet” to get started.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/fv1VmPA0GvciT7fxjg3-n.jpg&#x26;x=2705&#x26;y=187&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 2. Go to “Discover rewards” section to find all NFT collections with rewards.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/0B4MTSoRVEVdJv1K-Sp4M.jpg&#x26;x=1067&#x26;y=283&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 3. Select the NFT collection and click on “Rewards Available.”

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/_AYJztUNpIdylxHK692TM.jpg&#x26;x=683&#x26;y=1006&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 4. Review the individual NFT rewards, including those specific to certain traits.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/MAzHCAVu8tRVntQy-yuIb.jpg&#x26;x=715&#x26;y=536&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 5. Click on “Redeem” to interact with the NFT utility.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/r12BLPXMqml8zMJ9f9Cir.jpg&#x26;x=2445&#x26;y=569&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 6. Rewards can either be instantly claimable or may require you to complete tasks.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/r12BLPXMqml8zMJ9f9Cir.jpg&#x26;x=2445&#x26;y=569&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 7. When claiming, you must “Link” the reward to your NFT to ensure it transfers with the NFT’s ownership.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/lTj9AshOc92i98E4HxPXN.jpg&#x26;x=1696&#x26;y=680&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 8. Once redeemed, the reward is consumed and cannot be transferred to a new owner

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/i7EZlA_GhMSy-2HRJXPDJ.jpg&#x26;x=1739&#x26;y=956&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 9. Click on Verify to register completion of tasks

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/oc770NlzOn544VAHR7Ps_.jpg&#x26;x=2351&#x26;y=927&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 10. Click on "Claim"

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/oc770NlzOn544VAHR7Ps_.jpg&#x26;x=1220&#x26;y=1108&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 11. For raffles, wait until the claim date to find out the winners, or claim instantly if available.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/NlyVkEbh3fQSwHGDWK5Js.jpg&#x26;x=1967&#x26;y=838&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 12. Click on “Rewards Marketplace” to view all available rewards on the platform.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/NlyVkEbh3fQSwHGDWK5Js.jpg&#x26;x=1459&#x26;y=304&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

#### 13. View all available utilities and select a specific utility to claim the rewards.

<figure><img src="https://d16ev9qffqt5qm.cloudfront.net/?s3_key=clk6wvkynlpldzgx6266esdyw/D2fVRwtw_6iyK1004QGyt.jpg&#x26;x=1811&#x26;y=945&#x26;fill=1b6b1a&#x26;color=1b6b1a" alt=""><figcaption></figcaption></figure>

***


# Hedera Token Association

1. **Locate the "Associate NFT" Button**:

* Go to the NFTs tab in your wallet interface.

<figure><img src="/files/VAalqYu5SgWsz0GvHpzI" alt=""><figcaption></figcaption></figure>

* Click on the "Associate NFT" button.

2. **Input Token Details**:

* A dialogue box will appear.

<figure><img src="/files/iVwQtMKqyqlYN4D0kbqC" alt=""><figcaption></figcaption></figure>

* Enter the Token ID.

3. **Associate the Token**:

* Once the details are filled, click on the "Associate" button.

<figure><img src="/files/twvWqYSprvS2Hv3np7Ov" alt=""><figcaption></figcaption></figure>

* A fee of $0.05USD will be charged by the Hedera Network for this association.
* Upon successful transaction, the token will now be associated with your account and will able to receive the token.


# Privacy Policy

Thanks for entrusting StreamNFT with your documentation, your projects, and your personal information. Holding onto your private information is a serious responsibility, and we want you to know how we're handling it.

## What information StreamNFT collects and why

### Information from website browsers

If you're **just browsing the website**, we collect the same basic information that most websites collect. We use common internet technologies, such as cookies and web server logs. This is stuff we collect from everybody, whether they have an account or not.

The information we collect about all visitors to our website includes the visitor’s browser type, language preference, referring site, additional websites requested, and the date and time of each visitor request. We also collect potentially personally identifying information like Internet Protocol (IP) addresses.

#### Why do we collect this

We collect this information to better understand how our website visitors use StreamNFT and to monitor and protect the security of the website.

### Information from users with accounts

We only collect the information necessary to provide our services effectively. When you use our website or services, we may collect the following information:

* **Wallet Address:** We collect your wallet address to enable transactions and interactions within our platform.
* **Usage Data:** We may collect information about how you use our website and services, such as pages visited, features accessed, and interactions made. This information helps us improve our services and user experience.
* **Email**: While providing your email address is not mandatory, we may capture it to offer an enhanced user experience and send newsletter updates. For instance, when users opt to receive notifications via email, we utilize this information to send important updates regarding their active loans. For example, users who opt-in to receive notifications may receive repayment reminders 24 hours before their loan expiry to ensure they are informed and can take necessary actions.
* We use the collected information for the following purposes:
  * **Provision of Services:** To grant you access to our NFTFi platform and facilitate decentralized financial transactions securely and efficiently.
  * **Service Improvement:** We analyze usage data to identify areas for enhancement and refinement of our platform's features and functionality, ensuring a seamless and user-friendly experience for our users.
  * **Communication:** To communicate with you regarding urgent notifications, updates, and changes to our services, or to respond to inquiries and requests.
  * **Security Measures:** Your security is paramount to us. We employ the information collected to safeguard the integrity of our platform, detect and prevent fraudulent activities, and protect against unauthorized access or misuse of your data.

### Data Security

We are committed to ensuring the security and confidentiality of your information. We implement industry-standard security measures to protect your data against unauthorized access, alteration, disclosure, or destruction.

In the event of a data breach that affects your User Personal Information, we will act promptly to mitigate the impact of a breach and notify any affected users.

Transmission of data on StreamNFT is encrypted using HTTPS, and SSL/TLS. Data are stored and encrypted by trusted third-party cloud providers (such as Google Cloud or Amazon AWS).

No method of transmission, or method of electronic storage, is 100% secure. Therefore, we cannot guarantee its absolute security.

### Third-Party Services

\
We may integrate third-party services or utilize external partnerships to enhance the functionality of our NFTFi platform. While doing so, we ensure that these third-party services adhere to strict privacy standards and maintain the confidentiality of your information.

### Data Retention

We retain your information only for as long as necessary to fulfill the purposes outlined in this Privacy Policy or as required by applicable laws and regulations.

### Children's Privacy

Our services are not intended for individuals under the age of 18, and we do not knowingly collect personal information from minors. If we become aware of any such information being collected inadvertently, we will take immediate steps to remove it from our records.

### How we, and others, communicate with you

We will use your email address to communicate with you if you've said that's okay, **and only for the reasons you’ve said that’s okay**. For example, if you contact our Support team with a request, we will respond to you via email. You have a lot of control over how your email address is used and shared on and through StreamNFT.&#x20;

Depending on your email settings, StreamNFT may occasionally send notification emails about changes in a space you’re contributing to, new features, requests for feedback, important policy changes, or offer customer support. We also send marketing emails, but only with your consent, if you opt into our list. There's an unsubscribe link located at the bottom of each of the marketing emails we send you. Please note that you can not opt out of receiving important communications from us, such as emails from our Support team or system emails, but you can configure your notifications settings in your profile.

Our emails might contain a pixel tag, which is a small, clear image that can tell us whether or not you have opened an email and what your IP address is. We use this pixel tag to make our email more effective for you and to make sure we’re not sending you unwanted emails.

### Changes to our Privacy Statement

We reserve the right to update or modify this Privacy Policy periodically. Any changes will be reflected on this page, and your continued use of our NFTFi platform after such changes implies your acceptance of the revised Privacy Policy.

### Contacting StreamNFT

If you have any questions, concerns, or feedback regarding this Privacy Policy or our data practices, please do not hesitate to contact us at <info@streamnft.tech>.

By using our NFTFi platform, you acknowledge and consent to the terms of this Privacy Policy. Thank you for entrusting us with your privacy.

##


# Terms of Service

**Terms of Service**

Welcome to StreamNFT ("we", "us", or "our"). These Terms of Service govern your use of our NFT  (NFTFi) platform. By accessing or using our platform, you agree to comply with these terms and conditions.

**1. Acceptance of Terms**

By using our NFTFi platform, you agree to be bound by these Terms of Service and all applicable laws and regulations. If you do not agree with any part of these terms, you may not access or use our platform.

**2. Use of Platform**

You agree to use our NFTFi platform solely for lawful purposes and in accordance with these Terms of Service. You may not engage in any activity that interferes with or disrupts the operation of the platform or infringes upon the rights of others.

**3. Account Registration**

To access certain features of our platform, you may connect your cryptocurrency wallet to get started immediately. By connecting your wallet, you agree to comply with these Terms of Service and all applicable laws and regulations. You acknowledge that your wallet address serves as your unique identifier on our platform, and you are solely responsible for maintaining the security of your wallet and any associated private keys.

**4. User Conduct**

You agree to use our platform responsibly and in a manner consistent with all applicable laws and regulations. While we do not require traditional account registration, you must still adhere to the following guidelines:

* Respect the rights of others, including intellectual property rights.
* Refrain from uploading or transmitting any content that is unlawful, harmful, or offensive.
* Avoid attempting to gain unauthorized access to our platform or the accounts of other users.
* Do not engage in any conduct that could damage, disable, or impair the operation of our platform.

**5. Transactions**

Our NFTFi platform facilitates decentralized financial transactions. You acknowledge and agree that all transactions conducted through our platform are final and irreversible. We are not responsible for any loss or damage resulting from your use of our platform or participation in any transactions.

**6. Intellectual Property**

All content and materials available on our platform, including but not limited to text, graphics, logos, images, and software, are the property of StreamNFT or its licensors and are protected by copyright and other intellectual property laws. You may not use, reproduce, or distribute any content from our platform without prior written consent.

**7. Limitation of Liability**

To the fullest extent permitted by law, we disclaim any liability for any direct, indirect, incidental, consequential, or punitive damages arising out of your use of our platform or any transactions conducted through our platform.

**8. Changes to Terms**

We reserve the right to update or modify these Terms of Service at any time without prior notice. Any changes will be effective immediately upon posting on this page. Your continued use of our platform after any such changes constitutes your acceptance of the revised terms.

**9. Termination**

We reserve the right to terminate or suspend your access to our platform at any time for any reason without prior notice. Upon termination, you must cease all use of our platform and delete any content or materials obtained from the platform.

**10. Governing Law**

These Terms of Service are governed by and construed in accordance with the laws of Saint Vincent and the Grenadines, without regard to its conflict of laws principles.

**11. Contact Us**

If you have any questions or concerns about these Terms of Service, please contact us at <info@streamnft.tech>.

By using our NFTFi platform, you acknowledge and agree to these Terms of Service. Thank you for choosing StreamNFT.


