@bitgo/wasm-solana 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -0
  2. package/package.json +56 -5
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # wasm-solana
2
+
3
+ WASM bindings for Solana cryptographic operations. This package provides Rust-based bindings for Ed25519 keypair generation, public key operations, and signature verification for Solana.
4
+
5
+ ## Building
6
+
7
+ ### Mac
8
+
9
+ Requires Homebrew LLVM (Apple's Clang doesn't support WASM targets):
10
+
11
+ ```bash
12
+ brew install llvm
13
+ npm run build
14
+ ```
15
+
16
+ ### Docker (optional)
17
+
18
+ If you prefer a containerized build environment:
19
+
20
+ ```bash
21
+ make -f Container.mk build-image
22
+ make -f Container.mk build-wasm
23
+ ```
package/package.json CHANGED
@@ -1,11 +1,62 @@
1
1
  {
2
2
  "name": "@bitgo/wasm-solana",
3
- "version": "0.0.1",
4
- "description": "",
3
+ "description": "WebAssembly wrapper for Solana cryptographic operations",
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/BitGo/BitGoWASM"
9
+ },
5
10
  "license": "MIT",
6
- "author": "bitgobot",
7
- "main": "index.js",
11
+ "files": [
12
+ "dist/esm/js/**/*",
13
+ "dist/cjs/js/**/*",
14
+ "dist/cjs/package.json"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "import": {
19
+ "types": "./dist/esm/js/index.d.ts",
20
+ "default": "./dist/esm/js/index.js"
21
+ },
22
+ "require": {
23
+ "types": "./dist/cjs/js/index.d.ts",
24
+ "default": "./dist/cjs/js/index.js"
25
+ }
26
+ }
27
+ },
28
+ "main": "./dist/cjs/js/index.js",
29
+ "module": "./dist/esm/js/index.js",
30
+ "types": "./dist/esm/js/index.d.ts",
31
+ "sideEffects": [
32
+ "./dist/esm/js/wasm/wasm_solana.js",
33
+ "./dist/cjs/js/wasm/wasm_solana.js"
34
+ ],
8
35
  "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1"
36
+ "test": "npm run test:mocha",
37
+ "test:mocha": "mocha --recursive test",
38
+ "build:wasm": "make js/wasm && make dist/esm/js/wasm && make dist/cjs/js/wasm",
39
+ "build:ts-esm": "tsc",
40
+ "build:ts-cjs": "tsc --project tsconfig.cjs.json",
41
+ "build:ts": "npm run build:ts-esm && npm run build:ts-cjs",
42
+ "build:package-json": "echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
43
+ "build": "npm run build:wasm && npm run build:ts && npm run build:package-json",
44
+ "check-fmt": "prettier --check . && cargo fmt -- --check",
45
+ "lint": "eslint .",
46
+ "lint:fix": "eslint . --fix"
47
+ },
48
+ "devDependencies": {
49
+ "@eslint/js": "^9.17.0",
50
+ "@types/mocha": "^10.0.7",
51
+ "@types/node": "^22.10.5",
52
+ "eslint": "^9.17.0",
53
+ "mocha": "^10.6.0",
54
+ "tsx": "4.20.6",
55
+ "typescript": "^5.5.3",
56
+ "typescript-eslint": "^8.18.2"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public",
60
+ "registry": "https://registry.npmjs.org/"
10
61
  }
11
62
  }