Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Mar 15, 2024
1 parent 4fa0d3e commit 2641a60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ yarn
# Credentials
cp .env.example .env <---- paste your Near credentials
# Buy NFT buy collection slug:
npx ts-node examples/transfer-nft.ts
npx ts-node examples/opensea.ts
# You will be prompted to provide a collectionSlug
```

## Installation
Expand Down
4 changes: 3 additions & 1 deletion examples/opensea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const run = async (slug: string): Promise<void> => {
`Got ${listings.listings.length} Listings, preparing to purchase first available.`
);
const firstListing = listings.listings[0];
// This sleep is due to free-tier testnet rate limiting.
await sleep(1000);
const sender = await setupAccount();
const data = await openseaSDK.api.generateFulfillmentData(
Expand All @@ -41,7 +42,8 @@ const run = async (slug: string): Promise<void> => {

const tx = data.fulfillment_data.transaction;
const input_data = tx.input_data;


// TODO - report or fix these bugs with OpenseaSDK
// @ts-expect-error: Undocumented field on type FulfillmentData within FulfillmentDataResponse
const order = input_data.parameters;
// @ts-expect-error: Undocumented field on type FulfillmentData within FulfillmentDataResponse
Expand Down

0 comments on commit 2641a60

Please sign in to comment.