Installation
Pattern
Every client follows the same three-step pattern:1. Validate and initialize from a shyconfig
initializeFromShyConfig calls assertXManifest internally. It throws a descriptive error if the manifest is missing required fields, specifies an unsupported contract version, or declares an incompatible identity mode. Initialization is idempotent.
2. Build a transaction envelope
3. Submit
txJson to the configured API endpoint. castX convenience methods combine build + submit in one call.
Shared concepts
Identity commitment
Every client delegates identity commitment construction toidentityClient.createIdentityCommitment. The resulting commitment is a deterministic hash:
source is the provider-specific identifier (personId for Didit, walletAddress for wallet, subjectId for Identus).
Identity proof hash
A separateproofHash binds the commitment to a specific verification workflow:
identity block of the shyconfig and the caller’s input — no network call required.
Write-only posture
WhenresolveEffectivePosture determines that write-only mode is active, the receipt store is suppressed: match_store is treated as "none" and user_access as "never". Build methods still produce valid transaction envelopes; submit still works. The participant submits anonymously with no local state retained after the transaction confirms.
Web is structurally write-only for high-assurance deployments. This is not merely because browsers lack a Play Integrity or App Attest equivalent — it is because web cannot provide a trusted hostile-environment negative. In deployments that set write_only_on_hostile_network: true, the runtime must supply a verified signal that the network is not hostile (no VPN, client IP not in the high_risk_region_blocklist). A browser has no trusted mechanism to produce this signal; any check at the browser layer is trivially spoofable by the adversary whose presence the check is meant to detect. Native mobile — iOS App Attest + OS-level VPN detection, or Android Play Integrity + ConnectivityManager — is the only client surface that can provide both the device-integrity signal and the network-hostility negative required to authorize recoverable posture.
Client modules
| Module | Contract version | Main export |
|---|---|---|
votingClient.js | shyvoting-v1 | createVotingClient, initializeFromShyConfig |
sharesClient.js | shyshares-v1 | createSharesClient, initializeFromShyConfig |
custodyClient.js | shycustody-v1 | createCustodyClient, initializeFromShyConfig |
contractsClient.js | shycontracts-v1 | createFinancingClient, initializeFromShyConfig |
wireClient.js | shywire-v1 | createWireClient, initializeFromShyConfig |
identityClient.js | all | createIdentityResolver |
zkpClient.js | shyvoting-v1 (ZK tier) | initZKProver, generateProof |