Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
m1n999999 committed Sep 16, 2024
1 parent 00b270d commit 7484760
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/stableswap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Address, Lucid, Network, Tx, TxComplete, UTxO } from "lucid-cardano";

import { Asset } from "./types/asset";
import { NetworkId } from "./types/network";

export type CommonOrderOptions = {
sender: Address;
availableUtxos: UTxO[];
lpAsset: Asset;
};

export type ExchangeOptions = CommonOrderOptions & {
assetIn: Asset;
assetInAmount: bigint;
assetInIndex: bigint;
assetOutIndex: bigint;
minimumAssetOut: bigint;
};
export class Stableswap {
private readonly lucid: Lucid;
private readonly network: Network;
private readonly networkId: NetworkId;

constructor(lucid: Lucid) {
this.lucid = lucid;
this.network = lucid.network;
this.networkId =
lucid.network === "Mainnet" ? NetworkId.MAINNET : NetworkId.TESTNET;
}

async buildExchangeOrderTx(options: ExchangeOptions): Promise<TxComplete>{

}
}

0 comments on commit 7484760

Please sign in to comment.