Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@matrix-labs/matrix-storefront-sdk

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matrix-labs/matrix-storefront-sdk

`yarn add @matrix-labs/matrix-storefront-sdk`

  • 0.0.4
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by600%
Maintainers
2
Weekly downloads
 
Created
Source

Install

yarn add @matrix-labs/matrix-storefront-sdk


    /**
     * first step 
     *
     * @async
     * @param fcl:  import * as fcl from "@onflow/fcl" 
     * @param env:  import FlowEnv from "@matrix-labs/matrix-marketplace-nft-sdk"
     * @param config:   optional
         export interface IBindConfigs {
            fungibleTokenAddress?:string;
            fusdAddress?:string;
            flowTokenAddress?:string;
            nftStorefront?:string;
            nonFungibleTokenAddress?:string;
        }
     * @example  import * as fcl from "@onflow/fcl"; const client = new MatrixMarketplaceNFTClient();  client.bindFcl(fcl, FlowEnv.flowTestnet);
     */
    bindFcl(fcl: any, env: FlowEnv, config?: IBindConfigs): Promise<void>;
    
    /**
     * setup for fcl
     * @async
     * @param key:  fcl config, keyword must start with '0x'
     */
    setupFcl(key: string, value: string): Promise<void>;
    
    /**
     * before createList or removeList
     * @async
     * @param address:  account's address
     */
    checkStorefront(address: string): Promise<boolean>
    
    /**
     * if checkStorefront return false
     * @async
     */
    initStorefront(): Promise<string>;
    
    /**
     * @async
     * @param supportedNFTName:  NFT collection name
     * @param supportedNFTAddress:  NFT collection contract address
     * @param royaltyReceivers:  [royaltyReceivers addresses]
     * @param royaltyMount:  [mounts]
     * @param nftId:  import * as fcl from "@onflow/fcl"
     * @param price:  import * as fcl from "@onflow/fcl"
     * @example  createList("MatrixMarketplaceNFT", "0x7f3812b53dd4de20", 3, 3.14)
     */
    createList(supportedNFTName: string, supportedNFTAddress: string, royaltyReceivers: [string],  royaltyMount: [string], nftId: number, price: string): Promise<string>;
    
    /**
     * @async
     * @param supportedNFTName:  NFT collection name
     * @param supportedNFTAddress:  NFT collection contract address
     * @param listingResourceId:  listing id
     * @param sellerAddress:  seller's address
     * @example  purchaseList("MatrixMarketplaceNFT", "0x7f3812b53dd4de20", 31425, "0x9a0766d93b6608b7")
     */
    purchaseList(supportedNFTName: string, supportedNFTAddress: string, listingResourceId: number, sellerAddress: string): Promise<string>;
    
    /**
     * @async  invoke by listing owner
     * @param listingResourceId:  listing id
     * @example  removeList(31425)
     */
    removeList(listingResourceID: number): Promise<string>;
    
    /**
     * @async
     * @param account:  account's address
     * @example  getListingIds("0x9a0766d93b6608b7")
     */
    getListingIds(account: string): Promise<[number]>;

FAQs

Package last updated on 19 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc