Skip to content

Commit

Permalink
fix: bitcoin demo
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jun 11, 2024
1 parent a9a3c51 commit 73b8eb0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
title: 'chore: version packages'
commit: 'chore: version packages'
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm changeset:release
version: pnpm changeset:version
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ In order to interact with [JoyID App](https://app.joy.id) we provide different p
* [`@joyid/wagmi`](./packages/wagmi/): [Wagmi](https://wagmi.io/) implementation for JoyID EVM SDK.
* [`@joyid/rainbowkit`](./packages/rainbowkit/): [RainbowKit](https://www.rainbowkit.com/) implementation for JoyID EVM SDK.
* [`@joyid/ethereum-provider`](./packages/ethereum-provider/): [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) implementation for JoyID EVM SDK.
* [`@joyid/miniapp`](./packages/miniapp/): SDK for Telegram MiniApp.

You can choose the appropriate SDK package according to your application scenario and follow the instructions in the documentation for installation and use. If you need technical support, feel free to contact us in [Discord](https://discord.com/invite/77MyakRKVB).

Expand All @@ -27,12 +28,12 @@ pnpm run dev

There are six examples in the `examples` directory:

* [`CKB Demo`](./examples/ckb/): Example for `@joyid/ckb` SDK.
* [`Bitcoin Demo`](./examples/bitcoin/): Example for `@joyid/bitcoin` SDK.
* [`EVM Demo`](./examples/evm/): Example for `@joyid/evm` SDK.
* [`Wagmi Demo`](./examples/wagmi/): Example for `@joyid/wagmi` SDK.
* [`RainbowKit Demo`](./examples/rainbowkit/): Example for `@joyid/rainbowkit` SDK.
* [`nostr Demo`](./examples/nostr/): Example for `@joyid/nostr` SDK.
* [`CKB Demo`](./examples/ckb/): Example for `@joyid/ckb` SDK. [Preview](https://joyid-ckb-demo.vercel.app/)
* [`Bitcoin Demo`](./examples/bitcoin/): Example for `@joyid/bitcoin` SDK. [Preview](https://joyid-bitcoin-demo.vercel.app/)
* [`EVM Demo`](./examples/evm/): Example for `@joyid/evm` SDK. [Preview](https://joyid-evm-demo.vercel.app/)
* [`Wagmi Demo`](./examples/wagmi/): Example for `@joyid/wagmi` SDK. [Preview](https://joyid-wagmi-demo.vercel.app/)
* [`RainbowKit Demo`](./examples/rainbowkit/): Example for `@joyid/rainbowkit` SDK. [Preview](https://joyid-rainbowkit-demo.vercel.app/)
* [`nostr Demo`](./examples/nostr/): Example for `@joyid/nostr` SDK. [Preview](https://docs.joyid.dev/guide/nostr/nip-07#try-it-out)

## Development

Expand Down
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export default tseslint.config(
'packages/nostr/dist/**/*',
'packages/rainbowkit/dist/**/*',
'packages/wagmi/dist/**/*',
'packages/miniapp/dist/**/*',
'examples/bitcoin-demo/dist/**/*',
'examples/ckb-demo/dist/**/*',
'examples/evm-demo/dist/**/*',
'examples/rainbowkit-demo/dist/**/*',
'examples/wagmi-demo/dist/**/*',
],
},
{
Expand Down
33 changes: 2 additions & 31 deletions examples/bitcoin-demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,20 @@ import { defineConfig } from 'vite'
import solidPlugin from 'vite-plugin-solid'
import wasm from 'vite-plugin-wasm'
import topLevelAwait from 'vite-plugin-top-level-await'
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'

// import { nodePolyfills } from 'vite-plugin-node-polyfills'
// import WindiCSS from 'vite-plugin-windicss';
import { nodePolyfills } from 'vite-plugin-node-polyfills'

export default defineConfig({
plugins: [
wasm(),
topLevelAwait(),
solidPlugin(),
// nodePolyfills()
nodePolyfills()
],
server: {
port: 3000,
},
build: {
target: 'esnext',
rollupOptions: {
plugins: [
rollupNodePolyFill(),
// inject({ Buffer: ['buffer/', 'Buffer'] }),
] as any[],
},
},
resolve: {
alias: {
stream: 'stream-browserify',
crypto: 'crypto-browserify',
},
},
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: 'globalThis',
},
plugins: [
NodeGlobalsPolyfillPlugin({
buffer: true,
}),
],
// target: ['chrome60', 'firefox60', 'safari11', 'edge18'],
},
},
})
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73b8eb0

Please sign in to comment.