Solana

SDK optional parameters:

truefalse

secretKey

sign using secret key

sign using wallet adapter

raw

return raw transaction

execute transaction on-chain

Initialize

Initializes NFT rental

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)
)

[Process]

Processes NFT rental

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)
) 

[Cancel]

Cancels the nft rental

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

[Expire]

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

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

Last updated