Skip to content
Open
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
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
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