Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
36a6252
Single store
reednaa Oct 27, 2025
bed4626
Remove unused imports
reednaa Oct 27, 2025
ab7d696
Fix the input side selector
reednaa Oct 27, 2025
ec90700
fmt
reednaa Oct 27, 2025
d0afcc6
Fix input side and large number overhaul
reednaa Oct 28, 2025
513faee
Implement output token modal
reednaa Oct 28, 2025
d68f569
Make the next chain made the previous
reednaa Oct 28, 2025
1ee596e
Finalise order creation and begin work on filling intents
reednaa Oct 29, 2025
0ca82c4
Merge branch 'main' of https://github.com/catalystsystem/cat-swapper …
reednaa Nov 7, 2025
96d4ebb
Flow until proving phase
reednaa Nov 7, 2025
b73ffe8
Multichain intent issuing
reednaa Nov 10, 2025
f64789d
Multi outputs
reednaa Nov 10, 2025
adc3595
Multichain compact intents
reednaa Nov 11, 2025
6a27986
Remove debugging
reednaa Nov 11, 2025
9212f58
Fix escrow and a minor balance issue
reednaa Nov 12, 2025
b3c1816
Add arbitrum sepolia & remove broken register intent compact & set al…
reednaa Nov 12, 2025
2e8e597
Add support for same chain swaps
reednaa Jan 6, 2026
acd82f2
Merge branch 'main' into multichain
reednaa Jan 6, 2026
2af2616
Fix introduction and cleanup
reednaa Jan 6, 2026
db61046
Fix websockets
reednaa Jan 16, 2026
e8df4fe
Add new chains
reednaa Jan 30, 2026
5d909df
Polymer oracle with more 0s.
reednaa Feb 6, 2026
4c2f456
Merge branch 'cleanup'
reednaa Feb 11, 2026
5810ed4
Fix long standing issues with the intent finalise flow
reednaa Feb 12, 2026
39b6c46
Add agents.md
reednaa Feb 12, 2026
8fa200d
Update intent list
reednaa Feb 12, 2026
431a0be
Fix copy
reednaa Feb 12, 2026
71c7064
Merge branch 'main' into multichain
reednaa Feb 13, 2026
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
12 changes: 12 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"permissions": {
"allow": [
"Bash(bun run format:*)",
"Bash(bun run lint:*)",
"Bash(bunx eslint:*)",
"Bash(bun run check:*)",
"Bash(bun run:*)",
"Bash(bun install:*)"
]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules
.wrangler
/.svelte-kit
/build
.claude

# OS
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx prettier --write .
bunx lint-staged
47 changes: 47 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Repository Guidelines

## Project Structure & Module Organization

- `src/routes/` contains SvelteKit routes; the primary UI is `src/routes/+page.svelte`.
- `src/lib/screens/` holds the scrollable “screen” components used by the main page.
- `src/lib/components/`, `src/lib/utils/`, and `src/lib/state.svelte.ts` contain shared UI, helpers, and state.
- `src/lib/libraries/` wraps external endpoints and integrations.
- `src/lib/db.ts`, `src/lib/schema.ts`, and `drizzle/` define and store database schema + migrations.
- `src/app.css`, `src/app.html`, and `src/app.d.ts` are global app assets/config.

## Build, Test, and Development Commands

Use `bun` for all workflows.

- `bun install` installs dependencies.
- `bun run dev` starts the Vite dev server.
- `bun run build` generates a production build.
- `bun run preview` serves the production build locally.
- `bun run check` runs `svelte-check` with the repo’s TS config.
- `bun run lint` checks formatting (Prettier) and lint rules (ESLint).
- `bun run format` auto-formats the repo with Prettier.
- `bun run migrate` generates Drizzle migrations and compiles them.

## Coding Style & Naming Conventions

- Formatting is enforced by Prettier and `prettier-plugin-svelte`; run `bun run format`.
- Linting uses ESLint with Svelte support; run `bun run lint`.
- Prefer descriptive component names in `src/lib/screens/` and keep route files minimal.
- Use TypeScript where applicable (`.ts`, `.svelte` with `lang="ts"`).

## Testing Guidelines

- There is no dedicated test framework in this repo.
- Use `bun run check` and `bun run lint` as the baseline quality gate.
- If you add tests, keep them near the feature and name them clearly (e.g. `*.test.ts`).

## Commit & Pull Request Guidelines

- Commit messages are short, imperative, and capitalized (e.g., “Fix websockets”, “Add new chains”).
- PRs should include a concise description, testing performed (commands run), and UI screenshots for visual changes.
- Link relevant issues or context when available.

## Configuration & Environment

- Copy `.env.example` to `.env` and fill required keys (WalletConnect + Polymer).
- Cloudflare Workers are the default deployment target; see `svelte.config.js` and `wrangler.jsonc`.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ The LI.FI intent demo is hosted at lintent.org. It demonstrates the entire inten

## Project

This project uses SvelteKit and `npm`. It is configured for a deployment to Cloudflare workers, to change the deployment target modify [/svelte.config.js](/svelte.config.js) with another [adapter](https://svelte.dev/docs/kit/adapters).
This project uses SvelteKit and `bun`. It is configured for a deployment to Cloudflare workers, to change the deployment target modify [/svelte.config.js](/svelte.config.js) with another [adapter](https://svelte.dev/docs/kit/adapters).

### Development

To start development:

1. Copy `.env.example` to `.env`.
2. Then fill in the `env` variables by creating a [WalletConnect](https://walletconnect.com) project
3. Also create an [account](https://accounts.polymerlabs.org/) with Polymer to generation [Polymer](https://polymerlabs.org) API keys.
4. Install dependencies `npm install`.
5. Start `npm run dev`.
4. Install dependencies `bun install`.
5. Start `bun run dev`.

## Structure

Expand Down
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
oif = "oif"
OIF = "OIF"
1,630 changes: 1,630 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from "drizzle-kit";

export default defineConfig({
dialect: "postgresql",
schema: "./src/lib/schema.ts",
out: "./drizzle"
});
7 changes: 7 additions & 0 deletions drizzle/0000_absent_moonstone.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE "intents" (
"id" text PRIMARY KEY NOT NULL,
"order_id" text NOT NULL,
"intent_type" text NOT NULL,
"data" text NOT NULL,
"created_at" integer NOT NULL
);
6 changes: 6 additions & 0 deletions drizzle/0001_nifty_mephisto.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE "fill_transactions" (
"id" text PRIMARY KEY NOT NULL,
"output_hash" text NOT NULL,
"tx_hash" text NOT NULL,
CONSTRAINT "fill_transactions_output_hash_unique" UNIQUE("output_hash")
);
1 change: 1 addition & 0 deletions drizzle/0002_expand_intent_created_at.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "intents" ALTER COLUMN "created_at" TYPE bigint;
1 change: 1 addition & 0 deletions drizzle/0003_unique_intent_order_id.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE UNIQUE INDEX IF NOT EXISTS "intents_order_id_unique" ON "intents" ("order_id");
62 changes: 62 additions & 0 deletions drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"id": "acb031ae-9317-47af-b9af-c685b7c17bda",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.intents": {
"name": "intents",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"order_id": {
"name": "order_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"intent_type": {
"name": "intent_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"data": {
"name": "data",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
99 changes: 99 additions & 0 deletions drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"id": "9f78f425-71cd-4f66-b756-5c8433118a62",
"prevId": "acb031ae-9317-47af-b9af-c685b7c17bda",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.fill_transactions": {
"name": "fill_transactions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"output_hash": {
"name": "output_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"tx_hash": {
"name": "tx_hash",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"fill_transactions_output_hash_unique": {
"name": "fill_transactions_output_hash_unique",
"nullsNotDistinct": false,
"columns": ["output_hash"]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.intents": {
"name": "intents",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"order_id": {
"name": "order_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"intent_type": {
"name": "intent_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"data": {
"name": "data",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
34 changes: 34 additions & 0 deletions drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1770712231202,
"tag": "0000_absent_moonstone",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1770803119280,
"tag": "0001_nifty_mephisto",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1770809000000,
"tag": "0002_expand_intent_created_at",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1770810000000,
"tag": "0003_unique_intent_order_id",
"breakpoints": true
}
]
}
Loading