From a0c639a9497235d260b16158fb70cc5c01410709 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 13:58:56 +0300 Subject: [PATCH 01/18] chore: config weavevm --- .../src/SiteAdaptor/components/Terms.tsx | 3 +- packages/plugins/FileService/src/constants.ts | 2 + packages/plugins/FileService/src/helpers.ts | 1 + packages/plugins/FileService/src/types.ts | 1 + pnpm-lock.yaml | 37 +++++++++++-------- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx index 4d3dd4bf70a0..707afa1a7af5 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx @@ -98,7 +98,8 @@ export function Terms() { Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, - PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB. + PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB for most providers + and 8 MB for WeaveVM.

You can store files in multiple decentralized networks through the Web3 file service. When diff --git a/packages/plugins/FileService/src/constants.ts b/packages/plugins/FileService/src/constants.ts index e6769bdcc1b6..a76be5ce320f 100644 --- a/packages/plugins/FileService/src/constants.ts +++ b/packages/plugins/FileService/src/constants.ts @@ -3,6 +3,7 @@ export const META_KEY_2 = 'com.maskbook.fileservice:2' export const META_KEY_3 = 'com.maskbook.fileservice:3' export const MAX_FILE_SIZE = 10 * 1000 * 1000 +export const MAX_FILE_SIZE_WEAVEVM = 8 * 1024 * 1024 export const LANDING_PAGE = 'https://files.r2d2.to/partner/arweave/landing-page.html' export const RECOVERY_PAGE = 'https://fileservice.r2d2.to/recover' @@ -19,4 +20,5 @@ export const enum RoutePaths { export const enum Provider { IPFS = 'ipfs', Arweave = 'arweave', + WeaveVM = 'weavevm', } diff --git a/packages/plugins/FileService/src/helpers.ts b/packages/plugins/FileService/src/helpers.ts index f0f10902425e..b6894eeb90ac 100644 --- a/packages/plugins/FileService/src/helpers.ts +++ b/packages/plugins/FileService/src/helpers.ts @@ -45,6 +45,7 @@ const resolveGatewayAPI = createLookupTableResolver( { [Provider.Arweave]: 'https://arweave.net', [Provider.IPFS]: 'https://mask.infura-ipfs.io/ipfs', + [Provider.WeaveVM]: 'https://gateway.wvm.network/bundle', }, () => 'Unknown provider', ) diff --git a/packages/plugins/FileService/src/types.ts b/packages/plugins/FileService/src/types.ts index 407f8e1ca8a1..f167b3e101d7 100644 --- a/packages/plugins/FileService/src/types.ts +++ b/packages/plugins/FileService/src/types.ts @@ -3,6 +3,7 @@ import type { FileFrameProps } from '@masknet/shared' export enum Provider { Arweave = 'arweave', IPFS = 'ipfs', + WeaveVM = 'weavevm', } export interface LandingPageMetadata { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 464e6c1ce502..f4cb51b5c340 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,7 +215,7 @@ importers: version: 3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-i: specifier: ^2.29.1 - version: 2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) + version: 2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-lingui: specifier: ^0.10.0 version: 0.10.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2) @@ -5507,6 +5507,7 @@ packages: '@nice-labs/emit-file-webpack-plugin@1.1.4': resolution: {integrity: sha512-yNYzYN6N2wrcoOcxfNgBP7GLVoewfV7vsg4muVLAJdIBQWnXx+t7d/MEp0n3BYhcxH4MEjm6IZ6jDVzFa3zkJw==} + version: 1.1.4 engines: {node: '>= 12'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -5713,6 +5714,7 @@ packages: '@pmmmwh/react-refresh-webpack-plugin@0.5.15': resolution: {integrity: sha512-LFWllMA55pzB9D34w/wXUCf8+c+IYKuJDgxiZ3qMhl64KRMBHYM1I3VdGaD2BV5FNPV2/S2596bppxHbv2ZydQ==} + version: 0.5.15 engines: {node: '>= 10.13'} peerDependencies: '@types/webpack': 4.x || 5.x @@ -5918,61 +5920,51 @@ packages: resolution: {integrity: sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.34.9': resolution: {integrity: sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.34.9': resolution: {integrity: sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.34.9': resolution: {integrity: sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.34.9': resolution: {integrity: sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': resolution: {integrity: sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.34.9': resolution: {integrity: sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.34.9': resolution: {integrity: sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.34.9': resolution: {integrity: sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.34.9': resolution: {integrity: sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.34.9': resolution: {integrity: sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==} @@ -6039,6 +6031,7 @@ packages: '@rspack/cli@1.2.7': resolution: {integrity: sha512-nUUZuwnSEORqPcknhP+gkQh9YZqeOlmFKJA1YRnZ5QQkzugCehV+xzVjO+Ezd8R1CSMpqdAQq7+pFZ8rpaRymA==} + version: 1.2.7 hasBin: true peerDependencies: '@rspack/core': ^1.0.0-alpha || ^1.x @@ -6061,6 +6054,7 @@ packages: '@rspack/dev-server@1.0.10': resolution: {integrity: sha512-iDsEtP0jNHRm4LJxL00QFTlOuqkdxIFxnd69h0KrFadmtxAWiDLIe4vYdZXWF74w4MezsJFx6dB2nUM/Ok8utA==} + version: 1.0.10 engines: {node: '>= 18.12.0'} peerDependencies: '@rspack/core': '*' @@ -7420,6 +7414,7 @@ packages: '@webpack-cli/configtest@3.0.1': resolution: {integrity: sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==} + version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -7427,6 +7422,7 @@ packages: '@webpack-cli/info@3.0.1': resolution: {integrity: sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==} + version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -7434,6 +7430,7 @@ packages: '@webpack-cli/serve@3.0.1': resolution: {integrity: sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==} + version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -8631,6 +8628,7 @@ packages: copy-webpack-plugin@13.0.0: resolution: {integrity: sha512-FgR/h5a6hzJqATDGd9YG41SeDViH+0bkHn6WNXCi5zKAZkeESeSxLySSsFLHqLEVCh0E+rITmCf0dusXWYukeQ==} + version: 13.0.0 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -9169,6 +9167,7 @@ packages: devtools-ignore-webpack-plugin@0.2.0: resolution: {integrity: sha512-4P+1Y1VhSt1MRBRF6my8N1bs9nNMOFfIFSBHI6u18W73iCHWXNHTSWYeMoQQ72PIIHrP1q4koKpYg1Em3jb9Rw==} + version: 0.2.0 engines: {node: '>=16.14.2', npm: '>=8.5.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -10008,6 +10007,7 @@ packages: file-loader@6.2.0: resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} + version: 6.2.0 engines: {node: '>= 10.13.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -10567,6 +10567,7 @@ packages: html-webpack-plugin@5.6.3: resolution: {integrity: sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==} + version: 5.6.3 engines: {node: '>=10.13.0'} peerDependencies: '@rspack/core': 0.x || 1.x @@ -13851,6 +13852,7 @@ packages: source-map-loader@5.0.0: resolution: {integrity: sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==} + version: 5.0.0 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -14188,6 +14190,7 @@ packages: swc-loader@0.2.6: resolution: {integrity: sha512-9Zi9UP2YmDpgmQVbyOPJClY0dwf58JDyDMQ7uRc4krmc72twNI2fvlBWHLqVekBpPc7h5NJkGVT1zNDxFrqhvg==} + version: 0.2.6 peerDependencies: '@swc/core': 1.11.7 webpack: npm:@magic-works/webpack@5.88.2 @@ -14223,6 +14226,7 @@ packages: terser-webpack-plugin@5.3.12: resolution: {integrity: sha512-jDLYqo7oF8tJIttjXO6jBY5Hk8p3A8W4ttih7cCEq64fQFWmgJ4VqAQjKr7WwIDlmXKEc6QeoRb5ecjZ+2afcg==} + version: 5.3.12 engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -15248,6 +15252,7 @@ packages: webpack-dev-middleware@7.4.2: resolution: {integrity: sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==} + version: 7.4.2 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -15257,6 +15262,7 @@ packages: webpack-dev-server@5.0.4: resolution: {integrity: sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA==} + version: 5.0.4 engines: {node: '>= 18.12.0'} hasBin: true peerDependencies: @@ -15291,6 +15297,7 @@ packages: webpack-target-webextension@2.1.3: resolution: {integrity: sha512-rDNTgo0hdE1p6ayBy92qSRXdfivAqlaFbBOIirqfq/DSVdJvMbZ1yaDlftfzGDkkLlEeAblzl0zcQzTgp1UaKA==} + version: 2.1.3 engines: {node: '>=18.20.5'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -24481,7 +24488,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)): dependencies: debug: 3.2.7 optionalDependencies: @@ -24492,13 +24499,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-i@2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)): + eslint-plugin-i@2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)): dependencies: debug: 4.3.7 doctrine: 3.0.0 eslint: 9.21.0(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) get-tsconfig: 4.8.1 is-glob: 4.0.3 minimatch: 3.1.2 @@ -24519,7 +24526,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.21.0(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) has: 1.0.4 is-core-module: 2.16.1 is-glob: 4.0.3 From 40664e9f35419b11de57473bdb4ad72fa0ca2e1f Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 16:41:12 +0300 Subject: [PATCH 02/18] chore: config weavevm --- .../FileService/src/SiteAdaptor/components/FileBrowser.tsx | 2 ++ .../FileService/src/SiteAdaptor/components/UploadFile.tsx | 6 ++++++ packages/plugins/FileService/src/Worker/service.ts | 2 ++ 3 files changed, 10 insertions(+) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx index 29ee43e385b6..b08cdfbe6fb0 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx @@ -121,12 +121,14 @@ enum ProviderTabs { All = 'All', IPFS = 'IPFS', Arweave = 'Arweave', + WeaveVM = 'WeaveVM', } const TabToProviderMap: Record = { [ProviderTabs.All]: null, [ProviderTabs.IPFS]: Provider.IPFS, [ProviderTabs.Arweave]: Provider.Arweave, + [ProviderTabs.WeaveVM]: Provider.WeaveVM, } const providers = getEnumAsArray(ProviderTabs) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx index 2298ac2b519e..8059399fbdf4 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx @@ -1,3 +1,5 @@ +// todo:the issue is potentially the file size limit + import { Icons } from '@masknet/icons' import { UploadDropArea } from '@masknet/shared' import { makeStyles } from '@masknet/theme' @@ -92,6 +94,10 @@ export function UploadFile() { provider: Provider.IPFS, name: IPFS, }, + { + provider: Provider.WeaveVM, + name: WeaveVM, + }, ] const onSelectFile = useCallback( diff --git a/packages/plugins/FileService/src/Worker/service.ts b/packages/plugins/FileService/src/Worker/service.ts index 5a42e643a153..51dac7219853 100644 --- a/packages/plugins/FileService/src/Worker/service.ts +++ b/packages/plugins/FileService/src/Worker/service.ts @@ -1,10 +1,12 @@ import { type AttachmentOptions, type LandingPageMetadata, Provider, type ProviderAgent } from '../types.js' import arweave from './arweave.js' import ipfs from './ipfs.js' +import weavevm from './weavevm.js' const allProviders: Record = { [Provider.Arweave]: arweave, [Provider.IPFS]: ipfs, + [Provider.WeaveVM]: weavevm, } export async function makeAttachment(provider: Provider, options: AttachmentOptions) { From 2b2bff596972bcf9262cbba2ddede8b12411d52a Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 16:41:50 +0300 Subject: [PATCH 03/18] chore: weavevm agent --- .../plugins/FileService/src/Worker/weavevm.ts | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 packages/plugins/FileService/src/Worker/weavevm.ts diff --git a/packages/plugins/FileService/src/Worker/weavevm.ts b/packages/plugins/FileService/src/Worker/weavevm.ts new file mode 100644 index 000000000000..4f2d81507e73 --- /dev/null +++ b/packages/plugins/FileService/src/Worker/weavevm.ts @@ -0,0 +1,93 @@ +import { isEmpty } from 'lodash-es' +import { Attachment } from '@dimensiondev/common-protocols' +import { encodeText } from '@masknet/kit' +import { BundlerSDK } from 'bundler-upload-sdk' +import { LANDING_PAGE, Provider } from '../constants.js' +import type { ProviderAgent, LandingPageMetadata, AttachmentOptions } from '../types.js' +import { makeFileKeySigned } from '../helpers.js' + +// WeaveVM configuration +const WEAVEVM_UPLOAD_ENDPOINT = 'https://mechanism-gi3c.shuttle.app/' +const WEAVEVM_GATEWAY_URL = 'https://gateway.wvm.network/bundle' +const API_KEY = process.env.WEAVEVM_API_KEY || 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' + +class WeaveVMAgent implements ProviderAgent { + static providerName = 'WeaveVM' + bundlerSDK!: BundlerSDK + + init() { + if (this.bundlerSDK) return + this.bundlerSDK = new BundlerSDK(WEAVEVM_UPLOAD_ENDPOINT, API_KEY) + } + + async makeAttachment(options: AttachmentOptions) { + this.init() + const passphrase = options.key ? encodeText(options.key) : undefined + const encoded = await Attachment.encode(passphrase, { + block: options.block, + mime: isEmpty(options.type) ? 'application/octet-stream' : options.type, + metadata: null, + }) + const txId = await this.makePayload(encoded, isEmpty(options.type) ? 'application/octet-stream' : options.type) + + return txId + } + + async *upload(id: string) { + yield 100 + } + + async uploadLandingPage(metadata: LandingPageMetadata) { + this.init() + const linkPrefix = WEAVEVM_GATEWAY_URL + const encodedMetadata = JSON.stringify({ + name: metadata.name, + size: metadata.size, + provider: Provider.WeaveVM, // Ensure this constant is updated in Mask's constants.js + link: `${linkPrefix}/${metadata.txId}/0`, + signed: await makeFileKeySigned(metadata.key), + createdAt: new Date().toISOString(), + }) + const response = await fetch(LANDING_PAGE) + const text = await response.text() + const replaced = text + .replace('Arweave', WeaveVMAgent.providerName) + .replace('Over Arweave', `Over ${WeaveVMAgent.providerName}`) + .replace('__METADATA__', encodedMetadata) + const data = encodeText(replaced) + return this.makePayload(data, 'text/html') + } + + async makePayload(data: Uint8Array, type: string) { + this.init() + + try { + // Prepare tags - set the MIME type as required + const tags = { + 'Content-Type': type, + 'App-Name': 'Mask-Network', + } + + // Upload file with tags + const txHash = await this.bundlerSDK.upload([ + { + file: Buffer.from(data), + tags, + }, + ]) + + return txHash + } catch (error) { + const enhancedError = new Error( + `WeaveVM upload failed: ${error instanceof Error ? error.message : String(error)}`, + ) + if (error instanceof Error && error.stack) { + enhancedError.stack = error.stack + } + + throw enhancedError + } + } +} + +export default new WeaveVMAgent() From fba30ea8f0521795376840e13776ad35cc6ec357 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 16:42:10 +0300 Subject: [PATCH 04/18] chore: install bundler sdk --- package.json | 1 + pnpm-lock.yaml | 61 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9a2d83aaf5ab..2024e4333d38 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@types/react-dom": "npm:types-react-dom@beta", "@typescript/lib-dom": "npm:@types/web@^0.0.183", "buffer": "^6.0.3", + "bundler-upload-sdk": "^2.0.0", "lodash-es": "^4.17.21", "react": "0.0.0-experimental-58af67a8f8-20240628", "react-dom": "0.0.0-experimental-58af67a8f8-20240628", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4cb51b5c340..bdaa0e30e762 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,6 +137,9 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 + bundler-upload-sdk: + specifier: ^2.0.0 + version: 2.0.0 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -4032,9 +4035,6 @@ packages: resolution: {integrity: sha512-VRnXRqsYNXq1jzNf6piJnUamtgVGuL5/8dVXl/Qy7xGyHBqLaHbQ6QKDCc/qf9Z3gFzFSjIZZle+pNPJ925psA==, tarball: https://npm.pkg.github.com/download/@DimensionDev/holoflows-kit/0.9.0-20240322092738-f9180f3/1d2e9df5c5cd2a733c547ceafed4860973f10836} peerDependencies: '@types/webextension-polyfill': ^0.10.0 - peerDependenciesMeta: - '@types/webextension-polyfill': - optional: true '@dimensiondev/mask-wallet-core@0.1.0-20211013082857-eb62e5f': resolution: {integrity: sha512-2d7v1/z9Khw4O7J7oBNKLBo7BONd7ZE2gpw34uHVtdG9i0aEz+LSRappgNTZyUZ/+TRJ7ZgAf+Dbeql1oPMvNA==, tarball: https://npm.pkg.github.com/download/@DimensionDev/mask-wallet-core/0.1.0-20211013082857-eb62e5f/04f14f2d88766a9ab098a686785f824270c5ed90} @@ -5297,6 +5297,7 @@ packages: '@mui/base@5.0.0-beta.40': resolution: {integrity: sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==} engines: {node: '>=12.0.0'} + deprecated: This package has been replaced by @base-ui-components/react peerDependencies: '@types/react': npm:types-react@beta react: 0.0.0-experimental-58af67a8f8-20240628 @@ -7354,6 +7355,7 @@ packages: '@walletconnect/web3wallet@1.12.3': resolution: {integrity: sha512-HBzYDjf3ZVzyTCqycyMjJnn/1sQtRe0beGc3qtq9bLX/dmezkO6Oc1lg1WlvxT7KtTqKx41usw5tjiwfNZ2+ug==} + deprecated: Web3Wallet is now Reown WalletKit. Please follow the upgrade guide at https://docs.reown.com/walletkit/upgrade/from-web3wallet-web '@walletconnect/window-getters@1.0.0': resolution: {integrity: sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA==} @@ -8129,6 +8131,9 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} + bundler-upload-sdk@2.0.0: + resolution: {integrity: sha512-/bG1YuYmGn1ulyRMsb7VdX5ls+lgHvmZgIC+CPgdtzWMywy9CpI957n/c+KRhxJbmTfMpmYV+oNITunE+Kmalw==} + busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -8924,6 +8929,10 @@ packages: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -9986,6 +9995,10 @@ packages: picomatch: optional: true + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} @@ -10143,6 +10156,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -11791,6 +11808,7 @@ packages: lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. lodash.indexof@4.0.5: resolution: {integrity: sha512-t9wLWMQsawdVmf6/IcAgVGqAJkNzYVcn4BHYZKTPW//l7N5Oq7Bq138BaVk19agcsPZePcidSgTTw4NqS1nUAw==} @@ -11800,6 +11818,7 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. lodash.ismatch@4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} @@ -12425,6 +12444,10 @@ packages: node-addon-api@7.0.0: resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==} + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + node-fetch-native@1.4.1: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} @@ -12437,6 +12460,10 @@ packages: encoding: optional: true + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -15533,6 +15560,7 @@ packages: yaeti@0.0.6: resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} engines: {node: '>=0.10.32'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -17261,10 +17289,9 @@ snapshots: '@dimensiondev/holoflows-kit@0.9.0-20240322092738-f9180f3(@types/webextension-polyfill@0.10.7)': dependencies: '@servie/events': 3.0.0 + '@types/webextension-polyfill': 0.10.7 lodash-es: 4.17.21 tslib: 2.8.1 - optionalDependencies: - '@types/webextension-polyfill': 0.10.7 '@dimensiondev/mask-wallet-core@0.1.0-20211013082857-eb62e5f(protobufjs@7.2.3)': dependencies: @@ -22843,6 +22870,11 @@ snapshots: dependencies: run-applescript: 7.0.0 + bundler-upload-sdk@2.0.0: + dependencies: + form-data: 4.0.0 + node-fetch: 3.3.2 + busboy@1.6.0: dependencies: streamsearch: 1.1.0 @@ -23779,6 +23811,8 @@ snapshots: dependencies: assert-plus: 1.0.0 + data-uri-to-buffer@4.0.1: {} + data-urls@3.0.2: dependencies: abab: 2.0.6 @@ -25240,6 +25274,11 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + fflate@0.8.2: {} figures@3.2.0: @@ -25400,6 +25439,10 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + forwarded@0.2.0: {} fresh@0.5.2: {} @@ -28301,6 +28344,8 @@ snapshots: node-addon-api@7.0.0: {} + node-domexception@1.0.0: {} + node-fetch-native@1.4.1: {} node-fetch@2.7.0(encoding@0.1.13): @@ -28309,6 +28354,12 @@ snapshots: optionalDependencies: encoding: 0.1.13 + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + node-forge@1.3.1: {} node-gyp-build@4.8.4: {} From e6141bbf56f7c304dc65d902ae8625500cebf406 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 17:25:54 +0300 Subject: [PATCH 05/18] chore: update bundler sdk --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2024e4333d38..f59a70180e63 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/react-dom": "npm:types-react-dom@beta", "@typescript/lib-dom": "npm:@types/web@^0.0.183", "buffer": "^6.0.3", - "bundler-upload-sdk": "^2.0.0", + "bundler-upload-sdk": "^2.1.0", "lodash-es": "^4.17.21", "react": "0.0.0-experimental-58af67a8f8-20240628", "react-dom": "0.0.0-experimental-58af67a8f8-20240628", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdaa0e30e762..642b323f7378 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -138,8 +138,8 @@ importers: specifier: ^6.0.3 version: 6.0.3 bundler-upload-sdk: - specifier: ^2.0.0 - version: 2.0.0 + specifier: ^2.1.0 + version: 2.1.0 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -8131,8 +8131,8 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} - bundler-upload-sdk@2.0.0: - resolution: {integrity: sha512-/bG1YuYmGn1ulyRMsb7VdX5ls+lgHvmZgIC+CPgdtzWMywy9CpI957n/c+KRhxJbmTfMpmYV+oNITunE+Kmalw==} + bundler-upload-sdk@2.1.0: + resolution: {integrity: sha512-AeaTWWA8OQS26jBXI8eiBImQ1av3CNxcb6PMmJIAEw53XSmZnfvls/68EWReX3AqDQGgPBFZQ2bEzZ6qt5aRFQ==} busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} @@ -22870,7 +22870,7 @@ snapshots: dependencies: run-applescript: 7.0.0 - bundler-upload-sdk@2.0.0: + bundler-upload-sdk@2.1.0: dependencies: form-data: 4.0.0 node-fetch: 3.3.2 From 435c8067b839b4084cc14bec0b457aed12a2300c Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 7 Mar 2025 17:27:58 +0300 Subject: [PATCH 06/18] chore: minor fix --- packages/plugins/FileService/src/Worker/weavevm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/FileService/src/Worker/weavevm.ts b/packages/plugins/FileService/src/Worker/weavevm.ts index 4f2d81507e73..3a9099411cc3 100644 --- a/packages/plugins/FileService/src/Worker/weavevm.ts +++ b/packages/plugins/FileService/src/Worker/weavevm.ts @@ -9,7 +9,7 @@ import { makeFileKeySigned } from '../helpers.js' // WeaveVM configuration const WEAVEVM_UPLOAD_ENDPOINT = 'https://mechanism-gi3c.shuttle.app/' const WEAVEVM_GATEWAY_URL = 'https://gateway.wvm.network/bundle' -const API_KEY = process.env.WEAVEVM_API_KEY || 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' +const API_KEY = process.env.WEAVEVM_API_KEY || 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' // move to env class WeaveVMAgent implements ProviderAgent { static providerName = 'WeaveVM' From 9e518cd0a4909c107a82c9019fcd5fd9ad74ccd5 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 13 Mar 2025 13:28:08 +0300 Subject: [PATCH 07/18] chore: pull --- .../plugins/FileService/src/Worker/weavevm.ts | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/packages/plugins/FileService/src/Worker/weavevm.ts b/packages/plugins/FileService/src/Worker/weavevm.ts index 3a9099411cc3..27d9f6b99387 100644 --- a/packages/plugins/FileService/src/Worker/weavevm.ts +++ b/packages/plugins/FileService/src/Worker/weavevm.ts @@ -1,15 +1,14 @@ import { isEmpty } from 'lodash-es' import { Attachment } from '@dimensiondev/common-protocols' import { encodeText } from '@masknet/kit' -import { BundlerSDK } from 'bundler-upload-sdk' +import { BundlerSDK } from 'bundler-upload-sdk/browser' import { LANDING_PAGE, Provider } from '../constants.js' import type { ProviderAgent, LandingPageMetadata, AttachmentOptions } from '../types.js' import { makeFileKeySigned } from '../helpers.js' -// WeaveVM configuration -const WEAVEVM_UPLOAD_ENDPOINT = 'https://mechanism-gi3c.shuttle.app/' const WEAVEVM_GATEWAY_URL = 'https://gateway.wvm.network/bundle' -const API_KEY = process.env.WEAVEVM_API_KEY || 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' // move to env +const WEAVEVM_UPLOAD_ENDPOINT = 'https://mechanism-gi3c.shuttle.app/' +const API_KEY = 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' // move to env class WeaveVMAgent implements ProviderAgent { static providerName = 'WeaveVM' @@ -28,11 +27,15 @@ class WeaveVMAgent implements ProviderAgent { mime: isEmpty(options.type) ? 'application/octet-stream' : options.type, metadata: null, }) - const txId = await this.makePayload(encoded, isEmpty(options.type) ? 'application/octet-stream' : options.type) + + const effectiveType = isEmpty(options.type) ? 'application/octet-stream' : options.type + const effectiveName = options.name || 'unnamed_file' + const txId = await this.makePayload(encoded, effectiveType, effectiveName) return txId } + // no native support for progress tracking with WeaveVM async *upload(id: string) { yield 100 } @@ -43,7 +46,7 @@ class WeaveVMAgent implements ProviderAgent { const encodedMetadata = JSON.stringify({ name: metadata.name, size: metadata.size, - provider: Provider.WeaveVM, // Ensure this constant is updated in Mask's constants.js + provider: Provider.WeaveVM, link: `${linkPrefix}/${metadata.txId}/0`, signed: await makeFileKeySigned(metadata.key), createdAt: new Date().toISOString(), @@ -54,33 +57,39 @@ class WeaveVMAgent implements ProviderAgent { .replace('Arweave', WeaveVMAgent.providerName) .replace('Over Arweave', `Over ${WeaveVMAgent.providerName}`) .replace('__METADATA__', encodedMetadata) + const data = encodeText(replaced) - return this.makePayload(data, 'text/html') + + const landingPageTxId = await this.makePayload(data, 'text/html', `${metadata.name}-landing.html`) + + return landingPageTxId } - async makePayload(data: Uint8Array, type: string) { + async makePayload(data: Uint8Array, type: string, fileName: string = 'file.dat') { this.init() try { - // Prepare tags - set the MIME type as required const tags = { 'Content-Type': type, + Filename: fileName, 'App-Name': 'Mask-Network', + 'App-Version': '1.0.0', } - // Upload file with tags + const blob = new Blob([data], { type }) const txHash = await this.bundlerSDK.upload([ { - file: Buffer.from(data), + file: blob, tags, }, ]) return txHash } catch (error) { - const enhancedError = new Error( - `WeaveVM upload failed: ${error instanceof Error ? error.message : String(error)}`, - ) + const errorMessage = `WeaveVM upload failed: ${error instanceof Error ? error.message : String(error)}` + console.error('WeaveVM detailed error:', errorMessage) + + const enhancedError = new Error(errorMessage) if (error instanceof Error && error.stack) { enhancedError.stack = error.stack } From 146c5fc6d9b63680d9d36eec734fd3bf3ddeb530 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 13 Mar 2025 13:15:49 +0300 Subject: [PATCH 08/18] chore: use envelopes to set mime type --- .../plugins/FileService/src/Worker/weavevm.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/plugins/FileService/src/Worker/weavevm.ts b/packages/plugins/FileService/src/Worker/weavevm.ts index 27d9f6b99387..33c0c3fe1f6e 100644 --- a/packages/plugins/FileService/src/Worker/weavevm.ts +++ b/packages/plugins/FileService/src/Worker/weavevm.ts @@ -1,6 +1,7 @@ import { isEmpty } from 'lodash-es' import { Attachment } from '@dimensiondev/common-protocols' import { encodeText } from '@masknet/kit' +import { Envelope } from 'weavevm-bundles' import { BundlerSDK } from 'bundler-upload-sdk/browser' import { LANDING_PAGE, Provider } from '../constants.js' import type { ProviderAgent, LandingPageMetadata, AttachmentOptions } from '../types.js' @@ -69,14 +70,19 @@ class WeaveVMAgent implements ProviderAgent { this.init() try { - const tags = { - 'Content-Type': type, - Filename: fileName, - 'App-Name': 'Mask-Network', - 'App-Version': '1.0.0', - } + const envelope = new Envelope(data) + + envelope.tags.set('Content-Type', type) + envelope.tags.set('Filename', fileName) + envelope.tags.set('App-Name', 'Maskbook') const blob = new Blob([data], { type }) + + const tags: Record = {} + for (const [key, value] of envelope.tags.entries()) { + tags[key] = value + } + const txHash = await this.bundlerSDK.upload([ { file: blob, From e019cadbadf8c9285abc4238fe6186916d711131 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 13 Mar 2025 13:30:01 +0300 Subject: [PATCH 09/18] chore: rebase package.json --- package.json | 5 +++-- pnpm-lock.yaml | 40 ++++++++++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index f59a70180e63..1817867e8bfe 100644 --- a/package.json +++ b/package.json @@ -51,12 +51,13 @@ "@types/react-dom": "npm:types-react-dom@beta", "@typescript/lib-dom": "npm:@types/web@^0.0.183", "buffer": "^6.0.3", - "bundler-upload-sdk": "^2.1.0", + "bundler-upload-sdk": "^2.1.1", "lodash-es": "^4.17.21", "react": "0.0.0-experimental-58af67a8f8-20240628", "react-dom": "0.0.0-experimental-58af67a8f8-20240628", "ses": "1.9.0", - "ts-results-es": "^4.2.0" + "ts-results-es": "^4.2.0", + "weavevm-bundles": "^0.0.2" }, "devDependencies": { "@changesets/cli": "^2.28.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 642b323f7378..cabeaf4ec670 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -138,8 +138,8 @@ importers: specifier: ^6.0.3 version: 6.0.3 bundler-upload-sdk: - specifier: ^2.1.0 - version: 2.1.0 + specifier: ^2.1.1 + version: 2.1.1 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -155,6 +155,9 @@ importers: ts-results-es: specifier: ^4.2.0 version: 4.2.0 + weavevm-bundles: + specifier: ^0.0.2 + version: 0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) devDependencies: '@changesets/cli': specifier: ^2.28.1 @@ -5758,6 +5761,12 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + '@project-serum/borsh@0.2.5': + resolution: {integrity: sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==} + engines: {node: '>=10'} + peerDependencies: + '@solana/web3.js': ^1.2.0 + '@project-serum/sol-wallet-adapter@0.2.6': resolution: {integrity: sha512-cpIb13aWPW8y4KzkZAPDgw+Kb+DXjCC6rZoH74MGm3I/6e/zKyGnfAuW5olb2zxonFqsYgnv7ev8MQnvSgJ3/g==} engines: {node: '>=10'} @@ -8131,8 +8140,8 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} - bundler-upload-sdk@2.1.0: - resolution: {integrity: sha512-AeaTWWA8OQS26jBXI8eiBImQ1av3CNxcb6PMmJIAEw53XSmZnfvls/68EWReX3AqDQGgPBFZQ2bEzZ6qt5aRFQ==} + bundler-upload-sdk@2.1.1: + resolution: {integrity: sha512-BzBHTGA2YoMDDmdLl45j9Lq/MxhnJm85k/m6wy1By0M04ZkZEUbDrdPbZ45+WJA20iWU1Rb4oH2H3fNnVYuVRA==} busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} @@ -15095,6 +15104,9 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + weavevm-bundles@0.0.2: + resolution: {integrity: sha512-sJ2p7350AIQUkKi0SvIOfPqHz14n1/WTNxYfaVHkhN3WRY4WwtAZluM8mKJK+6MVxveNjtgjYGea4o7TAm+Hig==} + web-ext@8.4.0: resolution: {integrity: sha512-zO0GNacJeqw3fwbBvgHC2G8reieyN+oCKiMQepX3iv2fm9KEBqg1gdbcdEvi7edfj+gjgxyXhVlFcHIvcEM2Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -19520,6 +19532,12 @@ snapshots: '@popperjs/core@2.11.8': {} + '@project-serum/borsh@0.2.5(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))': + dependencies: + '@solana/web3.js': 1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + bn.js: 5.2.1 + buffer-layout: 1.2.2 + '@project-serum/sol-wallet-adapter@0.2.6(patch_hash=dl5wqnnaxjm7biesxtvdpr7gpe)(@solana/web3.js@1.75.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))': dependencies: '@solana/web3.js': 1.75.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -22870,12 +22888,7 @@ snapshots: dependencies: run-applescript: 7.0.0 - bundler-upload-sdk@2.1.0: - dependencies: - form-data: 4.0.0 - node-fetch: 3.3.2 - - busboy@1.6.0: + bundler-upload-sdk@2.1.1: dependencies: streamsearch: 1.1.0 @@ -31299,6 +31312,13 @@ snapshots: dependencies: defaults: 1.0.4 + weavevm-bundles@0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)): + dependencies: + '@project-serum/borsh': 0.2.5(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) + bn.js: 5.2.1 + transitivePeerDependencies: + - '@solana/web3.js' + web-ext@8.4.0(body-parser@1.20.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@babel/runtime': 7.26.7 From b0b6f185bfbdd2b734320e3070b7b35cfbef35c4 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 13 Mar 2025 13:20:49 +0300 Subject: [PATCH 10/18] chore: fix gateway and weavevm download url --- packages/plugins/FileService/src/helpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugins/FileService/src/helpers.ts b/packages/plugins/FileService/src/helpers.ts index b6894eeb90ac..fd6c0db43146 100644 --- a/packages/plugins/FileService/src/helpers.ts +++ b/packages/plugins/FileService/src/helpers.ts @@ -63,6 +63,9 @@ export function makeFileKey(length = 16) { export function downloadFile(file: FileInfo) { const gateway = resolveGatewayAPI(file.provider) let link = urlcat(gateway, '/:txId', { txId: file.landingTxID }) + if (file.provider === Provider.WeaveVM) { + link = `${link}/0` + } if (isAfter(new Date(2022, 8, 1), new Date(file.createdAt))) { link = urlcat(RECOVERY_PAGE, { url: encodeURIComponent(link), From 7fa6421015e193917010e1762459824a747fb70c Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 13 Mar 2025 13:22:39 +0300 Subject: [PATCH 11/18] chore: ui fixes --- .../FileService/src/SiteAdaptor/components/UploadFile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx index 8059399fbdf4..2692e8712466 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx @@ -5,7 +5,7 @@ import { UploadDropArea } from '@masknet/shared' import { makeStyles } from '@masknet/theme' import { Checkbox, FormControlLabel, Radio, Typography } from '@mui/material' import { useCallback, useMemo, useState, type ReactNode } from 'react' -import { MAX_FILE_SIZE } from '../../constants.js' +import { MAX_FILE_SIZE, MAX_FILE_SIZE_WEAVEVM } from '../../constants.js' import { downloadFile } from '../../helpers.js' import { Provider } from '../../types.js' import { useFileManagement } from '../contexts/index.js' @@ -109,7 +109,7 @@ export function UploadFile() { return (
- +
{providers.map((config: ProviderConfig) => ( Date: Thu, 13 Mar 2025 13:25:08 +0300 Subject: [PATCH 12/18] chore: cosmetic fix --- .../FileService/src/SiteAdaptor/components/UploadFile.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx index 2692e8712466..8ad5c2d17bea 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx @@ -81,6 +81,8 @@ export function UploadFile() { const [provider, setProvider] = useState(Provider.Arweave) const { recentFiles, uploadingFiles, uploadFile, attachToPost } = useFileManagement() + const FILE_SIZE = provider === Provider.WeaveVM ? MAX_FILE_SIZE_WEAVEVM : MAX_FILE_SIZE + const files = useMemo(() => { return [...uploadingFiles, ...recentFiles] }, [uploadingFiles, recentFiles]) @@ -109,7 +111,7 @@ export function UploadFile() { return (
- +
{providers.map((config: ProviderConfig) => ( Date: Fri, 14 Mar 2025 11:19:08 +0300 Subject: [PATCH 13/18] chore: move deps --- package.json | 4 +--- packages/plugins/FileService/package.json | 4 +++- pnpm-lock.yaml | 23 ++++++++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1817867e8bfe..9a2d83aaf5ab 100644 --- a/package.json +++ b/package.json @@ -51,13 +51,11 @@ "@types/react-dom": "npm:types-react-dom@beta", "@typescript/lib-dom": "npm:@types/web@^0.0.183", "buffer": "^6.0.3", - "bundler-upload-sdk": "^2.1.1", "lodash-es": "^4.17.21", "react": "0.0.0-experimental-58af67a8f8-20240628", "react-dom": "0.0.0-experimental-58af67a8f8-20240628", "ses": "1.9.0", - "ts-results-es": "^4.2.0", - "weavevm-bundles": "^0.0.2" + "ts-results-es": "^4.2.0" }, "devDependencies": { "@changesets/cli": "^2.28.1", diff --git a/packages/plugins/FileService/package.json b/packages/plugins/FileService/package.json index feb35139074c..9bcaec01065e 100644 --- a/packages/plugins/FileService/package.json +++ b/packages/plugins/FileService/package.json @@ -30,12 +30,14 @@ "@msgpack/msgpack": "^3.0.0-beta2", "@servie/events": "^3.0.0", "arweave": "^1.13.6", + "bundler-upload-sdk": "^2.1.1", "date-fns": "^3.6.0", "ipfs-http-client": "^60.0.1", "react-router-dom": "^6.24.0", "react-use": "^17.5.0", "urlcat": "^3.1.0", - "use-subscription": "^1.8.0" + "use-subscription": "^1.8.0", + "weavevm-bundles": "^0.0.2" }, "devDependencies": { "@types/use-subscription": "^1.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cabeaf4ec670..2e43e69b635e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,9 +137,6 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 - bundler-upload-sdk: - specifier: ^2.1.1 - version: 2.1.1 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -155,9 +152,6 @@ importers: ts-results-es: specifier: ^4.2.0 version: 4.2.0 - weavevm-bundles: - specifier: ^0.0.2 - version: 0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) devDependencies: '@changesets/cli': specifier: ^2.28.1 @@ -1286,6 +1280,9 @@ importers: arweave: specifier: ^1.13.6 version: 1.13.6 + bundler-upload-sdk: + specifier: ^2.1.1 + version: 2.1.1 date-fns: specifier: ^3.6.0 version: 3.6.0 @@ -1304,6 +1301,9 @@ importers: use-subscription: specifier: ^1.8.0 version: 1.8.2(react@0.0.0-experimental-58af67a8f8-20240628) + weavevm-bundles: + specifier: ^0.0.2 + version: 0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) devDependencies: '@types/use-subscription': specifier: ^1.0.2 @@ -4038,6 +4038,9 @@ packages: resolution: {integrity: sha512-VRnXRqsYNXq1jzNf6piJnUamtgVGuL5/8dVXl/Qy7xGyHBqLaHbQ6QKDCc/qf9Z3gFzFSjIZZle+pNPJ925psA==, tarball: https://npm.pkg.github.com/download/@DimensionDev/holoflows-kit/0.9.0-20240322092738-f9180f3/1d2e9df5c5cd2a733c547ceafed4860973f10836} peerDependencies: '@types/webextension-polyfill': ^0.10.0 + peerDependenciesMeta: + '@types/webextension-polyfill': + optional: true '@dimensiondev/mask-wallet-core@0.1.0-20211013082857-eb62e5f': resolution: {integrity: sha512-2d7v1/z9Khw4O7J7oBNKLBo7BONd7ZE2gpw34uHVtdG9i0aEz+LSRappgNTZyUZ/+TRJ7ZgAf+Dbeql1oPMvNA==, tarball: https://npm.pkg.github.com/download/@DimensionDev/mask-wallet-core/0.1.0-20211013082857-eb62e5f/04f14f2d88766a9ab098a686785f824270c5ed90} @@ -17301,9 +17304,10 @@ snapshots: '@dimensiondev/holoflows-kit@0.9.0-20240322092738-f9180f3(@types/webextension-polyfill@0.10.7)': dependencies: '@servie/events': 3.0.0 - '@types/webextension-polyfill': 0.10.7 lodash-es: 4.17.21 tslib: 2.8.1 + optionalDependencies: + '@types/webextension-polyfill': 0.10.7 '@dimensiondev/mask-wallet-core@0.1.0-20211013082857-eb62e5f(protobufjs@7.2.3)': dependencies: @@ -22889,6 +22893,11 @@ snapshots: run-applescript: 7.0.0 bundler-upload-sdk@2.1.1: + dependencies: + form-data: 4.0.0 + node-fetch: 3.3.2 + + busboy@1.6.0: dependencies: streamsearch: 1.1.0 From d19f18ce2b76df3665a13fe4933a6650ee75dfc7 Mon Sep 17 00:00:00 2001 From: Xylophone Date: Fri, 23 May 2025 10:04:17 +0100 Subject: [PATCH 14/18] feat: weavevm-bundles to load0 --- packages/plugins/FileService/package.json | 4 +- .../SiteAdaptor/components/FileBrowser.tsx | 4 +- .../src/SiteAdaptor/components/Terms.tsx | 3 +- .../src/SiteAdaptor/components/UploadFile.tsx | 8 +- .../plugins/FileService/src/Worker/load.ts | 116 +++++++++++++++ .../plugins/FileService/src/Worker/service.ts | 4 +- .../plugins/FileService/src/Worker/weavevm.ts | 108 -------------- packages/plugins/FileService/src/constants.ts | 4 +- packages/plugins/FileService/src/helpers.ts | 5 +- .../plugins/FileService/src/schema-v3.json | 2 +- packages/plugins/FileService/src/types.ts | 2 +- pnpm-lock.yaml | 133 +++++------------- 12 files changed, 167 insertions(+), 226 deletions(-) create mode 100644 packages/plugins/FileService/src/Worker/load.ts delete mode 100644 packages/plugins/FileService/src/Worker/weavevm.ts diff --git a/packages/plugins/FileService/package.json b/packages/plugins/FileService/package.json index 9bcaec01065e..feb35139074c 100644 --- a/packages/plugins/FileService/package.json +++ b/packages/plugins/FileService/package.json @@ -30,14 +30,12 @@ "@msgpack/msgpack": "^3.0.0-beta2", "@servie/events": "^3.0.0", "arweave": "^1.13.6", - "bundler-upload-sdk": "^2.1.1", "date-fns": "^3.6.0", "ipfs-http-client": "^60.0.1", "react-router-dom": "^6.24.0", "react-use": "^17.5.0", "urlcat": "^3.1.0", - "use-subscription": "^1.8.0", - "weavevm-bundles": "^0.0.2" + "use-subscription": "^1.8.0" }, "devDependencies": { "@types/use-subscription": "^1.0.2" diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx index b08cdfbe6fb0..df449509dfb7 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/FileBrowser.tsx @@ -121,14 +121,14 @@ enum ProviderTabs { All = 'All', IPFS = 'IPFS', Arweave = 'Arweave', - WeaveVM = 'WeaveVM', + Load = 'Load Network', } const TabToProviderMap: Record = { [ProviderTabs.All]: null, [ProviderTabs.IPFS]: Provider.IPFS, [ProviderTabs.Arweave]: Provider.Arweave, - [ProviderTabs.WeaveVM]: Provider.WeaveVM, + [ProviderTabs.Load]: Provider.Load, } const providers = getEnumAsArray(ProviderTabs) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx index 707afa1a7af5..4d3dd4bf70a0 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx @@ -98,8 +98,7 @@ export function Terms() { Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, - PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB for most providers - and 8 MB for WeaveVM. + PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.

You can store files in multiple decentralized networks through the Web3 file service. When diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx index 8ad5c2d17bea..b354c7ad0d38 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/UploadFile.tsx @@ -5,7 +5,7 @@ import { UploadDropArea } from '@masknet/shared' import { makeStyles } from '@masknet/theme' import { Checkbox, FormControlLabel, Radio, Typography } from '@mui/material' import { useCallback, useMemo, useState, type ReactNode } from 'react' -import { MAX_FILE_SIZE, MAX_FILE_SIZE_WEAVEVM } from '../../constants.js' +import { MAX_FILE_SIZE, MAX_FILE_SIZE_LOAD } from '../../constants.js' import { downloadFile } from '../../helpers.js' import { Provider } from '../../types.js' import { useFileManagement } from '../contexts/index.js' @@ -81,7 +81,7 @@ export function UploadFile() { const [provider, setProvider] = useState(Provider.Arweave) const { recentFiles, uploadingFiles, uploadFile, attachToPost } = useFileManagement() - const FILE_SIZE = provider === Provider.WeaveVM ? MAX_FILE_SIZE_WEAVEVM : MAX_FILE_SIZE + const FILE_SIZE = provider === Provider.Load ? MAX_FILE_SIZE_LOAD : MAX_FILE_SIZE const files = useMemo(() => { return [...uploadingFiles, ...recentFiles] @@ -97,8 +97,8 @@ export function UploadFile() { name: IPFS, }, { - provider: Provider.WeaveVM, - name: WeaveVM, + provider: Provider.Load, + name: Load Network, }, ] diff --git a/packages/plugins/FileService/src/Worker/load.ts b/packages/plugins/FileService/src/Worker/load.ts new file mode 100644 index 000000000000..9bf7f9370e7e --- /dev/null +++ b/packages/plugins/FileService/src/Worker/load.ts @@ -0,0 +1,116 @@ +import { isEmpty } from 'lodash-es' +import { Attachment } from '@dimensiondev/common-protocols' +import { encodeText } from '@masknet/kit' +import { LANDING_PAGE, Provider } from '../constants.js' +import type { ProviderAgent, LandingPageMetadata, AttachmentOptions } from '../types.js' +import { makeFileKeySigned } from '../helpers.js' + +const LOAD_GATEWAY_URL = 'https://load0.network/resolve' +const LOAD_UPLOAD_ENDPOINT = 'https://load0.network/upload' +const API_KEY = 'load_acc_ep4bep0uGlmUXMu46BxM0uWXKsqL5M5w' // move to env + +class LoadAgent implements ProviderAgent { + static providerName = 'Load Network' + private uploadController?: AbortController + + init() { + this.uploadController = new AbortController() + } + + async makeAttachment(options: AttachmentOptions) { + this.init() + const passphrase = options.key ? encodeText(options.key) : undefined + const encoded = await Attachment.encode(passphrase, { + block: options.block, + mime: isEmpty(options.type) ? 'application/octet-stream' : options.type, + metadata: null, + }) + + const effectiveType = isEmpty(options.type) ? 'application/octet-stream' : options.type + const effectiveName = options.name || 'unnamed_file' + const payloadTxID = await this.makePayload(encoded, effectiveType, effectiveName) + return payloadTxID + } + + async *upload(id: string) { + try { + // Since we're using optimistic upload, we can yield progress immediately + // The actual upload to Load Network happens in the background + yield 50 + yield 100 + } catch (error) { + console.error('Upload progress tracking failed:', error) + throw error + } finally { + if (this.uploadController) { + this.uploadController.abort() + this.uploadController = undefined + } + } + } + + async uploadLandingPage(metadata: LandingPageMetadata) { + this.init() + const linkPrefix = LOAD_GATEWAY_URL + const encodedMetadata = JSON.stringify({ + name: metadata.name, + size: metadata.size, + provider: Provider.Load, + link: `${linkPrefix}/${metadata.txId}`, + signed: await makeFileKeySigned(metadata.key), + createdAt: new Date().toISOString(), + }) + const response = await fetch(LANDING_PAGE) + const text = await response.text() + const replaced = text + .replace('Arweave', LoadAgent.providerName) + .replace('Over Arweave', `Over ${LoadAgent.providerName}`) + .replace('__METADATA__', encodedMetadata) + + const data = encodeText(replaced) + + const landingPageTxId = await this.makePayload(data, 'text/html', `${metadata.name}-landing.html`) + + return landingPageTxId + } + + async makePayload(data: Uint8Array, type: string, fileName: string = 'file.dat') { + this.init() + + try { + const blob = new Blob([data], { type }) + const headers = { + 'Content-Type': type, + 'Filename': fileName, + 'App-Name': 'Maskbook', + 'X-Load-Authorization': API_KEY + } + + const response = await fetch(LOAD_UPLOAD_ENDPOINT, { + method: 'POST', + headers, + body: blob, + signal: this.uploadController?.signal + }) + + if (!response.ok) { + throw new Error(`Upload failed: ${response.statusText}`) + } + + const { optimistic_hash } = await response.json() + return optimistic_hash + } catch (error) { + const errorMessage = `Load Network upload failed: ${error instanceof Error ? error.message : String(error)}` + console.error('Load Network detailed error:', errorMessage) + + const enhancedError = new Error(errorMessage) + if (error instanceof Error && error.stack) { + enhancedError.stack = error.stack + } + + throw enhancedError + } + } +} + +export default new LoadAgent() diff --git a/packages/plugins/FileService/src/Worker/service.ts b/packages/plugins/FileService/src/Worker/service.ts index 51dac7219853..7a4ae4d4ce69 100644 --- a/packages/plugins/FileService/src/Worker/service.ts +++ b/packages/plugins/FileService/src/Worker/service.ts @@ -1,12 +1,12 @@ import { type AttachmentOptions, type LandingPageMetadata, Provider, type ProviderAgent } from '../types.js' import arweave from './arweave.js' import ipfs from './ipfs.js' -import weavevm from './weavevm.js' +import load from './load.js' const allProviders: Record = { [Provider.Arweave]: arweave, [Provider.IPFS]: ipfs, - [Provider.WeaveVM]: weavevm, + [Provider.Load]: load, } export async function makeAttachment(provider: Provider, options: AttachmentOptions) { diff --git a/packages/plugins/FileService/src/Worker/weavevm.ts b/packages/plugins/FileService/src/Worker/weavevm.ts deleted file mode 100644 index 33c0c3fe1f6e..000000000000 --- a/packages/plugins/FileService/src/Worker/weavevm.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { isEmpty } from 'lodash-es' -import { Attachment } from '@dimensiondev/common-protocols' -import { encodeText } from '@masknet/kit' -import { Envelope } from 'weavevm-bundles' -import { BundlerSDK } from 'bundler-upload-sdk/browser' -import { LANDING_PAGE, Provider } from '../constants.js' -import type { ProviderAgent, LandingPageMetadata, AttachmentOptions } from '../types.js' -import { makeFileKeySigned } from '../helpers.js' - -const WEAVEVM_GATEWAY_URL = 'https://gateway.wvm.network/bundle' -const WEAVEVM_UPLOAD_ENDPOINT = 'https://mechanism-gi3c.shuttle.app/' -const API_KEY = 'd025e132382aea412f4256049c13d0e92d5c64095d1c88e1f5de7652966b69af' // move to env - -class WeaveVMAgent implements ProviderAgent { - static providerName = 'WeaveVM' - bundlerSDK!: BundlerSDK - - init() { - if (this.bundlerSDK) return - this.bundlerSDK = new BundlerSDK(WEAVEVM_UPLOAD_ENDPOINT, API_KEY) - } - - async makeAttachment(options: AttachmentOptions) { - this.init() - const passphrase = options.key ? encodeText(options.key) : undefined - const encoded = await Attachment.encode(passphrase, { - block: options.block, - mime: isEmpty(options.type) ? 'application/octet-stream' : options.type, - metadata: null, - }) - - const effectiveType = isEmpty(options.type) ? 'application/octet-stream' : options.type - const effectiveName = options.name || 'unnamed_file' - const txId = await this.makePayload(encoded, effectiveType, effectiveName) - - return txId - } - - // no native support for progress tracking with WeaveVM - async *upload(id: string) { - yield 100 - } - - async uploadLandingPage(metadata: LandingPageMetadata) { - this.init() - const linkPrefix = WEAVEVM_GATEWAY_URL - const encodedMetadata = JSON.stringify({ - name: metadata.name, - size: metadata.size, - provider: Provider.WeaveVM, - link: `${linkPrefix}/${metadata.txId}/0`, - signed: await makeFileKeySigned(metadata.key), - createdAt: new Date().toISOString(), - }) - const response = await fetch(LANDING_PAGE) - const text = await response.text() - const replaced = text - .replace('Arweave', WeaveVMAgent.providerName) - .replace('Over Arweave', `Over ${WeaveVMAgent.providerName}`) - .replace('__METADATA__', encodedMetadata) - - const data = encodeText(replaced) - - const landingPageTxId = await this.makePayload(data, 'text/html', `${metadata.name}-landing.html`) - - return landingPageTxId - } - - async makePayload(data: Uint8Array, type: string, fileName: string = 'file.dat') { - this.init() - - try { - const envelope = new Envelope(data) - - envelope.tags.set('Content-Type', type) - envelope.tags.set('Filename', fileName) - envelope.tags.set('App-Name', 'Maskbook') - - const blob = new Blob([data], { type }) - - const tags: Record = {} - for (const [key, value] of envelope.tags.entries()) { - tags[key] = value - } - - const txHash = await this.bundlerSDK.upload([ - { - file: blob, - tags, - }, - ]) - - return txHash - } catch (error) { - const errorMessage = `WeaveVM upload failed: ${error instanceof Error ? error.message : String(error)}` - console.error('WeaveVM detailed error:', errorMessage) - - const enhancedError = new Error(errorMessage) - if (error instanceof Error && error.stack) { - enhancedError.stack = error.stack - } - - throw enhancedError - } - } -} - -export default new WeaveVMAgent() diff --git a/packages/plugins/FileService/src/constants.ts b/packages/plugins/FileService/src/constants.ts index a76be5ce320f..d90b2d8b1497 100644 --- a/packages/plugins/FileService/src/constants.ts +++ b/packages/plugins/FileService/src/constants.ts @@ -3,7 +3,7 @@ export const META_KEY_2 = 'com.maskbook.fileservice:2' export const META_KEY_3 = 'com.maskbook.fileservice:3' export const MAX_FILE_SIZE = 10 * 1000 * 1000 -export const MAX_FILE_SIZE_WEAVEVM = 8 * 1024 * 1024 +export const MAX_FILE_SIZE_LOAD = 10 * 1024 * 1024 export const LANDING_PAGE = 'https://files.r2d2.to/partner/arweave/landing-page.html' export const RECOVERY_PAGE = 'https://fileservice.r2d2.to/recover' @@ -20,5 +20,5 @@ export const enum RoutePaths { export const enum Provider { IPFS = 'ipfs', Arweave = 'arweave', - WeaveVM = 'weavevm', + Load = 'load', } diff --git a/packages/plugins/FileService/src/helpers.ts b/packages/plugins/FileService/src/helpers.ts index fd6c0db43146..40050b3e5166 100644 --- a/packages/plugins/FileService/src/helpers.ts +++ b/packages/plugins/FileService/src/helpers.ts @@ -45,7 +45,7 @@ const resolveGatewayAPI = createLookupTableResolver( { [Provider.Arweave]: 'https://arweave.net', [Provider.IPFS]: 'https://mask.infura-ipfs.io/ipfs', - [Provider.WeaveVM]: 'https://gateway.wvm.network/bundle', + [Provider.Load]: 'https://load0.network/resolve', }, () => 'Unknown provider', ) @@ -63,9 +63,6 @@ export function makeFileKey(length = 16) { export function downloadFile(file: FileInfo) { const gateway = resolveGatewayAPI(file.provider) let link = urlcat(gateway, '/:txId', { txId: file.landingTxID }) - if (file.provider === Provider.WeaveVM) { - link = `${link}/0` - } if (isAfter(new Date(2022, 8, 1), new Date(file.createdAt))) { link = urlcat(RECOVERY_PAGE, { url: encodeURIComponent(link), diff --git a/packages/plugins/FileService/src/schema-v3.json b/packages/plugins/FileService/src/schema-v3.json index b03c6d31e194..2ec75a5e9035 100644 --- a/packages/plugins/FileService/src/schema-v3.json +++ b/packages/plugins/FileService/src/schema-v3.json @@ -12,7 +12,7 @@ }, "provider": { "type": "string", - "enum": ["arweave", "ipfs"], + "enum": ["arweave", "ipfs", "load"], "title": "provider" }, "id": { diff --git a/packages/plugins/FileService/src/types.ts b/packages/plugins/FileService/src/types.ts index f167b3e101d7..f40a37c78450 100644 --- a/packages/plugins/FileService/src/types.ts +++ b/packages/plugins/FileService/src/types.ts @@ -3,7 +3,7 @@ import type { FileFrameProps } from '@masknet/shared' export enum Provider { Arweave = 'arweave', IPFS = 'ipfs', - WeaveVM = 'weavevm', + Load = 'load', } export interface LandingPageMetadata { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e43e69b635e..6ce1dfcffe13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,7 +215,7 @@ importers: version: 3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-i: specifier: ^2.29.1 - version: 2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) + version: 2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-lingui: specifier: ^0.10.0 version: 0.10.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2) @@ -1280,9 +1280,6 @@ importers: arweave: specifier: ^1.13.6 version: 1.13.6 - bundler-upload-sdk: - specifier: ^2.1.1 - version: 2.1.1 date-fns: specifier: ^3.6.0 version: 3.6.0 @@ -1301,9 +1298,6 @@ importers: use-subscription: specifier: ^1.8.0 version: 1.8.2(react@0.0.0-experimental-58af67a8f8-20240628) - weavevm-bundles: - specifier: ^0.0.2 - version: 0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) devDependencies: '@types/use-subscription': specifier: ^1.0.2 @@ -4072,21 +4066,25 @@ packages: resolution: {integrity: sha512-lJ7s/pOQWRJ0mstjZQnVyX2/3QRXZ9cpFHJDZ7e81Y8QSn/iqxTrnK0DPgxUrDG8hYKQmWQdQLU4sP5DKBz0Jg==} cpu: [arm64] os: [linux] + libc: [glibc] '@dprint/linux-arm64-musl@0.45.1': resolution: {integrity: sha512-un2awe1L1sAJLsCPSEUrE0/cgupdzbYFoyBOutyU1zHR9KQn47AtIDw+chvuinU4xleHDuEGyXGuJ6NE+Ky6vw==} cpu: [arm64] os: [linux] + libc: [musl] '@dprint/linux-x64-glibc@0.45.1': resolution: {integrity: sha512-5Civht90S/g8zlyYB7n4oH78p+sLbNqeFCFuImJRK7uRxZwCRya7lji6RwlB6DQ7qngVqovTHj9RLOYfZzfVlg==} cpu: [x64] os: [linux] + libc: [glibc] '@dprint/linux-x64-musl@0.45.1': resolution: {integrity: sha512-p2/gjnHDd8GRCvtey5HZO4o/He6pSmY/zpcCuIXprFW9P0vNlEj3DFhz4FPpOKXM+csrsVWWs2E0T/xr5QZtVg==} cpu: [x64] os: [linux] + libc: [musl] '@dprint/typescript@0.90.5': resolution: {integrity: sha512-/1aP6saonFvJyQN3l2is6eTOec3GnLGyW+opid/eDm8pnlhwzYl8A9p36pI6WO5jLl/a9Ghod+LWpvSOuXFGUw==} @@ -5477,24 +5475,28 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@napi-rs/image-linux-arm64-musl@1.4.1': resolution: {integrity: sha512-zp5YOfAMf3Wl5Nl872ubB1Yhy/qzR6AHlzyTHvsNQcoeKQSXZeQ0pSeDO78TaoYXtytBF6FHi5DVmuqmz5lxOg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@napi-rs/image-linux-x64-gnu@1.4.1': resolution: {integrity: sha512-Z+4dShhM3kzYhSINT9jd52DCLKUYH23B7tHEuNW6PIl0eCZmgi2lYRawbmA98rFdmAckfFtYEEg4if6HEbyGgQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@napi-rs/image-linux-x64-musl@1.4.1': resolution: {integrity: sha512-wJh76KSVjJXtmsddhsU+lNYqvXMv0wyzSPMFF/zYPryjUeNAWZp3P59OKj2mq8eFK22t17pBxbZb6uru2bFT7A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@napi-rs/image-win32-ia32-msvc@1.4.1': resolution: {integrity: sha512-aB7JDZp1InE6nj25dg2+Xmv2I1aM+nTfI5v9r7dM6VPTByDHo2NtHqCtTeMM5xlpvMcUTwjyrZHwV1WJGZKNtQ==} @@ -5514,7 +5516,6 @@ packages: '@nice-labs/emit-file-webpack-plugin@1.1.4': resolution: {integrity: sha512-yNYzYN6N2wrcoOcxfNgBP7GLVoewfV7vsg4muVLAJdIBQWnXx+t7d/MEp0n3BYhcxH4MEjm6IZ6jDVzFa3zkJw==} - version: 1.1.4 engines: {node: '>= 12'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -5651,30 +5652,35 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-glibc@2.3.0': resolution: {integrity: sha512-mQ0gBSQEiq1k/MMkgcSB0Ic47UORZBmWoAWlMrTW6nbAGoLZP+h7AtUM7H3oDu34TBFFvjy4JCGP43JlylkTQA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.3.0': resolution: {integrity: sha512-LXZAExpepJew0Gp8ZkJ+xDZaTQjLHv48h0p0Vw2VMFQ8A+RKrAvpFuPVCVwKJCr5SE+zvaG+Etg56qXvTDIedw==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.3.0': resolution: {integrity: sha512-P7Wo91lKSeSgMTtG7CnBS6WrA5otr1K7shhSjKHNePVmfBHDoAOHYRXgUmhiNfbcGk0uMCHVcdbfxtuiZCHVow==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.3.0': resolution: {integrity: sha512-+kiRE1JIq8QdxzwoYY+wzBs9YbJ34guBweTK8nlzLKimn5EQ2b2FSC+tAOpq302BuIMjyuUGvBiUhEcLIGMQ5g==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-wasm@2.3.0': resolution: {integrity: sha512-ejBAX8H0ZGsD8lSICDNyMbSEtPMWgDL0WFCt/0z7hyf5v8Imz4rAM8xY379mBsECkq/Wdqa5WEDLqtjZ+6NxfA==} @@ -5721,7 +5727,6 @@ packages: '@pmmmwh/react-refresh-webpack-plugin@0.5.15': resolution: {integrity: sha512-LFWllMA55pzB9D34w/wXUCf8+c+IYKuJDgxiZ3qMhl64KRMBHYM1I3VdGaD2BV5FNPV2/S2596bppxHbv2ZydQ==} - version: 0.5.15 engines: {node: '>= 10.13'} peerDependencies: '@types/webpack': 4.x || 5.x @@ -5764,12 +5769,6 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@project-serum/borsh@0.2.5': - resolution: {integrity: sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==} - engines: {node: '>=10'} - peerDependencies: - '@solana/web3.js': ^1.2.0 - '@project-serum/sol-wallet-adapter@0.2.6': resolution: {integrity: sha512-cpIb13aWPW8y4KzkZAPDgw+Kb+DXjCC6rZoH74MGm3I/6e/zKyGnfAuW5olb2zxonFqsYgnv7ev8MQnvSgJ3/g==} engines: {node: '>=10'} @@ -5933,51 +5932,61 @@ packages: resolution: {integrity: sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.34.9': resolution: {integrity: sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.34.9': resolution: {integrity: sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.34.9': resolution: {integrity: sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.34.9': resolution: {integrity: sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': resolution: {integrity: sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.34.9': resolution: {integrity: sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.34.9': resolution: {integrity: sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.34.9': resolution: {integrity: sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.34.9': resolution: {integrity: sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.34.9': resolution: {integrity: sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==} @@ -6008,21 +6017,25 @@ packages: resolution: {integrity: sha512-DTtFBJmgQQrVWjbklpgJDr3kE9Uf1fHsPh+1GVslsBuyn+o4O7JslrnjuVsQCYKoiEg0Lg4ZPQmwnhJLHssZ5A==} cpu: [arm64] os: [linux] + libc: [glibc] '@rspack/binding-linux-arm64-musl@1.2.7': resolution: {integrity: sha512-01/OoQQF9eyDvRKkxj4DzCznfGZIvnzI8qOsrv+M7VBm8FLoKpb3hygXixaGQOXmNL42XTh61qjgm++fBu6aUA==} cpu: [arm64] os: [linux] + libc: [musl] '@rspack/binding-linux-x64-gnu@1.2.7': resolution: {integrity: sha512-lUOAUq0YSsofCXsP6XnlgfH0ZRDZ2X2XqXLXYjqf4xkSxCl5eBmE0EQYjAHF4zjUvU5rVx4a4bDLWv7+t3bOHg==} cpu: [x64] os: [linux] + libc: [glibc] '@rspack/binding-linux-x64-musl@1.2.7': resolution: {integrity: sha512-ZrPXfgT30p4DlydYavaTHiluxHkWvZHt7K4q7qNyTfYYowG6jRGwWi/PATdugNICGv027Wsh5nzEO4o27Iuhwg==} cpu: [x64] os: [linux] + libc: [musl] '@rspack/binding-win32-arm64-msvc@1.2.7': resolution: {integrity: sha512-1OzzM+OUSWX39XYcDfxJ8bGX5vNNrRejCMGotBEdP+uQ3KMWCPz0G4KRc3QIjghaLIYk3ofd83hcfUxyk/2Xog==} @@ -6044,7 +6057,6 @@ packages: '@rspack/cli@1.2.7': resolution: {integrity: sha512-nUUZuwnSEORqPcknhP+gkQh9YZqeOlmFKJA1YRnZ5QQkzugCehV+xzVjO+Ezd8R1CSMpqdAQq7+pFZ8rpaRymA==} - version: 1.2.7 hasBin: true peerDependencies: '@rspack/core': ^1.0.0-alpha || ^1.x @@ -6067,7 +6079,6 @@ packages: '@rspack/dev-server@1.0.10': resolution: {integrity: sha512-iDsEtP0jNHRm4LJxL00QFTlOuqkdxIFxnd69h0KrFadmtxAWiDLIe4vYdZXWF74w4MezsJFx6dB2nUM/Ok8utA==} - version: 1.0.10 engines: {node: '>= 18.12.0'} peerDependencies: '@rspack/core': '*' @@ -6518,24 +6529,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.11.7': resolution: {integrity: sha512-cTydaYBwDbVV5CspwVcCp9IevYWpGD1cF5B5KlBdjmBzxxeWyTAJRtKzn8w5/UJe/MfdAptarpqMPIs2f33YEQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.11.7': resolution: {integrity: sha512-YAX2KfYPlbDsnZiVMI4ZwotF3VeURUrzD+emJgFf1g26F4eEmslldgnDrKybW7V+bObsH22cDqoy6jmQZgpuPQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.11.7': resolution: {integrity: sha512-mYT6FTDZyYx5pailc8xt6ClS2yjKmP8jNHxA9Ce3K21n5qkKilI5M2N7NShwXkd3Ksw3F29wKrg+wvEMXTRY/A==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.11.7': resolution: {integrity: sha512-uLDQEcv0BHcepypstyxKkNsW6KfLyI5jVxTbcxka+B2UnMcFpvoR87nGt2JYW0grO2SNZPoFz+UnoKL9c6JxpA==} @@ -7428,7 +7443,6 @@ packages: '@webpack-cli/configtest@3.0.1': resolution: {integrity: sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==} - version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -7436,7 +7450,6 @@ packages: '@webpack-cli/info@3.0.1': resolution: {integrity: sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==} - version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -7444,7 +7457,6 @@ packages: '@webpack-cli/serve@3.0.1': resolution: {integrity: sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==} - version: 3.0.1 engines: {node: '>=18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -8143,9 +8155,6 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} - bundler-upload-sdk@2.1.1: - resolution: {integrity: sha512-BzBHTGA2YoMDDmdLl45j9Lq/MxhnJm85k/m6wy1By0M04ZkZEUbDrdPbZ45+WJA20iWU1Rb4oH2H3fNnVYuVRA==} - busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -8645,7 +8654,6 @@ packages: copy-webpack-plugin@13.0.0: resolution: {integrity: sha512-FgR/h5a6hzJqATDGd9YG41SeDViH+0bkHn6WNXCi5zKAZkeESeSxLySSsFLHqLEVCh0E+rITmCf0dusXWYukeQ==} - version: 13.0.0 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -8941,10 +8949,6 @@ packages: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} - data-uri-to-buffer@4.0.1: - resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} - engines: {node: '>= 12'} - data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -9188,7 +9192,6 @@ packages: devtools-ignore-webpack-plugin@0.2.0: resolution: {integrity: sha512-4P+1Y1VhSt1MRBRF6my8N1bs9nNMOFfIFSBHI6u18W73iCHWXNHTSWYeMoQQ72PIIHrP1q4koKpYg1Em3jb9Rw==} - version: 0.2.0 engines: {node: '>=16.14.2', npm: '>=8.5.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -10007,10 +10010,6 @@ packages: picomatch: optional: true - fetch-blob@3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} - engines: {node: ^12.20 || >= 14.13} - fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} @@ -10032,7 +10031,6 @@ packages: file-loader@6.2.0: resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} - version: 6.2.0 engines: {node: '>= 10.13.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -10168,10 +10166,6 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} - formdata-polyfill@4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -10596,7 +10590,6 @@ packages: html-webpack-plugin@5.6.3: resolution: {integrity: sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==} - version: 5.6.3 engines: {node: '>=10.13.0'} peerDependencies: '@rspack/core': 0.x || 1.x @@ -12456,10 +12449,6 @@ packages: node-addon-api@7.0.0: resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==} - node-domexception@1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - node-fetch-native@1.4.1: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} @@ -12472,10 +12461,6 @@ packages: encoding: optional: true - node-fetch@3.3.2: - resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -13891,7 +13876,6 @@ packages: source-map-loader@5.0.0: resolution: {integrity: sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==} - version: 5.0.0 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -14229,7 +14213,6 @@ packages: swc-loader@0.2.6: resolution: {integrity: sha512-9Zi9UP2YmDpgmQVbyOPJClY0dwf58JDyDMQ7uRc4krmc72twNI2fvlBWHLqVekBpPc7h5NJkGVT1zNDxFrqhvg==} - version: 0.2.6 peerDependencies: '@swc/core': 1.11.7 webpack: npm:@magic-works/webpack@5.88.2 @@ -14265,7 +14248,6 @@ packages: terser-webpack-plugin@5.3.12: resolution: {integrity: sha512-jDLYqo7oF8tJIttjXO6jBY5Hk8p3A8W4ttih7cCEq64fQFWmgJ4VqAQjKr7WwIDlmXKEc6QeoRb5ecjZ+2afcg==} - version: 5.3.12 engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -15107,9 +15089,6 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - weavevm-bundles@0.0.2: - resolution: {integrity: sha512-sJ2p7350AIQUkKi0SvIOfPqHz14n1/WTNxYfaVHkhN3WRY4WwtAZluM8mKJK+6MVxveNjtgjYGea4o7TAm+Hig==} - web-ext@8.4.0: resolution: {integrity: sha512-zO0GNacJeqw3fwbBvgHC2G8reieyN+oCKiMQepX3iv2fm9KEBqg1gdbcdEvi7edfj+gjgxyXhVlFcHIvcEM2Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -15294,7 +15273,6 @@ packages: webpack-dev-middleware@7.4.2: resolution: {integrity: sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==} - version: 7.4.2 engines: {node: '>= 18.12.0'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -15304,7 +15282,6 @@ packages: webpack-dev-server@5.0.4: resolution: {integrity: sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA==} - version: 5.0.4 engines: {node: '>= 18.12.0'} hasBin: true peerDependencies: @@ -15339,7 +15316,6 @@ packages: webpack-target-webextension@2.1.3: resolution: {integrity: sha512-rDNTgo0hdE1p6ayBy92qSRXdfivAqlaFbBOIirqfq/DSVdJvMbZ1yaDlftfzGDkkLlEeAblzl0zcQzTgp1UaKA==} - version: 2.1.3 engines: {node: '>=18.20.5'} peerDependencies: webpack: npm:@magic-works/webpack@5.88.2 @@ -19536,12 +19512,6 @@ snapshots: '@popperjs/core@2.11.8': {} - '@project-serum/borsh@0.2.5(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))': - dependencies: - '@solana/web3.js': 1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - bn.js: 5.2.1 - buffer-layout: 1.2.2 - '@project-serum/sol-wallet-adapter@0.2.6(patch_hash=dl5wqnnaxjm7biesxtvdpr7gpe)(@solana/web3.js@1.75.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))': dependencies: '@solana/web3.js': 1.75.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -22892,11 +22862,6 @@ snapshots: dependencies: run-applescript: 7.0.0 - bundler-upload-sdk@2.1.1: - dependencies: - form-data: 4.0.0 - node-fetch: 3.3.2 - busboy@1.6.0: dependencies: streamsearch: 1.1.0 @@ -23833,8 +23798,6 @@ snapshots: dependencies: assert-plus: 1.0.0 - data-uri-to-buffer@4.0.1: {} - data-urls@3.0.2: dependencies: abab: 2.0.6 @@ -24544,7 +24507,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)): dependencies: debug: 3.2.7 optionalDependencies: @@ -24555,13 +24518,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-i@2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)): + eslint-plugin-i@2.29.1(patch_hash=zgide6rxzjqivhxxv36ouq6c4y)(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)): dependencies: debug: 4.3.7 doctrine: 3.0.0 eslint: 9.21.0(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) get-tsconfig: 4.8.1 is-glob: 4.0.3 minimatch: 3.1.2 @@ -24582,7 +24545,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.21.0(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3(eslint-plugin-import@2.28.1)(eslint@9.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.8.3)(eslint@9.21.0(jiti@2.4.2)) has: 1.0.4 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -25296,11 +25259,6 @@ snapshots: optionalDependencies: picomatch: 4.0.2 - fetch-blob@3.2.0: - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.3.3 - fflate@0.8.2: {} figures@3.2.0: @@ -25461,10 +25419,6 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - formdata-polyfill@4.0.10: - dependencies: - fetch-blob: 3.2.0 - forwarded@0.2.0: {} fresh@0.5.2: {} @@ -28366,8 +28320,6 @@ snapshots: node-addon-api@7.0.0: {} - node-domexception@1.0.0: {} - node-fetch-native@1.4.1: {} node-fetch@2.7.0(encoding@0.1.13): @@ -28376,12 +28328,6 @@ snapshots: optionalDependencies: encoding: 0.1.13 - node-fetch@3.3.2: - dependencies: - data-uri-to-buffer: 4.0.1 - fetch-blob: 3.2.0 - formdata-polyfill: 4.0.10 - node-forge@1.3.1: {} node-gyp-build@4.8.4: {} @@ -31321,13 +31267,6 @@ snapshots: dependencies: defaults: 1.0.4 - weavevm-bundles@0.0.2(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)): - dependencies: - '@project-serum/borsh': 0.2.5(@solana/web3.js@1.98.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)) - bn.js: 5.2.1 - transitivePeerDependencies: - - '@solana/web3.js' - web-ext@8.4.0(body-parser@1.20.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@babel/runtime': 7.26.7 From a59cee3c922b1932ae8b9bfe9c1b4e3ffc39c145 Mon Sep 17 00:00:00 2001 From: guanbinrui Date: Fri, 23 May 2025 17:32:09 +0800 Subject: [PATCH 15/18] chore: bump version to 2.33.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a2d83aaf5ab..bc16ced99548 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "yarn": ">=999.0.0", "npm": ">=999.0.0" }, - "version": "2.33.2", + "version": "2.33.3", "private": true, "license": "AGPL-3.0-or-later", "scripts": { From ec939062724f1e08ace35946cd939082f441d49f Mon Sep 17 00:00:00 2001 From: guanbinrui Date: Fri, 23 May 2025 09:42:18 +0000 Subject: [PATCH 16/18] fix: linter --- packages/plugins/FileService/src/Worker/load.ts | 8 ++++---- packages/plugins/FileService/src/locale/en-US.json | 1 + packages/plugins/FileService/src/locale/en-US.po | 4 ++++ packages/plugins/FileService/src/locale/ja-JP.json | 1 + packages/plugins/FileService/src/locale/ja-JP.po | 4 ++++ packages/plugins/FileService/src/locale/ko-KR.json | 1 + packages/plugins/FileService/src/locale/ko-KR.po | 4 ++++ packages/plugins/FileService/src/locale/zh-CN.json | 1 + packages/plugins/FileService/src/locale/zh-CN.po | 4 ++++ packages/plugins/FileService/src/locale/zh-TW.json | 1 + packages/plugins/FileService/src/locale/zh-TW.po | 4 ++++ 11 files changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/plugins/FileService/src/Worker/load.ts b/packages/plugins/FileService/src/Worker/load.ts index 9bf7f9370e7e..af1cced4cf2f 100644 --- a/packages/plugins/FileService/src/Worker/load.ts +++ b/packages/plugins/FileService/src/Worker/load.ts @@ -81,16 +81,16 @@ class LoadAgent implements ProviderAgent { const blob = new Blob([data], { type }) const headers = { 'Content-Type': type, - 'Filename': fileName, + Filename: fileName, 'App-Name': 'Maskbook', - 'X-Load-Authorization': API_KEY + 'X-Load-Authorization': API_KEY, } const response = await fetch(LOAD_UPLOAD_ENDPOINT, { method: 'POST', headers, body: blob, - signal: this.uploadController?.signal + signal: this.uploadController?.signal, }) if (!response.ok) { @@ -107,7 +107,7 @@ class LoadAgent implements ProviderAgent { if (error instanceof Error && error.stack) { enhancedError.stack = error.stack } - + throw enhancedError } } diff --git a/packages/plugins/FileService/src/locale/en-US.json b/packages/plugins/FileService/src/locale/en-US.json index 7583e303eb45..b3672d3dd21e 100644 --- a/packages/plugins/FileService/src/locale/en-US.json +++ b/packages/plugins/FileService/src/locale/en-US.json @@ -24,6 +24,7 @@ "erRCKP": ["File saved"], "tG9G+b": ["File Service"], "XrH+JC": ["IPFS"], + "6ZZ+4S": ["Load Network"], "tuOw4x": ["Make It Encrypted"], "AxPAXW": ["No results found"], "VHShJf": ["Please click Browse Files button to select files to upload."], diff --git a/packages/plugins/FileService/src/locale/en-US.po b/packages/plugins/FileService/src/locale/en-US.po index 0cf647ab498a..f8f27663de0d 100644 --- a/packages/plugins/FileService/src/locale/en-US.po +++ b/packages/plugins/FileService/src/locale/en-US.po @@ -109,6 +109,10 @@ msgstr "" msgid "IPFS" msgstr "" +#: src/SiteAdaptor/components/UploadFile.tsx +msgid "Load Network" +msgstr "" + #: src/SiteAdaptor/components/UploadFile.tsx msgid "Make It Encrypted" msgstr "" diff --git a/packages/plugins/FileService/src/locale/ja-JP.json b/packages/plugins/FileService/src/locale/ja-JP.json index 04020d3e1d22..042391a78eb5 100644 --- a/packages/plugins/FileService/src/locale/ja-JP.json +++ b/packages/plugins/FileService/src/locale/ja-JP.json @@ -24,6 +24,7 @@ "erRCKP": ["File saved"], "tG9G+b": ["ファイルサービス"], "XrH+JC": ["IPFS"], + "6ZZ+4S": ["Load Network"], "tuOw4x": ["暗号化しましょう"], "AxPAXW": ["結果は見つかりませんでした。"], "VHShJf": ["アップロードするファイルを選択するには、「ファイルを参照」ボタンをクリックしてください。"], diff --git a/packages/plugins/FileService/src/locale/ja-JP.po b/packages/plugins/FileService/src/locale/ja-JP.po index 1b9dd5133fc4..5407fa87006e 100644 --- a/packages/plugins/FileService/src/locale/ja-JP.po +++ b/packages/plugins/FileService/src/locale/ja-JP.po @@ -114,6 +114,10 @@ msgstr "ファイルサービス" msgid "IPFS" msgstr "" +#: src/SiteAdaptor/components/UploadFile.tsx +msgid "Load Network" +msgstr "" + #: src/SiteAdaptor/components/UploadFile.tsx msgid "Make It Encrypted" msgstr "暗号化しましょう" diff --git a/packages/plugins/FileService/src/locale/ko-KR.json b/packages/plugins/FileService/src/locale/ko-KR.json index 6d3086b13522..c01fbb763028 100644 --- a/packages/plugins/FileService/src/locale/ko-KR.json +++ b/packages/plugins/FileService/src/locale/ko-KR.json @@ -22,6 +22,7 @@ "erRCKP": ["File saved"], "tG9G+b": ["파일 서비스"], "XrH+JC": ["IPFS"], + "6ZZ+4S": ["Load Network"], "tuOw4x": ["암호화하기"], "AxPAXW": ["검색 결과가 없습니다."], "VHShJf": ["파일 브러우저 버튼을 클릭하여 업로드할 파일을 선택하세요."], diff --git a/packages/plugins/FileService/src/locale/ko-KR.po b/packages/plugins/FileService/src/locale/ko-KR.po index 31f57f5fddf1..86b2e9ed604e 100644 --- a/packages/plugins/FileService/src/locale/ko-KR.po +++ b/packages/plugins/FileService/src/locale/ko-KR.po @@ -114,6 +114,10 @@ msgstr "파일 서비스" msgid "IPFS" msgstr "" +#: src/SiteAdaptor/components/UploadFile.tsx +msgid "Load Network" +msgstr "" + #: src/SiteAdaptor/components/UploadFile.tsx msgid "Make It Encrypted" msgstr "암호화하기" diff --git a/packages/plugins/FileService/src/locale/zh-CN.json b/packages/plugins/FileService/src/locale/zh-CN.json index b3725e299d18..0cb57df1ec72 100644 --- a/packages/plugins/FileService/src/locale/zh-CN.json +++ b/packages/plugins/FileService/src/locale/zh-CN.json @@ -22,6 +22,7 @@ "erRCKP": ["File saved"], "tG9G+b": ["文件服务"], "XrH+JC": ["IPFS"], + "6ZZ+4S": ["Load Network"], "tuOw4x": ["进行加密"], "AxPAXW": ["未找到结果"], "VHShJf": ["请点击浏览文件按钮选择要上传的文件。"], diff --git a/packages/plugins/FileService/src/locale/zh-CN.po b/packages/plugins/FileService/src/locale/zh-CN.po index b6f35c01a293..bf33f49d8826 100644 --- a/packages/plugins/FileService/src/locale/zh-CN.po +++ b/packages/plugins/FileService/src/locale/zh-CN.po @@ -114,6 +114,10 @@ msgstr "文件服务" msgid "IPFS" msgstr "" +#: src/SiteAdaptor/components/UploadFile.tsx +msgid "Load Network" +msgstr "" + #: src/SiteAdaptor/components/UploadFile.tsx msgid "Make It Encrypted" msgstr "进行加密" diff --git a/packages/plugins/FileService/src/locale/zh-TW.json b/packages/plugins/FileService/src/locale/zh-TW.json index 3a6690c6dfb2..fdd0358223fa 100644 --- a/packages/plugins/FileService/src/locale/zh-TW.json +++ b/packages/plugins/FileService/src/locale/zh-TW.json @@ -22,6 +22,7 @@ "erRCKP": ["File saved"], "tG9G+b": ["文件服务"], "XrH+JC": ["IPFS"], + "6ZZ+4S": ["Load Network"], "tuOw4x": ["加密它"], "AxPAXW": ["未找到结果"], "VHShJf": ["请点击浏览文件按钮选择要上传的文件。"], diff --git a/packages/plugins/FileService/src/locale/zh-TW.po b/packages/plugins/FileService/src/locale/zh-TW.po index 555f17ebf84a..019776fc1714 100644 --- a/packages/plugins/FileService/src/locale/zh-TW.po +++ b/packages/plugins/FileService/src/locale/zh-TW.po @@ -114,6 +114,10 @@ msgstr "" msgid "IPFS" msgstr "" +#: src/SiteAdaptor/components/UploadFile.tsx +msgid "Load Network" +msgstr "" + #: src/SiteAdaptor/components/UploadFile.tsx msgid "Make It Encrypted" msgstr "加密它" From 44ed4ae8e995d1aa41cf0934d612eb0be11414e1 Mon Sep 17 00:00:00 2001 From: Wukong Sun Date: Thu, 29 May 2025 20:19:38 +0800 Subject: [PATCH 17/18] chore: mf-6722 update and add plugin tutorial links (#12238) --- packages/plugins/Calendar/src/SiteAdaptor/index.tsx | 1 + .../plugins/FileService/src/SiteAdaptor/index.tsx | 2 +- .../plugins/GoPlusSecurity/src/SiteAdaptor/index.tsx | 2 ++ packages/plugins/Pets/src/SiteAdaptor/index.tsx | 3 +-- packages/plugins/RedPacket/src/SiteAdaptor/index.tsx | 2 +- .../plugins/ScamWarning/src/SiteAdaptor/index.tsx | 2 ++ packages/plugins/SwitchLogo/src/SiteAdaptor/index.tsx | 1 + packages/plugins/Tips/src/SiteAdaptor/index.tsx | 1 + packages/plugins/Transak/src/SiteAdaptor/index.tsx | 2 +- .../plugins/Web3Profile/src/SiteAdaptor/index.tsx | 1 + .../ApplicationSettingPluginSwitch.tsx | 11 +++++++++++ 11 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/plugins/Calendar/src/SiteAdaptor/index.tsx b/packages/plugins/Calendar/src/SiteAdaptor/index.tsx index 72a1f310d7ae..b991f6d61f6b 100644 --- a/packages/plugins/Calendar/src/SiteAdaptor/index.tsx +++ b/packages/plugins/Calendar/src/SiteAdaptor/index.tsx @@ -24,6 +24,7 @@ const site: Plugin.SiteAdaptor.Definition = { category: 'dapp', recommendFeature, description: recommendFeature.description, + tutorialLink: 'https://mask.notion.site/Calendar-Web3-Daily-Digest-a59647e6e43a454eaccedd627fe50d3c', }, ], } diff --git a/packages/plugins/FileService/src/SiteAdaptor/index.tsx b/packages/plugins/FileService/src/SiteAdaptor/index.tsx index ecb64c45b019..471a19710491 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/index.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/index.tsx @@ -101,7 +101,7 @@ const definition: Plugin.SiteAdaptor.Definition = { ), name, iconFilterColor, - tutorialLink: 'https://realmasknetwork.notion.site/8c8fe1efce5a48b49739a38f4ea8c60f', + tutorialLink: 'https://mask.notion.site/Web3-File-Service-ee60e0e79a674019a0560de16144ecb3', } })(), ], diff --git a/packages/plugins/GoPlusSecurity/src/SiteAdaptor/index.tsx b/packages/plugins/GoPlusSecurity/src/SiteAdaptor/index.tsx index 864951343764..790bd8208320 100644 --- a/packages/plugins/GoPlusSecurity/src/SiteAdaptor/index.tsx +++ b/packages/plugins/GoPlusSecurity/src/SiteAdaptor/index.tsx @@ -44,6 +44,8 @@ const site: Plugin.SiteAdaptor.Definition = { category: 'dapp', marketListSortingPriority: 16, description: Provide you with fast, reliable and convenient security services., + tutorialLink: + 'https://mask.notion.site/Security-Detection-Go-Scamsniffer-Blockaid-Cryptoscamdb-9c32befb3c0648e79997900cee232462', } })(), ], diff --git a/packages/plugins/Pets/src/SiteAdaptor/index.tsx b/packages/plugins/Pets/src/SiteAdaptor/index.tsx index 26f1e04d1e7e..46e222602d15 100644 --- a/packages/plugins/Pets/src/SiteAdaptor/index.tsx +++ b/packages/plugins/Pets/src/SiteAdaptor/index.tsx @@ -5,7 +5,6 @@ import { Icons } from '@masknet/icons' import { base } from '../base.js' import { PluginPetMessages } from '../messages.js' import { PetsGlobalInjection } from './PetsGlobalInjection.js' -import { twitterDomainMigrate } from '@masknet/shared-base' import { Trans } from '@lingui/react/macro' const site: Plugin.SiteAdaptor.Definition = { @@ -41,7 +40,7 @@ const site: Plugin.SiteAdaptor.Definition = { icon, description: Discover the infinite possibilities of #NFTs., name, - tutorialLink: twitterDomainMigrate('https://x.com/NonFFriend'), + tutorialLink: 'https://mask.notion.site/Set-Up-Your-Own-NFT-Pet-PFP-8c12e0ce8b6a4fa0bde3a90fe070618b', iconFilterColor, category: 'dapp', } diff --git a/packages/plugins/RedPacket/src/SiteAdaptor/index.tsx b/packages/plugins/RedPacket/src/SiteAdaptor/index.tsx index 492e41902320..4542095985b2 100644 --- a/packages/plugins/RedPacket/src/SiteAdaptor/index.tsx +++ b/packages/plugins/RedPacket/src/SiteAdaptor/index.tsx @@ -156,7 +156,7 @@ const site: Plugin.SiteAdaptor.Definition = { icon, description: Gift crypto or NFTs to any users, first come, first served., name, - tutorialLink: 'https://realmasknetwork.notion.site/0a71fd421aae4563bd07caa3e2129e5b', + tutorialLink: 'https://mask.notion.site/Send-a-Lucky-Drop-a4c7d33e87d54f1e9f537838308e3a6b', category: 'dapp', recommendFeature, } diff --git a/packages/plugins/ScamWarning/src/SiteAdaptor/index.tsx b/packages/plugins/ScamWarning/src/SiteAdaptor/index.tsx index 78a064f06830..f118e268cb68 100644 --- a/packages/plugins/ScamWarning/src/SiteAdaptor/index.tsx +++ b/packages/plugins/ScamWarning/src/SiteAdaptor/index.tsx @@ -27,6 +27,8 @@ const site: Plugin.SiteAdaptor.Definition = { digital assets. ), + tutorialLink: + 'https://mask.notion.site/Security-Detection-Go-Scamsniffer-Blockaid-Cryptoscamdb-9c32befb3c0648e79997900cee232462', } })(), ], diff --git a/packages/plugins/SwitchLogo/src/SiteAdaptor/index.tsx b/packages/plugins/SwitchLogo/src/SiteAdaptor/index.tsx index 40c3832883af..f7d841816e59 100644 --- a/packages/plugins/SwitchLogo/src/SiteAdaptor/index.tsx +++ b/packages/plugins/SwitchLogo/src/SiteAdaptor/index.tsx @@ -21,6 +21,7 @@ const site: Plugin.SiteAdaptor.Definition = { category: 'dapp', recommendFeature, description: recommendFeature.description, + tutorialLink: 'https://mask.notion.site/Back-to-Twitter-Blue-Bird-6e17fd3065be4333b7ddcb77b0828af0', }, ], GlobalInjection() { diff --git a/packages/plugins/Tips/src/SiteAdaptor/index.tsx b/packages/plugins/Tips/src/SiteAdaptor/index.tsx index 2505c5e8cf3e..1c1d713ceb7e 100644 --- a/packages/plugins/Tips/src/SiteAdaptor/index.tsx +++ b/packages/plugins/Tips/src/SiteAdaptor/index.tsx @@ -41,6 +41,7 @@ const site: Plugin.SiteAdaptor.Definition = { iconFilterColor, nextIdRequired: true, entryWalletConnectedNotRequired: true, + tutorialLink: 'https://mask.notion.site/Tip-Your-Favourite-Web3-User-fbf16a9009b54cc4be7e860ba2c15441', } })(), ], diff --git a/packages/plugins/Transak/src/SiteAdaptor/index.tsx b/packages/plugins/Transak/src/SiteAdaptor/index.tsx index 64bf570fdd8e..bfc083a24772 100644 --- a/packages/plugins/Transak/src/SiteAdaptor/index.tsx +++ b/packages/plugins/Transak/src/SiteAdaptor/index.tsx @@ -36,7 +36,7 @@ const site: Plugin.SiteAdaptor.Definition = { }, appBoardSortingDefaultPriority: 8, marketListSortingPriority: 6, - tutorialLink: 'https://transak.com/', + tutorialLink: 'https://mask.notion.site/Fiat-on-ramp-77cd1c4a771a4022ab4d5a45f6691717', icon, description: ( Fiat On-Ramp Aggregator on X. Buy crypto in 60+ countries with Transak support. diff --git a/packages/plugins/Web3Profile/src/SiteAdaptor/index.tsx b/packages/plugins/Web3Profile/src/SiteAdaptor/index.tsx index c5190c74bf7e..936cff3954e6 100644 --- a/packages/plugins/Web3Profile/src/SiteAdaptor/index.tsx +++ b/packages/plugins/Web3Profile/src/SiteAdaptor/index.tsx @@ -58,6 +58,7 @@ const site: Plugin.SiteAdaptor.Definition = { nextIdRequired: true, category: 'dapp', description: Choose and show your Web3 footprints on X., + tutorialLink: 'https://mask.notion.site/Web3-Profile-b3215b9094f24b0fa6928d9c04fc50f2', } })(), ], diff --git a/packages/shared/src/UI/modals/ApplicationBoardModal/ApplicationSettingPluginSwitch.tsx b/packages/shared/src/UI/modals/ApplicationBoardModal/ApplicationSettingPluginSwitch.tsx index 1da0cf79a3f8..32d26ce7f2c4 100644 --- a/packages/shared/src/UI/modals/ApplicationBoardModal/ApplicationSettingPluginSwitch.tsx +++ b/packages/shared/src/UI/modals/ApplicationBoardModal/ApplicationSettingPluginSwitch.tsx @@ -207,6 +207,17 @@ function DSearchSettings({ checked, onSwitch, setRef }: DSearchSettingsProps) { DSearch + + + + openWindow( + 'https://mask.notion.site/DSearch-73f30e9268764c10901090aaa6ed0558', + ) + } + /> +
From 50d9c2bc933f683010e71c24b22fc7cf4996a76b Mon Sep 17 00:00:00 2001 From: Wukong Sun Date: Fri, 30 May 2025 12:21:20 +0800 Subject: [PATCH 18/18] docs(FileService): mf-6721 update terms of service (#12237) --- .../src/SiteAdaptor/components/Terms.tsx | 33 ++++++++----------- .../plugins/FileService/src/locale/en-US.json | 3 ++ .../plugins/FileService/src/locale/en-US.po | 8 +++-- .../plugins/FileService/src/locale/ja-JP.json | 3 ++ .../plugins/FileService/src/locale/ja-JP.po | 8 +++-- .../plugins/FileService/src/locale/ko-KR.json | 3 ++ .../plugins/FileService/src/locale/ko-KR.po | 8 +++-- .../plugins/FileService/src/locale/zh-CN.json | 3 ++ .../plugins/FileService/src/locale/zh-CN.po | 8 +++-- .../plugins/FileService/src/locale/zh-TW.json | 3 ++ .../plugins/FileService/src/locale/zh-TW.po | 8 +++-- 11 files changed, 59 insertions(+), 29 deletions(-) diff --git a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx index 4d3dd4bf70a0..d9b015f38f04 100644 --- a/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx +++ b/packages/plugins/FileService/src/SiteAdaptor/components/Terms.tsx @@ -95,28 +95,23 @@ export function Terms() { - Web3 File Service is a decentralized storage service provided by Mask Network. It allows users - to store files in different decentralized networks. This feature is powered by Mask Network's - partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, - PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB. + Web3 File Service is a decentralized storage solution provided by Mask Network that allows users + to store files across multiple decentralized networks. This service is powered by Mask Network’s + partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats + such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.
+ Through the Web3 File Service, users can upload files to different decentralized networks and + choose whether or not to encrypt them, thereby generating files with different levels of + confidentiality. Mask Network users can share these files to social platforms via generated + links. Using encryption helps protect file security and prevent privacy breaches.
- You can store files in multiple decentralized networks through the Web3 file service. When - uploading files, you can choose to encrypt or decrypt them. According to the selected encryption - method, you can obtain two file links with and without encryption. Users of Mask Network can - share files to social platforms through this link. By using the encryption, you can ensure the - security of your files and prevent privacy leakage. + Please note that anyone with the link can access and share the file. Due to the immutable nature + of decentralized storage systems, uploaded files cannot be deleted or modified, so please + exercise caution when uploading files containing personal information.
-
- It should be noted that any user who has the link can download and share the file. With the - characteristics of decentralized file storage systems, your uploaded files can never be deleted - or tampered. Be caution when uploading files with personal privacy. -
-
- The Web3 File Service provided by Mask Network enables individuals to be free from data - restrictions imposed by traditional social platforms, enabling free encrypted transmission and - sharing of files. At present, the service is provisionally free for all users with Mask Network. - Mask Network will provide updates on costs users may have to pay in the future. + Mask Network’s Web3 File Service is designed to help users break free from the data limitations + of traditional social platforms, enabling secure and decentralized file sharing. The service is + currently free for all Mask Network users. Any future costs will be announced in advance.
diff --git a/packages/plugins/FileService/src/locale/en-US.json b/packages/plugins/FileService/src/locale/en-US.json index b3672d3dd21e..33ea06712bc8 100644 --- a/packages/plugins/FileService/src/locale/en-US.json +++ b/packages/plugins/FileService/src/locale/en-US.json @@ -43,6 +43,9 @@ "TwdaGt": [ "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." ], + "lErh77": [ + "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." + ], "4JCJIV": ["What is Web3 File Service?"], "9uYu7e": ["You haven't uploaded any files yet."], "jt/0L2": ["You've saved ", ["0"], " to Web3 file service."] diff --git a/packages/plugins/FileService/src/locale/en-US.po b/packages/plugins/FileService/src/locale/en-US.po index f8f27663de0d..2756eb7b37ce 100644 --- a/packages/plugins/FileService/src/locale/en-US.po +++ b/packages/plugins/FileService/src/locale/en-US.po @@ -157,13 +157,17 @@ msgid "Web3 File Service" msgstr "" #: src/SiteAdaptor/components/Terms.tsx -msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." -msgstr "" +#~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." +#~ msgstr "" #: src/SiteAdaptor/components/Terms.tsx #~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." #~ msgstr "" +#: src/SiteAdaptor/components/Terms.tsx +msgid "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." +msgstr "" + #: src/SiteAdaptor/components/Terms.tsx msgid "What is Web3 File Service?" msgstr "" diff --git a/packages/plugins/FileService/src/locale/ja-JP.json b/packages/plugins/FileService/src/locale/ja-JP.json index 042391a78eb5..76b7d96f05b6 100644 --- a/packages/plugins/FileService/src/locale/ja-JP.json +++ b/packages/plugins/FileService/src/locale/ja-JP.json @@ -43,6 +43,9 @@ "TwdaGt": [ "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." ], + "lErh77": [ + "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." + ], "4JCJIV": ["Web3ファイルサービスとは何ですか?"], "9uYu7e": ["まだファイルはアップロードされていません。"], "jt/0L2": ["You've saved ", ["0"], " to Web3 file service."] diff --git a/packages/plugins/FileService/src/locale/ja-JP.po b/packages/plugins/FileService/src/locale/ja-JP.po index 5407fa87006e..84a40fd51b40 100644 --- a/packages/plugins/FileService/src/locale/ja-JP.po +++ b/packages/plugins/FileService/src/locale/ja-JP.po @@ -162,13 +162,17 @@ msgid "Web3 File Service" msgstr "プラグイン: ファイルサービス" #: src/SiteAdaptor/components/Terms.tsx -msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." -msgstr "" +#~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." +#~ msgstr "" #: src/SiteAdaptor/components/Terms.tsx #~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." #~ msgstr "" +#: src/SiteAdaptor/components/Terms.tsx +msgid "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." +msgstr "" + #: src/SiteAdaptor/components/Terms.tsx msgid "What is Web3 File Service?" msgstr "Web3ファイルサービスとは何ですか?" diff --git a/packages/plugins/FileService/src/locale/ko-KR.json b/packages/plugins/FileService/src/locale/ko-KR.json index c01fbb763028..a7487e395748 100644 --- a/packages/plugins/FileService/src/locale/ko-KR.json +++ b/packages/plugins/FileService/src/locale/ko-KR.json @@ -41,6 +41,9 @@ "TwdaGt": [ "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." ], + "lErh77": [ + "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." + ], "4JCJIV": ["웹2 파일 서비스가 무엇입니까?"], "9uYu7e": ["업로드된 파일이 없습니다."], "jt/0L2": ["You've saved ", ["0"], " to Web3 file service."] diff --git a/packages/plugins/FileService/src/locale/ko-KR.po b/packages/plugins/FileService/src/locale/ko-KR.po index 86b2e9ed604e..4f23250b1c10 100644 --- a/packages/plugins/FileService/src/locale/ko-KR.po +++ b/packages/plugins/FileService/src/locale/ko-KR.po @@ -162,13 +162,17 @@ msgid "Web3 File Service" msgstr "웹3 파일 서비스" #: src/SiteAdaptor/components/Terms.tsx -msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." -msgstr "" +#~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." +#~ msgstr "" #: src/SiteAdaptor/components/Terms.tsx #~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." #~ msgstr "" +#: src/SiteAdaptor/components/Terms.tsx +msgid "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." +msgstr "" + #: src/SiteAdaptor/components/Terms.tsx msgid "What is Web3 File Service?" msgstr "웹2 파일 서비스가 무엇입니까?" diff --git a/packages/plugins/FileService/src/locale/zh-CN.json b/packages/plugins/FileService/src/locale/zh-CN.json index 0cb57df1ec72..da4d8a35a94a 100644 --- a/packages/plugins/FileService/src/locale/zh-CN.json +++ b/packages/plugins/FileService/src/locale/zh-CN.json @@ -39,6 +39,9 @@ "TwdaGt": [ "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." ], + "lErh77": [ + "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." + ], "4JCJIV": ["什么是 Web3 文件服务?"], "9uYu7e": ["您尚未上传任何文件。"], "jt/0L2": ["You've saved ", ["0"], " to Web3 file service."] diff --git a/packages/plugins/FileService/src/locale/zh-CN.po b/packages/plugins/FileService/src/locale/zh-CN.po index bf33f49d8826..af819e6ab65c 100644 --- a/packages/plugins/FileService/src/locale/zh-CN.po +++ b/packages/plugins/FileService/src/locale/zh-CN.po @@ -162,13 +162,17 @@ msgid "Web3 File Service" msgstr "文件服务" #: src/SiteAdaptor/components/Terms.tsx -msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." -msgstr "" +#~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." +#~ msgstr "" #: src/SiteAdaptor/components/Terms.tsx #~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." #~ msgstr "" +#: src/SiteAdaptor/components/Terms.tsx +msgid "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." +msgstr "" + #: src/SiteAdaptor/components/Terms.tsx msgid "What is Web3 File Service?" msgstr "什么是 Web3 文件服务?" diff --git a/packages/plugins/FileService/src/locale/zh-TW.json b/packages/plugins/FileService/src/locale/zh-TW.json index fdd0358223fa..b6086f79f040 100644 --- a/packages/plugins/FileService/src/locale/zh-TW.json +++ b/packages/plugins/FileService/src/locale/zh-TW.json @@ -39,6 +39,9 @@ "TwdaGt": [ "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." ], + "lErh77": [ + "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." + ], "4JCJIV": ["什么是 Web3 文件服务?"], "9uYu7e": ["您尚未上传任何文件。"], "jt/0L2": ["You've saved ", ["0"], " to Web3 file service."] diff --git a/packages/plugins/FileService/src/locale/zh-TW.po b/packages/plugins/FileService/src/locale/zh-TW.po index 019776fc1714..6c1523a53e3e 100644 --- a/packages/plugins/FileService/src/locale/zh-TW.po +++ b/packages/plugins/FileService/src/locale/zh-TW.po @@ -162,13 +162,17 @@ msgid "Web3 File Service" msgstr "檔案服務" #: src/SiteAdaptor/components/Terms.tsx -msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." -msgstr "" +#~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS and Arweave. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." +#~ msgstr "" #: src/SiteAdaptor/components/Terms.tsx #~ msgid "Web3 File Service is a decentralized storage service provided by Mask Network. It allows users to store files in different decentralized networks. This feature is powered by Mask Network's partner file storage protocols such as IPFS, Arweave and Meson Network. It supports files in PDF, DOC, JPG, PNG, MP3, MP4 and other formats. At present, the maximum file size is 10 MB.<0/><1/>You can store files in multiple decentralized networks through the Web3 file service. When uploading files, you can choose to encrypt or decrypt them. According to the selected encryption method, you can obtain two file links with and without encryption. Users of Mask Network can share files to social platforms through this link. By using the encryption, you can ensure the security of your files and prevent privacy leakage.<2/><3/>It should be noted that any user who has the link can download and share the file. With the characteristics of decentralized file storage systems, your uploaded files can never be deleted or tampered. Be caution when uploading files with personal privacy.<4/><5/>The Web3 File Service provided by Mask Network enables individuals to be free from data restrictions imposed by traditional social platforms, enabling free encrypted transmission and sharing of files. At present, the service is provisionally free for all users with Mask Network. Mask Network will provide updates on costs users may have to pay in the future." #~ msgstr "" +#: src/SiteAdaptor/components/Terms.tsx +msgid "Web3 File Service is a decentralized storage solution provided by Mask Network that allows users to store files across multiple decentralized networks. This service is powered by Mask Network’s partner protocols, including IPFS, Arweave, and Load Network. It supports various file formats such as PDF, DOC, JPG, PNG, MP3, MP4, and more, with a maximum file size of 10MB per upload.<0/>Through the Web3 File Service, users can upload files to different decentralized networks and choose whether or not to encrypt them, thereby generating files with different levels of confidentiality. Mask Network users can share these files to social platforms via generated links. Using encryption helps protect file security and prevent privacy breaches.<1/>Please note that anyone with the link can access and share the file. Due to the immutable nature of decentralized storage systems, uploaded files cannot be deleted or modified, so please exercise caution when uploading files containing personal information.<2/>Mask Network’s Web3 File Service is designed to help users break free from the data limitations of traditional social platforms, enabling secure and decentralized file sharing. The service is currently free for all Mask Network users. Any future costs will be announced in advance." +msgstr "" + #: src/SiteAdaptor/components/Terms.tsx msgid "What is Web3 File Service?" msgstr ""