Skip to content

Commit

Permalink
[all] drop solana support (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsdls authored Sep 20, 2023
1 parent 38fcbfb commit dca4246
Show file tree
Hide file tree
Showing 132 changed files with 297 additions and 11,794 deletions.
11 changes: 11 additions & 0 deletions .changeset/cool-lies-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@thirdweb-dev/react-core": major
"@thirdweb-dev/storage": major
"@thirdweb-dev/wallets": major
"@thirdweb-dev/react": major
"@thirdweb-dev/auth": major
"@thirdweb-dev/sdk": major
"thirdweb": minor
---

drop support for solana
1 change: 0 additions & 1 deletion .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ You can see a quick outline of each of the projects within this repo below, each
| [/auth](./packages/auth) | Best in class wallet authentication for Node backends | <a href="https://www.npmjs.com/package/@thirdweb-dev/auth"><img src="https://img.shields.io/npm/v/@thirdweb-dev/auth?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/storage](./packages/storage) | Best in class decentralized storage SDK for Browser and Node | <a href="https://www.npmjs.com/package/@thirdweb-dev/storage"><img src="https://img.shields.io/npm/v/@thirdweb-dev/storage?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/cli](./packages/cli) | Publish and deploy smart contracts without dealing with private keys | <a href="https://www.npmjs.com/package/thirdweb"><img src="https://img.shields.io/npm/v/thirdweb?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/solana](./packages/solana) | Solana SDK for Browser, Node and React Native | <a href="https://www.npmjs.com/package/@thirdweb-dev/solana"><img src="https://img.shields.io/npm/v/@thirdweb-dev/solana?color=red&label=npm&logo=npm" alt="npm version"/></a> |

## How to contribute

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./packages/sdk/coverage/evm/lcov.info,./packages/sdk/coverage/solana/lcov.info,
files: ./packages/sdk/coverage/evm/lcov.info

e2e:
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"test": "turbo run test test:evm test:solana --filter=./packages/*",
"test": "turbo run test --filter=./packages/*",
"e2e": "turbo run e2e",
"build": "turbo run build --filter=./packages/*",
"build:release": "turbo run build --force --filter=./packages/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@

## How to upgrade

The `ThirdwebAuth` constructor now takes the `domain` in the constructor, and takes a more generic `wallet` interface as input. The `wallet` can be imported from the `@thirdweb-dev/wallets` package, or for more simpler use cases, from the `@thirdweb-dev/auth/evm` and `@thirdweb-dev/auth/solana` entrypoints.
The `ThirdwebAuth` constructor now takes the `domain` in the constructor, and takes a more generic `wallet` interface as input. The `wallet` can be imported from the `@thirdweb-dev/wallets` package, or for more simpler use cases, from the `@thirdweb-dev/auth/evm` entrypoint.

```js
import { PrivateKeyWallet } from "@thirdweb-dev/auth/evm";
Expand Down
15 changes: 1 addition & 14 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@
},
"default": "./next/dist/thirdweb-dev-auth-next.cjs.js"
},
"./solana": {
"module": {
"browser": "./solana/dist/thirdweb-dev-auth-solana.browser.esm.js",
"default": "./solana/dist/thirdweb-dev-auth-solana.esm.js"
},
"default": "./solana/dist/thirdweb-dev-auth-solana.cjs.js"
},
"./express": {
"module": {
"browser": "./express/dist/thirdweb-dev-auth-express.browser.esm.js",
Expand Down Expand Up @@ -70,8 +63,7 @@
"express/index.ts",
"next/index.ts",
"next-auth/index.ts",
"evm/index.ts",
"solana/index.ts"
"evm/index.ts"
],
"exports": {
"envConditions": [
Expand All @@ -87,7 +79,6 @@
"@microsoft/api-extractor": "^7.36.3",
"@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "2.7.0",
"@solana/web3.js": "^1.62.0",
"@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.71",
"@thirdweb-dev/tsconfig": "workspace:*",
Expand Down Expand Up @@ -117,17 +108,13 @@
"typescript": "^5.1.6"
},
"peerDependencies": {
"@solana/web3.js": "^1.73.0",
"cookie-parser": "^1.4.6",
"ethers": "^5",
"express": "^4",
"next": "^12 || ^13",
"next-auth": "^4"
},
"peerDependenciesMeta": {
"@solana/web3.js": {
"optional": true
},
"cookie-parser": {
"optional": true
},
Expand Down
7 changes: 0 additions & 7 deletions packages/auth/solana/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/auth/src/core/functions/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { VerifyOptionsSchema } from "../schema/verify";
* Create an EIP-4361 & CAIP-122 compliant message to sign based on the login payload
*/
function createLoginMessage(payload: LoginPayloadData): string {
const typeField = payload.type === "evm" ? "Ethereum" : "Solana";
const typeField = "Ethereum";
const header = `${payload.domain} wants you to sign in with your ${typeField} account:`;
let prefix = [header, payload.address].join("\n");
prefix = [prefix, payload.statement].join("\n\n");
Expand Down
5 changes: 1 addition & 4 deletions packages/auth/src/core/schema/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ export const RawDateSchema = z.date().transform((i) => {
return Math.floor(i.getTime() / 1000);
});

export const AccountTypeSchema = z.union([
z.literal("evm"),
z.literal("solana"),
]);
export const AccountTypeSchema = z.literal("evm");

export type User<TContext extends Json = Json> = {
address: string;
Expand Down
29 changes: 0 additions & 29 deletions packages/auth/src/solana/index.ts

This file was deleted.

Loading

0 comments on commit dca4246

Please sign in to comment.