0.0.29 • Published 1 year ago

grape-art-listing-request v0.0.29

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year 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

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago