We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, folks. I started a node project from scratch to test out this module. I placed the following snippet from the README into index.js
index.js
import { MetadataApi } from '@cowprotocol/app-data' export const metadataApi = new MetadataApi() const appCode = 'YOUR_APP_CODE' const environment = 'prod' const referrer = { address: `REFERRER_ADDRESS` } const quote = { slippageBips: '0.5' } // Slippage percent, it's 0 to 100 const orderClass = { orderClass: 'market' } // "market" | "limit" | "liquidity" const appDataDoc = await metadataApi.generateAppDataDoc({ appCode, environment, metadata: { referrer, quote, orderClass, }, }) const { cid, appDataHex, appDataContent } = await metadataApi.appDataToCid(appDataDoc)
run node index.js and fails with
node index.js
[Error]: Invalid appData provided: AppData version 1.1.0 doesn't exist at f (file:///Users/pata/projects/appdata/node_modules/@cowprotocol/app-data/dist/index.modern.mjs:1:2169)
package.json needs "type": "module" to run this script and replicate. What am I missing? Thanks
package.json
"type": "module"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi, folks. I started a node project from scratch to test out this module. I placed the following snippet from the README into
index.js
run
node index.js
and fails withpackage.json
needs"type": "module"
to run this script and replicate. What am I missing? ThanksThe text was updated successfully, but these errors were encountered: