Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ yarn-error.log*
*.pem

schema.json
.npmrc
16 changes: 8 additions & 8 deletions apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"dependencies": {
"@cardano-ogmios/client": "^6.11.0",
"@minswap/tiny-invariant": "^1.2.0",
"@repo/ledger-core": "workspace:*",
"@repo/ledger-utils": "workspace:*",
"@repo/minswap-dex-v2": "workspace:*",
"@repo/sundaeswap-v1": "workspace:*",
"@repo/sundaeswap-v3": "workspace:*",
"@repo/syncer": "workspace:*",
"@repo/provider": "workspace:*",
"@repo/tx-builder": "workspace:*",
"@minswap/felis-ledger-core": "workspace:*",
"@minswap/felis-ledger-utils": "workspace:*",
"@minswap/felis-dex-v2": "workspace:*",
"@minswap/felis-sundaeswap-v1": "workspace:*",
"@minswap/felis-sundaeswap-v3": "workspace:*",
"@minswap/felis-syncer": "workspace:*",
"@minswap/felis-provider": "workspace:*",
"@minswap/felis-tx-builder": "workspace:*",
"socket.io-client": "^4.8.3"
}
}
6 changes: 3 additions & 3 deletions apps/example/src/cardanoscan.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from "node:fs";
import { RustModule } from "@repo/ledger-utils";
import { MinswapStableswapSyncer, MinswapV1Syncer, MinswapV2Syncer, SplashSyncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer, Transaction, WingridersV1Syncer, WingridersV2Syncer } from "@repo/syncer";
import { RustModule } from "@minswap/felis-ledger-utils";
import { MinswapStableswapSyncer, MinswapV1Syncer, MinswapV2Syncer, SplashSyncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer, Transaction, WingridersV1Syncer, WingridersV2Syncer } from "@minswap/felis-syncer";
import socketIO from "socket.io-client";
import { NetworkEnvironment } from "../../../packages/ledger-core/dist/network-id";
import { Bytes } from "@repo/ledger-core";
import { Bytes } from "@minswap/felis-ledger-core";

const main = async () => {
await RustModule.load();
Expand Down
12 changes: 6 additions & 6 deletions apps/example/src/fetchMapPools.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import fs from "node:fs";
import { Bytes, NetworkEnvironment, Utxo, XJSON } from "@repo/ledger-core";
import { getDexV2Configs, PoolV2 } from "@repo/minswap-dex-v2";
import { KupoService } from "@repo/provider";
import { MinswapV2Syncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer } from "@repo/syncer";
import { SundaeSwapV1 } from "@repo/sundaeswap-v1";
import { SundaeSwapV3 } from "@repo/sundaeswap-v3";
import { Bytes, NetworkEnvironment, Utxo, XJSON } from "@minswap/felis-ledger-core";
import { getDexV2Configs, PoolV2 } from "@minswap/felis-dex-v2";
import { KupoService } from "@minswap/felis-provider";
import { MinswapV2Syncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer } from "@minswap/felis-syncer";
import { SundaeSwapV1 } from "@minswap/felis-sundaeswap-v1";
import { SundaeSwapV3 } from "@minswap/felis-sundaeswap-v3";

const fetchMinswapV2Pools = async (kupo: KupoService, networkEnv: NetworkEnvironment) => {
const minswapDexV2Configs = getDexV2Configs(networkEnv);
Expand Down
6 changes: 3 additions & 3 deletions apps/example/src/syncer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from "node:fs";
import * as Ogmios from "@cardano-ogmios/client";
import invariant from "@minswap/tiny-invariant";
import { NetworkEnvironment } from "@repo/ledger-core";
import { RustModule } from "@repo/ledger-utils";
import { MinswapStableswapSyncer, MinswapV1Syncer, MinswapV2Syncer, SplashSyncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer, Transaction, WingridersV1Syncer, WingridersV2Syncer } from "@repo/syncer";
import { NetworkEnvironment } from "@minswap/felis-ledger-core";
import { RustModule } from "@minswap/felis-ledger-utils";
import { MinswapStableswapSyncer, MinswapV1Syncer, MinswapV2Syncer, SplashSyncer, SundaeSwapV1Syncer, SundaeSwapV3Syncer, Transaction, WingridersV1Syncer, WingridersV2Syncer } from "@minswap/felis-syncer";

const main = async () => {
await RustModule.load();
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/atoms/walletAtom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { XJSON } from "@repo/ledger-core";
import type { LendingMarket } from "@repo/minswap-lending-market";
import { XJSON } from "@minswap/felis-ledger-core";
import type { LendingMarket } from "@minswap/felis-lending-market";
import { atom } from "jotai";
import type { Asset } from "../../../../packages/ledger-core/dist/asset";
import { LocalStorageKey } from "../constants/storage";
Expand Down
6 changes: 3 additions & 3 deletions apps/web/app/components/deposit-withdraw.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import { ArrowDownOutlined, ArrowUpOutlined } from "@ant-design/icons";
import { RustModule } from "@repo/ledger-utils";
import { NitroWallet } from "@repo/minswap-lending-market";
import { TxComplete } from "@repo/tx-builder";
import { RustModule } from "@minswap/felis-ledger-utils";
import { NitroWallet } from "@minswap/felis-lending-market";
import { TxComplete } from "@minswap/felis-tx-builder";
import { Alert, App, Button, Card, Col, Form, Input, Modal, Row, Space, Statistic } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useEffect, useState } from "react";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/components/margin-trading-position-tab.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import { CloseOutlined, DollarOutlined, SwapOutlined, TrophyOutlined } from "@ant-design/icons";
import { ADA, Asset, Utxo, XJSON } from "@minswap/felis-ledger-core";
import { LendingMarket, type LiqwidProvider, NitroWallet } from "@minswap/felis-lending-market";
import invariant from "@minswap/tiny-invariant";
import { ADA, Asset, Utxo, XJSON } from "@repo/ledger-core";
import { LendingMarket, type LiqwidProvider, NitroWallet } from "@repo/minswap-lending-market";
import { Alert, App, Button, Card, Col, Divider, Progress, Row, Space, Statistic, Tag } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useCallback, useEffect, useRef } from "react";
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/components/margin-trading-trade-tab.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import { ArrowRightOutlined, InfoCircleOutlined } from "@ant-design/icons";
import { DexV2Calculation, OrderV2Direction } from "@minswap/felis-dex-v2";
import { ADA, Asset, Bytes } from "@minswap/felis-ledger-core";
import { sha3 } from "@minswap/felis-ledger-utils";
import { LendingMarket } from "@minswap/felis-lending-market";
import invariant from "@minswap/tiny-invariant";
import { ADA, Asset, Bytes } from "@repo/ledger-core";
import { sha3 } from "@repo/ledger-utils";
import { DexV2Calculation, OrderV2Direction } from "@repo/minswap-dex-v2";
import { LendingMarket } from "@repo/minswap-lending-market";
import {
Alert,
App,
Expand Down
6 changes: 3 additions & 3 deletions apps/web/app/components/short-trading-position-tab.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import { CloseOutlined, DollarOutlined, SwapOutlined, TrophyOutlined } from "@ant-design/icons";
import { DexV2Calculation, OrderV2Direction } from "@minswap/felis-dex-v2";
import { Address, Asset } from "@minswap/felis-ledger-core";
import { LendingMarket, LiqwidProvider } from "@minswap/felis-lending-market";
import invariant from "@minswap/tiny-invariant";
import { Address, Asset } from "@repo/ledger-core";
import { DexV2Calculation, OrderV2Direction } from "@repo/minswap-dex-v2";
import { LendingMarket, LiqwidProvider } from "@repo/minswap-lending-market";
import { Alert, App, Button, Card, Col, Divider, Progress, Row, Space, Statistic, Tag } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useCallback, useEffect, useState } from "react";
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/components/short-trading-trade-tab.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import { ArrowRightOutlined, InfoCircleOutlined } from "@ant-design/icons";
import { DexV2Calculation, OrderV2Direction } from "@minswap/felis-dex-v2";
import { Asset, Bytes } from "@minswap/felis-ledger-core";
import { sha3 } from "@minswap/felis-ledger-utils";
import { LendingMarket } from "@minswap/felis-lending-market";
import invariant from "@minswap/tiny-invariant";
import { Asset, Bytes } from "@repo/ledger-core";
import { sha3 } from "@repo/ledger-utils";
import { DexV2Calculation, OrderV2Direction } from "@repo/minswap-dex-v2";
import { LendingMarket } from "@repo/minswap-lending-market";
import { Alert, App, Button, Card, Col, Divider, Form, InputNumber, Radio, Row, Space, Statistic, Tooltip } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useEffect, useState } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NetworkEnvironment } from "@repo/ledger-core";
import { NetworkEnvironment } from "@minswap/felis-ledger-core";

type Config = {
networkEnv: NetworkEnvironment;
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/lib/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Address, NetworkEnvironment, Utxo } from "@repo/ledger-core";
import { NitroWallet } from "@repo/minswap-lending-market";
import { type Address, NetworkEnvironment, Utxo } from "@minswap/felis-ledger-core";
import { NitroWallet } from "@minswap/felis-lending-market";
import { CONFIG } from "../config";

export namespace Helpers {
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/lib/use-nitro-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { baseWalletFromEntropy } from "@repo/cip";
import { Address } from "@repo/ledger-core";
import { sha3 } from "@repo/ledger-utils";
import { NitroWallet } from "@repo/minswap-lending-market";
import { baseWalletFromEntropy } from "@minswap/felis-cip";
import { Address } from "@minswap/felis-ledger-core";
import { sha3 } from "@minswap/felis-ledger-utils";
import { NitroWallet } from "@minswap/felis-lending-market";
import { useAtom, useSetAtom } from "jotai";
import { useCallback, useEffect, useState } from "react";
import { setNitroBalanceAtom, setNitroWalletAtom } from "../atoms/walletAtom";
Expand Down
12 changes: 6 additions & 6 deletions apps/web/app/lib/use-position.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DEXOrderTransaction } from "@minswap/felis-build-tx";
import { DexV2Calculation, DexVersion, OrderV2Direction, OrderV2StepType } from "@minswap/felis-dex-v2";
import { PrivateKey, Utxo, Value } from "@minswap/felis-ledger-core";
import { Result } from "@minswap/felis-ledger-utils";
import { type LiqwidProvider, NitroWallet } from "@minswap/felis-lending-market";
import { CoinSelectionAlgorithm, EmulatorProvider } from "@minswap/felis-tx-builder";
import invariant from "@minswap/tiny-invariant";
import { PrivateKey, Utxo, Value } from "@repo/ledger-core";
import { Result } from "@repo/ledger-utils";
import { DEXOrderTransaction } from "@repo/minswap-build-tx";
import { DexV2Calculation, DexVersion, OrderV2Direction, OrderV2StepType } from "@repo/minswap-dex-v2";
import { type LiqwidProvider, NitroWallet } from "@repo/minswap-lending-market";
import { CoinSelectionAlgorithm, EmulatorProvider } from "@repo/tx-builder";
import { App } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useCallback, useRef } from "react";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/lib/wallet-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Address, Value } from "@repo/ledger-core";
import { RustModule } from "@repo/ledger-utils";
import { Address, Value } from "@minswap/felis-ledger-core";
import { RustModule } from "@minswap/felis-ledger-utils";

/**
* CIP-30 Wallet utilities for Cardano
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { LendingMarket } from "@repo/minswap-lending-market";
import { LendingMarket } from "@minswap/felis-lending-market";
import { App, Button, Layout, Space } from "antd";
import { useAtomValue, useSetAtom } from "jotai";
import { useEffect, useState } from "react";
Expand Down
14 changes: 7 additions & 7 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@ant-design/icons": "5.x",
"@ant-design/nextjs-registry": "^1.1.0",
"@minswap/tiny-invariant": "^1.2.0",
"@repo/ledger-core": "workspace:*",
"@repo/ledger-utils": "workspace:*",
"@repo/tx-builder": "workspace:*",
"@repo/cip": "workspace:*",
"@minswap/felis-ledger-core": "workspace:*",
"@minswap/felis-ledger-utils": "workspace:*",
"@minswap/felis-tx-builder": "workspace:*",
"@minswap/felis-cip": "workspace:*",
"@repo/ui": "workspace:*",
"@repo/minswap-lending-market": "workspace:*",
"@repo/minswap-dex-v2": "workspace:*",
"@repo/minswap-build-tx": "workspace:*",
"@minswap/felis-lending-market": "workspace:*",
"@minswap/felis-dex-v2": "workspace:*",
"@minswap/felis-build-tx": "workspace:*",
"antd": "^5.27.6",
"next": "^16.0.10",
"react": "^19.2.3",
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "minswap-felis",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/minswap/felis"
},
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
Expand All @@ -10,7 +14,9 @@
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write --unsafe",
"test": "turbo run test",
"test:watch": "turbo run test:watch"
"test:watch": "turbo run test:watch",
"publish:dry": "pnpm -r publish --dry-run --no-git-checks",
"publish:release": "pnpm -r publish --no-git-checks"
},
"devDependencies": {
"@biomejs/biome": "2.1.4",
Expand Down
22 changes: 18 additions & 4 deletions packages/cip/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
{
"name": "@repo/cip",
"name": "@minswap/felis-cip",
"version": "0.0.1",
"private": true,
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/minswap/felis",
"directory": "packages/cip"
},
"bugs": {
"url": "https://github.com/minswap/felis/issues"
},
"files": [
"dist"
],
"exports": {
".": "./dist/index.js"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "tsc --watch --preserveWatchOutput",
"build": "tsc",
Expand All @@ -23,8 +37,8 @@
"vitest": "^3.2.4"
},
"dependencies": {
"@repo/ledger-core": "workspace:*",
"@repo/ledger-utils": "workspace:*",
"@minswap/felis-ledger-core": "workspace:*",
"@minswap/felis-ledger-utils": "workspace:*",
"@minswap/tiny-invariant": "^1.2.0",
"bip39": "^3.1.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/cip/src/bip32.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import invariant from "@minswap/tiny-invariant";
import {
Address,
AddressType,
Expand All @@ -9,14 +8,15 @@ import {
networkEnvironmentToNetworkID,
PrivateKey,
type Utxo,
} from "@repo/ledger-core";
} from "@minswap/felis-ledger-core";
import {
type CSLBip32PrivateKey,
type CSLBip32PublicKey,
Maybe,
RustModule,
safeFreeRustObjects,
} from "@repo/ledger-utils";
} from "@minswap/felis-ledger-utils";
import invariant from "@minswap/tiny-invariant";
import { mnemonicToEntropy } from "bip39";

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/cip/src/bip39.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import invariant from "@minswap/tiny-invariant";
import {
Address,
AddressType,
Expand All @@ -7,8 +6,9 @@ import {
networkEnvironmentToNetworkID,
PrivateKey,
RewardAddress,
} from "@repo/ledger-core";
import { RustModule } from "@repo/ledger-utils";
} from "@minswap/felis-ledger-core";
import { RustModule } from "@minswap/felis-ledger-utils";
import invariant from "@minswap/tiny-invariant";
import { mnemonicToEntropy } from "bip39";

const harden = (num: number): number => 0x80000000 + num;
Expand Down
2 changes: 1 addition & 1 deletion packages/cip/src/cip-25.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Asset } from "@repo/ledger-core";
import type { Asset } from "@minswap/felis-ledger-core";

export type CIP25File = {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/cip/src/cip-68.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Asset, Bytes, DatumSourceType, type InlineDatum } from "@minswap/felis-ledger-core";
import { type Maybe, RustModule, safeFreeRustObjects } from "@minswap/felis-ledger-utils";
import invariant from "@minswap/tiny-invariant";
import { Asset, Bytes, DatumSourceType, type InlineDatum } from "@repo/ledger-core";
import { type Maybe, RustModule, safeFreeRustObjects } from "@repo/ledger-utils";

export const CIP_LABEL_LENGTH = 8;

Expand Down
4 changes: 2 additions & 2 deletions packages/cip/test/bip32.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NetworkEnvironment, PrivateKey } from "@repo/ledger-core";
import { RustModule } from "@repo/ledger-utils";
import { NetworkEnvironment, PrivateKey } from "@minswap/felis-ledger-core";
import { RustModule } from "@minswap/felis-ledger-utils";
import { beforeAll, describe, expect, it } from "vitest";
import { Bip32, baseAddressWalletFromSeed } from "../src";

Expand Down
Loading