Class NiftoryClient

Hierarchy

Properties

Accessors

  • get isReady(): boolean
  • Checks if token or client secret has been initialized yet

    Returns boolean

Methods - App

  • Adds a credential to an app

    Parameters

    Returns Promise<Keys>

    The added credential

  • Creates App

    Parameters

    Returns Promise<App>

    The App created

  • Deletes a credential

    Parameters

    • params: Exact<{
          clientId: string;
      }>

    Returns Promise<Keys>

    The deleted credential, if any

  • Gets app by its ID

    Parameters

    • id: string

      Id of the app to fetch

    Returns Promise<App>

    The App

  • Gets the current app

    Returns Promise<App>

    The App

  • Updates a credential

    Parameters

    Returns Promise<Keys>

    The added credential

Methods - Blockchain

  • Approves a custom transaction to be executed on the blockchain. Can only be used by a niftory admin.

    Parameters

    • id: string

      ID of the custom transaction to approve

    Returns Promise<CustomTransaction>

    the CustomTransaction approved

  • Creates a custom transaction to be executed on the blockchain. This needs to be approved by a Niftory admin before it can be executed.

    Parameters

    Returns Promise<CustomTransaction>

    the CustomTransaction created

  • deletes a custom Transaction from the database, This won't delete the transaction from the blockchain. Can only be used by an app admin

    Parameters

    • id: string

      ID of the custom transaction to delete

    Returns Promise<CustomTransaction>

    the CustomTransaction deleted

  • executes a custom transaction on the blockchain

    Parameters

    • params: Exact<{
          address?: string;
          appId?: string;
          args?: any;
          name?: string;
          transaction: string;
          transactionId?: string;
          userId?: string;
          walletId?: string;
      }>

    Returns Promise<BlockchainTransaction>

  • fetches the custom transaction to be executed on the blockchain

    Parameters

    • id: string

      ID of the custom transaction

    Returns Promise<CustomTransaction>

    the CustomTransaction

  • fetches the custom transactions to be executed on the blockchain

    Parameters

    • params: Exact<{
          appId?: string;
          cursor?: string;
          maxResults?: any;
          search?: string;
      }>

    Returns Promise<CustomTransactionList>

    the CustomTransactionList

Methods - Contract

  • Deploys the contract of current app

    Parameters

    • params: Exact<{
          appId: string;
          blockchain: Blockchain;
          name: string;
      }>

    Returns Promise<Contract>

    the Contract deployed

  • Gets the contract belonging to current app

    Parameters

    • Optional appId: string

      the if of the app you want to get the contract for

    Returns Promise<Contract>

    the Contract

Methods - DapperWallet

  • Initiates checkout with Dapper Wallet of specified NFTModels, and returns a signed transaction to complete checkout with. Flow blockchain only.

    Parameters

    • params: Exact<{
          address?: string;
          expiry?: any;
          nftModelId: string;
          price?: any;
          userId?: string;
          walletId?: string;
      }>

    Returns Promise<CheckoutWithDapperWalletResponse>

    CheckoutWithDapperWalletResponse

  • Marks the checkout with Dapper Wallet as complete, and updates the NFT as belonging to specified wallet. Called after checkoutWithDapperWallet once purchase is completed.

    Parameters

    • params: Exact<{
          nftDatabaseId?: string;
          transactionId: string;
      }>

    Returns Promise<Nft>

    the CompleteCheckoutWithDapperWalletMutation

  • Signs a transaction for Dapper Wallet.

    Parameters

    • params: Exact<{
          transaction?: string;
      }>

    Returns Promise<string>

    signed signature

Methods - File

  • Gets the Niftory Wallet of the currently signed-in user

    Parameters

    • params: Exact<{
          appId?: string;
          description?: string;
          name: string;
          options?: CreateFileOptionsInput;
      }>

    Returns Promise<File>

    the created file

  • Gets a file by ID using the Niftory API.

    Parameters

    • id: string

      The ID of the file to retrieve

    Returns Promise<File>

    the file

Methods - Invoice

  • Gets the list of invoices for your app.

    Parameters

    • params: Exact<{
          appId?: string;
          cursor?: string;
          filter?: InvoicesFilterInput;
          maxResults?: any;
      }>

    Returns Promise<InvoiceList>

    the {InvoiceList}

Methods - Marketplace

  • Marks the marketplace listing as cancelled

    Parameters

    • params: Exact<{
          id: string;
          transactionId: string;
      }>

    Returns Promise<MarketplaceListing>

    the MarketplaceListing

  • Marks the marketplace listing as completed. This should be caleld after listing transactions is sealed with its trasanctionhash and nftId

    Parameters

    • params: Exact<{
          nftId: string;
          transactionId: string;
      }>

    Returns Promise<MarketplaceListing>

    the MarketplaceListing

  • Transfers the NFT in the marketplace listing to a new owner

    Parameters

    • params: Exact<{
          id: string;
          transactionId: string;
      }>

    Returns Promise<MarketplaceListing>

    the MarketplaceListing

  • Fetches a Marketplace listing from its ID

    Parameters

    • id: string

      ID of the listing

    Returns Promise<MarketplaceListing>

    the MarketplaceListing

Methods - NFTListing

  • Creates an NFT listing

    Parameters

    Returns Promise<NftListing>

    the NFTListing created

  • Fetches an NFT listing

    Parameters

    • id: string

      ID of the listing

    Returns Promise<NftListing>

    the NFTListing

  • Reserves an NFT listing

    Parameters

    • id: string

      ID of the listing

    Returns Promise<Invoice>

    the Invoice of the reserve

  • Updates an existing NFTListing.

    Parameters

    Returns Promise<NftListing>

    the updated NFTSet

Methods - Nft

  • Gets an NFT by ID using the Niftory API.

    Parameters

    • id: string

      The ID of the NFT to retrieve

    Returns Promise<Nft>

    the NFT

  • Gets NFTs associated with the current AppUser context, including those that are transferring or failed to transfer. Read more here.

    Parameters

    Returns Promise<NftList>

    The list of NFTs

  • Gets NFTs associated with the current wallet, including those that are transferring or failed to transfer. Read more here.

    Parameters

    Returns Promise<NftList>

    The list of NFTs

  • Initiates the transfer of an NFT to the currently-logged in AppUser. The NFT is reserved for the user in database, and you can use the NFT.status field to check on the transfer progress.

    Parameters

    • params: Exact<{
          address?: string;
          appId?: string;
          force?: boolean;
          nftId?: string;
          nftModelId?: string;
          userId?: string;
          walletId?: string;
      }>

    Returns Promise<Nft>

    the NFT which was transferred

  • Creates an NFTContent object containing pre-signed URLs that can then be used to upload a file and poster. The primary file will automatically be uploaded to IPFS once it's been uploaded to the pre-signed URL. Each returned File has a 'state' property to track the upload.

    Parameters

    • params: Exact<{
          contentType?: string;
          description?: string;
          name?: string;
          posterContentType?: string;
      }>

    Returns Promise<NftContent>

    the {NftContent}

  • Withdraws an NFT from a Niftory Custodial Wallet to an external wallet address.

    Parameters

    • params: Exact<{
          appId?: string;
          id: string;
          niftoryWalletAddress?: string;
          receiverAddress: string;
      }>

    Returns Promise<Nft>

    the NFT which was withdrawn

Methods - NftListing

  • Deletes an existing NFTListing

    Parameters

    • id: string

      ID of the NFTListing to delete

    Returns Promise<NftListing>

    the deleted NFTListing

  • Deletes an existing NFTSet. This operation will only be perfomed if no NFTs have been minted from this NFTSet

    Parameters

    • id: string

      ID of the NFTSet to delete

    Returns Promise<NftSet>

    the deleted NFTSet

Methods - NftModel

  • Creates a new NFTModel using the Niftory API

    Parameters

    Returns Promise<NftModel>

    the newly created NFTModel

  • Deletes an existing NFTModel. This operation will only be perfomed if no NFTs have been minted from this NFTModel

    Parameters

    • id: string

      ID of the NFTModel to delete

    Returns Promise<NftModel>

    the deleted NFTModel

  • Gets an NFT Model by ID using the Niftory API.

    Parameters

    • id: string

      The ID of the NFT Model to retrieve

    Returns Promise<NftModel>

    the NFT Model

  • Gets an NFT Model by ID using the Niftory API.

    Parameters

    Returns Promise<NftModelList>

    the NFT Model

  • Mints an NFT model using the API

    Parameters

    • params: Exact<{
          appId?: string;
          nftModelId: string;
          quantity?: any;
      }>

    Returns Promise<NftModel>

    the NFTModel which was minted

  • Updates an existing NFTModel. Note that if this NFTModel has already been used to mint an NFT, the update operation will fail for any properties that affect the blockchain (such as 'quantity', 'title', 'metadata', etc.), whereas updating 'attributes' will succeed.

    Parameters

    Returns Promise<NftModel>

    the updated NFTModel

Methods - NftSet

  • Gets an NFT Model by ID using the Niftory API.

    Parameters

    Returns Promise<NftSetList>

    the NFT Set

  • Updates an existing NftSet.

    Parameters

    Returns Promise<NftSet>

    the updated NftSet

Methods - Organization

Methods - Set

  • Creates a new set using the Niftory API

    Parameters

    Returns Promise<NftSet>

    the newly created set

  • Gets a set by ID using the Niftory API

    Parameters

    • id: string

      the ID of the set to retrieve

    Returns Promise<NftSet>

    the set

  • Gets a list of sets using the Niftory API

    Parameters

    Returns Promise<NftSet[]>

    the list of sets

Methods - User

  • Gets the current admin user using the Niftory API

    Returns Promise<AdminUser>

    the current admin user

  • Fetches the current app user

    Returns Promise<AppUser>

    the AppUser

Methods - Wallet

  • Creates a new Niftory Wallet using the Niftory API

    Parameters

    • Optional args: Exact<{
          appId?: string;
          userId?: string;
      }>

    Returns Promise<Wallet>

    the newly created Niftory Wallet

  • Parameters

    • id: string

      The ID of the Niftory Wallet to retrieve

    Returns Promise<Wallet>

    the Niftory Wallet

  • Gets the primary wallet of the current user

    Returns Promise<Wallet>

    the Wallet

  • Parameters

    Returns Promise<WalletList>

    all Wallets for the current app

  • Marks a Wallet as ready, indicating that the wallet is ready to receive NFTs from the app's Contract. The wallet must be verified before this succeeds. Read more here.

    Parameters

    • address: string

      The address of the wallet

    Returns Promise<Wallet>

  • Registers a Wallet, associating it with the currently signed-in AppUser if specified. Read more here.

    Parameters

    • address: string

      The address of the wallet

    Returns Promise<Wallet>

  • Sets the primary Wallet for the currently signed in user.

    Parameters

    • params: Exact<{
          address?: string;
          walletId?: string;
      }>

    Returns Promise<Wallet>

  • Signs a transaction for Niftory Wallet.

    Parameters

    • params: Exact<{
          address?: string;
          appId?: string;
          transaction: string;
          userId?: string;
          walletId?: string;
      }>

    Returns Promise<string>

    signed signature

  • Verifies a Wallet to the currently signed-in user. If the signed verification code fails to decode with the wallet's public key or doesn't match the wallet's verification code, the request will fail. Read more here.

    Parameters

    • params: Exact<{
          address: string;
          signedVerificationCode: any;
      }>

    Returns Promise<Wallet>

Generated using TypeDoc