Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: distributed sessions #40

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0c31e3b
chore: dan skeleton
joepegler Jun 14, 2024
60c7037
chore: continued
joepegler Jun 14, 2024
7fe6c35
continued
joepegler Jun 14, 2024
37f0785
chore: continued
joepegler Jun 14, 2024
8190dc1
chore: cont
joepegler Jun 14, 2024
400f3c6
bugfix
joepegler Jun 14, 2024
ef6bb4a
updated code for keygen. (dependency linked local)
livingrockrises Jun 15, 2024
28b2c7c
update create dan session
livingrockrises Jun 24, 2024
5c258f5
use DAN SKM
livingrockrises Jun 25, 2024
1d1e050
update use dan session
livingrockrises Jun 26, 2024
8a1f762
chore: live reload
joepegler Jun 26, 2024
9e77954
chore: support env vars and add linting and add wallet to dev script
joepegler Jun 27, 2024
c166bb5
chore: continued integration
joepegler Jun 28, 2024
75d3e1d
chore: lint
joepegler Jun 28, 2024
aeab05f
update code to correct sig-gen
livingrockrises Jun 29, 2024
b9e2cb1
chore: continued
joepegler Jul 2, 2024
18d0b32
update use dan session
livingrockrises Jul 2, 2024
e1150d6
update use dan session
livingrockrises Jul 2, 2024
977e35e
chore: sl wallet
joepegler Jul 4, 2024
86a30aa
chore: fix demo
joepegler Jul 4, 2024
3269d33
chore: lint
joepegler Jul 4, 2024
bb4c4ff
fixes to work with latest sdk changes
livingrockrises Jul 4, 2024
68bef65
Merge branch 'feature/dan_skeleton' of https://github.com/bcnmy/sdk-d…
livingrockrises Jul 4, 2024
6808062
chore: duplicate policy
joepegler Jul 4, 2024
edfd684
chore: lint
joepegler Jul 4, 2024
5a7e357
Merge branch 'feature/dan_skeleton' of github.com:bcnmy/sdk-demo into…
joepegler Jul 4, 2024
1b8ed44
chore: use hooks
joepegler Jul 9, 2024
a4319d7
chore: remove dep
joepegler Jul 9, 2024
93827ab
chore: version bump
joepegler Jul 9, 2024
f5232fa
chore: rename PolicyLeaf
joepegler Jul 9, 2024
8447141
chore: add bunfig.toml
joepegler Jul 16, 2024
9f645a8
chore: npm token
joepegler Jul 17, 2024
1099642
chore: fix merkletree bug
joepegler Jul 17, 2024
20af6b4
chore: fix env vars
joepegler Jul 17, 2024
d01d7f3
chore: fix toast
joepegler Jul 17, 2024
bb5fd57
feat: persist session
joepegler Jul 19, 2024
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_PAYMASTER_KEY=
VITE_BUNDLER_URL=https://bundler.biconomy.io/api/v2/80002/cJPK7B3ru.dd7f7861-190d-45ic-af80-6877f74b8f44
VITE_SILENCE_LABS_NPM_TOKEN=npm_XXX
22 changes: 11 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true }
]
}
}
1 change: 1 addition & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
CI: false
NODE_OPTIONS: --max_old_space_size=4096
REACT_APP_PKEY: ${{ secrets.REACT_APP_PKEY }}
VITE_SILENCE_LABS_NPM_TOKEN: ${{ secrets.VITE_SILENCE_LABS_NPM_TOKEN }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
CI: false
NODE_OPTIONS: --max_old_space_size=4096
REACT_APP_PKEY: ${{ secrets.REACT_APP_PKEY }}
VITE_SILENCE_LABS_NPM_TOKEN: ${{ secrets.VITE_SILENCE_LABS_NPM_TOKEN }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ build
dist-ssr
*.local

bunfig.toml

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand All @@ -23,3 +25,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.env
63 changes: 63 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"files": {
"ignore": [
"package.json",
"node_modules",
"**/node_modules",
"cache",
"coverage",
"tsconfig.json",
"tsconfig.*.json",
"_cjs",
"_esm",
"_types",
"bun.lockb",
"docs",
"dist",
"build"
]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noArrayIndexKey": "off"
},
"style": {
"noUnusedTemplateLiteral": "off",
"noNonNullAssertion": "off",
"noUselessElse": "off",
"noParameterAssign": "off",
"useTemplate": "off"
},
"a11y": {
"noAccessKey": "off",
"useKeyWithClickEvents": "off",
"useKeyWithMouseEvents": "off",
"useButtonType": "off"
},
"complexity": {
"noExtraBooleanCast": "off"
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"lineWidth": 80,
"indentWidth": 2,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"trailingComma": "none"
}
}
}
Binary file modified bun.lockb
Binary file not shown.
22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "bun i && bun link @biconomy/account && vite",
"dev": "bun i && bun link @biconomy/account @biconomy/use-aa && vite",
"start": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "biome format . --write",
"lint": "biome check .",
"lint:fix": "bun run lint --apply",
"preview": "vite preview"
},
"dependencies": {
"@biconomy/account": "^4.4.5",
"@biconomy/use-aa": "1.0.11",
"@biconomy/account": "^4.6.0",
"@biconomy/use-aa": "^1.1.0",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@ethersproject/providers": "^5.7.2",
Expand All @@ -21,16 +23,17 @@
"@mui/styles": "^5.11.12",
"@rainbow-me/rainbowkit": "^2.0.0",
"@tanstack/react-query": "^5.22.2",
"@types/react-toastify": "^4.1.0",
"ethers": "^6.12.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-toastify": "^9.0.8",
"react-toastify": "^10.0.5",
"viem": "^2.13.7",
"wagmi": "^2.9.9"
},
"devDependencies": {
"@types/react": "^18.3.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
Expand All @@ -39,6 +42,11 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"typescript": "^5.2.2",
"vite": "^5.2.0"
"vite": "^5.2.0",
"simple-git-hooks": "^2.9.0",
"@biomejs/biome": "1.6.0"
},
"simple-git-hooks": {
"pre-commit": "bun run format && bun run lint:fix"
}
}
38 changes: 19 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import { makeStyles } from "@mui/styles";
import { ToastContainer } from "react-toastify";
import { useAccount } from "wagmi";
import { ConnectButton } from "@rainbow-me/rainbowkit";
import TabsBody from "./components/TabsBody";
import { makeStyles } from "@mui/styles"
import { ConnectButton } from "@rainbow-me/rainbowkit"
import type React from "react"
import { ToastContainer } from "react-toastify"
import { useAccount } from "wagmi"
import TabsBody from "./components/TabsBody"

const App: React.FC = () => {
const classes = useStyles();
const { address } = useAccount();
const classes = useStyles()
const { address } = useAccount()

if (!address) {
return (
Expand All @@ -17,7 +17,7 @@ const App: React.FC = () => {
<img
width={35}
style={{
marginRight: 20,
marginRight: 20
}}
src="/logo.svg"
alt=""
Expand All @@ -31,16 +31,16 @@ const App: React.FC = () => {
<ConnectButton />
</div>
</div>
);
)
}

return (
<div className={classes.bgCover}>
<TabsBody loading={false} />
<ToastContainer position="bottom-left" newestOnTop theme="dark" />
</div>
);
};
)
}

const useStyles = makeStyles(() => ({
bgCover: {
Expand All @@ -51,7 +51,7 @@ const useStyles = makeStyles(() => ({
color: "#e6e6e6",
justifyContent: "start",
alignItems: "center",
padding: "0px 20px",
padding: "0px 20px"
},
container: {
width: "60vw",
Expand All @@ -64,17 +64,17 @@ const useStyles = makeStyles(() => ({
flexDirection: "column",
alignItems: "start",
justifyContent: "center",
gap: 20,
gap: 20
},
title: {
margin: 0,
fontSize: 50,
color: "#ffb999",
color: "#ffb999"
},
subTitle: {
fontSize: 22,
margin: 0,
},
}));
margin: 0
}
}))

export default App;
export default App
Loading