Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.03 KB

Readme.md

File metadata and controls

43 lines (28 loc) · 1.03 KB

Introduction

  • This is the example project show how to use @minswap/sdk.

Prerequisites

  • Node version >= 20.17, <21

Installation

  • Install dependencies
  npm install

Usage

Run examples

Run a trade in Dex V2 by using Blockfrost Adapter on Testnet

  • Replace your YOUR_BLOCKFROST_API_KEY, YOUR_ADDRESS, YOUR_PRIVATE_KEY in the blockfrost/dex-v2-trade.ts file.

  • Example keys:

    • YOUR_BLOCKFROST_API_KEY: preprodBA1p1STJuuCjuw2QjfqFIecfT9SCyC9M
    • YOUR_ADDRESS: addr_test1vp0rfn7x3mf85jctsd85uu4pzga0ujh23dsxhznlktazflsjze52n
    • YOUR_PRIVATE_KEY: ed25519_sk1j9gkra33ts20pvjjq4my4lazpttmv98usq2e49um7sj67yy2clmqjdeuj9
  npx tsx --experimental-wasm-modules blockfrost/dex-v2-trade.ts
  • You can see more examples in the blockfrost and meastro folder.

Sign with seed phrase

  • You can sign with seed phrase replace signWithPrivateKey to signWithSeed.
const signedTx = await txComplete
    .signWithSeed("<YOUR_SEED_PHRASE>", <YOUR_ACCOUNT_INDEX>)
    .commit();