Skip to content

Commit

Permalink
Merge pull request #7 from thewuhxyz/v0.1.0
Browse files Browse the repository at this point in the history
Wallet Standard
  • Loading branch information
thewuhxyz authored Jul 23, 2024
2 parents 4a7ebc5 + 651b14b commit 93c6e24
Show file tree
Hide file tree
Showing 101 changed files with 20,652 additions and 8,742 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
8 changes: 8 additions & 0 deletions .changeset/chilly-schools-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@thewuh/wallet-standard-wallet-adapter-svelte': minor
'@thewuh/wallet-adapter-svelte-anchor': minor
'@thewuh/wallet-adapter-svelte-core': minor
'@thewuh/wallet-adapter-svelte-ui': minor
---

Release - Wallet Standard support
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["example"]
}
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup pnpm 9
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ node_modules
docs

.parcel-cache

.turbo
build
dist
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers = true
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docs
lib
dist
build
out
.next
Expand Down
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
# `@svelte-on-solana/wallet-adapter`
# `@thewuh/wallet-adapter-svelte`
_NB: this is a hard fork of the [@svelte-on-solana/wallet-adapter](https://github.com/svelte-on-solana/wallet-adapter) with added support for Wallet Standard and updated Anchor helper._

![Wallets](wallets-adapter.png)

Modular TypeScript wallet adapter and UI components for Solana/Anchor applications using [SvelteJS](https://svelte.dev/) as framework. This package contains a solution for [Svelte Template](https://github.com/sveltejs/template) and [SvelteKit](https://kit.svelte.dev/), making possible to build Solana Dapps in SPA or SSR mode.

[View demo][4] / [Browse demo code][5]
[View demo][6] / [Browse demo code][5]

## Quick installation

In your existing project, install:

```bash
npm install @thewuh/wallet-adapter-svelte-core \
@thewuh/wallet-adapter-svelte-ui\
@thewuh/wallet-adapter-svelte-anchor\
@solana/web3.js\
```


## Packages

- [Core][1] - Svelte Store which exposes methods and properties to run the wallet in your application
- [UI][2] - Pre-built components for integrating with Solana wallets using Svelte
- [Anchor][3] - Helper components for working with Anchor
- [Standard][1] - Svelte Store that helps to manage adapters that follow the Wallet Standard
- [Core][2] - Svelte Store which exposes methods and properties to run the wallet in your application
- [UI][3] - Pre-built components for integrating with Solana wallets using Svelte
- [Anchor][4] - Helper components for working with Anchor
- [Example][5] - Example app using packages

## Build from Source

1. Clone the project:
```shell
git clone https://github.com/svelte-on-solana/wallet-adapter.git
git clone https://github.com/thewuh/wallet-adapter-svelte.git
```

2. Install dependencies:
```shell
cd wallet-adapter
yarn install
cd wallet-adapter-svelte
pnpm install
```

3. Build all packages:
```shell
yarn build
pnpm build
```

4. Run locally:
```shell
cd packages/ui/
yarn start
cd packages/example/
pnpm start
```

[1]: https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/
[2]: https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/ui/README.md
[3]: https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/anchor/README.md
[4]: https://github.com/silvestrevivo/solana-svelte-counter/
[5]: https://solana-svelte-counter.netlify.app/
[1]: https://github.com/thewuhxyz/wallet-adapter-svelte/blob/main/packages/standard/README.md/
[2]: https://github.com/thewuhxyz/wallet-adapter-svelte/blob/main/packages/core/README.md/
[3]: https://github.com/thewuhxyz/wallet-adapter-svelte/blob/main/packages/ui/README.md
[4]: https://github.com/thewuhxyz/wallet-adapter-svelte/blob/main/packages/anchor/README.md
[5]: https://github.com/thewuhxyz/wallet-adapter-svelte/blob/main/packages/example
[6]: https://wallet-adapter-svelte.thewuh.xyz/
6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

73 changes: 38 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,69 @@
{
"private": true,
"name": "@svelte-on-solana/wallet-adapter",
"name": "@thewuh/wallet-adapter-svelte",
"author": "Svelte on Solana",
"repository": "https://github.com/svelte-on-solana/wallet-adapter",
"maintainers": [
"The Wuh <[email protected]> (https://dev.thewuh.xyz)"
],
"repository": "https://github.com/thewuhxyz/wallet-adapter-svelte",
"license": "Apache-2.0",
"type": "module",
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/@babel/preset-env",
"**/@babel/preset-env/**",
"**/babel-loader",
"**/babel-loader/**",
"**/webpack",
"**/webpack/**"
]
},
"engines": {
"node": ">= 14"
"node": ">= 18"
},
"publishConfig": {
"access": "public"
},
"packageManager": "[email protected]",
"scripts": {
"clean": "lerna run clean",
"build": "lerna run build",
"test": "lerna run test",
"publish": "lerna publish from-package",
"deploy": "yarn deploy:docs && yarn deploy:example",
"deploy:docs": "yarn docs && gh-pages --dist docs --dotfiles",
"changeset": "changeset",
"clean": "turbo run clean",
"build": "turbo run build",
"dev": "turbo run dev",
"test": "turbo run test",
"build:anchor": "pnpm build --filter=@thewuh/wallet-adapter-svelte-anchor",
"build:core": "pnpm build --filter=@thewuh/wallet-adapter-svelte-core",
"build:standard": "pnpm build --filter=@thewuh/wallet-standard-wallet-adapter-svelte",
"build:ui": "pnpm build --filter=@thewuh/wallet-adapter-svelte-ui",
"build:packages": "pnpm build:standard && pnpm build:core && pnpm build:ui && pnpm build:anchor",
"install:anchor": "pnpm install --filter=@thewuh/wallet-adapter-svelte-anchor",
"install:core": "pnpm install --filter=@thewuh/wallet-adapter-svelte-core",
"install:standard": "pnpm install --filter=@thewuh/wallet-standard-wallet-adapter-svelte",
"install:ui": "pnpm install --filter=@thewuh/wallet-adapter-svelte-ui",
"deploy": "pnpm deploy:docs && pnpm deploy:example",
"deploy:docs": "pnpm docs && gh-pages --dist docs --dotfiles",
"deploy:example": "gh-pages --dist packages/starter/example/out --dest example --dotfiles",
"docs": "shx rm -rf docs && NODE_OPTIONS=--max_old_space_size=8192 typedoc && shx cp ./{.nojekyll,wallets.png} docs/",
"fmt": "prettier --write '{*,**/*}.{js,ts,jsx,tsx,json}'",
"lint": "eslint --ext .ts . && prettier --check '{*,**/*}.{js,ts,jsx,tsx,json}'",
"lint:fix": "eslint --fix --ext .ts . && yarn fmt",
"nuke": "shx rm -rf {.,packages/*}/{node_modules,yarn.lock}"
"lint:fix": "eslint --fix --ext .ts . && pnpm fmt",
"nuke": "shx rm -rf {.,packages/*}/{node_modules,pnpm-lock.yaml}",
"release": "pnpm build:all && changeset publish"
},
"devDependencies": {
"@babel/eslint-parser": "^7.16.5",
"@changesets/cli": "^2.27.7",
"@types/eslint": "^8.2.1",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/node": "^16.11.12",
"@types/node": "^20.10.0",
"@types/prettier": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.2.1",
"gh-pages": "^3.2.3",
"lerna": "^4.0.0",
"prettier": "^2.5.1",
"shx": "^0.3.3",
"tslib": "^2.3.0",
"turbo": "^1.13.2",
"typedoc": "^0.22.10",
"typescript": "~4.4.4",
"typescript": "~5.0.2",
"typescript-esm": "^2.0.0"
},
"dependencies": {
"svelte2tsx": "^0.5.5"
"resolutions": {
"@solana/web3.js": "~1.88.0",
"rpc-websockets": "~7.9.0"
}
}
20 changes: 0 additions & 20 deletions packages/anchor/.eslintrc.cjs

This file was deleted.

23 changes: 20 additions & 3 deletions packages/anchor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
.DS_Store
node_modules
/build

# Output
.output
.vercel
/.svelte-kit
/package
/build
/dist

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions packages/anchor/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions packages/anchor/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
4 changes: 3 additions & 1 deletion packages/anchor/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
Loading

0 comments on commit 93c6e24

Please sign in to comment.