Skip to content

florian583/sundae-sdk

 
 

Repository files navigation

Sundae-SDK

Licence

Sundae-SDK is a TypeScript library for building transactions for the SundaeSwap DEX on Cardano.

⚠️ This is a pre-release package: until we release v1.0.0, the interface may change as we identify the optimal usage patterns.

QuickStart

Getting started

First, install the relevant packages:

$ yarn add lucid-cardano @sundaeswap/sdk-core

Then start using the SDK:

import { SundaeSDK } from "@sundaeswap/sdk-core";
import {
 TxBuilderLucid,
 ProviderSundaeSwap
} from "@sundaeswap/sdk-core/extensions";

const txBuilder = new TxBuilderLucid(
 {
     wallet: "eternl",
     network: "preview",        
     provider: "blockfrost",
     blockfrost: {
         url: "https://cardano-preview.blockfrost.io/api/v0",
         apiKey: "YOUR_API_KEY"
     }
 },
 new ProviderSundaeSwap("preview")
);

const sdk: SundaeSDK = new SundaeSDK(txBuilder);

const txHash = await sdk.swap( /** ... */ ).then(({ submit }) => submit());

How to Use

Documentation is available at https://sundaeswap-finance.github.io/sundae-sdk/, but it is very much a work-in-progress. Feel free to open a discussion with feedback, or submit a pull request!

Contributing

Want to contribute? See CONTRIBUTING.md to know how.

About

The official SundaeSwap protocol SDK for clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.2%
  • JavaScript 1.8%
  • Other 1.0%