remove v4 (#4627)
This commit is contained in:
+1
-27
@@ -10,33 +10,7 @@
|
||||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": [
|
||||
"bundlers-esbuild",
|
||||
"bundlers-vite",
|
||||
"bundlers-webpack",
|
||||
"bundlers-swc",
|
||||
"runtimes-node-commonjs",
|
||||
"runtimes-node-module",
|
||||
"playground-web",
|
||||
"thirdweb-dashboard",
|
||||
"wallet-ui",
|
||||
"portal",
|
||||
"@thirdweb-dev/auth",
|
||||
"@thirdweb-dev/chains",
|
||||
"@thirdweb-dev/cli",
|
||||
"@thirdweb-dev/contracts-js",
|
||||
"@thirdweb-dev/crypto",
|
||||
"@thirdweb-dev/generated-abis",
|
||||
"@thirdweb-dev/merkletree",
|
||||
"@thirdweb-dev/pay",
|
||||
"@thirdweb-dev/payments",
|
||||
"@thirdweb-dev/react",
|
||||
"@thirdweb-dev/react-core",
|
||||
"@thirdweb-dev/sdk",
|
||||
"@thirdweb-dev/storage",
|
||||
"@thirdweb-dev/unity-js-bridge",
|
||||
"@thirdweb-dev/wallets"
|
||||
],
|
||||
"ignore": ["playground-web", "thirdweb-dashboard", "wallet-ui", "portal"],
|
||||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
||||
"updateInternalDependents": "always",
|
||||
"onlyUpdatePeerDependentsWhenOutOfRange": true
|
||||
|
||||
@@ -3,29 +3,6 @@
|
||||
# default ownership group
|
||||
- @jnsdls @joaquim-verges @MananTank @gregfromstl
|
||||
|
||||
# legacy packages
|
||||
|
||||
legacy_packages/auth/ @jnsdls @joaquim-verges
|
||||
legacy_packages/chains/ @jnsdls @joaquim-verges
|
||||
legacy_packages/cli/ @jnsdls @joaquim-verges
|
||||
legacy_packages/contracts-js/ @jnsdls @joaquim-verges
|
||||
legacy_packages/crypto/ @jnsdls @joaquim-verges
|
||||
legacy_packages/generated-abis/ @jnsdls @joaquim-verges
|
||||
legacy_packages/merkletree/ @jnsdls @joaquim-verges
|
||||
legacy_packages/pay/ @jnsdls @joaquim-verges
|
||||
legacy_packages/payments/ @jnsdls @joaquim-verges
|
||||
legacy_packages/react/ @MananTank @jnsdls @joaquim-verges
|
||||
legacy_packages/react-core/ @MananTank @jnsdls @joaquim-verges
|
||||
legacy_packages/react-native/ @jnsdls @joaquim-verges
|
||||
legacy_packages/react-native-compat/ @jnsdls @joaquim-verges
|
||||
legacy_packages/sdk/ @joaquim-verges @jnsdls
|
||||
legacy_packages/storage/ @jnsdls @joaquim-verges
|
||||
legacy_packages/wallets/ @MananTank @jnsdls @joaquim-verges
|
||||
|
||||
# legacy e2e
|
||||
|
||||
legacy_e2e/ @jnsdls
|
||||
|
||||
# packages
|
||||
packages/thirdweb/ @joaquim-verges @gregfromstl @jnsdls
|
||||
|
||||
@@ -38,7 +15,6 @@ packages/typedoc-gen/ @MananTank @jnsdls @joaquim-verges
|
||||
packages/service-utils/ @arcoraven @jnsdls @joaquim-verges
|
||||
packages/eslint-config-thirdweb/ @jnsdls @joaquim-verges
|
||||
packages/tw-tsconfig/ @jnsdls @joaquim-verges
|
||||
packages/unity-js-bridge/ @joaquim-verges @0xFirekeeper @jnsdls
|
||||
|
||||
# apps
|
||||
apps/ @jnsdls @joaquim-verges
|
||||
|
||||
@@ -5,9 +5,6 @@ dashboard:
|
||||
playground:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "apps/playground-web/**/*"
|
||||
legacy_packages:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "legacy-packages/**/*"
|
||||
packages:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "packages/**/*"
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
name: CI (Legacy Packages)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "legacy_packages/**"
|
||||
- "legacy_e2e/**"
|
||||
- "package.json"
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- "legacy_packages/**"
|
||||
- "legacy_e2e/**"
|
||||
- "package.json"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# To use Remote Caching, uncomment the next lines and follow the steps below.
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
jobs:
|
||||
optimize_ci:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
skip: ${{ steps.check_skip.outputs.skip }}
|
||||
steps:
|
||||
- name: Optimize CI
|
||||
id: check_skip
|
||||
uses: withgraphite/graphite-ci-action@main
|
||||
with:
|
||||
graphite_token: ${{ secrets.GRAPHITE_OMTIMIZE_TOKEN }}
|
||||
|
||||
build:
|
||||
needs: optimize_ci
|
||||
if: needs.optimize_ci.outputs.skip == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Packages
|
||||
steps:
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup & Install
|
||||
uses: ./.github/composite-actions/install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm build:legacy_packages
|
||||
|
||||
lint:
|
||||
needs: optimize_ci
|
||||
if: needs.optimize_ci.outputs.skip == 'false'
|
||||
timeout-minutes: 15
|
||||
name: Lint Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup & Install
|
||||
uses: ./.github/composite-actions/install
|
||||
|
||||
- run: pnpm lint:legacy
|
||||
|
||||
test:
|
||||
needs: optimize_ci
|
||||
if: needs.optimize_ci.outputs.skip == 'false'
|
||||
timeout-minutes: 15
|
||||
name: Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup & Install
|
||||
uses: ./.github/composite-actions/install
|
||||
|
||||
- run: pnpm test:legacy
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
directory: legacy_packages/
|
||||
flags: legacy_packages
|
||||
verbose: true
|
||||
|
||||
e2e:
|
||||
needs: optimize_ci
|
||||
if: needs.optimize_ci.outputs.skip == 'false'
|
||||
timeout-minutes: 15
|
||||
name: E2E Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup & Install
|
||||
uses: ./.github/composite-actions/install
|
||||
|
||||
- name: Install Playwright
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run e2e tests
|
||||
run: pnpm e2e:legacy
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CLI_E2E_API_KEY: ${{ secrets.CLI_E2E_API_KEY }}
|
||||
@@ -8,7 +8,6 @@ on:
|
||||
paths:
|
||||
- ".changeset/**"
|
||||
- "packages/**"
|
||||
- "legacy_packages/**"
|
||||
branches:
|
||||
- main
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
name: Sync chains every hour
|
||||
|
||||
on:
|
||||
# temporarily disabled chain syncing
|
||||
# schedule:
|
||||
# - cron: "0 * * * *" # Runs every hour
|
||||
workflow_dispatch: # Allows you to manually run the workflow from the Actions tab
|
||||
|
||||
jobs:
|
||||
sync-chains:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: 1.0.35
|
||||
|
||||
- name: Run chains sync
|
||||
run: bun run db:sync
|
||||
working-directory: ./legacy_packages/chains
|
||||
|
||||
- name: Check for Changes
|
||||
id: git-check
|
||||
run: |
|
||||
if git diff --quiet; then
|
||||
echo "CHANGES_FOUND=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "CHANGES_FOUND=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Create or Update sync-chains.md
|
||||
if: env.CHANGES_FOUND == 'true'
|
||||
run: |
|
||||
echo '---' > .changeset/sync-chains.md
|
||||
echo '"@thirdweb-dev/chains": patch' >> .changeset/sync-chains.md
|
||||
echo '---' >> .changeset/sync-chains.md
|
||||
echo '' >> .changeset/sync-chains.md
|
||||
echo 'Synced Chains Package' >> .changeset/sync-chains.md
|
||||
|
||||
- name: Commit Changes
|
||||
if: env.CHANGES_FOUND == 'true'
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add -A
|
||||
git commit -m "chore(chains): sync from db"
|
||||
|
||||
- name: Create or Update Pull Request
|
||||
if: env.CHANGES_FOUND == 'true'
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
title: "chore(chains): update chains"
|
||||
branch: "sync-chains"
|
||||
body: "This PR was automatically created by a GitHub Action. It updates the chains package with the latest changes from the database."
|
||||
commit-message: "chore(chains): sync from db"
|
||||
@@ -10,7 +10,6 @@ dist-ssr
|
||||
.cache
|
||||
server/dist
|
||||
public/dist
|
||||
./legacy_packages/contracts-js/abis
|
||||
.idea/
|
||||
.yalc/
|
||||
yalc.lock
|
||||
@@ -18,9 +17,6 @@ yalc.lock
|
||||
playwright-report/
|
||||
.env/
|
||||
|
||||
# Artifacts
|
||||
legacy_packages/cli/artifacts/
|
||||
|
||||
# codecov binary
|
||||
codecov
|
||||
|
||||
@@ -28,7 +24,6 @@ codecov
|
||||
sitemap*.xml
|
||||
|
||||
# typedoc
|
||||
legacy_packages/*/typedoc/*
|
||||
packages/*/typedoc/*
|
||||
|
||||
*storybook.log
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/cli": minor
|
||||
"thirdweb": minor
|
||||
---
|
||||
|
||||
Adds --expo option to cli
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/sdk": patch
|
||||
---
|
||||
|
||||
ZkCandy addresses
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/cli": patch
|
||||
"@thirdweb-dev/sdk": patch
|
||||
---
|
||||
|
||||
Override contract publish id on CLI
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/merkletree": patch
|
||||
"@thirdweb-dev/react-core": patch
|
||||
"@thirdweb-dev/payments": patch
|
||||
"@thirdweb-dev/storage": patch
|
||||
"@thirdweb-dev/wallets": patch
|
||||
"@thirdweb-dev/chains": patch
|
||||
"@thirdweb-dev/crypto": patch
|
||||
"@thirdweb-dev/service-utils": patch
|
||||
"@thirdweb-dev/react": patch
|
||||
"@thirdweb-dev/auth": patch
|
||||
"@thirdweb-dev/cli": patch
|
||||
"@thirdweb-dev/pay": patch
|
||||
"@thirdweb-dev/sdk": patch
|
||||
---
|
||||
|
||||
update dependencies
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/react": patch
|
||||
---
|
||||
|
||||
Fix error when doing buy with Crypto transaction with InApp wallet
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/sdk": patch
|
||||
---
|
||||
|
||||
Fix EIP155 check for create2 factory deployment
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/wallets": patch
|
||||
"@thirdweb-dev/sdk": patch
|
||||
---
|
||||
|
||||
respect gas overrides if they are passed in
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/react": patch
|
||||
---
|
||||
|
||||
Fix wallet app not opening when using ConnectButton inside an iframe
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@thirdweb-dev/chains": patch
|
||||
---
|
||||
|
||||
Synced Chains Package
|
||||
@@ -1,142 +1,142 @@
|
||||
import { readFile } from "fs/promises";
|
||||
import { getFilesRecursive } from "./getFilesRecursive";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import {
|
||||
parse,
|
||||
HTMLElement as X_HTMLElement,
|
||||
Node as X_Node,
|
||||
TextNode as X_TextNode,
|
||||
CommentNode as X_CommentNode,
|
||||
CommentNode as X_CommentNode,
|
||||
HTMLElement as X_HTMLElement,
|
||||
type Node as X_Node,
|
||||
TextNode as X_TextNode,
|
||||
parse,
|
||||
} from "node-html-parser";
|
||||
import { PageData, PageSectionData } from "../types";
|
||||
import { trimExtraSpace } from "./trimExtraSpace";
|
||||
import type { PageData, PageSectionData } from "../types";
|
||||
import { getFilesRecursive } from "./getFilesRecursive";
|
||||
import { ignoreHeadings } from "./settings";
|
||||
import { trimExtraSpace } from "./trimExtraSpace";
|
||||
|
||||
export async function extractSearchData(rootDir: string): Promise<PageData[]> {
|
||||
const nextOutputDir = `${rootDir}/.next/server/app`;
|
||||
const htmlFiles = getFilesRecursive(nextOutputDir, "html");
|
||||
const nextOutputDir = `${rootDir}/.next/server/app`;
|
||||
const htmlFiles = getFilesRecursive(nextOutputDir, "html");
|
||||
|
||||
const pages: PageData[] = [];
|
||||
const pages: PageData[] = [];
|
||||
|
||||
const noMainFound: string[] = [];
|
||||
const noH1Found: string[] = [];
|
||||
const noMainFound: string[] = [];
|
||||
const noH1Found: string[] = [];
|
||||
|
||||
await Promise.all(
|
||||
htmlFiles.map(async (filePath) => {
|
||||
const htmlContent = await readFile(filePath, "utf-8");
|
||||
const mainEl = parse(htmlContent, {
|
||||
comment: false,
|
||||
blockTextElements: {
|
||||
pre: false, // parse text inside <pre> elements instead of treating it as text
|
||||
},
|
||||
}).querySelector("main");
|
||||
await Promise.all(
|
||||
htmlFiles.map(async (filePath) => {
|
||||
const htmlContent = await readFile(filePath, "utf-8");
|
||||
const mainEl = parse(htmlContent, {
|
||||
comment: false,
|
||||
blockTextElements: {
|
||||
pre: false, // parse text inside <pre> elements instead of treating it as text
|
||||
},
|
||||
}).querySelector("main");
|
||||
|
||||
if (!mainEl) {
|
||||
noMainFound.push(
|
||||
filePath.split(".next/server/app")[1]?.replace(".html", "") || "",
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!mainEl) {
|
||||
noMainFound.push(
|
||||
filePath.split(".next/server/app")[1]?.replace(".html", "") || "",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const noIndex = mainEl.getAttribute("data-noindex");
|
||||
const noIndex = mainEl.getAttribute("data-noindex");
|
||||
|
||||
if (noIndex) {
|
||||
return;
|
||||
}
|
||||
if (noIndex) {
|
||||
return;
|
||||
}
|
||||
|
||||
const pageTitle = mainEl.querySelector("h1")?.text;
|
||||
const pageTitle = mainEl.querySelector("h1")?.text;
|
||||
|
||||
if (!pageTitle) {
|
||||
noH1Found.push(
|
||||
filePath.split(".next/server/app")[1]?.replace(".html", "") || "",
|
||||
);
|
||||
}
|
||||
if (!pageTitle) {
|
||||
noH1Found.push(
|
||||
filePath.split(".next/server/app")[1]?.replace(".html", "") || "",
|
||||
);
|
||||
}
|
||||
|
||||
pages.push({
|
||||
href: filePath.replace(nextOutputDir, "").replace(".html", ""),
|
||||
title: pageTitle ? trimExtraSpace(pageTitle) : "",
|
||||
sections: getPageSections(mainEl),
|
||||
});
|
||||
}),
|
||||
);
|
||||
pages.push({
|
||||
href: filePath.replace(nextOutputDir, "").replace(".html", ""),
|
||||
title: pageTitle ? trimExtraSpace(pageTitle) : "",
|
||||
sections: getPageSections(mainEl),
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
if (noMainFound.length) {
|
||||
console.warn(
|
||||
`\n\nNo <main> element found in below routes, They will not be included in search results :\n`,
|
||||
);
|
||||
noMainFound.forEach((f) => console.warn("* " + f));
|
||||
console.warn("\n");
|
||||
}
|
||||
if (noMainFound.length) {
|
||||
console.warn(
|
||||
`\n\nNo <main> element found in below routes, They will not be included in search results :\n`,
|
||||
);
|
||||
noMainFound.forEach((f) => console.warn("* " + f));
|
||||
console.warn("\n");
|
||||
}
|
||||
|
||||
if (noH1Found.length) {
|
||||
console.warn(`\n\nNo <h1> element found in below routes :\n`);
|
||||
noH1Found.forEach((f) => console.warn("* " + f));
|
||||
console.warn("\n");
|
||||
}
|
||||
if (noH1Found.length) {
|
||||
console.warn(`\n\nNo <h1> element found in below routes :\n`);
|
||||
noH1Found.forEach((f) => console.warn("* " + f));
|
||||
console.warn("\n");
|
||||
}
|
||||
|
||||
return pages;
|
||||
return pages;
|
||||
}
|
||||
|
||||
function getPageSections(main: X_HTMLElement): PageSectionData[] {
|
||||
const sectionData: PageSectionData[] = [];
|
||||
const sectionData: PageSectionData[] = [];
|
||||
|
||||
const ignoreTags = new Set(["code", "nav"].map((t) => t.toUpperCase()));
|
||||
const ignoreTags = new Set(["code", "nav"].map((t) => t.toUpperCase()));
|
||||
|
||||
function collector(node: X_Node) {
|
||||
if (node instanceof X_CommentNode) {
|
||||
return;
|
||||
} else if (node instanceof X_HTMLElement) {
|
||||
if (ignoreTags.has(node.tagName)) {
|
||||
return;
|
||||
}
|
||||
function collector(node: X_Node) {
|
||||
if (node instanceof X_CommentNode) {
|
||||
return;
|
||||
} else if (node instanceof X_HTMLElement) {
|
||||
if (ignoreTags.has(node.tagName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const noIndexAttribute = node.getAttribute("data-noindex");
|
||||
const noIndexAttribute = node.getAttribute("data-noindex");
|
||||
|
||||
if (noIndexAttribute === "true") {
|
||||
return;
|
||||
}
|
||||
if (noIndexAttribute === "true") {
|
||||
return;
|
||||
}
|
||||
|
||||
// headings -> start new section
|
||||
if (node.tagName.startsWith("H")) {
|
||||
if (node.tagName === "H1") {
|
||||
return;
|
||||
}
|
||||
// headings -> start new section
|
||||
if (node.tagName.startsWith("H")) {
|
||||
if (node.tagName === "H1") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ignoreHeadings.has(node.text.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
if (ignoreHeadings.has(node.text.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
sectionData.push({
|
||||
title: node.text,
|
||||
href: node.parentNode.querySelector("a")?.getAttribute("href") || "",
|
||||
content: "",
|
||||
});
|
||||
} else {
|
||||
for (const child of node.childNodes) {
|
||||
collector(child);
|
||||
}
|
||||
}
|
||||
} else if (node instanceof X_TextNode) {
|
||||
const lastSection = sectionData[sectionData.length - 1];
|
||||
const text = node.text;
|
||||
if (text) {
|
||||
if (lastSection) {
|
||||
lastSection.content += node.text + " ";
|
||||
} else {
|
||||
sectionData.push({
|
||||
content: node.text + " ",
|
||||
href: "",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sectionData.push({
|
||||
title: node.text,
|
||||
href: node.parentNode.querySelector("a")?.getAttribute("href") || "",
|
||||
content: "",
|
||||
});
|
||||
} else {
|
||||
for (const child of node.childNodes) {
|
||||
collector(child);
|
||||
}
|
||||
}
|
||||
} else if (node instanceof X_TextNode) {
|
||||
const lastSection = sectionData[sectionData.length - 1];
|
||||
const text = node.text;
|
||||
if (text) {
|
||||
if (lastSection) {
|
||||
lastSection.content += node.text + " ";
|
||||
} else {
|
||||
sectionData.push({
|
||||
content: node.text + " ",
|
||||
href: "",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
collector(main);
|
||||
collector(main);
|
||||
|
||||
sectionData.forEach((s) => {
|
||||
s.title = s.title ? trimExtraSpace(s.title) : s.title;
|
||||
s.content = trimExtraSpace(s.content);
|
||||
});
|
||||
sectionData.forEach((s) => {
|
||||
s.title = s.title ? trimExtraSpace(s.title) : s.title;
|
||||
s.content = trimExtraSpace(s.content);
|
||||
});
|
||||
|
||||
return sectionData.filter((s) => s.title || s.content);
|
||||
return sectionData.filter((s) => s.title || s.content);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ create new projects with the SDK configured, build, publish and deploy smart con
|
||||
|
||||
<OpenSourceCard
|
||||
title="CLI"
|
||||
href="https://github.com/thirdweb-dev/js/tree/main/legacy_packages/cli"
|
||||
href="https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/cli"
|
||||
/>
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -40,7 +40,7 @@ function App() {
|
||||
|
||||
<Details id="using-chains-package" summary="Import a chain from chains package">
|
||||
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains) package which has 1000+ chains.
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains) package which has 1000+ chains.
|
||||
|
||||
```jsx
|
||||
import { ThirdwebProvider } from "@thirdweb-dev/react-native";
|
||||
@@ -62,7 +62,7 @@ Override the default values (such as an RPC URL) for any given chain.
|
||||
<Callout variant='info'>
|
||||
By default, the `@thirdweb-dev/chains` provides free-to-use RPCs. No configuration required!
|
||||
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains/chains).
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains/chains).
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ function App() {
|
||||
|
||||
<Details id="using-chains-package" summary="Import a chain from chains package">
|
||||
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains) package which has 1000+ chains.
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains) package which has 1000+ chains.
|
||||
|
||||
```jsx
|
||||
import { ThirdwebSDKProvider } from "@thirdweb-dev/react-native";
|
||||
@@ -62,7 +62,7 @@ Override the default values (such as an RPC URL) for any given chain.
|
||||
<Callout variant='info'>
|
||||
By default, the `@thirdweb-dev/chains` provides free-to-use RPCs. No configuration required!
|
||||
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains/chains).
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains/chains).
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ messages, and utilize common standards such as tokens, NFTs, marketplaces; all w
|
||||
|
||||
<OpenSourceCard
|
||||
title="React Native SDK"
|
||||
href="https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-native"
|
||||
href="https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/react-native"
|
||||
/>
|
||||
|
||||
## How It Works
|
||||
|
||||
@@ -40,7 +40,7 @@ function App() {
|
||||
|
||||
<Details id="using-chains-package" summary="Import a chain from chains package">
|
||||
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains) package which has 1000+ chains.
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains) package which has 1000+ chains.
|
||||
|
||||
```jsx
|
||||
import { ThirdwebProvider } from "@thirdweb-dev/react";
|
||||
@@ -62,7 +62,7 @@ Override the default values (such as an RPC URL) for any given chain.
|
||||
<Callout variant='info'>
|
||||
By default, the `@thirdweb-dev/chains` provides free-to-use RPCs. No configuration required!
|
||||
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains/chains).
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains/chains).
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ function App() {
|
||||
|
||||
<Details id="using-chains-package" summary="Import a chain from chains package">
|
||||
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains) package which has 1000+ chains.
|
||||
If the chain you are looking for is not one of default supported chains, you can import a chain from the [@thirdweb-dev/chains](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains) package which has 1000+ chains.
|
||||
|
||||
```jsx
|
||||
import { ThirdwebSDKProvider } from "@thirdweb-dev/react";
|
||||
@@ -62,7 +62,7 @@ Override the default values (such as an RPC URL) for any given chain.
|
||||
<Callout variant='info'>
|
||||
By default, the `@thirdweb-dev/chains` provides free-to-use RPCs. No configuration required!
|
||||
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/main/legacy_packages/chains/chains).
|
||||
[View the default RPC URLs for each network](https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/chains/chains).
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ messages, and utilize common standards such as tokens, NFTs, marketplaces; all w
|
||||
|
||||
<OpenSourceCard
|
||||
title="React SDK"
|
||||
href="https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react"
|
||||
href="https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/react"
|
||||
/>
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -6,9 +6,7 @@ export async function fetchReactCoreDoc() {
|
||||
return prom;
|
||||
}
|
||||
prom = (async () => {
|
||||
const doc = await import(
|
||||
"../../../../../../../../legacy_packages/react-core/typedoc/documentation.json"
|
||||
);
|
||||
const doc = await import("./v4-legacy-docs/react-core.json");
|
||||
|
||||
return transform(doc as any);
|
||||
})();
|
||||
|
||||
@@ -9,9 +9,7 @@ export async function fetchReactDoc() {
|
||||
}
|
||||
prom = (async () => {
|
||||
const [doc, reactCoreDoc] = await Promise.all([
|
||||
import(
|
||||
"../../../../../../../../legacy_packages/react/typedoc/documentation.json"
|
||||
),
|
||||
import("./v4-legacy-docs/react.json"),
|
||||
fetchReactCoreDoc(),
|
||||
]);
|
||||
return mergeDocs(reactCoreDoc, transform(doc as any));
|
||||
|
||||
@@ -6,9 +6,7 @@ export async function fetchStorageDoc() {
|
||||
return prom;
|
||||
}
|
||||
prom = (async () => {
|
||||
const doc = await import(
|
||||
"../../../../../../../../legacy_packages/storage/typedoc/documentation.json"
|
||||
);
|
||||
const doc = await import("./v4-legacy-docs/storage.json");
|
||||
|
||||
return transform(doc as any);
|
||||
})();
|
||||
|
||||
@@ -9,9 +9,7 @@ export async function fetchTypeScriptDoc(version: string) {
|
||||
return v4Prom;
|
||||
}
|
||||
v4Prom = (async () => {
|
||||
const doc = await import(
|
||||
"../../../../../../../../legacy_packages/sdk/typedoc/documentation.json"
|
||||
);
|
||||
const doc = await import("./v4-legacy-docs/sdk.json");
|
||||
|
||||
return transform(doc as any);
|
||||
})();
|
||||
|
||||
@@ -6,9 +6,7 @@ export async function fetchWalletsDoc() {
|
||||
return prom;
|
||||
}
|
||||
prom = (async () => {
|
||||
const doc = await import(
|
||||
"../../../../../../../../legacy_packages/wallets/typedoc/documentation.json"
|
||||
);
|
||||
const doc = await import("./v4-legacy-docs/wallets.json");
|
||||
|
||||
return transform(doc as any);
|
||||
})();
|
||||
|
||||
+45429
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+4290
File diff suppressed because it is too large
Load Diff
+193398
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,7 @@ Connect to user's wallets, interact with smart contracts, sign messages, and uti
|
||||
|
||||
<OpenSourceCard
|
||||
title="TypeScript SDK"
|
||||
href="https://github.com/thirdweb-dev/js/tree/main/legacy_packages/sdk"
|
||||
href="https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/sdk"
|
||||
/>
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -42,7 +42,7 @@ or integrate an existing wallet provider with thirdweb's
|
||||
|
||||
<OpenSourceCard
|
||||
title="wallets"
|
||||
href="https://github.com/thirdweb-dev/js/tree/main/legacy_packages/wallets"
|
||||
href="https://github.com/thirdweb-dev/js/tree/v4/legacy_packages/wallets"
|
||||
/>
|
||||
|
||||
<Heading level={2} id="wallets" children="Popular Wallets Available" />
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
},
|
||||
"files": {
|
||||
"ignore": [
|
||||
"legacy_packages/**",
|
||||
"packages/thirdweb/src/crypto/aes/lib/md5.ts",
|
||||
"packages/thirdweb/src/utils/promise/p-limit.ts",
|
||||
"packages/thirdweb/src/utils/bytecode/cbor-decode.ts",
|
||||
|
||||
@@ -8,10 +8,6 @@ coverage:
|
||||
target: auto
|
||||
flags:
|
||||
- packages
|
||||
legacy_packages:
|
||||
target: auto
|
||||
flags:
|
||||
- legacy_packages
|
||||
|
||||
|
||||
github_checks:
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { Ethereum, getChainBySlug } from "@thirdweb-dev/chains";
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { sha256 } from "@thirdweb-dev/crypto";
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { MerkleTree } from "@thirdweb-dev/merkletree";
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "bundlers-esbuild",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "0.23.1",
|
||||
"ora": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
await $`esbuild fixtures/${fixture} --bundle`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
spinner.fail("Failed to run fixture: " + fixture);
|
||||
// await fs.rm("./fixtures/index.html");
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// await fs.rm("./fixtures/index.html");
|
||||
|
||||
spinner.suffixText = "";
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { Ethereum, getChainBySlug } from "@thirdweb-dev/chains";
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { sha256 } from "@thirdweb-dev/crypto";
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { MerkleTree } from "@thirdweb-dev/merkletree";
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "bundlers-swc",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.3.12",
|
||||
"@swc/core": "^1.6.6",
|
||||
"ora": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
await $`bunx swc fixtures/${fixture}`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
spinner.fail("Failed to run fixture: " + fixture);
|
||||
// await fs.rm("./fixtures/index.html");
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// await fs.rm("./fixtures/index.html");
|
||||
|
||||
spinner.suffixText = "";
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { Ethereum, getChainBySlug } from "@thirdweb-dev/chains";
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { sha256 } from "@thirdweb-dev/crypto";
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { MerkleTree } from "@thirdweb-dev/merkletree";
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "bundlers-vite",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ora": "^8.0.1",
|
||||
"vite": "5.4.5"
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
// write a basic template index.html file that includes the fixture
|
||||
await fs.writeFile(
|
||||
"./fixtures/index.html",
|
||||
`<html>
|
||||
<head>
|
||||
<script type="module" src="./${fixture}"></script>
|
||||
</head>
|
||||
</html>
|
||||
`,
|
||||
);
|
||||
|
||||
await $`vite build fixtures/`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
spinner.fail("Failed to run fixture: " + fixture);
|
||||
await fs.rm("./fixtures/index.html");
|
||||
await fs.rmdir("./fixtures/dist", { recursive: true });
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await fs.rm("./fixtures/index.html");
|
||||
await fs.rmdir("./fixtures/dist", { recursive: true });
|
||||
|
||||
spinner.suffixText = "";
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { Ethereum, getChainBySlug } from "@thirdweb-dev/chains";
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { sha256 } from "@thirdweb-dev/crypto";
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { MerkleTree } from "@thirdweb-dev/merkletree";
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "bundlers-webpack",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ora": "^8.0.1",
|
||||
"webpack": "^5.92.1",
|
||||
"webpack-cli": "^5.1.4"
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
await $`webpack build ./fixtures/${fixture} --mode=production`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
|
||||
spinner.fail("Fixture failed:");
|
||||
|
||||
await fs.rmdir("./dist", { recursive: true });
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await fs.rmdir("./dist", { recursive: true });
|
||||
|
||||
spinner.suffixText = "";
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,3 +0,0 @@
|
||||
const { ThirdwebAuth } = require("@thirdweb-dev/auth");
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
const { Ethereum, getChainBySlug } = require("@thirdweb-dev/chains");
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
const { sha256 } = require("@thirdweb-dev/crypto");
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
const { MerkleTree } = require("@thirdweb-dev/merkletree");
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
const { ThirdwebSDK } = require("@thirdweb-dev/sdk");
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
const { ThirdwebStorage } = require("@thirdweb-dev/storage");
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
const { LocalWallet } = require("@thirdweb-dev/wallets");
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "runtimes-node-commonjs",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ora": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
await $`node fixtures/${fixture}`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
spinner.fail("Failed to run fixture: " + fixture);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||
|
||||
new ThirdwebAuth();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { Ethereum, getChainBySlug } from "@thirdweb-dev/chains";
|
||||
|
||||
getChainBySlug("ethereum");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { sha256 } from "@thirdweb-dev/crypto";
|
||||
|
||||
sha256("hello world");
|
||||
@@ -1,3 +0,0 @@
|
||||
import { MerkleTree } from "@thirdweb-dev/merkletree";
|
||||
|
||||
new MerkleTree([]);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
|
||||
new ThirdwebSDK(1);
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
new ThirdwebStorage();
|
||||
@@ -1,3 +0,0 @@
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
|
||||
new LocalWallet();
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "runtimes-node-module",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
"@thirdweb-dev/merkletree": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "bun run.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ora": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import { $ } from "bun";
|
||||
import fs from "node:fs/promises";
|
||||
import ora from "ora";
|
||||
|
||||
const fixtures = await fs.readdir("./fixtures");
|
||||
|
||||
const spinner = ora("Running fixtures: ").start();
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
spinner.suffixText = fixture;
|
||||
try {
|
||||
await $`node fixtures/${fixture}`.text();
|
||||
} catch (error) {
|
||||
if (error.exitCode !== 0) {
|
||||
console.error(error);
|
||||
spinner.fail("Failed to run fixture: " + fixture);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spinner.succeed("All fixtures ran successfully");
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: ["thirdweb"],
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
node_modules/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2021 Non-Fungible Labs, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,38 +0,0 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb Auth</h1>
|
||||
<p align="center">
|
||||
<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>
|
||||
<a href="https://github.com/thirdweb-dev/js/actions/workflows/build-test-lint.yml"><img alt="Build Status" src="https://github.com/thirdweb-dev/js/actions/workflows/build-test-lint.yml/badge.svg"/></a>
|
||||
<a href="https://discord.gg/thirdweb"><img alt="Join our Discord!" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/></a>
|
||||
|
||||
</p>
|
||||
<p align="center"><strong>Best in class wallet authentication for Node backends</strong></p>
|
||||
<br />
|
||||
|
||||
## Overview
|
||||
|
||||
Auth is a developer SDK that lets you integrate passwordless web3-native authentication and authorization into your applications.
|
||||
|
||||
It enables users to sign in with their wallets, allowing apps to access rich blockchain-level data and interact with their users on-chain.
|
||||
|
||||
With Auth, developers can build applications that have secure, self-custodied, web3-first authentication.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the latest version of the SDK with either `npm` or `yarn`:
|
||||
|
||||
```shell
|
||||
npm install @thirdweb-dev/auth
|
||||
```
|
||||
|
||||
```shell
|
||||
yarn add @thirdweb-dev/auth
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- Check out the [Auth Documentation](https://portal.thirdweb.com/auth) for full guides and API references on how to use Auth.
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-auth-evm.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth-evm.esm.js",
|
||||
"browser": {
|
||||
"./dist/thirdweb-dev-auth-evm.esm.js": "./dist/thirdweb-dev-auth-evm.browser.esm.js"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-auth-express.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth-express.esm.js",
|
||||
"browser": {
|
||||
"./dist/thirdweb-dev-auth-express.esm.js": "./dist/thirdweb-dev-auth-express.browser.esm.js"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user