3MeshSDK
3meshsdk JS/TS implementation. It supports compilation
to WASM via Emscripten so that 3mesh-sdk features can be used in a browser.
Getting Started
npm install
npm run build
Release Publishing
vi ~/.npmrc
npm login
npm publish --tag beta --access public
npm publish --tag latest --access public
npm config delete proxy
npm config delete https-proxy
npm config get proxy
npm config get https-proxy
npm config set proxy http://127.0.0.1:7890
npm config set https-proxy http://127.0.0.1:7890
npm config set registry https://registry.npmmirror.com
npm config set registry https://registry.npmmirror.com --location=project
npm config set registry https://registry.npmjs.org/
Install
3meshsdk is available as a UMD module compatible with both NodeJS and browsers,
and includes TypeScript definitions.
npm install 3meshsdk
Usage
To use the meshsdk, do the following:
import { createMeshSDK } from '3meshsdk';
const mrmesh = await createMeshSDK();
Ensure cross-origin isolation (COOP + COEP) is supported:
1.Vite
export default defineConfig({
...,
server: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
},
...
});
2.Nginx
server {
listen 80;
server_name your.domain.com;
add_header Cross-Origin-Opener-Policy same-origin;
add_header Cross-Origin-Embedder-Policy require-corp;
root /var/www/your-app;
index index.html;
}