Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Mirage

Index

Constructors

Properties

NFTStorageAPIKey: string
_provider?: default
_treasuryMint: PublicKey = WRAPPED_SOL_MINT
auctionHouse?: PublicKey
auctionHouseAuthority: PublicKey
connection: Connection
metaplex: Metaplex
mintConfig: undefined | { mintRoyalties: number; seller_fee_basis_points: number }
program?: Program<AuctionHouseIDL>
wallet: Wallet

Accessors

  • get clientIsOwner(): boolean
  • Determines whether the client is the owner of the auctionhouse

    Returns boolean

Methods

  • buyToken(mint: string, _buyerPrice: number): Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>
  • Purchases an NFT that has been listed on sale

    Parameters

    • mint: string

      NFT mint address to be bought

    • _buyerPrice: number

      price at which NFT will be bought. This MUST match the selling price of the NFT

    Returns Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>

  • cancelListing(mint: string, currentListingPrice: number, __DANGEROUSLY_INSET_SELLER__?: string): Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>
  • Cancels a listing for sell or buy instructions for an NFT

    Parameters

    • mint: string

      NFT mint address whose listing is to be cancelled

    • currentListingPrice: number

      price at which NFT was listed

    • Optional __DANGEROUSLY_INSET_SELLER__: string

    Returns Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>

  • createBuyTransaction(mint: PublicKey, listingPrice: number, buyerPublicKey: PublicKey, connection?: Connection): Promise<readonly [Transaction, PublicKey, Keypair[]]>
  • Creates Buy transaction Object

    Parameters

    • mint: PublicKey
    • listingPrice: number
    • buyerPublicKey: PublicKey
    • connection: Connection = ...

    Returns Promise<readonly [Transaction, PublicKey, Keypair[]]>

  • createCancelListingTransaction(mint: PublicKey, currentListingPrice: number, sellerPublicKey: PublicKey, auctionHouseAuthority?: PublicKey, connection?: Connection, __DANGEROUSLY_INSET_SELLER__?: string): Promise<readonly [Transaction, PublicKey]>
  • Creates Cancel Listing transaction Object

    Parameters

    • mint: PublicKey
    • currentListingPrice: number
    • sellerPublicKey: PublicKey
    • auctionHouseAuthority: PublicKey = ...
    • connection: Connection = ...
    • Optional __DANGEROUSLY_INSET_SELLER__: string

    Returns Promise<readonly [Transaction, PublicKey]>

  • createCreateMarketplaceTransaction(auctionHouseAuthority: PublicKey, sellerFeeBasisPoints: number, treasuryMint?: PublicKey, feeWithdrawalDestination?: PublicKey, treasuryWithdrawalDestination?: PublicKey, requiresSignOff?: boolean, canChangeSalePrice?: boolean, storeFrontUrl?: string, feePayer?: PublicKey): Promise<Transaction>
  • Parameters

    • auctionHouseAuthority: PublicKey
    • sellerFeeBasisPoints: number
    • Optional treasuryMint: PublicKey
    • Optional feeWithdrawalDestination: PublicKey
    • Optional treasuryWithdrawalDestination: PublicKey
    • Optional requiresSignOff: boolean
    • Optional canChangeSalePrice: boolean
    • Optional storeFrontUrl: string
    • Optional feePayer: PublicKey

    Returns Promise<Transaction>

  • createListTransaction(mint: PublicKey, listingPrice: number, sellerPublicKey: PublicKey): Promise<readonly [Transaction, PublicKey]>
  • Create listing transaction

    Parameters

    • mint: PublicKey
    • listingPrice: number
    • sellerPublicKey: PublicKey

    Returns Promise<readonly [Transaction, PublicKey]>

  • createMarketplace(options: CreateMarketplaceActionOptions): Promise<(string | RpcResponseAndContext<SignatureResult>)[]>
  • Creates a new marketplace instance for the user.

    Parameters

    • options: CreateMarketplaceActionOptions

    Returns Promise<(string | RpcResponseAndContext<SignatureResult>)[]>

  • createTransferTransaction(mint: PublicKey, recipient: PublicKey, holderPublicKey: PublicKey, auctionHouseAuthority?: PublicKey, connection?: Connection, __DANGEROUSLY_INSET_SELLER__?: string): Promise<Transaction>
  • Creates Transfer transaction Object

    Parameters

    • mint: PublicKey
    • recipient: PublicKey
    • holderPublicKey: PublicKey
    • auctionHouseAuthority: PublicKey = ...
    • connection: Connection = ...
    • Optional __DANGEROUSLY_INSET_SELLER__: string

    Returns Promise<Transaction>

  • createUpdateListingTransaction(mint: PublicKey, currentListingPrice: number, newListingPrice: number, sellerPublicKey: PublicKey, auctionHouseAuthority?: PublicKey, connection?: Connection): Promise<readonly [Transaction, PublicKey]>
  • Creates Update Listing transaction Object

    Parameters

    • mint: PublicKey
    • currentListingPrice: number
    • newListingPrice: number
    • sellerPublicKey: PublicKey
    • auctionHouseAuthority: PublicKey = ...
    • connection: Connection = ...

    Returns Promise<readonly [Transaction, PublicKey]>

  • createUpdateMarketplaceTransaction(authority: PublicKey, sellerFeeBasisPoints: number, newAuthority?: PublicKey, treasuryMint?: PublicKey, feeWithdrawalDestination?: PublicKey, treasuryWithdrawalDestination?: PublicKey, requiresSignOff?: boolean, canChangeSalePrice?: boolean, storeFrontUrl?: string, feePayer?: PublicKey): Promise<Transaction>
  • Parameters

    • authority: PublicKey
    • sellerFeeBasisPoints: number
    • Optional newAuthority: PublicKey
    • Optional treasuryMint: PublicKey
    • Optional feeWithdrawalDestination: PublicKey
    • Optional treasuryWithdrawalDestination: PublicKey
    • Optional requiresSignOff: boolean
    • Optional canChangeSalePrice: boolean
    • Optional storeFrontUrl: string
    • Optional feePayer: PublicKey

    Returns Promise<Transaction>

  • fetchAuctionHouse(auctionHouse: PublicKey): Promise<{ auctionHouseFeeAccount: PublicKey; auctionHouseTreasury: PublicKey; authority: PublicKey; bump: number; canChangeSalePrice: boolean; creator: PublicKey; feeAmount: number; feePayerBump: number; feeWithdrawalDestination: PublicKey; requiresSignOff: boolean; sellerFeeBasisPoints: number; treasuryAmount: number; treasuryBump: number; treasuryMint: PublicKey; treasuryWithdrawalDestination: PublicKey }>
  • Fetches an auctionHouse object

    Parameters

    • auctionHouse: PublicKey

    Returns Promise<{ auctionHouseFeeAccount: PublicKey; auctionHouseTreasury: PublicKey; authority: PublicKey; bump: number; canChangeSalePrice: boolean; creator: PublicKey; feeAmount: number; feePayerBump: number; feeWithdrawalDestination: PublicKey; requiresSignOff: boolean; sellerFeeBasisPoints: number; treasuryAmount: number; treasuryBump: number; treasuryMint: PublicKey; treasuryWithdrawalDestination: PublicKey }>

  • getAuctionHouseAddress(treasuryMint?: PublicKey): Promise<[PublicKey, number]>
  • Get the auction house addresses by the owner

    Parameters

    • treasuryMint: PublicKey = ...

    Returns Promise<[PublicKey, number]>

  • getNft(mintKey: PublicKey): Promise<Nft>
  • Get single NFT by mint

    Parameters

    • mintKey: PublicKey

    Returns Promise<Nft>

  • getNftOwner(mint: string | PublicKey): Promise<readonly [string, PublicKey, Buffer | ParsedAccountData]>
  • Gets the owner of an NFT

    Parameters

    • mint: string | PublicKey

    Returns Promise<readonly [string, PublicKey, Buffer | ParsedAccountData]>

  • getProvider(commitment?: Commitment): Promise<default>
  • Loads provider instance

    Parameters

    • commitment: Commitment = 'processed'

    Returns Promise<default>

  • getTokenTransactions(mint: string | PublicKey, auctionHouseAddress?: string | PublicKey): Promise<(undefined | TransactionReceipt)[]>
  • Get token transactions

    Parameters

    • mint: string | PublicKey
    • auctionHouseAddress: string | PublicKey = ...

    Returns Promise<(undefined | TransactionReceipt)[]>

  • getUserNfts(publicKey: PublicKey): Promise<Nft[]>
  • Get user's NFTs

    Parameters

    • publicKey: PublicKey

    Returns Promise<Nft[]>

  • listToken(mint: string, _listingPrice: number): Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>
  • Lists an NFT for sale.

    Parameters

    • mint: string

      NFT mint address to be sold

    • _listingPrice: number

      price at which NFT will be sold

    Returns Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>

  • loadAuctionHouseProgram(): Promise<Program<AuctionHouseIDL>>
  • Loads auctionhouse program

    Returns Promise<Program<AuctionHouseIDL>>

  • mintNft(metadata: MetadataObject, metadataLink?: string, file?: File): Promise<Nft>
  • Mints a new NFT on Solana. There are 2 approaches to using this function.

    1. If you already have your files uploaded to the blockchain, then there is no need to perform a new upload. Simply provide the necessary metadata URI / tokenURI.
    2. If you choose to provide a file/image/video for your NFT, then it will be uploaded to a decentralized storage service before minting.

    Parameters

    Returns Promise<Nft>

  • setup(): Promise<void>
  • Returns Promise<void>

  • signTransaction(txt: Transaction, wallet: Wallet): Promise<Buffer>
  • Signs a transaction object

    Parameters

    • txt: Transaction
    • wallet: Wallet

    Returns Promise<Buffer>

  • transferNft(mint: string | PublicKey, recipient: string | PublicKey): Promise<[RpcResponseAndContext<SignatureResult>, TransactionSignature]>
  • Sends an NFT to a new user.

    Parameters

    • mint: string | PublicKey

      NFT mint address to transfer to a new user

    • recipient: string | PublicKey

      Recipient's publicKey

    Returns Promise<[RpcResponseAndContext<SignatureResult>, TransactionSignature]>

  • updateListing(mint: string, currentListingPrice: number, newListingPrice: number): Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>
  • Updates a current listing

    Parameters

    • mint: string
    • currentListingPrice: number
    • newListingPrice: number

    Returns Promise<readonly [RpcResponseAndContext<any>, PublicKey, TransactionSignature]>

  • updateMarketplace(options: UpdateMarketplaceOptions): Promise<(string | RpcResponseAndContext<SignatureResult>)[]>
  • Parameters

    • options: UpdateMarketplaceOptions

    Returns Promise<(string | RpcResponseAndContext<SignatureResult>)[]>

  • getTokenAmount(anchorProgram: Program<AuctionHouseIDL>, account: PublicKey, mint: PublicKey): Promise<number>
  • Parameters

    • anchorProgram: Program<AuctionHouseIDL>
    • account: PublicKey
    • mint: PublicKey

    Returns Promise<number>

Generated using TypeDoc