Skip to content

Commit 75c4e4b

Browse files
authored
Merge pull request #8 from tokenbound/bj/combined-ethers-viem
Ethers / Viem combo release
2 parents 2c126bb + a2f5836 commit 75c4e4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2971
-1327
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** @type {import('eslint').ESLint.ConfigData} */
2+
module.exports = {
3+
root: true,
4+
extends: ["prettier"],
5+
rules: {
6+
"no-unexpected-multiline": "warn",
7+
"react/display-name": "off",
8+
semi: 0,
9+
"react/no-unescaped-entities": 0,
10+
},
11+
};

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.next

.prettierrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"arrowParens": "always",
3+
"endOfLine": "lf",
4+
"importOrderSortSpecifiers": true,
5+
"printWidth": 90,
6+
"semi": false,
7+
"singleQuote": true,
8+
"trailingComma": "es5",
9+
"importOrderSeparation": true,
10+
"importOrder": [
11+
"^[components]",
12+
"^[constants]",
13+
"^[hooks]",
14+
"^[styles]",
15+
"^[types]",
16+
"^@(.*)$",
17+
"^[./]"
18+
]
19+
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Tokenbound SDK
22

3-
This repo houses the tokenbound SDK, a front end library for interacting with [ERC-6551 accounts](https://eips.ethereum.org/EIPS/eip-6551).
3+
This repo houses the Tokenbound SDK, a front-end library for interacting with [ERC-6551 accounts](https://eips.ethereum.org/EIPS/eip-6551).
44

55
### Packages
66

7-
- **[@tokenbound/sdk](https://github.com/tokenbound/sdk/tree/main/packages/sdk)** - SDK client for projects using viem
8-
- **[@tokenbound/sdk-ethers](https://github.com/tokenbound/sdk/tree/main/packages/sdk-ethers)** - SDK client for projects using ethers
7+
- **[@tokenbound/sdk](https://github.com/tokenbound/sdk/tree/main/packages/sdk)** - SDK client for all projects, signing enabled via either Ethers Signer or viem WalletClient.
98
- **[@tokenbound/react](https://github.com/tokenbound/sdk/tree/main/packages/react)** - Low-level react hooks for interacting with token bound accounts
109

1110
### Examples
1211

1312
- **[examples/vite-wagmi](https://github.com/tokenbound/sdk/tree/main/examples/vite-wagmi)** - An example app using the tokenbound SDK in a vite project with wagmi
13+
- **[examples/vite-wagmi](https://github.com/tokenbound/sdk/tree/main/examples/vite-wagmi-ethers)** - An example app using the tokenbound SDK in a vite project with ethers v5
14+
- **[examples/vite-wagmi](https://github.com/tokenbound/sdk/tree/main/examples/vite-wagmi-ethers6)** - An example app using the tokenbound SDK in a vite project with ethers v6
1415

1516
### Development
1617

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_ALCHEMY_API_KEY=
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
5+
/node_modules
6+
/.pnp
7+
.pnp.js
8+
9+
# testing
10+
11+
/coverage
12+
13+
# vite
14+
15+
dist
16+
dist-ssr
17+
18+
# production
19+
20+
/build
21+
22+
# misc
23+
24+
.DS_Store
25+
\*.pem
26+
*.local
27+
28+
# debug
29+
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
.pnpm-debug.log*
34+
35+
# local env files
36+
37+
.env
38+
.env\*.local
39+
40+
# vercel
41+
42+
.vercel
43+
44+
# typescript
45+
46+
\*.tsbuildinfo
47+
next-env.d.ts

examples/vite-wagmi-ethers/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
strict-peer-dependencies = false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This is a [wagmi](https://wagmi.sh) + [ConnectKit](https://docs.family.co/connectkit) + [Vite](https://vitejs.dev/) project bootstrapped with [`create-wagmi`](https://github.com/wagmi-dev/wagmi/tree/main/packages/create-wagmi)
2+
3+
# Getting Started
4+
5+
Run `npm run dev` in your terminal, and then open [localhost:5173](http://localhost:5173) in your browser.
6+
7+
Once the webpage has loaded, changes made to files inside the `src/` directory (e.g. `src/App.tsx`) will automatically update the webpage.
8+
9+
# Learn more
10+
11+
To learn more about [Vite](https://vitejs.dev/), [ConnectKit](https://docs.family.co/connectkit) or [wagmi](https://wagmi.sh), check out the following resources:
12+
13+
- [wagmi Documentation](https://wagmi.sh) – learn about wagmi Hooks and API.
14+
- [wagmi Examples](https://wagmi.sh/examples/connect-wallet) – a suite of simple examples using wagmi.
15+
- [ConnectKit Documentation](https://docs.family.co/connectkit) – learn more about ConnectKit (configuration, theming, advanced usage, etc).
16+
- [Vite Documentation](https://vitejs.dev/) – learn about Vite features and API.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Tokenbound Demo - Ethers 5 Signer</title>
7+
<script type="module" src="./polyfills.ts"></script>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "vite-wagmi-ethers",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "tsc && vite build",
8+
"preview": "vite preview",
9+
"clean": "rm -rf node_modules"
10+
},
11+
"dependencies": {
12+
"@tokenbound/sdk": "workspace:^",
13+
"buffer": "^6.0.3",
14+
"connectkit": "1.4.0",
15+
"ethers": "^5.7.2",
16+
"process": "^0.11.10",
17+
"react": "^18.2.0",
18+
"react-dom": "^18.2.0",
19+
"util": "^0.12.5",
20+
"viem": "^1.0.7",
21+
"wagmi": "^1.2.0"
22+
},
23+
"devDependencies": {
24+
"@types/react": "^18.2.12",
25+
"@types/react-dom": "^18.2.5",
26+
"@vitejs/plugin-react": "^4.0.1",
27+
"typescript": "^5.1.3",
28+
"vite": "^4.3.9"
29+
}
30+
}

0 commit comments

Comments
 (0)