50382553c2
Add the missing Tauri command layer for the node-families contract and switch
the wallet's real provider onto it (node-families-real-ipc groups 1-3, docs).
Rust command layer (src-tauri/src/operations/families/):
- execute.rs: 9 state-changing commands over NodeFamiliesSigningClient, auto/
simulated gas; create_family attaches create_family_fee as base-denom funds.
Returns TransactionExecuteResult (family_events omitted per D2 - the provider
refreshAll()s reads after every execute).
- query.rs: 9 reads over NodeFamiliesQueryClient, normalised at the IPC boundary
to the wallet shapes in src/types/families.ts: base Coin -> display DecCoin
(paid_fee, create_family_fee), per-page contract envelopes -> { items,
start_next_after }, cw_serde tagged FamilyInvitationStatus -> { kind, at }.
get_family_config reads raw contract state at the "config" key (no smart query).
- Registered all 18 commands in main.rs; added the contract-common path dep.
- cargo build + cargo clippy clean.
Provider wiring:
- Replace the controlledNodeIds = [] stub in FamiliesContextProvider with a
derivation from useBondingContext().bondedNode ([nodeId]/[mixId]/[]); wrap the
/family route in BondingContextProvider (it is per-route, not global). D3.
- Fix the requests/families.ts execute bindings to pass camelCase arg keys
(Tauri maps JS camelCase -> Rust snake_case params).
Types reconciliation + drift guard:
- Fix the generated FamilyInvitationStatus `at` field (bigint -> number) and
export the 18 generated family types from the @nymproject/types barrel.
- Add src/types/families.contract-guard.ts: tsc-checked assertions locking the
wallet families types against the ts-rs-generated contract types; IPC-normalised
fields excluded with documented reasons.
Docs: real-IPC path + guarded sandbox write-flow procedure in e2e/README.md;
design D3 one-bonded-node-per-account note; parent change 9.4/9.5 cross-ref;
update_family arg shape confirmed against the contract (6.2).
Families Jest suites green; contract guard passes. Remaining sandbox read/write
smokes (3.3, groups 4-5) need a wired native build + sandbox + the funded test
account, tracked in tasks.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Nym Typescript (and Javascript) packages
This directory has shared Typescript (and Javascript) libraries using yarn workspaces.
Why ts-packages?
Naming stuff is hard. The ts- part means Typescript, because this monorepo also contains Rust crates. So we needed some way to indicate: "put your Typescript here".
Now you know! So, please, put your Typescript here. And your Javascript.
How does it work?
In the root of this repository is package.json that specifies an array of globs for packages that are shared:
{
"name": "@nymproject/nymsphere",
"version": "1.0.0",
"private": true,
"license": "Apache 2.0",
"workspaces": ["ts-packages/*", "nym-wallet"] <-------
}
There are some caveats:
- this only works with
yarnand notnpm yarncreates a singlenode_modulesin the root for shared dependencies- packages that use shared packages, need to be in a path specified in
workspaces - local packages take precedence over published packages on
npm
Building
From the root of the repository run:
yarn
yarn build
This will build all libraries.
Now you can try out react-webpack-with-theme-example by running:
cd ts-packages/react-webpack-with-theme-example
yarn start
Our React components have a Storybook in react-components:
cd ts-packages/react-components
yarn storybook
Development
Watch mode is available in some packages with yarn watch.
See mui-theme for an example.