Skip to content

minswap/sdk-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published