0.0.29 • Published 3 years ago

grape-art-listing-request v0.0.29

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Grape Art Marketplace - On-chain Program SDK

Install

yarn add [PROGRAM_REPO]/sdk

Usage

  • Create Config
const { updateAdmin, createConfig } = useManageAdmin(provider);
const [tx, account] = await createConfig(new BN(LAMPORTS_PER_SOL))
  • Create a Listing Request
  const { requestListng  } = useListingRequest(provider, new PublicKey(CONFIG))
  const result = await requestListng({
  name: "Loquacious Ladybugs",
  auction_house: web3.Keypair.generate().publicKey,
  verified_collection_address: verifiedCollectionAddress,
  collection_update_authority: web3.Keypair.generate().publicKey,
  meta_data_url: 'http://whatever.org'
  })
  • Approve or Deny a listing
    const { approveListing, denyListing } = useAdmin(provider, new PublicKey(CONFIG))
    const res = await denyListing(new PublicKey('5zL9T9M6MbMCQ4ZfkH7nwptUhPPCiUfegmjZZq8Gg1YF'));
  • View All Approved or Denied/Pending Listings
   const { getAllPendingListings, getAllApprovedListings, isApproved, hasToken  } = useListingQuery(provider, new PublicKey(CONFIG))
    const listings = await getAllPendingListings();
    for (let list of listings) {
        console.log('verified collection address', list.verified_collection_address.toBase58())
    }
    const approvedListings = await getAllApprovedListings();
    for (let list of approvedListings) {
        console.log('verified collection address', list.verified_collection_address.toBase58())
    }
0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago