- This is the example project show how to use @minswap/sdk.
- Node version >= 20.17, <21
- Install dependencies
npm install-
Replace your
YOUR_BLOCKFROST_API_KEY,YOUR_ADDRESS,YOUR_PRIVATE_KEYin theblockfrost/dex-v2-trade.tsfile. -
Example keys:
YOUR_BLOCKFROST_API_KEY: preprodBA1p1STJuuCjuw2QjfqFIecfT9SCyC9MYOUR_ADDRESS: addr_test1vp0rfn7x3mf85jctsd85uu4pzga0ujh23dsxhznlktazflsjze52nYOUR_PRIVATE_KEY: ed25519_sk1j9gkra33ts20pvjjq4my4lazpttmv98usq2e49um7sj67yy2clmqjdeuj9
npx tsx --experimental-wasm-modules blockfrost/dex-v2-trade.ts- You can see more examples in the
blockfrostandmeastrofolder.
- You can sign with seed phrase replace
signWithPrivateKeytosignWithSeed.
const signedTx = await txComplete
.signWithSeed("<YOUR_SEED_PHRASE>", <YOUR_ACCOUNT_INDEX>)
.commit();