You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{BasicOrderParametersStruct}from"@opensea/seaport-js/lib/typechain-types/seaport/contracts/Seaport";import{ethers}from"ethers";import{Chain,OpenSeaSDK,OrderSide}from"opensea-js";constprovider=newethers.JsonRpcProvider("https://sepolia.infura.io");constopenseaSDK=newOpenSeaSDK(provider,{chain: Chain.Sepolia,});asyncfunctiongenerateFulfillmentData(collection: string,tokenID: string,fulfillerAddr: string,seaportAddr: string): Promise<string>{constorder=awaitopenseaSDK.api.getOrder({side: OrderSide.LISTING,assetContractAddress: collection,tokenId: tokenID,});if(!order.orderHash){thrownewError(`No order hash for ${collection}-${tokenID}`);}const{fulfillment_data: fulfillmentData}=awaitopenseaSDK.api.generateFulfillmentData(fulfillerAddr,order.orderHash,seaportAddr,OrderSide.LISTING);//FIXME: pacakge api has invalid response type, actual response has another formatconsttxInputData=fulfillmentData.transaction.input_dataasanyas{parameters: BasicOrderParametersStruct;};console.log(txInputData)}
Component
API
Have you ensured that all of these are up to date?
What version of opensea-js are you on?
7.1.14
What function is the bug in?
generateFulfillmentData
Operating System
macOS (Intel)
Describe the bug
Calling
openseaSDK.api.generateFulfillmentData
returns the data format that is not equal to the one specified in the package.Response types specified in the package:
actually
input_data
field has another format:Reproducible example:
Response example
The text was updated successfully, but these errors were encountered: