{"_id":"@anomaorg/arm-bindings","_rev":"5-f1008b5cc748cc50644910fa5ce72738","name":"@anomaorg/arm-bindings","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@anomaorg/arm-bindings","version":"0.1.0","author":{"name":"Anoma"},"license":"Apache-2.0","_id":"@anomaorg/arm-bindings@0.1.0","maintainers":[{"name":"prznd","email":"pedro@heliax.dev"},{"name":"mateuszatheliaxdev","email":"mateusz@heliax.dev"},{"name":"justinevans","email":"justin@heliax.dev"},{"name":"harri-heliax","email":"harrison@heliax.dev"}],"homepage":"https://anoma.net","bugs":{"url":"https://github.com/anoma/anoma-app-sdk/issues"},"dist":{"shasum":"43d2167676c95ef87a9cec2bc5219ab65f22c82f","tarball":"https://registry.npmjs.org/@anomaorg/arm-bindings/-/arm-bindings-0.1.0.tgz","fileCount":8,"integrity":"sha512-JZpfr89o9nQMEy8Ac5jg1V3ClMyNL7W0s0rI+LASI7jog+NQ5xhIn0Tt67wnsn41aUF9GZg3USz8Akj3y/Kv1Q==","signatures":[{"sig":"MEYCIQDO+SgZ4hbAD53rTI1Le5DbW1cDTjPKaFrN1ZZk6FEZVAIhAM0G+c7u9yydVSjqg+F7h2R1khaAENVBw1JLTbcRngw8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anomaorg%2farm-bindings@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1017430},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"d01fb48ebde3caca107a0dced848f6e6e440b682","scripts":{"build":"pnpm clean && pnpm build:web && pnpm build:ts","clean":"rm -rf generated dist","smoke":"node scripts/smoke.mjs","build:ts":"tsdown","build:dev":"pnpm clean && pnpm build:web:dev && pnpm build:ts","build:web":"ubrn build web --release && pnpm optimize:wasm","lint:rust":"cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings","typecheck":"tsc --noEmit","build:web:dev":"ubrn build web","optimize:wasm":"wasm-opt -Oz generated/wasm/wasm-bindgen/index_bg.wasm -o generated/wasm/wasm-bindgen/index_bg.opt.wasm && mv generated/wasm/wasm-bindgen/index_bg.opt.wasm generated/wasm/wasm-bindgen/index_bg.wasm","format:check:rust":"cargo fmt --manifest-path rust/Cargo.toml --check"},"_npmUser":{"name":"harri-heliax","email":"harrison@heliax.dev"},"repository":{"url":"git+https://github.com/anoma/anoma-app-sdk.git","type":"git"},"_npmVersion":"11.16.0","description":"Wasm bindings for arm-risc0","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@ubjs/core":"0.31.0-3"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.5","uniffi-bindgen-react-native":"0.31.0-3"},"_npmOperationalInternal":{"tmp":"tmp/arm-bindings_0.1.0_1786558634559_0.7915686575502177","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anomaorg/arm-bindings","version":"0.2.0","author":{"name":"Anoma"},"license":"Apache-2.0","_id":"@anomaorg/arm-bindings@0.2.0","maintainers":[{"name":"prznd","email":"pedro@heliax.dev"},{"name":"mateuszatheliaxdev","email":"mateusz@heliax.dev"},{"name":"justinevans","email":"justin@heliax.dev"},{"name":"harri-heliax","email":"harrison@heliax.dev"}],"homepage":"https://anoma.net","bugs":{"url":"https://github.com/anoma/anoma-app-sdk/issues"},"dist":{"shasum":"d1f94a8d41f80ecc96e27fb53a70827bae64474d","tarball":"https://registry.npmjs.org/@anomaorg/arm-bindings/-/arm-bindings-0.2.0.tgz","fileCount":8,"integrity":"sha512-6w5SlJdMADNv9r0WncK45PIkBEUKofmABBVtOQ1RnCVNEUwA4XQIUYnoj92YoTMC2A3Gbdy1Of2Izh8bYi+0TQ==","signatures":[{"sig":"MEUCIAbL9gxN1m+cwm61dxDxJNGx2o/GfVzj2z+tDAx/eo0EAiEA8t52szRMsAtkt4olN13N558FLygD02cTugdIDNAEcUs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anomaorg%2farm-bindings@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1017434},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"c981a328c00792ecae2a720d68795afc964fe886","scripts":{"build":"pnpm clean && pnpm build:web && pnpm build:ts","clean":"rm -rf generated dist","smoke":"node scripts/smoke.mjs","build:ts":"tsdown","build:dev":"pnpm clean && pnpm build:web:dev && pnpm build:ts","build:web":"ubrn build web --release && pnpm optimize:wasm","lint:rust":"cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings","typecheck":"tsc --noEmit","build:web:dev":"ubrn build web","optimize:wasm":"wasm-opt -Oz generated/wasm/wasm-bindgen/index_bg.wasm -o generated/wasm/wasm-bindgen/index_bg.opt.wasm && mv generated/wasm/wasm-bindgen/index_bg.opt.wasm generated/wasm/wasm-bindgen/index_bg.wasm","format:check:rust":"cargo fmt --manifest-path rust/Cargo.toml --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8b8f6eb-e528-4fa1-9e6d-0a54be3aab90"}},"repository":{"url":"git+https://github.com/anoma/anoma-app-sdk.git","type":"git"},"_npmVersion":"11.16.0","description":"Wasm bindings for arm-risc0","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@ubjs/core":"0.31.0-3"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.5","uniffi-bindgen-react-native":"0.31.0-3"},"_npmOperationalInternal":{"tmp":"tmp/arm-bindings_0.2.0_1786633818290_0.06709832405267702","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@anomaorg/arm-bindings","version":"0.3.0","author":{"name":"Anoma"},"license":"Apache-2.0","_id":"@anomaorg/arm-bindings@0.3.0","maintainers":[{"name":"prznd","email":"pedro@heliax.dev"},{"name":"justinevans","email":"justin@heliax.dev"},{"name":"harri-heliax","email":"harrison@heliax.dev"}],"homepage":"https://anoma.net","bugs":{"url":"https://github.com/anoma/anoma-app-sdk/issues"},"dist":{"shasum":"557a49e13e982fe8a547f555bbb8a12c508732aa","tarball":"https://registry.npmjs.org/@anomaorg/arm-bindings/-/arm-bindings-0.3.0.tgz","fileCount":38,"integrity":"sha512-jydYFJaSxnpmFtVV19qjQKlnt0LwagHytaS5y8bCjHtQ0S0A2M0djwQ9Iak/IfDCD7PFIWd3JWLZ2XZBpFRiyg==","signatures":[{"sig":"MEUCICpuNNEC4SBjcjT9v61cYEcP3M14//kdJEU0FKifObd2AiEAsDSkL1FGy/jpePudwiKiTZ7yZz/Fev91Ahok6J6DxrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anomaorg%2farm-bindings@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":86889650},"main":"./index","type":"module","_from":"file:/home/runner/work/_temp/package/anomaorg-arm-bindings-0.3.0.tgz","types":"./bundled/dist/index.d.ts","scripts":{"build":"pnpm clean && pnpm build:android && pnpm build:ios && pnpm build:web && pnpm build:ts","clean":"rm -rf generated bundled/dist cpp android ios *.podspec *.xcframework","smoke":"node scripts/smoke.mjs","build:ts":"tsdown","build:dev":"pnpm clean && pnpm build:ios:dev && pnpm build:android:dev && pnpm build:web:dev","build:ios":"ubrn build ios --and-generate --release","build:web":"ubrn build web --release","lint:rust":"cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings","typecheck":"tsc --noEmit","build:android":"ubrn build android --and-generate --release","build:ios:dev":"ubrn build ios --and-generate","build:web:dev":"ubrn build web","build:android:dev":"ubrn build android --and-generate","format:check:rust":"cargo fmt --manifest-path rust/Cargo.toml --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8b8f6eb-e528-4fa1-9e6d-0a54be3aab90"}},"_resolved":"/home/runner/work/_temp/package/anomaorg-arm-bindings-0.3.0.tgz","_integrity":"sha512-jydYFJaSxnpmFtVV19qjQKlnt0LwagHytaS5y8bCjHtQ0S0A2M0djwQ9Iak/IfDCD7PFIWd3JWLZ2XZBpFRiyg==","repository":{"url":"git+https://github.com/anoma/anoma-app-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Wasm bindings for arm-risc0","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@ubjs/core":"0.31.0-3"},"codegenConfig":{"name":"ArmBindingsSpec","type":"modules","android":{"javaPackageName":"net.anoma"},"jsSrcsDir":"generated","outputDir":{"ios":"ios/generated"}},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.5","uniffi-bindgen-react-native":"0.31.0-3"},"peerDependencies":{"react-native":">=0.79"},"peerDependenciesMeta":{"react-native":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/arm-bindings_0.3.0_1787072742332_0.2914234044643864","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@anomaorg/arm-bindings","version":"0.3.1","description":"Wasm bindings for arm-risc0","license":"Apache-2.0","author":{"name":"Anoma"},"homepage":"https://anoma.net","repository":{"type":"git","url":"git+https://github.com/anoma/anoma-app-sdk.git"},"type":"module","main":"./index","types":"./bundled/dist/index.d.ts","publishConfig":{"access":"public","provenance":true},"scripts":{"build":"pnpm clean && pnpm build:android && pnpm build:ios && pnpm build:web && pnpm build:ts","build:dev":"pnpm clean && pnpm build:ios:dev && pnpm build:android:dev && pnpm build:web:dev","build:android":"ubrn build android --and-generate --release","build:android:dev":"ubrn build android --and-generate","build:ios":"ubrn build ios --and-generate --release","build:ios:dev":"ubrn build ios --and-generate","build:web":"ubrn build web --release","build:web:dev":"ubrn build web","build:ts":"tsdown","clean":"rm -rf generated bundled/dist cpp android ios *.podspec *.xcframework","typecheck":"tsc --noEmit","smoke":"node scripts/smoke.mjs","lint:rust":"cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings","format:check:rust":"cargo fmt --manifest-path rust/Cargo.toml --check"},"dependencies":{"@ubjs/core":"0.31.0-5","uniffi-bindgen-react-native":"0.31.0-5"},"devDependencies":{"tsdown":"^0.21.5"},"peerDependencies":{"react-native":">=0.79"},"peerDependenciesMeta":{"react-native":{"optional":true}},"codegenConfig":{"name":"ArmBindingsSpec","type":"modules","jsSrcsDir":"generated","outputDir":{"ios":"ios/generated"},"android":{"javaPackageName":"net.anoma"}},"_id":"@anomaorg/arm-bindings@0.3.1","bugs":{"url":"https://github.com/anoma/anoma-app-sdk/issues"},"_integrity":"sha512-FUq5V1CHpZqLEvFmEJBHL1lFy9gA07iHDFvbB7Ll6SqdJmpEQgT0zWK5GlgwwrwtDr89ADPivRM2jQvodvzW/A==","_resolved":"/home/runner/work/_temp/package/anomaorg-arm-bindings-0.3.1.tgz","_from":"file:/home/runner/work/_temp/package/anomaorg-arm-bindings-0.3.1.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-FUq5V1CHpZqLEvFmEJBHL1lFy9gA07iHDFvbB7Ll6SqdJmpEQgT0zWK5GlgwwrwtDr89ADPivRM2jQvodvzW/A==","shasum":"7c5382f67be3febe256702175c7f926a560e9d69","tarball":"https://registry.npmjs.org/@anomaorg/arm-bindings/-/arm-bindings-0.3.1.tgz","fileCount":36,"unpackedSize":88382326,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anomaorg%2farm-bindings@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCWfpmZaV8SEbeLhZu4Jl9CeBsrwIEqOHxW9WcYPrFbXQIhAJhSS7caqSG8uS2h8FyRARoAv+1wG197k8UUUTnj9rEU"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8b8f6eb-e528-4fa1-9e6d-0a54be3aab90"}},"directories":{},"maintainers":[{"name":"prznd","email":"pedro@heliax.dev"},{"name":"justinevans","email":"justin@heliax.dev"},{"name":"harri-heliax","email":"harrison@heliax.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arm-bindings_0.3.1_1787580089776_0.9579435823221862"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T18:17:14.346Z","modified":"2026-08-24T14:01:30.669Z","0.1.0":"2026-08-12T18:17:14.704Z","0.2.0":"2026-08-13T15:10:18.436Z","0.3.0":"2026-08-18T17:05:42.842Z","0.3.1":"2026-08-24T14:01:30.226Z"},"bugs":{"url":"https://github.com/anoma/anoma-app-sdk/issues"},"author":{"name":"Anoma"},"license":"Apache-2.0","homepage":"https://anoma.net","repository":{"type":"git","url":"git+https://github.com/anoma/anoma-app-sdk.git"},"description":"Wasm bindings for arm-risc0","maintainers":[{"name":"prznd","email":"pedro@heliax.dev"},{"name":"justinevans","email":"justin@heliax.dev"},{"name":"harri-heliax","email":"harrison@heliax.dev"}],"readme":"# @anomaorg/arm-bindings\n\nWebAssembly bindings for [`anoma-rm-risc0`](https://github.com/anoma), the Anoma\nresource machine. Provides resources, digests, nullifier keys, authorization\nsignatures, Merkle trees and encryption primitives to TypeScript.\n\nShips three targets from one Rust crate: wasm for browsers and Node, and\nuniffi/JSI bindings for React Native on iOS and Android.\n\n## Install\n\n```bash\npnpm add @anomaorg/arm-bindings\n```\n\n## Usage\n\nThe wasm module must be initialised once before any binding is used.\n\n```ts\nimport { initArmBindings, Digest, randomBytes } from \"@anomaorg/arm-bindings\";\n\nawait initArmBindings();\n\nconst nonce = Digest.fromBytes(randomBytes());\nconsole.log(nonce.toHex());\n```\n\n## Platform entries\n\n`main` is `./index`, deliberately without an extension: that is what makes\nMetro probe for platform variants, so Expo picks up `index.native.js` on iOS\nand Android and `index.web.js` on web, while every other bundler and Node fall\nthrough to `index.js`. There is no `exports` map, because Metro honours it in\npreference to `main` and would then skip the probing.\n\n| Entry             | Resolved by                     | Backing bindings         |\n| ----------------- | ------------------------------- | ------------------------ |\n| `index.js`        | Vite, webpack, Rollup, Node     | `bundled/dist`           |\n| `index.web.js`    | Metro, platform web             | `generated/index.web`    |\n| `index.native.js` | Metro, platform ios and android | `generated/index.native` |\n\nOnly the first is pre-compiled. Metro reads `generated/` as TypeScript source,\nso the wasm and `react-native` imports ubrn wrote stay untouched; every other\ntoolchain needs the built ESM in `bundled/dist`.\n\nDo not add a `browser` field. Vite's default `resolve.mainFields` and Expo's\n`resolverMainFields` both read it before `main`, so it would hand the\nMetro-only web entry to Vite.\n\nExpo web additionally needs the wasm registered as an asset, since\n`generated/index.web` imports it as one:\n\n```js\nconfig.resolver.assetExts.push(\"wasm\");\n```\n\n## Web bundlers\n\n`initArmBindings()` locates the wasm binary relative to the module's own URL, so\nbundlers that understand `new URL(..., import.meta.url)` (Vite, webpack 5,\nRollup) resolve it without extra configuration.\n\nOne exception: `vite dev` pre-bundles dependencies into\n`node_modules/.vite/deps/`, which moves that URL out from under the binary.\nExclude the package to keep the path intact — `vite build` is unaffected.\n\n```typescript\nexport default defineConfig({\n  optimizeDeps: { exclude: [\"@anomaorg/arm-bindings\"] },\n});\n```\n\n## Building from source\n\nRequires a Rust toolchain and the `wasm-bindgen` CLI, pinned in\n[`wasm-cargo-patch.toml`](./wasm-cargo-patch.toml).\n\n```bash\npnpm build          # release wasm + optimise + bundle\npnpm build:dev      # debug wasm, no optimise\npnpm smoke          # load the built bundle and round-trip a digest\n```\n\n[`scripts/smoke.mjs`](./scripts/smoke.mjs) imports `bundled/dist` exactly as a\nconsumer would, so it fails if the wasm lookup or the published `files` list\nbreaks.\n\nThree directories, one crate. [`rust/`](./rust) is the crate itself.\n`ubrn build web` generates the TypeScript bindings into `generated/`, and\nThe release profile in\n[`wasm-cargo-patch.toml`](./wasm-cargo-patch.toml) keeps it small. `tsdown` then bundles\n[`bundled/index.ts`](./bundled/index.ts) into `bundled/dist`. Neither\n`generated/` nor `bundled/dist` is committed.\n\n`ubrn build ios` and `ubrn build android` emit the native halves — the\nxcframework, `cpp/`, `ios/`, `android/` and the podspec — likewise generated,\nlikewise not committed.\n\nThe wasm-bindgen crate version is pinned in\n[`wasm-cargo-patch.toml`](./wasm-cargo-patch.toml) and must be bumped together\nwith the CLI version installed in\n[`.github/workflows/ci-arm-bindings.yml`](../.github/workflows/ci-arm-bindings.yml).\n\n## License\n\n[Apache-2.0](./LICENSE).\n","readmeFilename":"README.md"}